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 UnaryCallableThe 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- * 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
- * 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- * 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+ * 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- * 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- * 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",