diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java index 943121d4..f4c528d7 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java @@ -34,8 +34,8 @@ *
  * 
  * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- *   MetadataName name = MetadataName.ofMetadataName();
- *   Metadata response = alphaAnalyticsDataClient.getMetadata(name);
+ *   RunReportRequest request = RunReportRequest.newBuilder().build();
+ *   RunReportResponse response = alphaAnalyticsDataClient.runReport(request);
  * }
  * 
  * 
@@ -325,74 +325,23 @@ public final BatchRunPivotReportsResponse batchRunPivotReports( * dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and * deletions may occur. * - *

Sample code: - * - *


-   * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
-   *   MetadataName name = MetadataName.ofMetadataName();
-   *   Metadata response = alphaAnalyticsDataClient.getMetadata(name);
-   * }
-   * 
- * - * @param name Required. The name of the metadata to retrieve. Either has the form 'metadata' or - * 'properties/{property}/metadata'. This name field is specified in the URL path and not URL - * parameters. Property is a numeric Google Analytics App + Web Property Id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Metadata getMetadata(MetadataName name) { - GetMetadataRequest request = - GetMetadataRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getMetadata(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the - * dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and - * deletions may occur. - * - *

Sample code: - * - *


-   * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
-   *   MetadataName name = MetadataName.ofMetadataName();
-   *   Metadata response = alphaAnalyticsDataClient.getMetadata(name.toString());
-   * }
-   * 
- * - * @param name Required. The name of the metadata to retrieve. Either has the form 'metadata' or - * 'properties/{property}/metadata'. This name field is specified in the URL path and not URL - * parameters. Property is a numeric Google Analytics App + Web Property Id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Metadata getMetadata(String name) { - GetMetadataRequest request = GetMetadataRequest.newBuilder().setName(name).build(); - return getMetadata(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the - * dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and - * deletions may occur. + *

This method returns Universal Metadata. Universal Metadata are dimensions and metrics + * applicable to any property such as `country` and `totalUsers`. * *

Sample code: * *


    * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
-   *   MetadataName name = MetadataName.ofMetadataName();
-   *   GetMetadataRequest request = GetMetadataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   Metadata response = alphaAnalyticsDataClient.getMetadata(request);
+   *   GetUniversalMetadataRequest request = GetUniversalMetadataRequest.newBuilder().build();
+   *   UniversalMetadata response = alphaAnalyticsDataClient.getUniversalMetadata(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Metadata getMetadata(GetMetadataRequest request) { - return getMetadataCallable().call(request); + public final UniversalMetadata getUniversalMetadata(GetUniversalMetadataRequest request) { + return getUniversalMetadataCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -401,22 +350,23 @@ public final Metadata getMetadata(GetMetadataRequest request) { * dimensions and metrics. Dimensions and metrics will be mostly added over time, but renames and * deletions may occur. * + *

This method returns Universal Metadata. Universal Metadata are dimensions and metrics + * applicable to any property such as `country` and `totalUsers`. + * *

Sample code: * *


    * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
-   *   MetadataName name = MetadataName.ofMetadataName();
-   *   GetMetadataRequest request = GetMetadataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Metadata> future = alphaAnalyticsDataClient.getMetadataCallable().futureCall(request);
+   *   GetUniversalMetadataRequest request = GetUniversalMetadataRequest.newBuilder().build();
+   *   ApiFuture<UniversalMetadata> future = alphaAnalyticsDataClient.getUniversalMetadataCallable().futureCall(request);
    *   // Do something
-   *   Metadata response = future.get();
+   *   UniversalMetadata response = future.get();
    * }
    * 
*/ - public final UnaryCallable getMetadataCallable() { - return stub.getMetadataCallable(); + public final UnaryCallable + getUniversalMetadataCallable() { + return stub.getUniversalMetadataCallable(); } @Override diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java index 5d7c1b7c..0d2c3224 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java @@ -45,16 +45,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of getMetadata to 30 seconds: + *

For example, to set the total timeout of runReport to 30 seconds: * *

  * 
  * AlphaAnalyticsDataSettings.Builder alphaAnalyticsDataSettingsBuilder =
  *     AlphaAnalyticsDataSettings.newBuilder();
  * alphaAnalyticsDataSettingsBuilder
- *     .getMetadataSettings()
+ *     .runReportSettings()
  *     .setRetrySettings(
- *         alphaAnalyticsDataSettingsBuilder.getMetadataSettings().getRetrySettings().toBuilder()
+ *         alphaAnalyticsDataSettingsBuilder.runReportSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AlphaAnalyticsDataSettings alphaAnalyticsDataSettings = alphaAnalyticsDataSettingsBuilder.build();
@@ -86,9 +86,10 @@ public UnaryCallSettings runPivot
     return ((AlphaAnalyticsDataStubSettings) getStubSettings()).batchRunPivotReportsSettings();
   }
 
-  /** Returns the object with the settings used for calls to getMetadata. */
-  public UnaryCallSettings getMetadataSettings() {
-    return ((AlphaAnalyticsDataStubSettings) getStubSettings()).getMetadataSettings();
+  /** Returns the object with the settings used for calls to getUniversalMetadata. */
+  public UnaryCallSettings
+      getUniversalMetadataSettings() {
+    return ((AlphaAnalyticsDataStubSettings) getStubSettings()).getUniversalMetadataSettings();
   }
 
   public static final AlphaAnalyticsDataSettings create(AlphaAnalyticsDataStubSettings stub)
@@ -211,9 +212,10 @@ public UnaryCallSettings.Builder runReportS
       return getStubSettingsBuilder().batchRunPivotReportsSettings();
     }
 
-    /** Returns the builder for the settings used for calls to getMetadata. */
-    public UnaryCallSettings.Builder getMetadataSettings() {
-      return getStubSettingsBuilder().getMetadataSettings();
+    /** Returns the builder for the settings used for calls to getUniversalMetadata. */
+    public UnaryCallSettings.Builder
+        getUniversalMetadataSettings() {
+      return getStubSettingsBuilder().getUniversalMetadataSettings();
     }
 
     @Override
diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java
index f76c1e60..8376daf5 100644
--- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java
+++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java
@@ -28,8 +28,8 @@
  * 
  * 
  * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- *   MetadataName name = MetadataName.ofMetadataName();
- *   Metadata response = alphaAnalyticsDataClient.getMetadata(name);
+ *   RunReportRequest request = RunReportRequest.newBuilder().build();
+ *   RunReportResponse response = alphaAnalyticsDataClient.runReport(request);
  * }
  * 
  * 
diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java index 1fc623a0..10a4d658 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java @@ -19,12 +19,12 @@ import com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse; import com.google.analytics.data.v1alpha.BatchRunReportsRequest; import com.google.analytics.data.v1alpha.BatchRunReportsResponse; -import com.google.analytics.data.v1alpha.GetMetadataRequest; -import com.google.analytics.data.v1alpha.Metadata; +import com.google.analytics.data.v1alpha.GetUniversalMetadataRequest; import com.google.analytics.data.v1alpha.RunPivotReportRequest; import com.google.analytics.data.v1alpha.RunPivotReportResponse; import com.google.analytics.data.v1alpha.RunReportRequest; import com.google.analytics.data.v1alpha.RunReportResponse; +import com.google.analytics.data.v1alpha.UniversalMetadata; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; @@ -57,8 +57,9 @@ public UnaryCallable batchRunRe throw new UnsupportedOperationException("Not implemented: batchRunPivotReportsCallable()"); } - public UnaryCallable getMetadataCallable() { - throw new UnsupportedOperationException("Not implemented: getMetadataCallable()"); + public UnaryCallable + getUniversalMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: getUniversalMetadataCallable()"); } @Override diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java index 6c7777a0..443ac3cf 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java @@ -19,12 +19,12 @@ import com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse; import com.google.analytics.data.v1alpha.BatchRunReportsRequest; import com.google.analytics.data.v1alpha.BatchRunReportsResponse; -import com.google.analytics.data.v1alpha.GetMetadataRequest; -import com.google.analytics.data.v1alpha.Metadata; +import com.google.analytics.data.v1alpha.GetUniversalMetadataRequest; import com.google.analytics.data.v1alpha.RunPivotReportRequest; import com.google.analytics.data.v1alpha.RunPivotReportResponse; import com.google.analytics.data.v1alpha.RunReportRequest; import com.google.analytics.data.v1alpha.RunReportResponse; +import com.google.analytics.data.v1alpha.UniversalMetadata; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; import com.google.api.gax.core.GaxProperties; @@ -64,16 +64,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of getMetadata to 30 seconds: + *

For example, to set the total timeout of runReport to 30 seconds: * *

  * 
  * AlphaAnalyticsDataStubSettings.Builder alphaAnalyticsDataSettingsBuilder =
  *     AlphaAnalyticsDataStubSettings.newBuilder();
  * alphaAnalyticsDataSettingsBuilder
- *     .getMetadataSettings()
+ *     .runReportSettings()
  *     .setRetrySettings(
- *         alphaAnalyticsDataSettingsBuilder.getMetadataSettings().getRetrySettings().toBuilder()
+ *         alphaAnalyticsDataSettingsBuilder.runReportSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AlphaAnalyticsDataStubSettings alphaAnalyticsDataSettings = alphaAnalyticsDataSettingsBuilder.build();
@@ -97,7 +97,8 @@ public class AlphaAnalyticsDataStubSettings extends StubSettings
       batchRunPivotReportsSettings;
-  private final UnaryCallSettings getMetadataSettings;
+  private final UnaryCallSettings
+      getUniversalMetadataSettings;
 
   /** Returns the object with the settings used for calls to runReport. */
   public UnaryCallSettings runReportSettings() {
@@ -121,9 +122,10 @@ public UnaryCallSettings runPivot
     return batchRunPivotReportsSettings;
   }
 
-  /** Returns the object with the settings used for calls to getMetadata. */
-  public UnaryCallSettings getMetadataSettings() {
-    return getMetadataSettings;
+  /** Returns the object with the settings used for calls to getUniversalMetadata. */
+  public UnaryCallSettings
+      getUniversalMetadataSettings() {
+    return getUniversalMetadataSettings;
   }
 
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
@@ -199,7 +201,7 @@ protected AlphaAnalyticsDataStubSettings(Builder settingsBuilder) throws IOExcep
     runPivotReportSettings = settingsBuilder.runPivotReportSettings().build();
     batchRunReportsSettings = settingsBuilder.batchRunReportsSettings().build();
     batchRunPivotReportsSettings = settingsBuilder.batchRunPivotReportsSettings().build();
-    getMetadataSettings = settingsBuilder.getMetadataSettings().build();
+    getUniversalMetadataSettings = settingsBuilder.getUniversalMetadataSettings().build();
   }
 
   /** Builder for AlphaAnalyticsDataStubSettings. */
@@ -215,7 +217,8 @@ public static class Builder
     private final UnaryCallSettings.Builder<
             BatchRunPivotReportsRequest, BatchRunPivotReportsResponse>
         batchRunPivotReportsSettings;
-    private final UnaryCallSettings.Builder getMetadataSettings;
+    private final UnaryCallSettings.Builder
+        getUniversalMetadataSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -276,7 +279,7 @@ protected Builder(ClientContext clientContext) {
 
       batchRunPivotReportsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      getMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      getUniversalMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
@@ -284,7 +287,7 @@ protected Builder(ClientContext clientContext) {
               runPivotReportSettings,
               batchRunReportsSettings,
               batchRunPivotReportsSettings,
-              getMetadataSettings);
+              getUniversalMetadataSettings);
 
       initDefaults(this);
     }
@@ -321,7 +324,7 @@ private static Builder initDefaults(Builder builder) {
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       builder
-          .getMetadataSettings()
+          .getUniversalMetadataSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
 
@@ -335,7 +338,7 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) {
       runPivotReportSettings = settings.runPivotReportSettings.toBuilder();
       batchRunReportsSettings = settings.batchRunReportsSettings.toBuilder();
       batchRunPivotReportsSettings = settings.batchRunPivotReportsSettings.toBuilder();
-      getMetadataSettings = settings.getMetadataSettings.toBuilder();
+      getUniversalMetadataSettings = settings.getUniversalMetadataSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
@@ -343,7 +346,7 @@ protected Builder(AlphaAnalyticsDataStubSettings settings) {
               runPivotReportSettings,
               batchRunReportsSettings,
               batchRunPivotReportsSettings,
-              getMetadataSettings);
+              getUniversalMetadataSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -385,9 +388,10 @@ public UnaryCallSettings.Builder runReportS
       return batchRunPivotReportsSettings;
     }
 
-    /** Returns the builder for the settings used for calls to getMetadata. */
-    public UnaryCallSettings.Builder getMetadataSettings() {
-      return getMetadataSettings;
+    /** Returns the builder for the settings used for calls to getUniversalMetadata. */
+    public UnaryCallSettings.Builder
+        getUniversalMetadataSettings() {
+      return getUniversalMetadataSettings;
     }
 
     @Override
diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java
index d5e8088a..9acc5c5a 100644
--- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java
+++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java
@@ -19,25 +19,22 @@
 import com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse;
 import com.google.analytics.data.v1alpha.BatchRunReportsRequest;
 import com.google.analytics.data.v1alpha.BatchRunReportsResponse;
-import com.google.analytics.data.v1alpha.GetMetadataRequest;
-import com.google.analytics.data.v1alpha.Metadata;
+import com.google.analytics.data.v1alpha.GetUniversalMetadataRequest;
 import com.google.analytics.data.v1alpha.RunPivotReportRequest;
 import com.google.analytics.data.v1alpha.RunPivotReportResponse;
 import com.google.analytics.data.v1alpha.RunReportRequest;
 import com.google.analytics.data.v1alpha.RunReportResponse;
+import com.google.analytics.data.v1alpha.UniversalMetadata;
 import com.google.api.core.BetaApi;
 import com.google.api.gax.core.BackgroundResource;
 import com.google.api.gax.core.BackgroundResourceAggregation;
 import com.google.api.gax.grpc.GrpcCallSettings;
 import com.google.api.gax.grpc.GrpcStubCallableFactory;
 import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.RequestParamsExtractor;
 import com.google.api.gax.rpc.UnaryCallable;
-import com.google.common.collect.ImmutableMap;
 import io.grpc.MethodDescriptor;
 import io.grpc.protobuf.ProtoUtils;
 import java.io.IOException;
-import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import javax.annotation.Generated;
 
@@ -90,13 +87,16 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(BatchRunPivotReportsResponse.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor getMetadataMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.analytics.data.v1alpha.AlphaAnalyticsData/GetMetadata")
-          .setRequestMarshaller(ProtoUtils.marshaller(GetMetadataRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Metadata.getDefaultInstance()))
-          .build();
+  private static final MethodDescriptor
+      getUniversalMetadataMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.analytics.data.v1alpha.AlphaAnalyticsData/GetUniversalMetadata")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(GetUniversalMetadataRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(UniversalMetadata.getDefaultInstance()))
+              .build();
 
   private final BackgroundResource backgroundResources;
 
@@ -106,7 +106,8 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub {
       batchRunReportsCallable;
   private final UnaryCallable
       batchRunPivotReportsCallable;
-  private final UnaryCallable getMetadataCallable;
+  private final UnaryCallable
+      getUniversalMetadataCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -168,19 +169,11 @@ protected GrpcAlphaAnalyticsDataStub(
             GrpcCallSettings.newBuilder()
                 .setMethodDescriptor(batchRunPivotReportsMethodDescriptor)
                 .build();
-    GrpcCallSettings getMetadataTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(getMetadataMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(GetMetadataRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
+    GrpcCallSettings
+        getUniversalMetadataTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(getUniversalMetadataMethodDescriptor)
+                .build();
 
     this.runReportCallable =
         callableFactory.createUnaryCallable(
@@ -196,9 +189,11 @@ public Map extract(GetMetadataRequest request) {
             batchRunPivotReportsTransportSettings,
             settings.batchRunPivotReportsSettings(),
             clientContext);
-    this.getMetadataCallable =
+    this.getUniversalMetadataCallable =
         callableFactory.createUnaryCallable(
-            getMetadataTransportSettings, settings.getMetadataSettings(), clientContext);
+            getUniversalMetadataTransportSettings,
+            settings.getUniversalMetadataSettings(),
+            clientContext);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
@@ -220,8 +215,9 @@ public UnaryCallable batchRunRe
     return batchRunPivotReportsCallable;
   }
 
-  public UnaryCallable getMetadataCallable() {
-    return getMetadataCallable;
+  public UnaryCallable
+      getUniversalMetadataCallable() {
+    return getUniversalMetadataCallable;
   }
 
   @Override
diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java
index 76cee39d..9c304a93 100644
--- a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java
+++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java
@@ -77,7 +77,9 @@ public void tearDown() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void runReportTest() {
-    RunReportResponse expectedResponse = RunReportResponse.newBuilder().build();
+    int rowCount = 1340416618;
+    RunReportResponse expectedResponse =
+        RunReportResponse.newBuilder().setRowCount(rowCount).build();
     mockAlphaAnalyticsData.addResponse(expectedResponse);
 
     RunReportRequest request = RunReportRequest.newBuilder().build();
@@ -225,21 +227,19 @@ public void batchRunPivotReportsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getMetadataTest() {
-    MetadataName name2 = MetadataName.ofMetadataName();
-    Metadata expectedResponse = Metadata.newBuilder().setName(name2.toString()).build();
+  public void getUniversalMetadataTest() {
+    UniversalMetadata expectedResponse = UniversalMetadata.newBuilder().build();
     mockAlphaAnalyticsData.addResponse(expectedResponse);
 
-    MetadataName name = MetadataName.ofMetadataName();
+    GetUniversalMetadataRequest request = GetUniversalMetadataRequest.newBuilder().build();
 
-    Metadata actualResponse = client.getMetadata(name);
+    UniversalMetadata actualResponse = client.getUniversalMetadata(request);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockAlphaAnalyticsData.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetMetadataRequest actualRequest = (GetMetadataRequest) actualRequests.get(0);
+    GetUniversalMetadataRequest actualRequest = (GetUniversalMetadataRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, MetadataName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -248,14 +248,14 @@ public void getMetadataTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getMetadataExceptionTest() throws Exception {
+  public void getUniversalMetadataExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockAlphaAnalyticsData.addException(exception);
 
     try {
-      MetadataName name = MetadataName.ofMetadataName();
+      GetUniversalMetadataRequest request = GetUniversalMetadataRequest.newBuilder().build();
 
-      client.getMetadata(name);
+      client.getUniversalMetadata(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java
index 5343c74e..79fb7e80 100644
--- a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java
+++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java
@@ -118,11 +118,12 @@ public void batchRunPivotReports(
   }
 
   @Override
-  public void getMetadata(GetMetadataRequest request, StreamObserver responseObserver) {
+  public void getUniversalMetadata(
+      GetUniversalMetadataRequest request, StreamObserver responseObserver) {
     Object response = responses.remove();
-    if (response instanceof Metadata) {
+    if (response instanceof UniversalMetadata) {
       requests.add(request);
-      responseObserver.onNext((Metadata) response);
+      responseObserver.onNext((UniversalMetadata) response);
       responseObserver.onCompleted();
     } else if (response instanceof Exception) {
       responseObserver.onError((Exception) response);
diff --git a/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java b/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java
index 26d62f76..cc61ce92 100644
--- a/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java
+++ b/grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java
@@ -231,49 +231,53 @@ private AlphaAnalyticsDataGrpc() {}
   }
 
   private static volatile io.grpc.MethodDescriptor<
-          com.google.analytics.data.v1alpha.GetMetadataRequest,
-          com.google.analytics.data.v1alpha.Metadata>
-      getGetMetadataMethod;
+          com.google.analytics.data.v1alpha.GetUniversalMetadataRequest,
+          com.google.analytics.data.v1alpha.UniversalMetadata>
+      getGetUniversalMetadataMethod;
 
   @io.grpc.stub.annotations.RpcMethod(
-      fullMethodName = SERVICE_NAME + '/' + "GetMetadata",
-      requestType = com.google.analytics.data.v1alpha.GetMetadataRequest.class,
-      responseType = com.google.analytics.data.v1alpha.Metadata.class,
+      fullMethodName = SERVICE_NAME + '/' + "GetUniversalMetadata",
+      requestType = com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.class,
+      responseType = com.google.analytics.data.v1alpha.UniversalMetadata.class,
       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
   public static io.grpc.MethodDescriptor<
-          com.google.analytics.data.v1alpha.GetMetadataRequest,
-          com.google.analytics.data.v1alpha.Metadata>
-      getGetMetadataMethod() {
+          com.google.analytics.data.v1alpha.GetUniversalMetadataRequest,
+          com.google.analytics.data.v1alpha.UniversalMetadata>
+      getGetUniversalMetadataMethod() {
     io.grpc.MethodDescriptor<
-            com.google.analytics.data.v1alpha.GetMetadataRequest,
-            com.google.analytics.data.v1alpha.Metadata>
-        getGetMetadataMethod;
-    if ((getGetMetadataMethod = AlphaAnalyticsDataGrpc.getGetMetadataMethod) == null) {
+            com.google.analytics.data.v1alpha.GetUniversalMetadataRequest,
+            com.google.analytics.data.v1alpha.UniversalMetadata>
+        getGetUniversalMetadataMethod;
+    if ((getGetUniversalMetadataMethod = AlphaAnalyticsDataGrpc.getGetUniversalMetadataMethod)
+        == null) {
       synchronized (AlphaAnalyticsDataGrpc.class) {
-        if ((getGetMetadataMethod = AlphaAnalyticsDataGrpc.getGetMetadataMethod) == null) {
-          AlphaAnalyticsDataGrpc.getGetMetadataMethod =
-              getGetMetadataMethod =
+        if ((getGetUniversalMetadataMethod = AlphaAnalyticsDataGrpc.getGetUniversalMetadataMethod)
+            == null) {
+          AlphaAnalyticsDataGrpc.getGetUniversalMetadataMethod =
+              getGetUniversalMetadataMethod =
                   io.grpc.MethodDescriptor
-                      .
+                      .
                           newBuilder()
                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
-                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadata"))
+                      .setFullMethodName(
+                          generateFullMethodName(SERVICE_NAME, "GetUniversalMetadata"))
                       .setSampledToLocalTracing(true)
                       .setRequestMarshaller(
                           io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.analytics.data.v1alpha.GetMetadataRequest
+                              com.google.analytics.data.v1alpha.GetUniversalMetadataRequest
                                   .getDefaultInstance()))
                       .setResponseMarshaller(
                           io.grpc.protobuf.ProtoUtils.marshaller(
-                              com.google.analytics.data.v1alpha.Metadata.getDefaultInstance()))
+                              com.google.analytics.data.v1alpha.UniversalMetadata
+                                  .getDefaultInstance()))
                       .setSchemaDescriptor(
-                          new AlphaAnalyticsDataMethodDescriptorSupplier("GetMetadata"))
+                          new AlphaAnalyticsDataMethodDescriptorSupplier("GetUniversalMetadata"))
                       .build();
         }
       }
     }
-    return getGetMetadataMethod;
+    return getGetUniversalMetadataMethod;
   }
 
   /** Creates a new async stub that supports all call types for the service */
@@ -401,12 +405,15 @@ public void batchRunPivotReports(
      * Returns metadata for dimensions and metrics available in reporting methods.
      * Used to explore the dimensions and metrics. Dimensions and metrics will be
      * mostly added over time, but renames and deletions may occur.
+     * This method returns Universal Metadata. Universal Metadata are dimensions
+     * and metrics applicable to any property such as `country` and `totalUsers`.
      * 
*/ - public void getMetadata( - com.google.analytics.data.v1alpha.GetMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetMetadataMethod(), responseObserver); + public void getUniversalMetadata( + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetUniversalMetadataMethod(), responseObserver); } @java.lang.Override @@ -441,11 +448,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse>( this, METHODID_BATCH_RUN_PIVOT_REPORTS))) .addMethod( - getGetMetadataMethod(), + getGetUniversalMetadataMethod(), asyncUnaryCall( new MethodHandlers< - com.google.analytics.data.v1alpha.GetMetadataRequest, - com.google.analytics.data.v1alpha.Metadata>(this, METHODID_GET_METADATA))) + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest, + com.google.analytics.data.v1alpha.UniversalMetadata>( + this, METHODID_GET_UNIVERSAL_METADATA))) .build(); } } @@ -554,13 +562,16 @@ public void batchRunPivotReports( * Returns metadata for dimensions and metrics available in reporting methods. * Used to explore the dimensions and metrics. Dimensions and metrics will be * mostly added over time, but renames and deletions may occur. + * This method returns Universal Metadata. Universal Metadata are dimensions + * and metrics applicable to any property such as `country` and `totalUsers`. *
*/ - public void getMetadata( - com.google.analytics.data.v1alpha.GetMetadataRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getUniversalMetadata( + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest request, + io.grpc.stub.StreamObserver + responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetMetadataMethod(), getCallOptions()), + getChannel().newCall(getGetUniversalMetadataMethod(), getCallOptions()), request, responseObserver); } @@ -654,11 +665,14 @@ public com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse batchRunPi * Returns metadata for dimensions and metrics available in reporting methods. * Used to explore the dimensions and metrics. Dimensions and metrics will be * mostly added over time, but renames and deletions may occur. + * This method returns Universal Metadata. Universal Metadata are dimensions + * and metrics applicable to any property such as `country` and `totalUsers`. * */ - public com.google.analytics.data.v1alpha.Metadata getMetadata( - com.google.analytics.data.v1alpha.GetMetadataRequest request) { - return blockingUnaryCall(getChannel(), getGetMetadataMethod(), getCallOptions(), request); + public com.google.analytics.data.v1alpha.UniversalMetadata getUniversalMetadata( + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest request) { + return blockingUnaryCall( + getChannel(), getGetUniversalMetadataMethod(), getCallOptions(), request); } } @@ -756,13 +770,16 @@ protected AlphaAnalyticsDataFutureStub build( * Returns metadata for dimensions and metrics available in reporting methods. * Used to explore the dimensions and metrics. Dimensions and metrics will be * mostly added over time, but renames and deletions may occur. + * This method returns Universal Metadata. Universal Metadata are dimensions + * and metrics applicable to any property such as `country` and `totalUsers`. * */ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.data.v1alpha.Metadata> - getMetadata(com.google.analytics.data.v1alpha.GetMetadataRequest request) { + com.google.analytics.data.v1alpha.UniversalMetadata> + getUniversalMetadata( + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest request) { return futureUnaryCall( - getChannel().newCall(getGetMetadataMethod(), getCallOptions()), request); + getChannel().newCall(getGetUniversalMetadataMethod(), getCallOptions()), request); } } @@ -770,7 +787,7 @@ protected AlphaAnalyticsDataFutureStub build( private static final int METHODID_RUN_PIVOT_REPORT = 1; private static final int METHODID_BATCH_RUN_REPORTS = 2; private static final int METHODID_BATCH_RUN_PIVOT_REPORTS = 3; - private static final int METHODID_GET_METADATA = 4; + private static final int METHODID_GET_UNIVERSAL_METADATA = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -816,10 +833,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.analytics.data.v1alpha.BatchRunPivotReportsResponse>) responseObserver); break; - case METHODID_GET_METADATA: - serviceImpl.getMetadata( - (com.google.analytics.data.v1alpha.GetMetadataRequest) request, - (io.grpc.stub.StreamObserver) + case METHODID_GET_UNIVERSAL_METADATA: + serviceImpl.getUniversalMetadata( + (com.google.analytics.data.v1alpha.GetUniversalMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: @@ -890,7 +907,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRunPivotReportMethod()) .addMethod(getBatchRunReportsMethod()) .addMethod(getBatchRunPivotReportsMethod()) - .addMethod(getGetMetadataMethod()) + .addMethod(getGetUniversalMetadataMethod()) .build(); } } diff --git a/proto-google-analytics-data-v1alpha/pom.xml b/proto-google-analytics-data-v1alpha/pom.xml index 8eb02d05..31019c7f 100644 --- a/proto-google-analytics-data-v1alpha/pom.xml +++ b/proto-google-analytics-data-v1alpha/pom.xml @@ -21,14 +21,6 @@ com.google.api.grpc proto-google-common-protos - - com.google.guava - guava - - - com.google.api - api-common - diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java index 1a14ae53..1765cc0d 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java @@ -27,10 +27,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_data_v1alpha_Metadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_data_v1alpha_Metadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -64,9 +60,13 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor; + internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_data_v1alpha_GetMetadataRequest_fieldAccessorTable; + internal_static_google_analytics_data_v1alpha_UniversalMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -81,115 +81,111 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1alpha\032(google/analytics/data/v1alpha/d" + "ata.proto\032\034google/api/annotations.proto\032" + "\027google/api/client.proto\032\037google/api/fie" - + "ld_behavior.proto\032\031google/api/resource.p" - + "roto\"\364\001\n\010Metadata\022\014\n\004name\030\003 \001(\t\022D\n\ndimen" - + "sions\030\001 \003(\01320.google.analytics.data.v1al" - + "pha.DimensionMetadata\022>\n\007metrics\030\002 \003(\0132-" - + ".google.analytics.data.v1alpha.MetricMet" - + "adata:T\352AQ\n%analyticsdata.googleapis.com" - + "/Metadata\022\010metadata\022\036properties/{propert" - + "y}/metadata\"\311\005\n\020RunReportRequest\0225\n\006enti" - + "ty\030\001 \001(\0132%.google.analytics.data.v1alpha" - + ".Entity\022<\n\ndimensions\030\002 \003(\0132(.google.ana" - + "lytics.data.v1alpha.Dimension\0226\n\007metrics" - + "\030\003 \003(\0132%.google.analytics.data.v1alpha.M" - + "etric\022=\n\013date_ranges\030\004 \003(\0132(.google.anal" - + "ytics.data.v1alpha.DateRange\022\016\n\006offset\030\005" - + " \001(\003\022\r\n\005limit\030\006 \001(\003\022M\n\023metric_aggregatio" - + "ns\030\007 \003(\01620.google.analytics.data.v1alpha" - + ".MetricAggregation\022I\n\020dimension_filter\030\010" - + " \001(\0132/.google.analytics.data.v1alpha.Fil" - + "terExpression\022F\n\rmetric_filter\030\t \001(\0132/.g" - + "oogle.analytics.data.v1alpha.FilterExpre" - + "ssion\0229\n\torder_bys\030\n \003(\0132&.google.analyt" - + "ics.data.v1alpha.OrderBy\022\025\n\rcurrency_cod" - + "e\030\013 \001(\t\022>\n\013cohort_spec\030\014 \001(\0132).google.an" - + "alytics.data.v1alpha.CohortSpec\022\027\n\017keep_" - + "empty_rows\030\r \001(\010\022\035\n\025return_property_quot" - + "a\030\016 \001(\010\"\376\003\n\021RunReportResponse\022I\n\021dimensi" - + "on_headers\030\013 \003(\0132..google.analytics.data" - + ".v1alpha.DimensionHeader\022C\n\016metric_heade" - + "rs\030\001 \003(\0132+.google.analytics.data.v1alpha" - + ".MetricHeader\0220\n\004rows\030\002 \003(\0132\".google.ana" - + "lytics.data.v1alpha.Row\0222\n\006totals\030\010 \003(\0132" - + "\".google.analytics.data.v1alpha.Row\0224\n\010m" - + "aximums\030\t \003(\0132\".google.analytics.data.v1" - + "alpha.Row\0224\n\010minimums\030\n \003(\0132\".google.ana" - + "lytics.data.v1alpha.Row\022A\n\010metadata\030\006 \001(" - + "\0132/.google.analytics.data.v1alpha.Respon" - + "seMetaData\022D\n\016property_quota\030\007 \001(\0132,.goo" - + "gle.analytics.data.v1alpha.PropertyQuota" - + "\"\333\004\n\025RunPivotReportRequest\0225\n\006entity\030\001 \001" - + "(\0132%.google.analytics.data.v1alpha.Entit" - + "y\022<\n\ndimensions\030\002 \003(\0132(.google.analytics" - + ".data.v1alpha.Dimension\0226\n\007metrics\030\003 \003(\013" - + "2%.google.analytics.data.v1alpha.Metric\022" - + "I\n\020dimension_filter\030\004 \001(\0132/.google.analy" - + "tics.data.v1alpha.FilterExpression\022F\n\rme" - + "tric_filter\030\005 \001(\0132/.google.analytics.dat" - + "a.v1alpha.FilterExpression\0224\n\006pivots\030\006 \003" - + "(\0132$.google.analytics.data.v1alpha.Pivot" - + "\022=\n\013date_ranges\030\007 \003(\0132(.google.analytics" - + ".data.v1alpha.DateRange\022\025\n\rcurrency_code" - + "\030\010 \001(\t\022>\n\013cohort_spec\030\t \001(\0132).google.ana" - + "lytics.data.v1alpha.CohortSpec\022\027\n\017keep_e" - + "mpty_rows\030\n \001(\010\022\035\n\025return_property_quota" - + "\030\013 \001(\010\"\336\003\n\026RunPivotReportResponse\022A\n\rpiv" - + "ot_headers\030\001 \003(\0132*.google.analytics.data" - + ".v1alpha.PivotHeader\022I\n\021dimension_header" - + "s\030\007 \003(\0132..google.analytics.data.v1alpha." - + "DimensionHeader\022C\n\016metric_headers\030\002 \003(\0132" - + "+.google.analytics.data.v1alpha.MetricHe" - + "ader\0220\n\004rows\030\003 \003(\0132\".google.analytics.da" - + "ta.v1alpha.Row\0226\n\naggregates\030\004 \003(\0132\".goo" - + "gle.analytics.data.v1alpha.Row\022A\n\010metada" - + "ta\030\005 \001(\0132/.google.analytics.data.v1alpha" - + ".ResponseMetaData\022D\n\016property_quota\030\006 \001(" - + "\0132,.google.analytics.data.v1alpha.Proper" - + "tyQuota\"\222\001\n\026BatchRunReportsRequest\0225\n\006en" - + "tity\030\001 \001(\0132%.google.analytics.data.v1alp" - + "ha.Entity\022A\n\010requests\030\002 \003(\0132/.google.ana" - + "lytics.data.v1alpha.RunReportRequest\"\\\n\027" - + "BatchRunReportsResponse\022A\n\007reports\030\001 \003(\013" - + "20.google.analytics.data.v1alpha.RunRepo" - + "rtResponse\"\234\001\n\033BatchRunPivotReportsReque" - + "st\0225\n\006entity\030\001 \001(\0132%.google.analytics.da" - + "ta.v1alpha.Entity\022F\n\010requests\030\002 \003(\01324.go" - + "ogle.analytics.data.v1alpha.RunPivotRepo" - + "rtRequest\"l\n\034BatchRunPivotReportsRespons" - + "e\022L\n\rpivot_reports\030\001 \003(\01325.google.analyt" - + "ics.data.v1alpha.RunPivotReportResponse\"" - + "Q\n\022GetMetadataRequest\022;\n\004name\030\001 \001(\tB-\340A\002" - + "\372A\'\n%analyticsdata.googleapis.com/Metada" - + "ta2\352\007\n\022AlphaAnalyticsData\022\215\001\n\tRunReport\022" - + "/.google.analytics.data.v1alpha.RunRepor" - + "tRequest\0320.google.analytics.data.v1alpha" - + ".RunReportResponse\"\035\202\323\344\223\002\027\"\022/v1alpha:run" - + "Report:\001*\022\241\001\n\016RunPivotReport\0224.google.an" - + "alytics.data.v1alpha.RunPivotReportReque" - + "st\0325.google.analytics.data.v1alpha.RunPi" - + "votReportResponse\"\"\202\323\344\223\002\034\"\027/v1alpha:runP" - + "ivotReport:\001*\022\245\001\n\017BatchRunReports\0225.goog" - + "le.analytics.data.v1alpha.BatchRunReport" - + "sRequest\0326.google.analytics.data.v1alpha" - + ".BatchRunReportsResponse\"#\202\323\344\223\002\035\"\030/v1alp" - + "ha:batchRunReports:\001*\022\271\001\n\024BatchRunPivotR" - + "eports\022:.google.analytics.data.v1alpha.B" - + "atchRunPivotReportsRequest\032;.google.anal" - + "ytics.data.v1alpha.BatchRunPivotReportsR" - + "esponse\"(\202\323\344\223\002\"\"\035/v1alpha:batchRunPivotR" - + "eports:\001*\022\273\001\n\013GetMetadata\0221.google.analy" - + "tics.data.v1alpha.GetMetadataRequest\032\'.g" - + "oogle.analytics.data.v1alpha.Metadata\"P\202" - + "\323\344\223\002C\022\030/v1alpha/{name=metadata}Z\'\022%/v1al" - + "pha/{name=properties/*/metadata}\332A\004name\032" - + "~\312A\034analyticsdata.googleapis.com\322A\\https" - + "://www.googleapis.com/auth/analytics,htt" - + "ps://www.googleapis.com/auth/analytics.r" - + "eadonlyB\177\n!com.google.analytics.data.v1a" - + "lphaB\025AnalyticsDataApiProtoP\001ZAgoogle.go" - + "lang.org/genproto/googleapis/analytics/d" - + "ata/v1alpha;datab\006proto3" + + "ld_behavior.proto\"\311\005\n\020RunReportRequest\0225" + + "\n\006entity\030\001 \001(\0132%.google.analytics.data.v" + + "1alpha.Entity\022<\n\ndimensions\030\002 \003(\0132(.goog" + + "le.analytics.data.v1alpha.Dimension\0226\n\007m" + + "etrics\030\003 \003(\0132%.google.analytics.data.v1a" + + "lpha.Metric\022=\n\013date_ranges\030\004 \003(\0132(.googl" + + "e.analytics.data.v1alpha.DateRange\022\016\n\006of" + + "fset\030\005 \001(\003\022\r\n\005limit\030\006 \001(\003\022M\n\023metric_aggr" + + "egations\030\007 \003(\01620.google.analytics.data.v" + + "1alpha.MetricAggregation\022I\n\020dimension_fi" + + "lter\030\010 \001(\0132/.google.analytics.data.v1alp" + + "ha.FilterExpression\022F\n\rmetric_filter\030\t \001" + + "(\0132/.google.analytics.data.v1alpha.Filte" + + "rExpression\0229\n\torder_bys\030\n \003(\0132&.google." + + "analytics.data.v1alpha.OrderBy\022\025\n\rcurren" + + "cy_code\030\013 \001(\t\022>\n\013cohort_spec\030\014 \001(\0132).goo" + + "gle.analytics.data.v1alpha.CohortSpec\022\027\n" + + "\017keep_empty_rows\030\r \001(\010\022\035\n\025return_propert" + + "y_quota\030\016 \001(\010\"\221\004\n\021RunReportResponse\022I\n\021d" + + "imension_headers\030\013 \003(\0132..google.analytic" + + "s.data.v1alpha.DimensionHeader\022C\n\016metric" + + "_headers\030\001 \003(\0132+.google.analytics.data.v" + + "1alpha.MetricHeader\0220\n\004rows\030\002 \003(\0132\".goog" + + "le.analytics.data.v1alpha.Row\0222\n\006totals\030" + + "\010 \003(\0132\".google.analytics.data.v1alpha.Ro" + + "w\0224\n\010maximums\030\t \003(\0132\".google.analytics.d" + + "ata.v1alpha.Row\0224\n\010minimums\030\n \003(\0132\".goog" + + "le.analytics.data.v1alpha.Row\022\021\n\trow_cou" + + "nt\030\014 \001(\005\022A\n\010metadata\030\006 \001(\0132/.google.anal" + + "ytics.data.v1alpha.ResponseMetaData\022D\n\016p" + + "roperty_quota\030\007 \001(\0132,.google.analytics.d" + + "ata.v1alpha.PropertyQuota\"\333\004\n\025RunPivotRe" + + "portRequest\0225\n\006entity\030\001 \001(\0132%.google.ana" + + "lytics.data.v1alpha.Entity\022<\n\ndimensions" + + "\030\002 \003(\0132(.google.analytics.data.v1alpha.D" + + "imension\0226\n\007metrics\030\003 \003(\0132%.google.analy" + + "tics.data.v1alpha.Metric\022I\n\020dimension_fi" + + "lter\030\004 \001(\0132/.google.analytics.data.v1alp" + + "ha.FilterExpression\022F\n\rmetric_filter\030\005 \001" + + "(\0132/.google.analytics.data.v1alpha.Filte" + + "rExpression\0224\n\006pivots\030\006 \003(\0132$.google.ana" + + "lytics.data.v1alpha.Pivot\022=\n\013date_ranges" + + "\030\007 \003(\0132(.google.analytics.data.v1alpha.D" + + "ateRange\022\025\n\rcurrency_code\030\010 \001(\t\022>\n\013cohor" + + "t_spec\030\t \001(\0132).google.analytics.data.v1a" + + "lpha.CohortSpec\022\027\n\017keep_empty_rows\030\n \001(\010" + + "\022\035\n\025return_property_quota\030\013 \001(\010\"\336\003\n\026RunP" + + "ivotReportResponse\022A\n\rpivot_headers\030\001 \003(" + + "\0132*.google.analytics.data.v1alpha.PivotH" + + "eader\022I\n\021dimension_headers\030\007 \003(\0132..googl" + + "e.analytics.data.v1alpha.DimensionHeader" + + "\022C\n\016metric_headers\030\002 \003(\0132+.google.analyt" + + "ics.data.v1alpha.MetricHeader\0220\n\004rows\030\003 " + + "\003(\0132\".google.analytics.data.v1alpha.Row\022" + + "6\n\naggregates\030\004 \003(\0132\".google.analytics.d" + + "ata.v1alpha.Row\022A\n\010metadata\030\005 \001(\0132/.goog" + + "le.analytics.data.v1alpha.ResponseMetaDa" + + "ta\022D\n\016property_quota\030\006 \001(\0132,.google.anal" + + "ytics.data.v1alpha.PropertyQuota\"\222\001\n\026Bat" + + "chRunReportsRequest\0225\n\006entity\030\001 \001(\0132%.go" + + "ogle.analytics.data.v1alpha.Entity\022A\n\010re" + + "quests\030\002 \003(\0132/.google.analytics.data.v1a" + + "lpha.RunReportRequest\"\\\n\027BatchRunReports" + + "Response\022A\n\007reports\030\001 \003(\01320.google.analy" + + "tics.data.v1alpha.RunReportResponse\"\234\001\n\033" + + "BatchRunPivotReportsRequest\0225\n\006entity\030\001 " + + "\001(\0132%.google.analytics.data.v1alpha.Enti" + + "ty\022F\n\010requests\030\002 \003(\01324.google.analytics." + + "data.v1alpha.RunPivotReportRequest\"l\n\034Ba" + + "tchRunPivotReportsResponse\022L\n\rpivot_repo" + + "rts\030\001 \003(\01325.google.analytics.data.v1alph" + + "a.RunPivotReportResponse\"\035\n\033GetUniversal" + + "MetadataRequest\"\231\001\n\021UniversalMetadata\022D\n" + + "\ndimensions\030\001 \003(\01320.google.analytics.dat" + + "a.v1alpha.DimensionMetadata\022>\n\007metrics\030\002" + + " \003(\0132-.google.analytics.data.v1alpha.Met" + + "ricMetadata2\327\007\n\022AlphaAnalyticsData\022\215\001\n\tR" + + "unReport\022/.google.analytics.data.v1alpha" + + ".RunReportRequest\0320.google.analytics.dat" + + "a.v1alpha.RunReportResponse\"\035\202\323\344\223\002\027\"\022/v1" + + "alpha:runReport:\001*\022\241\001\n\016RunPivotReport\0224." + + "google.analytics.data.v1alpha.RunPivotRe" + + "portRequest\0325.google.analytics.data.v1al" + + "pha.RunPivotReportResponse\"\"\202\323\344\223\002\034\"\027/v1a" + + "lpha:runPivotReport:\001*\022\245\001\n\017BatchRunRepor" + + "ts\0225.google.analytics.data.v1alpha.Batch" + + "RunReportsRequest\0326.google.analytics.dat" + + "a.v1alpha.BatchRunReportsResponse\"#\202\323\344\223\002" + + "\035\"\030/v1alpha:batchRunReports:\001*\022\271\001\n\024Batch" + + "RunPivotReports\022:.google.analytics.data." + + "v1alpha.BatchRunPivotReportsRequest\032;.go" + + "ogle.analytics.data.v1alpha.BatchRunPivo" + + "tReportsResponse\"(\202\323\344\223\002\"\"\035/v1alpha:batch" + + "RunPivotReports:\001*\022\250\001\n\024GetUniversalMetad" + + "ata\022:.google.analytics.data.v1alpha.GetU" + + "niversalMetadataRequest\0320.google.analyti" + + "cs.data.v1alpha.UniversalMetadata\"\"\202\323\344\223\002" + + "\034\022\032/v1alpha/universalMetadata\032~\312A\034analyt" + + "icsdata.googleapis.com\322A\\https://www.goo" + + "gleapis.com/auth/analytics,https://www.g" + + "oogleapis.com/auth/analytics.readonlyB\177\n" + + "!com.google.analytics.data.v1alphaB\025Anal" + + "yticsDataApiProtoP\001ZAgoogle.golang.org/g" + + "enproto/googleapis/analytics/data/v1alph" + + "a;datab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -199,18 +195,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - }); - internal_static_google_analytics_data_v1alpha_Metadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_analytics_data_v1alpha_Metadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_data_v1alpha_Metadata_descriptor, - new java.lang.String[] { - "Name", "Dimensions", "Metrics", }); internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(0); internal_static_google_analytics_data_v1alpha_RunReportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunReportRequest_descriptor, @@ -231,7 +218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReturnPropertyQuota", }); internal_static_google_analytics_data_v1alpha_RunReportResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(1); internal_static_google_analytics_data_v1alpha_RunReportResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunReportResponse_descriptor, @@ -242,11 +229,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Totals", "Maximums", "Minimums", + "RowCount", "Metadata", "PropertyQuota", }); internal_static_google_analytics_data_v1alpha_RunPivotReportRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(2); internal_static_google_analytics_data_v1alpha_RunPivotReportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunPivotReportRequest_descriptor, @@ -264,7 +252,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReturnPropertyQuota", }); internal_static_google_analytics_data_v1alpha_RunPivotReportResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(3); internal_static_google_analytics_data_v1alpha_RunPivotReportResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_RunPivotReportResponse_descriptor, @@ -278,7 +266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PropertyQuota", }); internal_static_google_analytics_data_v1alpha_BatchRunReportsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(4); internal_static_google_analytics_data_v1alpha_BatchRunReportsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_BatchRunReportsRequest_descriptor, @@ -286,7 +274,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entity", "Requests", }); internal_static_google_analytics_data_v1alpha_BatchRunReportsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(5); internal_static_google_analytics_data_v1alpha_BatchRunReportsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_BatchRunReportsResponse_descriptor, @@ -294,7 +282,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Reports", }); internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(6); internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsRequest_descriptor, @@ -302,37 +290,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entity", "Requests", }); internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(7); internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_BatchRunPivotReportsResponse_descriptor, new java.lang.String[] { "PivotReports", }); - internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor = + internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor, + new java.lang.String[] {}); + internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor = getDescriptor().getMessageTypes().get(9); - internal_static_google_analytics_data_v1alpha_GetMetadataRequest_fieldAccessorTable = + internal_static_google_analytics_data_v1alpha_UniversalMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor, + internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor, new java.lang.String[] { - "Name", + "Dimensions", "Metrics", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.analytics.data.v1alpha.ReportingApiProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java deleted file mode 100644 index 3badee4d..00000000 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/data/v1alpha/analytics_data_api.proto - -package com.google.analytics.data.v1alpha; - -public interface GetMetadataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.GetMetadataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the metadata to retrieve. Either has the form
-   * 'metadata' or 'properties/{property}/metadata'. This name field is
-   * specified in the URL path and not URL parameters. Property is a numeric
-   * Google Analytics App + Web Property Id.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The name of the metadata to retrieve. Either has the form
-   * 'metadata' or 'properties/{property}/metadata'. This name field is
-   * specified in the URL path and not URL parameters. Property is a numeric
-   * Google Analytics App + Web Property Id.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequest.java similarity index 50% rename from proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java rename to proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequest.java index be5ad3ef..81322c1f 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequest.java @@ -22,29 +22,27 @@ * * *
- * Request for dimension and metric metadata.
+ * Request for the universal dimension and metric metadata.
  * 
* - * Protobuf type {@code google.analytics.data.v1alpha.GetMetadataRequest} + * Protobuf type {@code google.analytics.data.v1alpha.GetUniversalMetadataRequest} */ -public final class GetMetadataRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetUniversalMetadataRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.GetMetadataRequest) - GetMetadataRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.GetUniversalMetadataRequest) + GetUniversalMetadataRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetMetadataRequest.newBuilder() to construct. - private GetMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetUniversalMetadataRequest.newBuilder() to construct. + private GetUniversalMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetMetadataRequest() { - name_ = ""; - } + private GetUniversalMetadataRequest() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetMetadataRequest(); + return new GetUniversalMetadataRequest(); } @java.lang.Override @@ -52,7 +50,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetMetadataRequest( + private GetUniversalMetadataRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -70,13 +68,6 @@ private GetMetadataRequest( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -98,76 +89,17 @@ private GetMetadataRequest( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor; + .internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_GetMetadataRequest_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.GetMetadataRequest.class, - com.google.analytics.data.v1alpha.GetMetadataRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the metadata to retrieve. Either has the form
-   * 'metadata' or 'properties/{property}/metadata'. This name field is
-   * specified in the URL path and not URL parameters. Property is a numeric
-   * Google Analytics App + Web Property Id.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the metadata to retrieve. Either has the form
-   * 'metadata' or 'properties/{property}/metadata'. This name field is
-   * specified in the URL path and not URL parameters. Property is a numeric
-   * Google Analytics App + Web Property Id.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.class, + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.Builder.class); } private byte memoizedIsInitialized = -1; @@ -184,9 +116,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } unknownFields.writeTo(output); } @@ -196,9 +125,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -209,13 +135,12 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.data.v1alpha.GetMetadataRequest)) { + if (!(obj instanceof com.google.analytics.data.v1alpha.GetUniversalMetadataRequest)) { return super.equals(obj); } - com.google.analytics.data.v1alpha.GetMetadataRequest other = - (com.google.analytics.data.v1alpha.GetMetadataRequest) obj; + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest other = + (com.google.analytics.data.v1alpha.GetUniversalMetadataRequest) obj; - if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -227,78 +152,76 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom(byte[] data) + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest parseFrom( + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -315,7 +238,8 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.analytics.data.v1alpha.GetMetadataRequest prototype) { + public static Builder newBuilder( + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -333,31 +257,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for dimension and metric metadata.
+   * Request for the universal dimension and metric metadata.
    * 
* - * Protobuf type {@code google.analytics.data.v1alpha.GetMetadataRequest} + * Protobuf type {@code google.analytics.data.v1alpha.GetUniversalMetadataRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.GetMetadataRequest) - com.google.analytics.data.v1alpha.GetMetadataRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.GetUniversalMetadataRequest) + com.google.analytics.data.v1alpha.GetUniversalMetadataRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor; + .internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_GetMetadataRequest_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.GetMetadataRequest.class, - com.google.analytics.data.v1alpha.GetMetadataRequest.Builder.class); + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.class, + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.Builder.class); } - // Construct using com.google.analytics.data.v1alpha.GetMetadataRequest.newBuilder() + // Construct using com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -374,25 +298,24 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - name_ = ""; - return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_GetMetadataRequest_descriptor; + .internal_static_google_analytics_data_v1alpha_GetUniversalMetadataRequest_descriptor; } @java.lang.Override - public com.google.analytics.data.v1alpha.GetMetadataRequest getDefaultInstanceForType() { - return com.google.analytics.data.v1alpha.GetMetadataRequest.getDefaultInstance(); + public com.google.analytics.data.v1alpha.GetUniversalMetadataRequest + getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.data.v1alpha.GetMetadataRequest build() { - com.google.analytics.data.v1alpha.GetMetadataRequest result = buildPartial(); + public com.google.analytics.data.v1alpha.GetUniversalMetadataRequest build() { + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -400,10 +323,9 @@ public com.google.analytics.data.v1alpha.GetMetadataRequest build() { } @java.lang.Override - public com.google.analytics.data.v1alpha.GetMetadataRequest buildPartial() { - com.google.analytics.data.v1alpha.GetMetadataRequest result = - new com.google.analytics.data.v1alpha.GetMetadataRequest(this); - result.name_ = name_; + public com.google.analytics.data.v1alpha.GetUniversalMetadataRequest buildPartial() { + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest result = + new com.google.analytics.data.v1alpha.GetUniversalMetadataRequest(this); onBuilt(); return result; } @@ -443,21 +365,18 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.data.v1alpha.GetMetadataRequest) { - return mergeFrom((com.google.analytics.data.v1alpha.GetMetadataRequest) other); + if (other instanceof com.google.analytics.data.v1alpha.GetUniversalMetadataRequest) { + return mergeFrom((com.google.analytics.data.v1alpha.GetUniversalMetadataRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.data.v1alpha.GetMetadataRequest other) { - if (other == com.google.analytics.data.v1alpha.GetMetadataRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.analytics.data.v1alpha.GetUniversalMetadataRequest other) { + if (other + == com.google.analytics.data.v1alpha.GetUniversalMetadataRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -473,12 +392,13 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.analytics.data.v1alpha.GetMetadataRequest parsedMessage = null; + com.google.analytics.data.v1alpha.GetUniversalMetadataRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.analytics.data.v1alpha.GetMetadataRequest) e.getUnfinishedMessage(); + (com.google.analytics.data.v1alpha.GetUniversalMetadataRequest) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -488,137 +408,6 @@ public Builder mergeFrom( return this; } - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the metadata to retrieve. Either has the form
-     * 'metadata' or 'properties/{property}/metadata'. This name field is
-     * specified in the URL path and not URL parameters. Property is a numeric
-     * Google Analytics App + Web Property Id.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the metadata to retrieve. Either has the form
-     * 'metadata' or 'properties/{property}/metadata'. This name field is
-     * specified in the URL path and not URL parameters. Property is a numeric
-     * Google Analytics App + Web Property Id.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the metadata to retrieve. Either has the form
-     * 'metadata' or 'properties/{property}/metadata'. This name field is
-     * specified in the URL path and not URL parameters. Property is a numeric
-     * Google Analytics App + Web Property Id.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the metadata to retrieve. Either has the form
-     * 'metadata' or 'properties/{property}/metadata'. This name field is
-     * specified in the URL path and not URL parameters. Property is a numeric
-     * Google Analytics App + Web Property Id.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the metadata to retrieve. Either has the form
-     * 'metadata' or 'properties/{property}/metadata'. This name field is
-     * specified in the URL path and not URL parameters. Property is a numeric
-     * Google Analytics App + Web Property Id.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -630,42 +419,43 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.GetMetadataRequest) + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.GetUniversalMetadataRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.GetMetadataRequest) - private static final com.google.analytics.data.v1alpha.GetMetadataRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.GetUniversalMetadataRequest) + private static final com.google.analytics.data.v1alpha.GetUniversalMetadataRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.GetMetadataRequest(); + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.GetUniversalMetadataRequest(); } - public static com.google.analytics.data.v1alpha.GetMetadataRequest getDefaultInstance() { + public static com.google.analytics.data.v1alpha.GetUniversalMetadataRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetMetadataRequest parsePartialFrom( + public GetUniversalMetadataRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetMetadataRequest(input, extensionRegistry); + return new GetUniversalMetadataRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.data.v1alpha.GetMetadataRequest getDefaultInstanceForType() { + public com.google.analytics.data.v1alpha.GetUniversalMetadataRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequestOrBuilder.java new file mode 100644 index 00000000..573ecb65 --- /dev/null +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequestOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1alpha/analytics_data_api.proto + +package com.google.analytics.data.v1alpha; + +public interface GetUniversalMetadataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.GetUniversalMetadataRequest) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java deleted file mode 100644 index ec4a0649..00000000 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.analytics.data.v1alpha; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class MetadataName implements ResourceName { - - @Deprecated - protected MetadataName() {} - - private static final String METADATA_FIXED_VALUE = "metadata"; - private static final MetadataName METADATA_INSTANCE = new MetadataName("metadata"); - private static final PathTemplate PROPERTY_METADATA_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("properties/{property}/metadata"); - - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - - private String property; - - public String getProperty() { - return property; - } - - private MetadataName(PropertyMetadataBuilder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - pathTemplate = PROPERTY_METADATA_PATH_TEMPLATE; - } - - private MetadataName(String fixedValue) { - this.fixedValue = fixedValue; - fieldValuesMap = ImmutableMap.of("", fixedValue); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static PropertyMetadataBuilder newPropertyMetadataBuilder() { - return new PropertyMetadataBuilder(); - } - - public static MetadataName of(String metadata) { - return METADATA_INSTANCE; - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static MetadataName ofMetadataName() { - return METADATA_INSTANCE; - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static MetadataName ofPropertyMetadataName(String property) { - return newPropertyMetadataBuilder().setProperty(property).build(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatMetadataName() { - return METADATA_FIXED_VALUE; - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatPropertyMetadataName(String property) { - return newPropertyMetadataBuilder().setProperty(property).build().toString(); - } - - public static MetadataName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (METADATA_FIXED_VALUE.equals(formattedString)) { - return METADATA_INSTANCE; - } else if (PROPERTY_METADATA_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = PROPERTY_METADATA_PATH_TEMPLATE.match(formattedString); - return ofPropertyMetadataName(matchMap.get("property")); - } - throw new ValidationException("JobName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (MetadataName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return METADATA_FIXED_VALUE.equals(formattedString) - || PROPERTY_METADATA_PATH_TEMPLATE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (property != null) { - fieldMapBuilder.put("property", property); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - /** Builder for properties/{property}/metadata. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class PropertyMetadataBuilder { - - private String property; - - private PropertyMetadataBuilder() {} - - public String getProperty() { - return property; - } - - public PropertyMetadataBuilder setProperty(String property) { - this.property = property; - return this; - } - - public MetadataName build() { - return new MetadataName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - MetadataName that = (MetadataName) o; - return (Objects.equals(this.property, that.property)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(property); - return h; - } -} diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeader.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeader.java index 99ea9418..536dc93a 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeader.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeader.java @@ -216,7 +216,9 @@ public com.google.analytics.data.v1alpha.PivotDimensionHeader getPivotDimensionH * * *
-   * The cardinality of the pivot as if offset = 0 and limit = -1.
+   * The cardinality of the pivot as if offset = 0 and limit = -1. The total
+   * number of rows for this pivot's fields regardless of how the parameters
+   * offset and limit are specified in the request.
    * 
* * int32 row_count = 2; @@ -1028,7 +1030,9 @@ public Builder removePivotDimensionHeaders(int index) { * * *
-     * The cardinality of the pivot as if offset = 0 and limit = -1.
+     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
+     * number of rows for this pivot's fields regardless of how the parameters
+     * offset and limit are specified in the request.
      * 
* * int32 row_count = 2; @@ -1043,7 +1047,9 @@ public int getRowCount() { * * *
-     * The cardinality of the pivot as if offset = 0 and limit = -1.
+     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
+     * number of rows for this pivot's fields regardless of how the parameters
+     * offset and limit are specified in the request.
      * 
* * int32 row_count = 2; @@ -1061,7 +1067,9 @@ public Builder setRowCount(int value) { * * *
-     * The cardinality of the pivot as if offset = 0 and limit = -1.
+     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
+     * number of rows for this pivot's fields regardless of how the parameters
+     * offset and limit are specified in the request.
      * 
* * int32 row_count = 2; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeaderOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeaderOrBuilder.java index 106b6b21..a6cbb2fb 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeaderOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/PivotHeaderOrBuilder.java @@ -91,7 +91,9 @@ com.google.analytics.data.v1alpha.PivotDimensionHeaderOrBuilder getPivotDimensio * * *
-   * The cardinality of the pivot as if offset = 0 and limit = -1.
+   * The cardinality of the pivot as if offset = 0 and limit = -1. The total
+   * number of rows for this pivot's fields regardless of how the parameters
+   * offset and limit are specified in the request.
    * 
* * int32 row_count = 2; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java index 222b96b7..751c4c24 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java @@ -178,6 +178,11 @@ private RunReportResponse( extensionRegistry)); break; } + case 96: + { + rowCount_ = input.readInt32(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -657,6 +662,27 @@ public com.google.analytics.data.v1alpha.RowOrBuilder getMinimumsOrBuilder(int i return minimums_.get(index); } + public static final int ROW_COUNT_FIELD_NUMBER = 12; + private int rowCount_; + /** + * + * + *
+   * The total number of rows in the query result, regardless of the number of
+   * rows returned in the response. For example if a query returns 175 rows and
+   * includes limit = 50 in the API request, the response will contain row_count
+   * = 175 but only 50 rows.
+   * 
+ * + * int32 row_count = 12; + * + * @return The rowCount. + */ + @java.lang.Override + public int getRowCount() { + return rowCount_; + } + public static final int METADATA_FIELD_NUMBER = 6; private com.google.analytics.data.v1alpha.ResponseMetaData metadata_; /** @@ -791,6 +817,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < dimensionHeaders_.size(); i++) { output.writeMessage(11, dimensionHeaders_.get(i)); } + if (rowCount_ != 0) { + output.writeInt32(12, rowCount_); + } unknownFields.writeTo(output); } @@ -825,6 +854,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, dimensionHeaders_.get(i)); } + if (rowCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, rowCount_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -847,6 +879,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTotalsList().equals(other.getTotalsList())) return false; if (!getMaximumsList().equals(other.getMaximumsList())) return false; if (!getMinimumsList().equals(other.getMinimumsList())) return false; + if (getRowCount() != other.getRowCount()) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata().equals(other.getMetadata())) return false; @@ -890,6 +923,8 @@ public int hashCode() { hash = (37 * hash) + MINIMUMS_FIELD_NUMBER; hash = (53 * hash) + getMinimumsList().hashCode(); } + hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRowCount(); if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); @@ -1086,6 +1121,8 @@ public Builder clear() { } else { minimumsBuilder_.clear(); } + rowCount_ = 0; + if (metadataBuilder_ == null) { metadata_ = null; } else { @@ -1180,6 +1217,7 @@ public com.google.analytics.data.v1alpha.RunReportResponse buildPartial() { } else { result.minimums_ = minimumsBuilder_.build(); } + result.rowCount_ = rowCount_; if (metadataBuilder_ == null) { result.metadata_ = metadata_; } else { @@ -1402,6 +1440,9 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.RunReportResponse oth } } } + if (other.getRowCount() != 0) { + setRowCount(other.getRowCount()); + } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } @@ -3589,6 +3630,67 @@ public java.util.List getMinimums return minimumsBuilder_; } + private int rowCount_; + /** + * + * + *
+     * The total number of rows in the query result, regardless of the number of
+     * rows returned in the response. For example if a query returns 175 rows and
+     * includes limit = 50 in the API request, the response will contain row_count
+     * = 175 but only 50 rows.
+     * 
+ * + * int32 row_count = 12; + * + * @return The rowCount. + */ + @java.lang.Override + public int getRowCount() { + return rowCount_; + } + /** + * + * + *
+     * The total number of rows in the query result, regardless of the number of
+     * rows returned in the response. For example if a query returns 175 rows and
+     * includes limit = 50 in the API request, the response will contain row_count
+     * = 175 but only 50 rows.
+     * 
+ * + * int32 row_count = 12; + * + * @param value The rowCount to set. + * @return This builder for chaining. + */ + public Builder setRowCount(int value) { + + rowCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of rows in the query result, regardless of the number of
+     * rows returned in the response. For example if a query returns 175 rows and
+     * includes limit = 50 in the API request, the response will contain row_count
+     * = 175 but only 50 rows.
+     * 
+ * + * int32 row_count = 12; + * + * @return This builder for chaining. + */ + public Builder clearRowCount() { + + rowCount_ = 0; + onChanged(); + return this; + } + private com.google.analytics.data.v1alpha.ResponseMetaData metadata_; private com.google.protobuf.SingleFieldBuilderV3< com.google.analytics.data.v1alpha.ResponseMetaData, diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java index f75bdb5b..3c1697ee 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java @@ -344,6 +344,22 @@ com.google.analytics.data.v1alpha.DimensionHeaderOrBuilder getDimensionHeadersOr */ com.google.analytics.data.v1alpha.RowOrBuilder getMinimumsOrBuilder(int index); + /** + * + * + *
+   * The total number of rows in the query result, regardless of the number of
+   * rows returned in the response. For example if a query returns 175 rows and
+   * includes limit = 50 in the API request, the response will contain row_count
+   * = 175 but only 50 rows.
+   * 
+ * + * int32 row_count = 12; + * + * @return The rowCount. + */ + int getRowCount(); + /** * * diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metadata.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadata.java similarity index 83% rename from proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metadata.java rename to proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadata.java index 29c1c67c..4a683ed4 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metadata.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadata.java @@ -25,20 +25,19 @@ * The dimensions and metrics currently accepted in reporting methods. * * - * Protobuf type {@code google.analytics.data.v1alpha.Metadata} + * Protobuf type {@code google.analytics.data.v1alpha.UniversalMetadata} */ -public final class Metadata extends com.google.protobuf.GeneratedMessageV3 +public final class UniversalMetadata extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.Metadata) - MetadataOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.UniversalMetadata) + UniversalMetadataOrBuilder { private static final long serialVersionUID = 0L; - // Use Metadata.newBuilder() to construct. - private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UniversalMetadata.newBuilder() to construct. + private UniversalMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Metadata() { - name_ = ""; + private UniversalMetadata() { dimensions_ = java.util.Collections.emptyList(); metrics_ = java.util.Collections.emptyList(); } @@ -46,7 +45,7 @@ private Metadata() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Metadata(); + return new UniversalMetadata(); } @java.lang.Override @@ -54,7 +53,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Metadata( + private UniversalMetadata( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -99,13 +98,6 @@ private Metadata( extensionRegistry)); break; } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -133,66 +125,17 @@ private Metadata( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_Metadata_descriptor; + .internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_Metadata_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_UniversalMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.Metadata.class, - com.google.analytics.data.v1alpha.Metadata.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Resource name of this metadata.
-   * 
- * - * string name = 3; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Resource name of this metadata.
-   * 
- * - * string name = 3; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + com.google.analytics.data.v1alpha.UniversalMetadata.class, + com.google.analytics.data.v1alpha.UniversalMetadata.Builder.class); } public static final int DIMENSIONS_FIELD_NUMBER = 1; @@ -354,9 +297,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < metrics_.size(); i++) { output.writeMessage(2, metrics_.get(i)); } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } unknownFields.writeTo(output); } @@ -372,9 +312,6 @@ public int getSerializedSize() { for (int i = 0; i < metrics_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -385,13 +322,12 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.data.v1alpha.Metadata)) { + if (!(obj instanceof com.google.analytics.data.v1alpha.UniversalMetadata)) { return super.equals(obj); } - com.google.analytics.data.v1alpha.Metadata other = - (com.google.analytics.data.v1alpha.Metadata) obj; + com.google.analytics.data.v1alpha.UniversalMetadata other = + (com.google.analytics.data.v1alpha.UniversalMetadata) obj; - if (!getName().equals(other.getName())) return false; if (!getDimensionsList().equals(other.getDimensionsList())) return false; if (!getMetricsList().equals(other.getMetricsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -405,8 +341,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); if (getDimensionsCount() > 0) { hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; hash = (53 * hash) + getDimensionsList().hashCode(); @@ -420,71 +354,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.data.v1alpha.Metadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom(byte[] data) + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.Metadata parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.Metadata parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.Metadata parseFrom( + public static com.google.analytics.data.v1alpha.UniversalMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -501,7 +435,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.analytics.data.v1alpha.Metadata prototype) { + public static Builder newBuilder(com.google.analytics.data.v1alpha.UniversalMetadata prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -522,28 +456,28 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * The dimensions and metrics currently accepted in reporting methods. * * - * Protobuf type {@code google.analytics.data.v1alpha.Metadata} + * Protobuf type {@code google.analytics.data.v1alpha.UniversalMetadata} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.Metadata) - com.google.analytics.data.v1alpha.MetadataOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.UniversalMetadata) + com.google.analytics.data.v1alpha.UniversalMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_Metadata_descriptor; + .internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_Metadata_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_UniversalMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.Metadata.class, - com.google.analytics.data.v1alpha.Metadata.Builder.class); + com.google.analytics.data.v1alpha.UniversalMetadata.class, + com.google.analytics.data.v1alpha.UniversalMetadata.Builder.class); } - // Construct using com.google.analytics.data.v1alpha.Metadata.newBuilder() + // Construct using com.google.analytics.data.v1alpha.UniversalMetadata.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -563,8 +497,6 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - name_ = ""; - if (dimensionsBuilder_ == null) { dimensions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); @@ -583,17 +515,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.data.v1alpha.AnalyticsDataApiProto - .internal_static_google_analytics_data_v1alpha_Metadata_descriptor; + .internal_static_google_analytics_data_v1alpha_UniversalMetadata_descriptor; } @java.lang.Override - public com.google.analytics.data.v1alpha.Metadata getDefaultInstanceForType() { - return com.google.analytics.data.v1alpha.Metadata.getDefaultInstance(); + public com.google.analytics.data.v1alpha.UniversalMetadata getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.UniversalMetadata.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.data.v1alpha.Metadata build() { - com.google.analytics.data.v1alpha.Metadata result = buildPartial(); + public com.google.analytics.data.v1alpha.UniversalMetadata build() { + com.google.analytics.data.v1alpha.UniversalMetadata result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -601,11 +533,10 @@ public com.google.analytics.data.v1alpha.Metadata build() { } @java.lang.Override - public com.google.analytics.data.v1alpha.Metadata buildPartial() { - com.google.analytics.data.v1alpha.Metadata result = - new com.google.analytics.data.v1alpha.Metadata(this); + public com.google.analytics.data.v1alpha.UniversalMetadata buildPartial() { + com.google.analytics.data.v1alpha.UniversalMetadata result = + new com.google.analytics.data.v1alpha.UniversalMetadata(this); int from_bitField0_ = bitField0_; - result.name_ = name_; if (dimensionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { dimensions_ = java.util.Collections.unmodifiableList(dimensions_); @@ -663,20 +594,17 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.data.v1alpha.Metadata) { - return mergeFrom((com.google.analytics.data.v1alpha.Metadata) other); + if (other instanceof com.google.analytics.data.v1alpha.UniversalMetadata) { + return mergeFrom((com.google.analytics.data.v1alpha.UniversalMetadata) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.data.v1alpha.Metadata other) { - if (other == com.google.analytics.data.v1alpha.Metadata.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } + public Builder mergeFrom(com.google.analytics.data.v1alpha.UniversalMetadata other) { + if (other == com.google.analytics.data.v1alpha.UniversalMetadata.getDefaultInstance()) + return this; if (dimensionsBuilder_ == null) { if (!other.dimensions_.isEmpty()) { if (dimensions_.isEmpty()) { @@ -746,11 +674,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.analytics.data.v1alpha.Metadata parsedMessage = null; + com.google.analytics.data.v1alpha.UniversalMetadata parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.analytics.data.v1alpha.Metadata) e.getUnfinishedMessage(); + parsedMessage = + (com.google.analytics.data.v1alpha.UniversalMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -762,112 +691,6 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Resource name of this metadata.
-     * 
- * - * string name = 3; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Resource name of this metadata.
-     * 
- * - * string name = 3; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Resource name of this metadata.
-     * 
- * - * string name = 3; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Resource name of this metadata.
-     * 
- * - * string name = 3; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Resource name of this metadata.
-     * 
- * - * string name = 3; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - private java.util.List dimensions_ = java.util.Collections.emptyList(); @@ -1589,42 +1412,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.Metadata) + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.UniversalMetadata) } - // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.Metadata) - private static final com.google.analytics.data.v1alpha.Metadata DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.UniversalMetadata) + private static final com.google.analytics.data.v1alpha.UniversalMetadata DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.Metadata(); + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.UniversalMetadata(); } - public static com.google.analytics.data.v1alpha.Metadata getDefaultInstance() { + public static com.google.analytics.data.v1alpha.UniversalMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Metadata parsePartialFrom( + public UniversalMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Metadata(input, extensionRegistry); + return new UniversalMetadata(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.data.v1alpha.Metadata getDefaultInstanceForType() { + public com.google.analytics.data.v1alpha.UniversalMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadataOrBuilder.java similarity index 88% rename from proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataOrBuilder.java rename to proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadataOrBuilder.java index 442d5702..997b60c1 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadataOrBuilder.java @@ -18,36 +18,11 @@ package com.google.analytics.data.v1alpha; -public interface MetadataOrBuilder +public interface UniversalMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.Metadata) + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.UniversalMetadata) com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-   * Resource name of this metadata.
-   * 
- * - * string name = 3; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Resource name of this metadata.
-   * 
- * - * string name = 3; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - /** * * diff --git a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto index 58a80153..dbbc258a 100644 --- a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto +++ b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto @@ -20,7 +20,6 @@ import "google/analytics/data/v1alpha/data.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data"; option java_multiple_files = true; @@ -81,35 +80,16 @@ service AlphaAnalyticsData { // Returns metadata for dimensions and metrics available in reporting methods. // Used to explore the dimensions and metrics. Dimensions and metrics will be // mostly added over time, but renames and deletions may occur. - rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + // + // This method returns Universal Metadata. Universal Metadata are dimensions + // and metrics applicable to any property such as `country` and `totalUsers`. + rpc GetUniversalMetadata(GetUniversalMetadataRequest) returns (UniversalMetadata) { option (google.api.http) = { - get: "/v1alpha/{name=metadata}" - additional_bindings { - get: "/v1alpha/{name=properties/*/metadata}" - } + get: "/v1alpha/universalMetadata" }; - option (google.api.method_signature) = "name"; } } -// The dimensions and metrics currently accepted in reporting methods. -message Metadata { - option (google.api.resource) = { - type: "analyticsdata.googleapis.com/Metadata" - pattern: "metadata" - pattern: "properties/{property}/metadata" - }; - - // Resource name of this metadata. - string name = 3; - - // The dimensions descriptions. - repeated DimensionMetadata dimensions = 1; - - // The metric descriptions. - repeated MetricMetadata metrics = 2; -} - // The request to generate a report. message RunReportRequest { // A property whose events are tracked. Within a batch request, this entity @@ -192,6 +172,12 @@ message RunReportResponse { // If requested, the minimum values of metrics. repeated Row minimums = 10; + // The total number of rows in the query result, regardless of the number of + // rows returned in the response. For example if a query returns 175 rows and + // includes limit = 50 in the API request, the response will contain row_count + // = 175 but only 50 rows. + int32 row_count = 12; + // Metadata for the report. ResponseMetaData metadata = 6; @@ -354,16 +340,16 @@ message BatchRunPivotReportsResponse { repeated RunPivotReportResponse pivot_reports = 1; } -// Request for dimension and metric metadata. -message GetMetadataRequest { - // Required. The name of the metadata to retrieve. Either has the form - // 'metadata' or 'properties/{property}/metadata'. This name field is - // specified in the URL path and not URL parameters. Property is a numeric - // Google Analytics App + Web Property Id. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsdata.googleapis.com/Metadata" - } - ]; +// Request for the universal dimension and metric metadata. +message GetUniversalMetadataRequest { + +} + +// The dimensions and metrics currently accepted in reporting methods. +message UniversalMetadata { + // The dimensions descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; } diff --git a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto index 5202800f..74a7db49 100644 --- a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto +++ b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto @@ -486,7 +486,9 @@ message PivotHeader { // combinations. repeated PivotDimensionHeader pivot_dimension_headers = 1; - // The cardinality of the pivot as if offset = 0 and limit = -1. + // The cardinality of the pivot as if offset = 0 and limit = -1. The total + // number of rows for this pivot's fields regardless of how the parameters + // offset and limit are specified in the request. int32 row_count = 2; } diff --git a/synth.metadata b/synth.metadata index 3006cc17..e768cba5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32cd28cc67e8f644856471573821bf930b7ee513", - "internalRef": "329352783" + "sha": "c3c12961380f5612d41bbda0944454a5e88b63b0", + "internalRef": "335470104" } }, { @@ -146,11 +146,8 @@ "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FilterExpressionListOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FilterExpressionOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FilterOrBuilder.java", - "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java", - "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java", - "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metadata.java", - "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java", - "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataOrBuilder.java", + "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequest.java", + "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetUniversalMetadataRequestOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metric.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricAggregation.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricHeader.java", @@ -188,6 +185,8 @@ "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequestOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java", + "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadata.java", + "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/UniversalMetadataOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto", "proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto", "renovate.json",