- 0.64.0 (latest)
- 0.63.0
- 0.62.0
- 0.61.0
- 0.59.0
- 0.58.0
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
public class AnalyticsAdminServiceClient implements BackgroundResource
Service Description: Service Interface for the Analytics Admin API (GA4).
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
Account response = analyticsAdminServiceClient.getAccount(name);
}
Note: close() needs to be called on the AnalyticsAdminServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of AnalyticsAdminServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
AnalyticsAdminServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
AnalyticsAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
AnalyticsAdminServiceSettings.newHttpJsonBuilder().build();
AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final AnalyticsAdminServiceClient create()
Constructs an instance of AnalyticsAdminServiceClient with default settings.
Type | Description |
AnalyticsAdminServiceClient |
Type | Description |
IOException |
create(AnalyticsAdminServiceSettings settings)
public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceSettings settings)
Constructs an instance of AnalyticsAdminServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | AnalyticsAdminServiceSettings |
Type | Description |
AnalyticsAdminServiceClient |
Type | Description |
IOException |
create(AnalyticsAdminServiceStub stub)
public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceStub stub)
Constructs an instance of AnalyticsAdminServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(AnalyticsAdminServiceSettings).
Name | Description |
stub | AnalyticsAdminServiceStub |
Type | Description |
AnalyticsAdminServiceClient |
Constructors
AnalyticsAdminServiceClient(AnalyticsAdminServiceSettings settings)
protected AnalyticsAdminServiceClient(AnalyticsAdminServiceSettings settings)
Constructs an instance of AnalyticsAdminServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | AnalyticsAdminServiceSettings |
AnalyticsAdminServiceClient(AnalyticsAdminServiceStub stub)
protected AnalyticsAdminServiceClient(AnalyticsAdminServiceStub stub)
Name | Description |
stub | AnalyticsAdminServiceStub |
Methods
acknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest request)
public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest request)
Acknowledges the terms of user data collection for the specified property.
This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AcknowledgeUserDataCollectionRequest request =
AcknowledgeUserDataCollectionRequest.newBuilder()
.setProperty(PropertyName.of("[PROPERTY]").toString())
.setAcknowledgement("acknowledgement1769490938")
.build();
AcknowledgeUserDataCollectionResponse response =
analyticsAdminServiceClient.acknowledgeUserDataCollection(request);
}
Name | Description |
request | AcknowledgeUserDataCollectionRequest The request object containing all of the parameters for the API call. |
Type | Description |
AcknowledgeUserDataCollectionResponse |
acknowledgeUserDataCollectionCallable()
public final UnaryCallable<AcknowledgeUserDataCollectionRequest,AcknowledgeUserDataCollectionResponse> acknowledgeUserDataCollectionCallable()
Acknowledges the terms of user data collection for the specified property.
This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AcknowledgeUserDataCollectionRequest request =
AcknowledgeUserDataCollectionRequest.newBuilder()
.setProperty(PropertyName.of("[PROPERTY]").toString())
.setAcknowledgement("acknowledgement1769490938")
.build();
ApiFuture<AcknowledgeUserDataCollectionResponse> future =
analyticsAdminServiceClient.acknowledgeUserDataCollectionCallable().futureCall(request);
// Do something.
AcknowledgeUserDataCollectionResponse response = future.get();
}
Type | Description |
UnaryCallable<AcknowledgeUserDataCollectionRequest,AcknowledgeUserDataCollectionResponse> |
archiveCustomDimension(ArchiveCustomDimensionRequest request)
public final void archiveCustomDimension(ArchiveCustomDimensionRequest request)
Archives a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveCustomDimensionRequest request =
ArchiveCustomDimensionRequest.newBuilder()
.setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
.build();
analyticsAdminServiceClient.archiveCustomDimension(request);
}
Name | Description |
request | ArchiveCustomDimensionRequest The request object containing all of the parameters for the API call. |
archiveCustomDimension(CustomDimensionName name)
public final void archiveCustomDimension(CustomDimensionName name)
Archives a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
analyticsAdminServiceClient.archiveCustomDimension(name);
}
Name | Description |
name | CustomDimensionName Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678 |
archiveCustomDimension(String name)
public final void archiveCustomDimension(String name)
Archives a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
analyticsAdminServiceClient.archiveCustomDimension(name);
}
Name | Description |
name | String Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678 |
archiveCustomDimensionCallable()
public final UnaryCallable<ArchiveCustomDimensionRequest,Empty> archiveCustomDimensionCallable()
Archives a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveCustomDimensionRequest request =
ArchiveCustomDimensionRequest.newBuilder()
.setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.archiveCustomDimensionCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<ArchiveCustomDimensionRequest,Empty> |
archiveCustomMetric(ArchiveCustomMetricRequest request)
public final void archiveCustomMetric(ArchiveCustomMetricRequest request)
Archives a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveCustomMetricRequest request =
ArchiveCustomMetricRequest.newBuilder()
.setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
.build();
analyticsAdminServiceClient.archiveCustomMetric(request);
}
Name | Description |
request | ArchiveCustomMetricRequest The request object containing all of the parameters for the API call. |
archiveCustomMetric(CustomMetricName name)
public final void archiveCustomMetric(CustomMetricName name)
Archives a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
analyticsAdminServiceClient.archiveCustomMetric(name);
}
Name | Description |
name | CustomMetricName Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678 |
archiveCustomMetric(String name)
public final void archiveCustomMetric(String name)
Archives a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
analyticsAdminServiceClient.archiveCustomMetric(name);
}
Name | Description |
name | String Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678 |
archiveCustomMetricCallable()
public final UnaryCallable<ArchiveCustomMetricRequest,Empty> archiveCustomMetricCallable()
Archives a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveCustomMetricRequest request =
ArchiveCustomMetricRequest.newBuilder()
.setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.archiveCustomMetricCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<ArchiveCustomMetricRequest,Empty> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createConversionEvent(CreateConversionEventRequest request)
public final ConversionEvent createConversionEvent(CreateConversionEventRequest request)
Creates a conversion event with the specified attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateConversionEventRequest request =
CreateConversionEventRequest.newBuilder()
.setConversionEvent(ConversionEvent.newBuilder().build())
.setParent(PropertyName.of("[PROPERTY]").toString())
.build();
ConversionEvent response = analyticsAdminServiceClient.createConversionEvent(request);
}
Name | Description |
request | CreateConversionEventRequest The request object containing all of the parameters for the API call. |
Type | Description |
ConversionEvent |
createConversionEvent(PropertyName parent, ConversionEvent conversionEvent)
public final ConversionEvent createConversionEvent(PropertyName parent, ConversionEvent conversionEvent)
Creates a conversion event with the specified attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
ConversionEvent conversionEvent = ConversionEvent.newBuilder().build();
ConversionEvent response =
analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent);
}
Name | Description |
parent | PropertyName Required. The resource name of the parent property where this conversion event will be created. Format: properties/123 |
conversionEvent | ConversionEvent Required. The conversion event to create. |
Type | Description |
ConversionEvent |
createConversionEvent(String parent, ConversionEvent conversionEvent)
public final ConversionEvent createConversionEvent(String parent, ConversionEvent conversionEvent)
Creates a conversion event with the specified attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
ConversionEvent conversionEvent = ConversionEvent.newBuilder().build();
ConversionEvent response =
analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent);
}
Name | Description |
parent | String Required. The resource name of the parent property where this conversion event will be created. Format: properties/123 |
conversionEvent | ConversionEvent Required. The conversion event to create. |
Type | Description |
ConversionEvent |
createConversionEventCallable()
public final UnaryCallable<CreateConversionEventRequest,ConversionEvent> createConversionEventCallable()
Creates a conversion event with the specified attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateConversionEventRequest request =
CreateConversionEventRequest.newBuilder()
.setConversionEvent(ConversionEvent.newBuilder().build())
.setParent(PropertyName.of("[PROPERTY]").toString())
.build();
ApiFuture<ConversionEvent> future =
analyticsAdminServiceClient.createConversionEventCallable().futureCall(request);
// Do something.
ConversionEvent response = future.get();
}
Type | Description |
UnaryCallable<CreateConversionEventRequest,ConversionEvent> |
createCustomDimension(CreateCustomDimensionRequest request)
public final CustomDimension createCustomDimension(CreateCustomDimensionRequest request)
Creates a CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateCustomDimensionRequest request =
CreateCustomDimensionRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setCustomDimension(CustomDimension.newBuilder().build())
.build();
CustomDimension response = analyticsAdminServiceClient.createCustomDimension(request);
}
Name | Description |
request | CreateCustomDimensionRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomDimension |
createCustomDimension(PropertyName parent, CustomDimension customDimension)
public final CustomDimension createCustomDimension(PropertyName parent, CustomDimension customDimension)
Creates a CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
CustomDimension customDimension = CustomDimension.newBuilder().build();
CustomDimension response =
analyticsAdminServiceClient.createCustomDimension(parent, customDimension);
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
customDimension | CustomDimension Required. The CustomDimension to create. |
Type | Description |
CustomDimension |
createCustomDimension(String parent, CustomDimension customDimension)
public final CustomDimension createCustomDimension(String parent, CustomDimension customDimension)
Creates a CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
CustomDimension customDimension = CustomDimension.newBuilder().build();
CustomDimension response =
analyticsAdminServiceClient.createCustomDimension(parent, customDimension);
}
Name | Description |
parent | String Required. Example format: properties/1234 |
customDimension | CustomDimension Required. The CustomDimension to create. |
Type | Description |
CustomDimension |
createCustomDimensionCallable()
public final UnaryCallable<CreateCustomDimensionRequest,CustomDimension> createCustomDimensionCallable()
Creates a CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateCustomDimensionRequest request =
CreateCustomDimensionRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setCustomDimension(CustomDimension.newBuilder().build())
.build();
ApiFuture<CustomDimension> future =
analyticsAdminServiceClient.createCustomDimensionCallable().futureCall(request);
// Do something.
CustomDimension response = future.get();
}
Type | Description |
UnaryCallable<CreateCustomDimensionRequest,CustomDimension> |
createCustomMetric(CreateCustomMetricRequest request)
public final CustomMetric createCustomMetric(CreateCustomMetricRequest request)
Creates a CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateCustomMetricRequest request =
CreateCustomMetricRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setCustomMetric(CustomMetric.newBuilder().build())
.build();
CustomMetric response = analyticsAdminServiceClient.createCustomMetric(request);
}
Name | Description |
request | CreateCustomMetricRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomMetric |
createCustomMetric(PropertyName parent, CustomMetric customMetric)
public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric customMetric)
Creates a CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
CustomMetric customMetric = CustomMetric.newBuilder().build();
CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric);
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
customMetric | CustomMetric Required. The CustomMetric to create. |
Type | Description |
CustomMetric |
createCustomMetric(String parent, CustomMetric customMetric)
public final CustomMetric createCustomMetric(String parent, CustomMetric customMetric)
Creates a CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
CustomMetric customMetric = CustomMetric.newBuilder().build();
CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric);
}
Name | Description |
parent | String Required. Example format: properties/1234 |
customMetric | CustomMetric Required. The CustomMetric to create. |
Type | Description |
CustomMetric |
createCustomMetricCallable()
public final UnaryCallable<CreateCustomMetricRequest,CustomMetric> createCustomMetricCallable()
Creates a CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateCustomMetricRequest request =
CreateCustomMetricRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setCustomMetric(CustomMetric.newBuilder().build())
.build();
ApiFuture<CustomMetric> future =
analyticsAdminServiceClient.createCustomMetricCallable().futureCall(request);
// Do something.
CustomMetric response = future.get();
}
Type | Description |
UnaryCallable<CreateCustomMetricRequest,CustomMetric> |
createDataStream(CreateDataStreamRequest request)
public final DataStream createDataStream(CreateDataStreamRequest request)
Creates a DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDataStreamRequest request =
CreateDataStreamRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDataStream(DataStream.newBuilder().build())
.build();
DataStream response = analyticsAdminServiceClient.createDataStream(request);
}
Name | Description |
request | CreateDataStreamRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataStream |
createDataStream(PropertyName parent, DataStream dataStream)
public final DataStream createDataStream(PropertyName parent, DataStream dataStream)
Creates a DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
DataStream dataStream = DataStream.newBuilder().build();
DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream);
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
dataStream | DataStream Required. The DataStream to create. |
Type | Description |
DataStream |
createDataStream(String parent, DataStream dataStream)
public final DataStream createDataStream(String parent, DataStream dataStream)
Creates a DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
DataStream dataStream = DataStream.newBuilder().build();
DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream);
}
Name | Description |
parent | String Required. Example format: properties/1234 |
dataStream | DataStream Required. The DataStream to create. |
Type | Description |
DataStream |
createDataStreamCallable()
public final UnaryCallable<CreateDataStreamRequest,DataStream> createDataStreamCallable()
Creates a DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDataStreamRequest request =
CreateDataStreamRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDataStream(DataStream.newBuilder().build())
.build();
ApiFuture<DataStream> future =
analyticsAdminServiceClient.createDataStreamCallable().futureCall(request);
// Do something.
DataStream response = future.get();
}
Type | Description |
UnaryCallable<CreateDataStreamRequest,DataStream> |
createFirebaseLink(CreateFirebaseLinkRequest request)
public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request)
Creates a FirebaseLink.
Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateFirebaseLinkRequest request =
CreateFirebaseLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setFirebaseLink(FirebaseLink.newBuilder().build())
.build();
FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(request);
}
Name | Description |
request | CreateFirebaseLinkRequest The request object containing all of the parameters for the API call. |
Type | Description |
FirebaseLink |
createFirebaseLink(PropertyName parent, FirebaseLink firebaseLink)
public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink firebaseLink)
Creates a FirebaseLink.
Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
}
Name | Description |
parent | PropertyName Required. Format: properties/{property_id} Example: properties/1234 |
firebaseLink | FirebaseLink Required. The Firebase link to create. |
Type | Description |
FirebaseLink |
createFirebaseLink(String parent, FirebaseLink firebaseLink)
public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebaseLink)
Creates a FirebaseLink.
Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
}
Name | Description |
parent | String Required. Format: properties/{property_id} Example: properties/1234 |
firebaseLink | FirebaseLink Required. The Firebase link to create. |
Type | Description |
FirebaseLink |
createFirebaseLinkCallable()
public final UnaryCallable<CreateFirebaseLinkRequest,FirebaseLink> createFirebaseLinkCallable()
Creates a FirebaseLink.
Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateFirebaseLinkRequest request =
CreateFirebaseLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setFirebaseLink(FirebaseLink.newBuilder().build())
.build();
ApiFuture<FirebaseLink> future =
analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request);
// Do something.
FirebaseLink response = future.get();
}
Type | Description |
UnaryCallable<CreateFirebaseLinkRequest,FirebaseLink> |
createGoogleAdsLink(CreateGoogleAdsLinkRequest request)
public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest request)
Creates a GoogleAdsLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateGoogleAdsLinkRequest request =
CreateGoogleAdsLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
.build();
GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(request);
}
Name | Description |
request | CreateGoogleAdsLinkRequest The request object containing all of the parameters for the API call. |
Type | Description |
GoogleAdsLink |
createGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink)
public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink)
Creates a GoogleAdsLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
GoogleAdsLink response =
analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
googleAdsLink | GoogleAdsLink Required. The GoogleAdsLink to create. |
Type | Description |
GoogleAdsLink |
createGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink)
public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink)
Creates a GoogleAdsLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
GoogleAdsLink response =
analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
}
Name | Description |
parent | String Required. Example format: properties/1234 |
googleAdsLink | GoogleAdsLink Required. The GoogleAdsLink to create. |
Type | Description |
GoogleAdsLink |
createGoogleAdsLinkCallable()
public final UnaryCallable<CreateGoogleAdsLinkRequest,GoogleAdsLink> createGoogleAdsLinkCallable()
Creates a GoogleAdsLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateGoogleAdsLinkRequest request =
CreateGoogleAdsLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
.build();
ApiFuture<GoogleAdsLink> future =
analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request);
// Do something.
GoogleAdsLink response = future.get();
}
Type | Description |
UnaryCallable<CreateGoogleAdsLinkRequest,GoogleAdsLink> |
createMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest request)
public final MeasurementProtocolSecret createMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest request)
Creates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateMeasurementProtocolSecretRequest request =
CreateMeasurementProtocolSecretRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
.build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.createMeasurementProtocolSecret(request);
}
Name | Description |
request | CreateMeasurementProtocolSecretRequest The request object containing all of the parameters for the API call. |
Type | Description |
MeasurementProtocolSecret |
createMeasurementProtocolSecret(DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret)
public final MeasurementProtocolSecret createMeasurementProtocolSecret(DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret)
Creates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
MeasurementProtocolSecret measurementProtocolSecret =
MeasurementProtocolSecret.newBuilder().build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.createMeasurementProtocolSecret(
parent, measurementProtocolSecret);
}
Name | Description |
parent | DataStreamName Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream} |
measurementProtocolSecret | MeasurementProtocolSecret Required. The measurement protocol secret to create. |
Type | Description |
MeasurementProtocolSecret |
createMeasurementProtocolSecret(String parent, MeasurementProtocolSecret measurementProtocolSecret)
public final MeasurementProtocolSecret createMeasurementProtocolSecret(String parent, MeasurementProtocolSecret measurementProtocolSecret)
Creates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
MeasurementProtocolSecret measurementProtocolSecret =
MeasurementProtocolSecret.newBuilder().build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.createMeasurementProtocolSecret(
parent, measurementProtocolSecret);
}
Name | Description |
parent | String Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream} |
measurementProtocolSecret | MeasurementProtocolSecret Required. The measurement protocol secret to create. |
Type | Description |
MeasurementProtocolSecret |
createMeasurementProtocolSecretCallable()
public final UnaryCallable<CreateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> createMeasurementProtocolSecretCallable()
Creates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateMeasurementProtocolSecretRequest request =
CreateMeasurementProtocolSecretRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
.build();
ApiFuture<MeasurementProtocolSecret> future =
analyticsAdminServiceClient.createMeasurementProtocolSecretCallable().futureCall(request);
// Do something.
MeasurementProtocolSecret response = future.get();
}
Type | Description |
UnaryCallable<CreateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> |
createProperty(CreatePropertyRequest request)
public final Property createProperty(CreatePropertyRequest request)
Creates an "GA4" property with the specified location and attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreatePropertyRequest request =
CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
Property response = analyticsAdminServiceClient.createProperty(request);
}
Name | Description |
request | CreatePropertyRequest The request object containing all of the parameters for the API call. |
Type | Description |
Property |
createProperty(Property property)
public final Property createProperty(Property property)
Creates an "GA4" property with the specified location and attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
Property property = Property.newBuilder().build();
Property response = analyticsAdminServiceClient.createProperty(property);
}
Name | Description |
property | Property Required. The property to create. Note: the supplied property must specify its parent. |
Type | Description |
Property |
createPropertyCallable()
public final UnaryCallable<CreatePropertyRequest,Property> createPropertyCallable()
Creates an "GA4" property with the specified location and attributes.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreatePropertyRequest request =
CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
ApiFuture<Property> future =
analyticsAdminServiceClient.createPropertyCallable().futureCall(request);
// Do something.
Property response = future.get();
}
Type | Description |
UnaryCallable<CreatePropertyRequest,Property> |
deleteAccount(AccountName name)
public final void deleteAccount(AccountName name)
Marks target Account as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.
If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
analyticsAdminServiceClient.deleteAccount(name);
}
Name | Description |
name | AccountName Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100" |
deleteAccount(DeleteAccountRequest request)
public final void deleteAccount(DeleteAccountRequest request)
Marks target Account as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.
If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAccountRequest request =
DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
analyticsAdminServiceClient.deleteAccount(request);
}
Name | Description |
request | DeleteAccountRequest The request object containing all of the parameters for the API call. |
deleteAccount(String name)
public final void deleteAccount(String name)
Marks target Account as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.
If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = AccountName.of("[ACCOUNT]").toString();
analyticsAdminServiceClient.deleteAccount(name);
}
Name | Description |
name | String Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100" |
deleteAccountCallable()
public final UnaryCallable<DeleteAccountRequest,Empty> deleteAccountCallable()
Marks target Account as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.
If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAccountRequest request =
DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteAccountCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteAccountRequest,Empty> |
deleteConversionEvent(ConversionEventName name)
public final void deleteConversionEvent(ConversionEventName name)
Deletes a conversion event in a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
analyticsAdminServiceClient.deleteConversionEvent(name);
}
Name | Description |
name | ConversionEventName Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456" |
deleteConversionEvent(DeleteConversionEventRequest request)
public final void deleteConversionEvent(DeleteConversionEventRequest request)
Deletes a conversion event in a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteConversionEventRequest request =
DeleteConversionEventRequest.newBuilder()
.setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
.build();
analyticsAdminServiceClient.deleteConversionEvent(request);
}
Name | Description |
request | DeleteConversionEventRequest The request object containing all of the parameters for the API call. |
deleteConversionEvent(String name)
public final void deleteConversionEvent(String name)
Deletes a conversion event in a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
analyticsAdminServiceClient.deleteConversionEvent(name);
}
Name | Description |
name | String Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456" |
deleteConversionEventCallable()
public final UnaryCallable<DeleteConversionEventRequest,Empty> deleteConversionEventCallable()
Deletes a conversion event in a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteConversionEventRequest request =
DeleteConversionEventRequest.newBuilder()
.setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteConversionEventCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteConversionEventRequest,Empty> |
deleteDataStream(DataStreamName name)
public final void deleteDataStream(DataStreamName name)
Deletes a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
analyticsAdminServiceClient.deleteDataStream(name);
}
Name | Description |
name | DataStreamName Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678 |
deleteDataStream(DeleteDataStreamRequest request)
public final void deleteDataStream(DeleteDataStreamRequest request)
Deletes a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDataStreamRequest request =
DeleteDataStreamRequest.newBuilder()
.setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
analyticsAdminServiceClient.deleteDataStream(request);
}
Name | Description |
request | DeleteDataStreamRequest The request object containing all of the parameters for the API call. |
deleteDataStream(String name)
public final void deleteDataStream(String name)
Deletes a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
analyticsAdminServiceClient.deleteDataStream(name);
}
Name | Description |
name | String Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678 |
deleteDataStreamCallable()
public final UnaryCallable<DeleteDataStreamRequest,Empty> deleteDataStreamCallable()
Deletes a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDataStreamRequest request =
DeleteDataStreamRequest.newBuilder()
.setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteDataStreamCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteDataStreamRequest,Empty> |
deleteFirebaseLink(DeleteFirebaseLinkRequest request)
public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request)
Deletes a FirebaseLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteFirebaseLinkRequest request =
DeleteFirebaseLinkRequest.newBuilder()
.setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
.build();
analyticsAdminServiceClient.deleteFirebaseLink(request);
}
Name | Description |
request | DeleteFirebaseLinkRequest The request object containing all of the parameters for the API call. |
deleteFirebaseLink(FirebaseLinkName name)
public final void deleteFirebaseLink(FirebaseLinkName name)
Deletes a FirebaseLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
analyticsAdminServiceClient.deleteFirebaseLink(name);
}
Name | Description |
name | FirebaseLinkName Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678 |
deleteFirebaseLink(String name)
public final void deleteFirebaseLink(String name)
Deletes a FirebaseLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
analyticsAdminServiceClient.deleteFirebaseLink(name);
}
Name | Description |
name | String Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678 |
deleteFirebaseLinkCallable()
public final UnaryCallable<DeleteFirebaseLinkRequest,Empty> deleteFirebaseLinkCallable()
Deletes a FirebaseLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteFirebaseLinkRequest request =
DeleteFirebaseLinkRequest.newBuilder()
.setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteFirebaseLinkRequest,Empty> |
deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request)
public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request)
Deletes a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteGoogleAdsLinkRequest request =
DeleteGoogleAdsLinkRequest.newBuilder()
.setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
.build();
analyticsAdminServiceClient.deleteGoogleAdsLink(request);
}
Name | Description |
request | DeleteGoogleAdsLinkRequest The request object containing all of the parameters for the API call. |
deleteGoogleAdsLink(GoogleAdsLinkName name)
public final void deleteGoogleAdsLink(GoogleAdsLinkName name)
Deletes a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
analyticsAdminServiceClient.deleteGoogleAdsLink(name);
}
Name | Description |
name | GoogleAdsLinkName Required. Example format: properties/1234/googleAdsLinks/5678 |
deleteGoogleAdsLink(String name)
public final void deleteGoogleAdsLink(String name)
Deletes a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
analyticsAdminServiceClient.deleteGoogleAdsLink(name);
}
Name | Description |
name | String Required. Example format: properties/1234/googleAdsLinks/5678 |
deleteGoogleAdsLinkCallable()
public final UnaryCallable<DeleteGoogleAdsLinkRequest,Empty> deleteGoogleAdsLinkCallable()
Deletes a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteGoogleAdsLinkRequest request =
DeleteGoogleAdsLinkRequest.newBuilder()
.setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteGoogleAdsLinkRequest,Empty> |
deleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest request)
public final void deleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest request)
Deletes target MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteMeasurementProtocolSecretRequest request =
DeleteMeasurementProtocolSecretRequest.newBuilder()
.setName(
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString())
.build();
analyticsAdminServiceClient.deleteMeasurementProtocolSecret(request);
}
Name | Description |
request | DeleteMeasurementProtocolSecretRequest The request object containing all of the parameters for the API call. |
deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name)
public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name)
Deletes target MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
MeasurementProtocolSecretName name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
}
Name | Description |
name | MeasurementProtocolSecretName Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} |
deleteMeasurementProtocolSecret(String name)
public final void deleteMeasurementProtocolSecret(String name)
Deletes target MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString();
analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
}
Name | Description |
name | String Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} |
deleteMeasurementProtocolSecretCallable()
public final UnaryCallable<DeleteMeasurementProtocolSecretRequest,Empty> deleteMeasurementProtocolSecretCallable()
Deletes target MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteMeasurementProtocolSecretRequest request =
DeleteMeasurementProtocolSecretRequest.newBuilder()
.setName(
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteMeasurementProtocolSecretCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteMeasurementProtocolSecretRequest,Empty> |
deleteProperty(DeletePropertyRequest request)
public final Property deleteProperty(DeletePropertyRequest request)
Marks target Property as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.
If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found, or is not an GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeletePropertyRequest request =
DeletePropertyRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
Property response = analyticsAdminServiceClient.deleteProperty(request);
}
Name | Description |
request | DeletePropertyRequest The request object containing all of the parameters for the API call. |
Type | Description |
Property |
deleteProperty(PropertyName name)
public final Property deleteProperty(PropertyName name)
Marks target Property as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.
If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found, or is not an GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName name = PropertyName.of("[PROPERTY]");
Property response = analyticsAdminServiceClient.deleteProperty(name);
}
Name | Description |
name | PropertyName Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000" |
Type | Description |
Property |
deleteProperty(String name)
public final Property deleteProperty(String name)
Marks target Property as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.
If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found, or is not an GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = PropertyName.of("[PROPERTY]").toString();
Property response = analyticsAdminServiceClient.deleteProperty(name);
}
Name | Description |
name | String Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000" |
Type | Description |
Property |
deletePropertyCallable()
public final UnaryCallable<DeletePropertyRequest,Property> deletePropertyCallable()
Marks target Property as soft-deleted (ie: "trashed") and returns it.
This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.
If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772
Returns an error if the target is not found, or is not an GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeletePropertyRequest request =
DeletePropertyRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
ApiFuture<Property> future =
analyticsAdminServiceClient.deletePropertyCallable().futureCall(request);
// Do something.
Property response = future.get();
}
Type | Description |
UnaryCallable<DeletePropertyRequest,Property> |
getAccount(AccountName name)
public final Account getAccount(AccountName name)
Lookup for a single Account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
Account response = analyticsAdminServiceClient.getAccount(name);
}
Name | Description |
name | AccountName Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100" |
Type | Description |
Account |
getAccount(GetAccountRequest request)
public final Account getAccount(GetAccountRequest request)
Lookup for a single Account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAccountRequest request =
GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
Account response = analyticsAdminServiceClient.getAccount(request);
}
Name | Description |
request | GetAccountRequest The request object containing all of the parameters for the API call. |
Type | Description |
Account |
getAccount(String name)
public final Account getAccount(String name)
Lookup for a single Account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = AccountName.of("[ACCOUNT]").toString();
Account response = analyticsAdminServiceClient.getAccount(name);
}
Name | Description |
name | String Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100" |
Type | Description |
Account |
getAccountCallable()
public final UnaryCallable<GetAccountRequest,Account> getAccountCallable()
Lookup for a single Account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAccountRequest request =
GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
ApiFuture<Account> future =
analyticsAdminServiceClient.getAccountCallable().futureCall(request);
// Do something.
Account response = future.get();
}
Type | Description |
UnaryCallable<GetAccountRequest,Account> |
getConversionEvent(ConversionEventName name)
public final ConversionEvent getConversionEvent(ConversionEventName name)
Retrieve a single conversion event.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
}
Name | Description |
name | ConversionEventName Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456" |
Type | Description |
ConversionEvent |
getConversionEvent(GetConversionEventRequest request)
public final ConversionEvent getConversionEvent(GetConversionEventRequest request)
Retrieve a single conversion event.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetConversionEventRequest request =
GetConversionEventRequest.newBuilder()
.setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
.build();
ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(request);
}
Name | Description |
request | GetConversionEventRequest The request object containing all of the parameters for the API call. |
Type | Description |
ConversionEvent |
getConversionEvent(String name)
public final ConversionEvent getConversionEvent(String name)
Retrieve a single conversion event.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
}
Name | Description |
name | String Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456" |
Type | Description |
ConversionEvent |
getConversionEventCallable()
public final UnaryCallable<GetConversionEventRequest,ConversionEvent> getConversionEventCallable()
Retrieve a single conversion event.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetConversionEventRequest request =
GetConversionEventRequest.newBuilder()
.setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString())
.build();
ApiFuture<ConversionEvent> future =
analyticsAdminServiceClient.getConversionEventCallable().futureCall(request);
// Do something.
ConversionEvent response = future.get();
}
Type | Description |
UnaryCallable<GetConversionEventRequest,ConversionEvent> |
getCustomDimension(CustomDimensionName name)
public final CustomDimension getCustomDimension(CustomDimensionName name)
Lookup for a single CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
}
Name | Description |
name | CustomDimensionName Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678 |
Type | Description |
CustomDimension |
getCustomDimension(GetCustomDimensionRequest request)
public final CustomDimension getCustomDimension(GetCustomDimensionRequest request)
Lookup for a single CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetCustomDimensionRequest request =
GetCustomDimensionRequest.newBuilder()
.setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
.build();
CustomDimension response = analyticsAdminServiceClient.getCustomDimension(request);
}
Name | Description |
request | GetCustomDimensionRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomDimension |
getCustomDimension(String name)
public final CustomDimension getCustomDimension(String name)
Lookup for a single CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
}
Name | Description |
name | String Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678 |
Type | Description |
CustomDimension |
getCustomDimensionCallable()
public final UnaryCallable<GetCustomDimensionRequest,CustomDimension> getCustomDimensionCallable()
Lookup for a single CustomDimension.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetCustomDimensionRequest request =
GetCustomDimensionRequest.newBuilder()
.setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
.build();
ApiFuture<CustomDimension> future =
analyticsAdminServiceClient.getCustomDimensionCallable().futureCall(request);
// Do something.
CustomDimension response = future.get();
}
Type | Description |
UnaryCallable<GetCustomDimensionRequest,CustomDimension> |
getCustomMetric(CustomMetricName name)
public final CustomMetric getCustomMetric(CustomMetricName name)
Lookup for a single CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
}
Name | Description |
name | CustomMetricName Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678 |
Type | Description |
CustomMetric |
getCustomMetric(GetCustomMetricRequest request)
public final CustomMetric getCustomMetric(GetCustomMetricRequest request)
Lookup for a single CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetCustomMetricRequest request =
GetCustomMetricRequest.newBuilder()
.setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
.build();
CustomMetric response = analyticsAdminServiceClient.getCustomMetric(request);
}
Name | Description |
request | GetCustomMetricRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomMetric |
getCustomMetric(String name)
public final CustomMetric getCustomMetric(String name)
Lookup for a single CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
}
Name | Description |
name | String Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678 |
Type | Description |
CustomMetric |
getCustomMetricCallable()
public final UnaryCallable<GetCustomMetricRequest,CustomMetric> getCustomMetricCallable()
Lookup for a single CustomMetric.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetCustomMetricRequest request =
GetCustomMetricRequest.newBuilder()
.setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString())
.build();
ApiFuture<CustomMetric> future =
analyticsAdminServiceClient.getCustomMetricCallable().futureCall(request);
// Do something.
CustomMetric response = future.get();
}
Type | Description |
UnaryCallable<GetCustomMetricRequest,CustomMetric> |
getDataRetentionSettings(DataRetentionSettingsName name)
public final DataRetentionSettings getDataRetentionSettings(DataRetentionSettingsName name)
Returns the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]");
DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
}
Name | Description |
name | DataRetentionSettingsName Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings" |
Type | Description |
DataRetentionSettings |
getDataRetentionSettings(GetDataRetentionSettingsRequest request)
public final DataRetentionSettings getDataRetentionSettings(GetDataRetentionSettingsRequest request)
Returns the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataRetentionSettingsRequest request =
GetDataRetentionSettingsRequest.newBuilder()
.setName(DataRetentionSettingsName.of("[PROPERTY]").toString())
.build();
DataRetentionSettings response =
analyticsAdminServiceClient.getDataRetentionSettings(request);
}
Name | Description |
request | GetDataRetentionSettingsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataRetentionSettings |
getDataRetentionSettings(String name)
public final DataRetentionSettings getDataRetentionSettings(String name)
Returns the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataRetentionSettingsName.of("[PROPERTY]").toString();
DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
}
Name | Description |
name | String Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings" |
Type | Description |
DataRetentionSettings |
getDataRetentionSettingsCallable()
public final UnaryCallable<GetDataRetentionSettingsRequest,DataRetentionSettings> getDataRetentionSettingsCallable()
Returns the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataRetentionSettingsRequest request =
GetDataRetentionSettingsRequest.newBuilder()
.setName(DataRetentionSettingsName.of("[PROPERTY]").toString())
.build();
ApiFuture<DataRetentionSettings> future =
analyticsAdminServiceClient.getDataRetentionSettingsCallable().futureCall(request);
// Do something.
DataRetentionSettings response = future.get();
}
Type | Description |
UnaryCallable<GetDataRetentionSettingsRequest,DataRetentionSettings> |
getDataSharingSettings(DataSharingSettingsName name)
public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName name)
Get data sharing settings on an account. Data sharing settings are singletons.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
}
Name | Description |
name | DataSharingSettingsName Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" |
Type | Description |
DataSharingSettings |
getDataSharingSettings(GetDataSharingSettingsRequest request)
public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRequest request)
Get data sharing settings on an account. Data sharing settings are singletons.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataSharingSettingsRequest request =
GetDataSharingSettingsRequest.newBuilder()
.setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
.build();
DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(request);
}
Name | Description |
request | GetDataSharingSettingsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataSharingSettings |
getDataSharingSettings(String name)
public final DataSharingSettings getDataSharingSettings(String name)
Get data sharing settings on an account. Data sharing settings are singletons.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataSharingSettingsName.of("[ACCOUNT]").toString();
DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
}
Name | Description |
name | String Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" |
Type | Description |
DataSharingSettings |
getDataSharingSettingsCallable()
public final UnaryCallable<GetDataSharingSettingsRequest,DataSharingSettings> getDataSharingSettingsCallable()
Get data sharing settings on an account. Data sharing settings are singletons.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataSharingSettingsRequest request =
GetDataSharingSettingsRequest.newBuilder()
.setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
.build();
ApiFuture<DataSharingSettings> future =
analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request);
// Do something.
DataSharingSettings response = future.get();
}
Type | Description |
UnaryCallable<GetDataSharingSettingsRequest,DataSharingSettings> |
getDataStream(DataStreamName name)
public final DataStream getDataStream(DataStreamName name)
Lookup for a single DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
DataStream response = analyticsAdminServiceClient.getDataStream(name);
}
Name | Description |
name | DataStreamName Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678 |
Type | Description |
DataStream |
getDataStream(GetDataStreamRequest request)
public final DataStream getDataStream(GetDataStreamRequest request)
Lookup for a single DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataStreamRequest request =
GetDataStreamRequest.newBuilder()
.setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
DataStream response = analyticsAdminServiceClient.getDataStream(request);
}
Name | Description |
request | GetDataStreamRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataStream |
getDataStream(String name)
public final DataStream getDataStream(String name)
Lookup for a single DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
DataStream response = analyticsAdminServiceClient.getDataStream(name);
}
Name | Description |
name | String Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678 |
Type | Description |
DataStream |
getDataStreamCallable()
public final UnaryCallable<GetDataStreamRequest,DataStream> getDataStreamCallable()
Lookup for a single DataStream.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataStreamRequest request =
GetDataStreamRequest.newBuilder()
.setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
ApiFuture<DataStream> future =
analyticsAdminServiceClient.getDataStreamCallable().futureCall(request);
// Do something.
DataStream response = future.get();
}
Type | Description |
UnaryCallable<GetDataStreamRequest,DataStream> |
getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest request)
public final MeasurementProtocolSecret getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest request)
Lookup for a single "GA4" MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetMeasurementProtocolSecretRequest request =
GetMeasurementProtocolSecretRequest.newBuilder()
.setName(
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString())
.build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.getMeasurementProtocolSecret(request);
}
Name | Description |
request | GetMeasurementProtocolSecretRequest The request object containing all of the parameters for the API call. |
Type | Description |
MeasurementProtocolSecret |
getMeasurementProtocolSecret(MeasurementProtocolSecretName name)
public final MeasurementProtocolSecret getMeasurementProtocolSecret(MeasurementProtocolSecretName name)
Lookup for a single "GA4" MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
MeasurementProtocolSecretName name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
MeasurementProtocolSecret response =
analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
}
Name | Description |
name | MeasurementProtocolSecretName Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} |
Type | Description |
MeasurementProtocolSecret |
getMeasurementProtocolSecret(String name)
public final MeasurementProtocolSecret getMeasurementProtocolSecret(String name)
Lookup for a single "GA4" MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
}
Name | Description |
name | String Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} |
Type | Description |
MeasurementProtocolSecret |
getMeasurementProtocolSecretCallable()
public final UnaryCallable<GetMeasurementProtocolSecretRequest,MeasurementProtocolSecret> getMeasurementProtocolSecretCallable()
Lookup for a single "GA4" MeasurementProtocolSecret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetMeasurementProtocolSecretRequest request =
GetMeasurementProtocolSecretRequest.newBuilder()
.setName(
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString())
.build();
ApiFuture<MeasurementProtocolSecret> future =
analyticsAdminServiceClient.getMeasurementProtocolSecretCallable().futureCall(request);
// Do something.
MeasurementProtocolSecret response = future.get();
}
Type | Description |
UnaryCallable<GetMeasurementProtocolSecretRequest,MeasurementProtocolSecret> |
getProperty(GetPropertyRequest request)
public final Property getProperty(GetPropertyRequest request)
Lookup for a single "GA4" Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetPropertyRequest request =
GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
Property response = analyticsAdminServiceClient.getProperty(request);
}
Name | Description |
request | GetPropertyRequest The request object containing all of the parameters for the API call. |
Type | Description |
Property |
getProperty(PropertyName name)
public final Property getProperty(PropertyName name)
Lookup for a single "GA4" Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName name = PropertyName.of("[PROPERTY]");
Property response = analyticsAdminServiceClient.getProperty(name);
}
Name | Description |
name | PropertyName Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000" |
Type | Description |
Property |
getProperty(String name)
public final Property getProperty(String name)
Lookup for a single "GA4" Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = PropertyName.of("[PROPERTY]").toString();
Property response = analyticsAdminServiceClient.getProperty(name);
}
Name | Description |
name | String Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000" |
Type | Description |
Property |
getPropertyCallable()
public final UnaryCallable<GetPropertyRequest,Property> getPropertyCallable()
Lookup for a single "GA4" Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetPropertyRequest request =
GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
ApiFuture<Property> future =
analyticsAdminServiceClient.getPropertyCallable().futureCall(request);
// Do something.
Property response = future.get();
}
Type | Description |
UnaryCallable<GetPropertyRequest,Property> |
getSettings()
public final AnalyticsAdminServiceSettings getSettings()
Type | Description |
AnalyticsAdminServiceSettings |
getStub()
public AnalyticsAdminServiceStub getStub()
Type | Description |
AnalyticsAdminServiceStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listAccountSummaries(ListAccountSummariesRequest request)
public final AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse listAccountSummaries(ListAccountSummariesRequest request)
Returns summaries of all accounts accessible by the caller.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountSummariesRequest request =
ListAccountSummariesRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AccountSummary element :
analyticsAdminServiceClient.listAccountSummaries(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListAccountSummariesRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse |
listAccountSummariesCallable()
public final UnaryCallable<ListAccountSummariesRequest,ListAccountSummariesResponse> listAccountSummariesCallable()
Returns summaries of all accounts accessible by the caller.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountSummariesRequest request =
ListAccountSummariesRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAccountSummariesResponse response =
analyticsAdminServiceClient.listAccountSummariesCallable().call(request);
for (AccountSummary element : response.getAccountSummariesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListAccountSummariesRequest,ListAccountSummariesResponse> |
listAccountSummariesPagedCallable()
public final UnaryCallable<ListAccountSummariesRequest,AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse> listAccountSummariesPagedCallable()
Returns summaries of all accounts accessible by the caller.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountSummariesRequest request =
ListAccountSummariesRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AccountSummary> future =
analyticsAdminServiceClient.listAccountSummariesPagedCallable().futureCall(request);
// Do something.
for (AccountSummary element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListAccountSummariesRequest,ListAccountSummariesPagedResponse> |
listAccounts(ListAccountsRequest request)
public final AnalyticsAdminServiceClient.ListAccountsPagedResponse listAccounts(ListAccountsRequest request)
Returns all accounts accessible by the caller.
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
for (Account element : analyticsAdminServiceClient.listAccounts(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListAccountsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListAccountsPagedResponse |
listAccountsCallable()
public final UnaryCallable<ListAccountsRequest,ListAccountsResponse> listAccountsCallable()
Returns all accounts accessible by the caller.
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
while (true) {
ListAccountsResponse response =
analyticsAdminServiceClient.listAccountsCallable().call(request);
for (Account element : response.getAccountsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListAccountsRequest,ListAccountsResponse> |
listAccountsPagedCallable()
public final UnaryCallable<ListAccountsRequest,AnalyticsAdminServiceClient.ListAccountsPagedResponse> listAccountsPagedCallable()
Returns all accounts accessible by the caller.
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
ApiFuture<Account> future =
analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request);
// Do something.
for (Account element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListAccountsRequest,ListAccountsPagedResponse> |
listConversionEvents(ListConversionEventsRequest request)
public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(ListConversionEventsRequest request)
Returns a list of conversion events in the specified parent property.
Returns an empty list if no conversion events are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListConversionEventsRequest request =
ListConversionEventsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ConversionEvent element :
analyticsAdminServiceClient.listConversionEvents(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListConversionEventsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListConversionEventsPagedResponse |
listConversionEvents(PropertyName parent)
public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(PropertyName parent)
Returns a list of conversion events in the specified parent property.
Returns an empty list if no conversion events are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (ConversionEvent element :
analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. The resource name of the parent property. Example: 'properties/123' |
Type | Description |
AnalyticsAdminServiceClient.ListConversionEventsPagedResponse |
listConversionEvents(String parent)
public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(String parent)
Returns a list of conversion events in the specified parent property.
Returns an empty list if no conversion events are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (ConversionEvent element :
analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the parent property. Example: 'properties/123' |
Type | Description |
AnalyticsAdminServiceClient.ListConversionEventsPagedResponse |
listConversionEventsCallable()
public final UnaryCallable<ListConversionEventsRequest,ListConversionEventsResponse> listConversionEventsCallable()
Returns a list of conversion events in the specified parent property.
Returns an empty list if no conversion events are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListConversionEventsRequest request =
ListConversionEventsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListConversionEventsResponse response =
analyticsAdminServiceClient.listConversionEventsCallable().call(request);
for (ConversionEvent element : response.getConversionEventsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListConversionEventsRequest,ListConversionEventsResponse> |
listConversionEventsPagedCallable()
public final UnaryCallable<ListConversionEventsRequest,AnalyticsAdminServiceClient.ListConversionEventsPagedResponse> listConversionEventsPagedCallable()
Returns a list of conversion events in the specified parent property.
Returns an empty list if no conversion events are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListConversionEventsRequest request =
ListConversionEventsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ConversionEvent> future =
analyticsAdminServiceClient.listConversionEventsPagedCallable().futureCall(request);
// Do something.
for (ConversionEvent element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListConversionEventsRequest,ListConversionEventsPagedResponse> |
listCustomDimensions(ListCustomDimensionsRequest request)
public final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(ListCustomDimensionsRequest request)
Lists CustomDimensions on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomDimensionsRequest request =
ListCustomDimensionsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (CustomDimension element :
analyticsAdminServiceClient.listCustomDimensions(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListCustomDimensionsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse |
listCustomDimensions(PropertyName parent)
public final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName parent)
Lists CustomDimensions on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (CustomDimension element :
analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse |
listCustomDimensions(String parent)
public final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(String parent)
Lists CustomDimensions on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (CustomDimension element :
analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse |
listCustomDimensionsCallable()
public final UnaryCallable<ListCustomDimensionsRequest,ListCustomDimensionsResponse> listCustomDimensionsCallable()
Lists CustomDimensions on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomDimensionsRequest request =
ListCustomDimensionsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListCustomDimensionsResponse response =
analyticsAdminServiceClient.listCustomDimensionsCallable().call(request);
for (CustomDimension element : response.getCustomDimensionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListCustomDimensionsRequest,ListCustomDimensionsResponse> |
listCustomDimensionsPagedCallable()
public final UnaryCallable<ListCustomDimensionsRequest,AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse> listCustomDimensionsPagedCallable()
Lists CustomDimensions on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomDimensionsRequest request =
ListCustomDimensionsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<CustomDimension> future =
analyticsAdminServiceClient.listCustomDimensionsPagedCallable().futureCall(request);
// Do something.
for (CustomDimension element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListCustomDimensionsRequest,ListCustomDimensionsPagedResponse> |
listCustomMetrics(ListCustomMetricsRequest request)
public final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsRequest request)
Lists CustomMetrics on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomMetricsRequest request =
ListCustomMetricsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (CustomMetric element :
analyticsAdminServiceClient.listCustomMetrics(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListCustomMetricsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse |
listCustomMetrics(PropertyName parent)
public final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(PropertyName parent)
Lists CustomMetrics on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (CustomMetric element :
analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse |
listCustomMetrics(String parent)
public final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(String parent)
Lists CustomMetrics on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (CustomMetric element :
analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse |
listCustomMetricsCallable()
public final UnaryCallable<ListCustomMetricsRequest,ListCustomMetricsResponse> listCustomMetricsCallable()
Lists CustomMetrics on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomMetricsRequest request =
ListCustomMetricsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListCustomMetricsResponse response =
analyticsAdminServiceClient.listCustomMetricsCallable().call(request);
for (CustomMetric element : response.getCustomMetricsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListCustomMetricsRequest,ListCustomMetricsResponse> |
listCustomMetricsPagedCallable()
public final UnaryCallable<ListCustomMetricsRequest,AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse> listCustomMetricsPagedCallable()
Lists CustomMetrics on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListCustomMetricsRequest request =
ListCustomMetricsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<CustomMetric> future =
analyticsAdminServiceClient.listCustomMetricsPagedCallable().futureCall(request);
// Do something.
for (CustomMetric element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListCustomMetricsRequest,ListCustomMetricsPagedResponse> |
listDataStreams(ListDataStreamsRequest request)
public final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest request)
Lists DataStreams on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDataStreamsRequest request =
ListDataStreamsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DataStream element : analyticsAdminServiceClient.listDataStreams(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListDataStreamsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListDataStreamsPagedResponse |
listDataStreams(PropertyName parent)
public final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(PropertyName parent)
Lists DataStreams on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListDataStreamsPagedResponse |
listDataStreams(String parent)
public final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(String parent)
Lists DataStreams on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListDataStreamsPagedResponse |
listDataStreamsCallable()
public final UnaryCallable<ListDataStreamsRequest,ListDataStreamsResponse> listDataStreamsCallable()
Lists DataStreams on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDataStreamsRequest request =
ListDataStreamsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDataStreamsResponse response =
analyticsAdminServiceClient.listDataStreamsCallable().call(request);
for (DataStream element : response.getDataStreamsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListDataStreamsRequest,ListDataStreamsResponse> |
listDataStreamsPagedCallable()
public final UnaryCallable<ListDataStreamsRequest,AnalyticsAdminServiceClient.ListDataStreamsPagedResponse> listDataStreamsPagedCallable()
Lists DataStreams on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDataStreamsRequest request =
ListDataStreamsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DataStream> future =
analyticsAdminServiceClient.listDataStreamsPagedCallable().futureCall(request);
// Do something.
for (DataStream element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListDataStreamsRequest,ListDataStreamsPagedResponse> |
listFirebaseLinks(ListFirebaseLinksRequest request)
public final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksRequest request)
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListFirebaseLinksRequest request =
ListFirebaseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (FirebaseLink element :
analyticsAdminServiceClient.listFirebaseLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListFirebaseLinksRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse |
listFirebaseLinks(PropertyName parent)
public final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName parent)
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (FirebaseLink element :
analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. Format: properties/{property_id} Example: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse |
listFirebaseLinks(String parent)
public final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(String parent)
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (FirebaseLink element :
analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Format: properties/{property_id} Example: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse |
listFirebaseLinksCallable()
public final UnaryCallable<ListFirebaseLinksRequest,ListFirebaseLinksResponse> listFirebaseLinksCallable()
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListFirebaseLinksRequest request =
ListFirebaseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListFirebaseLinksResponse response =
analyticsAdminServiceClient.listFirebaseLinksCallable().call(request);
for (FirebaseLink element : response.getFirebaseLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListFirebaseLinksRequest,ListFirebaseLinksResponse> |
listFirebaseLinksPagedCallable()
public final UnaryCallable<ListFirebaseLinksRequest,AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse> listFirebaseLinksPagedCallable()
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListFirebaseLinksRequest request =
ListFirebaseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<FirebaseLink> future =
analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request);
// Do something.
for (FirebaseLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListFirebaseLinksRequest,ListFirebaseLinksPagedResponse> |
listGoogleAdsLinks(ListGoogleAdsLinksRequest request)
public final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(ListGoogleAdsLinksRequest request)
Lists GoogleAdsLinks on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListGoogleAdsLinksRequest request =
ListGoogleAdsLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (GoogleAdsLink element :
analyticsAdminServiceClient.listGoogleAdsLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListGoogleAdsLinksRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse |
listGoogleAdsLinks(PropertyName parent)
public final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName parent)
Lists GoogleAdsLinks on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName parent = PropertyName.of("[PROPERTY]");
for (GoogleAdsLink element :
analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | PropertyName Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse |
listGoogleAdsLinks(String parent)
public final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent)
Lists GoogleAdsLinks on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = PropertyName.of("[PROPERTY]").toString();
for (GoogleAdsLink element :
analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Example format: properties/1234 |
Type | Description |
AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse |
listGoogleAdsLinksCallable()
public final UnaryCallable<ListGoogleAdsLinksRequest,ListGoogleAdsLinksResponse> listGoogleAdsLinksCallable()
Lists GoogleAdsLinks on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListGoogleAdsLinksRequest request =
ListGoogleAdsLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListGoogleAdsLinksResponse response =
analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request);
for (GoogleAdsLink element : response.getGoogleAdsLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListGoogleAdsLinksRequest,ListGoogleAdsLinksResponse> |
listGoogleAdsLinksPagedCallable()
public final UnaryCallable<ListGoogleAdsLinksRequest,AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse> listGoogleAdsLinksPagedCallable()
Lists GoogleAdsLinks on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListGoogleAdsLinksRequest request =
ListGoogleAdsLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<GoogleAdsLink> future =
analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request);
// Do something.
for (GoogleAdsLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListGoogleAdsLinksRequest,ListGoogleAdsLinksPagedResponse> |
listMeasurementProtocolSecrets(DataStreamName parent)
public final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(DataStreamName parent)
Returns child MeasurementProtocolSecrets under the specified parent Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
for (MeasurementProtocolSecret element :
analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | DataStreamName Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets |
Type | Description |
AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse |
listMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest request)
public final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest request)
Returns child MeasurementProtocolSecrets under the specified parent Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListMeasurementProtocolSecretsRequest request =
ListMeasurementProtocolSecretsRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (MeasurementProtocolSecret element :
analyticsAdminServiceClient.listMeasurementProtocolSecrets(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListMeasurementProtocolSecretsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse |
listMeasurementProtocolSecrets(String parent)
public final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(String parent)
Returns child MeasurementProtocolSecrets under the specified parent Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
for (MeasurementProtocolSecret element :
analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets |
Type | Description |
AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse |
listMeasurementProtocolSecretsCallable()
public final UnaryCallable<ListMeasurementProtocolSecretsRequest,ListMeasurementProtocolSecretsResponse> listMeasurementProtocolSecretsCallable()
Returns child MeasurementProtocolSecrets under the specified parent Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListMeasurementProtocolSecretsRequest request =
ListMeasurementProtocolSecretsRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListMeasurementProtocolSecretsResponse response =
analyticsAdminServiceClient.listMeasurementProtocolSecretsCallable().call(request);
for (MeasurementProtocolSecret element : response.getMeasurementProtocolSecretsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListMeasurementProtocolSecretsRequest,ListMeasurementProtocolSecretsResponse> |
listMeasurementProtocolSecretsPagedCallable()
public final UnaryCallable<ListMeasurementProtocolSecretsRequest,AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse> listMeasurementProtocolSecretsPagedCallable()
Returns child MeasurementProtocolSecrets under the specified parent Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListMeasurementProtocolSecretsRequest request =
ListMeasurementProtocolSecretsRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<MeasurementProtocolSecret> future =
analyticsAdminServiceClient
.listMeasurementProtocolSecretsPagedCallable()
.futureCall(request);
// Do something.
for (MeasurementProtocolSecret element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListMeasurementProtocolSecretsRequest,ListMeasurementProtocolSecretsPagedResponse> |
listProperties(ListPropertiesRequest request)
public final AnalyticsAdminServiceClient.ListPropertiesPagedResponse listProperties(ListPropertiesRequest request)
Returns child Properties under the specified parent Account.
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
for (Property element : analyticsAdminServiceClient.listProperties(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListPropertiesRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.ListPropertiesPagedResponse |
listPropertiesCallable()
public final UnaryCallable<ListPropertiesRequest,ListPropertiesResponse> listPropertiesCallable()
Returns child Properties under the specified parent Account.
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
while (true) {
ListPropertiesResponse response =
analyticsAdminServiceClient.listPropertiesCallable().call(request);
for (Property element : response.getPropertiesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListPropertiesRequest,ListPropertiesResponse> |
listPropertiesPagedCallable()
public final UnaryCallable<ListPropertiesRequest,AnalyticsAdminServiceClient.ListPropertiesPagedResponse> listPropertiesPagedCallable()
Returns child Properties under the specified parent Account.
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
ApiFuture<Property> future =
analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request);
// Do something.
for (Property element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListPropertiesRequest,ListPropertiesPagedResponse> |
provisionAccountTicket(ProvisionAccountTicketRequest request)
public final ProvisionAccountTicketResponse provisionAccountTicket(ProvisionAccountTicketRequest request)
Requests a ticket for creating an account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ProvisionAccountTicketRequest request =
ProvisionAccountTicketRequest.newBuilder()
.setAccount(Account.newBuilder().build())
.setRedirectUri("redirectUri1970337776")
.build();
ProvisionAccountTicketResponse response =
analyticsAdminServiceClient.provisionAccountTicket(request);
}
Name | Description |
request | ProvisionAccountTicketRequest The request object containing all of the parameters for the API call. |
Type | Description |
ProvisionAccountTicketResponse |
provisionAccountTicketCallable()
public final UnaryCallable<ProvisionAccountTicketRequest,ProvisionAccountTicketResponse> provisionAccountTicketCallable()
Requests a ticket for creating an account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ProvisionAccountTicketRequest request =
ProvisionAccountTicketRequest.newBuilder()
.setAccount(Account.newBuilder().build())
.setRedirectUri("redirectUri1970337776")
.build();
ApiFuture<ProvisionAccountTicketResponse> future =
analyticsAdminServiceClient.provisionAccountTicketCallable().futureCall(request);
// Do something.
ProvisionAccountTicketResponse response = future.get();
}
Type | Description |
UnaryCallable<ProvisionAccountTicketRequest,ProvisionAccountTicketResponse> |
searchChangeHistoryEvents(SearchChangeHistoryEventsRequest request)
public final AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents(SearchChangeHistoryEventsRequest request)
Searches through all changes to an account or its children given the specified set of filters.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchChangeHistoryEventsRequest request =
SearchChangeHistoryEventsRequest.newBuilder()
.setAccount(AccountName.of("[ACCOUNT]").toString())
.setProperty(PropertyName.of("[PROPERTY]").toString())
.addAllResourceType(new ArrayList<ChangeHistoryResourceType>())
.addAllAction(new ArrayList<ActionType>())
.addAllActorEmail(new ArrayList<String>())
.setEarliestChangeTime(Timestamp.newBuilder().build())
.setLatestChangeTime(Timestamp.newBuilder().build())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ChangeHistoryEvent element :
analyticsAdminServiceClient.searchChangeHistoryEvents(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | SearchChangeHistoryEventsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse |
searchChangeHistoryEventsCallable()
public final UnaryCallable<SearchChangeHistoryEventsRequest,SearchChangeHistoryEventsResponse> searchChangeHistoryEventsCallable()
Searches through all changes to an account or its children given the specified set of filters.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchChangeHistoryEventsRequest request =
SearchChangeHistoryEventsRequest.newBuilder()
.setAccount(AccountName.of("[ACCOUNT]").toString())
.setProperty(PropertyName.of("[PROPERTY]").toString())
.addAllResourceType(new ArrayList<ChangeHistoryResourceType>())
.addAllAction(new ArrayList<ActionType>())
.addAllActorEmail(new ArrayList<String>())
.setEarliestChangeTime(Timestamp.newBuilder().build())
.setLatestChangeTime(Timestamp.newBuilder().build())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
SearchChangeHistoryEventsResponse response =
analyticsAdminServiceClient.searchChangeHistoryEventsCallable().call(request);
for (ChangeHistoryEvent element : response.getChangeHistoryEventsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<SearchChangeHistoryEventsRequest,SearchChangeHistoryEventsResponse> |
searchChangeHistoryEventsPagedCallable()
public final UnaryCallable<SearchChangeHistoryEventsRequest,AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse> searchChangeHistoryEventsPagedCallable()
Searches through all changes to an account or its children given the specified set of filters.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchChangeHistoryEventsRequest request =
SearchChangeHistoryEventsRequest.newBuilder()
.setAccount(AccountName.of("[ACCOUNT]").toString())
.setProperty(PropertyName.of("[PROPERTY]").toString())
.addAllResourceType(new ArrayList<ChangeHistoryResourceType>())
.addAllAction(new ArrayList<ActionType>())
.addAllActorEmail(new ArrayList<String>())
.setEarliestChangeTime(Timestamp.newBuilder().build())
.setLatestChangeTime(Timestamp.newBuilder().build())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ChangeHistoryEvent> future =
analyticsAdminServiceClient.searchChangeHistoryEventsPagedCallable().futureCall(request);
// Do something.
for (ChangeHistoryEvent element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<SearchChangeHistoryEventsRequest,SearchChangeHistoryEventsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateAccount(Account account, FieldMask updateMask)
public final Account updateAccount(Account account, FieldMask updateMask)
Updates an account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
Account account = Account.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Account response = analyticsAdminServiceClient.updateAccount(account, updateMask);
}
Name | Description |
account | Account Required. The account to update. The account's |
updateMask | FieldMask Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
Account |
updateAccount(UpdateAccountRequest request)
public final Account updateAccount(UpdateAccountRequest request)
Updates an account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAccountRequest request =
UpdateAccountRequest.newBuilder()
.setAccount(Account.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Account response = analyticsAdminServiceClient.updateAccount(request);
}
Name | Description |
request | UpdateAccountRequest The request object containing all of the parameters for the API call. |
Type | Description |
Account |
updateAccountCallable()
public final UnaryCallable<UpdateAccountRequest,Account> updateAccountCallable()
Updates an account.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAccountRequest request =
UpdateAccountRequest.newBuilder()
.setAccount(Account.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Account> future =
analyticsAdminServiceClient.updateAccountCallable().futureCall(request);
// Do something.
Account response = future.get();
}
Type | Description |
UnaryCallable<UpdateAccountRequest,Account> |
updateCustomDimension(CustomDimension customDimension, FieldMask updateMask)
public final CustomDimension updateCustomDimension(CustomDimension customDimension, FieldMask updateMask)
Updates a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomDimension customDimension = CustomDimension.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
CustomDimension response =
analyticsAdminServiceClient.updateCustomDimension(customDimension, updateMask);
}
Name | Description |
customDimension | CustomDimension The CustomDimension to update |
updateMask | FieldMask Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
CustomDimension |
updateCustomDimension(UpdateCustomDimensionRequest request)
public final CustomDimension updateCustomDimension(UpdateCustomDimensionRequest request)
Updates a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateCustomDimensionRequest request =
UpdateCustomDimensionRequest.newBuilder()
.setCustomDimension(CustomDimension.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
CustomDimension response = analyticsAdminServiceClient.updateCustomDimension(request);
}
Name | Description |
request | UpdateCustomDimensionRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomDimension |
updateCustomDimensionCallable()
public final UnaryCallable<UpdateCustomDimensionRequest,CustomDimension> updateCustomDimensionCallable()
Updates a CustomDimension on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateCustomDimensionRequest request =
UpdateCustomDimensionRequest.newBuilder()
.setCustomDimension(CustomDimension.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<CustomDimension> future =
analyticsAdminServiceClient.updateCustomDimensionCallable().futureCall(request);
// Do something.
CustomDimension response = future.get();
}
Type | Description |
UnaryCallable<UpdateCustomDimensionRequest,CustomDimension> |
updateCustomMetric(CustomMetric customMetric, FieldMask updateMask)
public final CustomMetric updateCustomMetric(CustomMetric customMetric, FieldMask updateMask)
Updates a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomMetric customMetric = CustomMetric.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
CustomMetric response =
analyticsAdminServiceClient.updateCustomMetric(customMetric, updateMask);
}
Name | Description |
customMetric | CustomMetric The CustomMetric to update |
updateMask | FieldMask Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
CustomMetric |
updateCustomMetric(UpdateCustomMetricRequest request)
public final CustomMetric updateCustomMetric(UpdateCustomMetricRequest request)
Updates a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateCustomMetricRequest request =
UpdateCustomMetricRequest.newBuilder()
.setCustomMetric(CustomMetric.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
CustomMetric response = analyticsAdminServiceClient.updateCustomMetric(request);
}
Name | Description |
request | UpdateCustomMetricRequest The request object containing all of the parameters for the API call. |
Type | Description |
CustomMetric |
updateCustomMetricCallable()
public final UnaryCallable<UpdateCustomMetricRequest,CustomMetric> updateCustomMetricCallable()
Updates a CustomMetric on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateCustomMetricRequest request =
UpdateCustomMetricRequest.newBuilder()
.setCustomMetric(CustomMetric.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<CustomMetric> future =
analyticsAdminServiceClient.updateCustomMetricCallable().futureCall(request);
// Do something.
CustomMetric response = future.get();
}
Type | Description |
UnaryCallable<UpdateCustomMetricRequest,CustomMetric> |
updateDataRetentionSettings(DataRetentionSettings dataRetentionSettings, FieldMask updateMask)
public final DataRetentionSettings updateDataRetentionSettings(DataRetentionSettings dataRetentionSettings, FieldMask updateMask)
Updates the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataRetentionSettings response =
analyticsAdminServiceClient.updateDataRetentionSettings(
dataRetentionSettings, updateMask);
}
Name | Description |
dataRetentionSettings | DataRetentionSettings Required. The settings to update. The |
updateMask | FieldMask Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
DataRetentionSettings |
updateDataRetentionSettings(UpdateDataRetentionSettingsRequest request)
public final DataRetentionSettings updateDataRetentionSettings(UpdateDataRetentionSettingsRequest request)
Updates the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataRetentionSettingsRequest request =
UpdateDataRetentionSettingsRequest.newBuilder()
.setDataRetentionSettings(DataRetentionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DataRetentionSettings response =
analyticsAdminServiceClient.updateDataRetentionSettings(request);
}
Name | Description |
request | UpdateDataRetentionSettingsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataRetentionSettings |
updateDataRetentionSettingsCallable()
public final UnaryCallable<UpdateDataRetentionSettingsRequest,DataRetentionSettings> updateDataRetentionSettingsCallable()
Updates the singleton data retention settings for this property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataRetentionSettingsRequest request =
UpdateDataRetentionSettingsRequest.newBuilder()
.setDataRetentionSettings(DataRetentionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DataRetentionSettings> future =
analyticsAdminServiceClient.updateDataRetentionSettingsCallable().futureCall(request);
// Do something.
DataRetentionSettings response = future.get();
}
Type | Description |
UnaryCallable<UpdateDataRetentionSettingsRequest,DataRetentionSettings> |
updateDataStream(DataStream dataStream, FieldMask updateMask)
public final DataStream updateDataStream(DataStream dataStream, FieldMask updateMask)
Updates a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStream dataStream = DataStream.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataStream response = analyticsAdminServiceClient.updateDataStream(dataStream, updateMask);
}
Name | Description |
dataStream | DataStream The DataStream to update |
updateMask | FieldMask Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
DataStream |
updateDataStream(UpdateDataStreamRequest request)
public final DataStream updateDataStream(UpdateDataStreamRequest request)
Updates a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataStreamRequest request =
UpdateDataStreamRequest.newBuilder()
.setDataStream(DataStream.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DataStream response = analyticsAdminServiceClient.updateDataStream(request);
}
Name | Description |
request | UpdateDataStreamRequest The request object containing all of the parameters for the API call. |
Type | Description |
DataStream |
updateDataStreamCallable()
public final UnaryCallable<UpdateDataStreamRequest,DataStream> updateDataStreamCallable()
Updates a DataStream on a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataStreamRequest request =
UpdateDataStreamRequest.newBuilder()
.setDataStream(DataStream.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DataStream> future =
analyticsAdminServiceClient.updateDataStreamCallable().futureCall(request);
// Do something.
DataStream response = future.get();
}
Type | Description |
UnaryCallable<UpdateDataStreamRequest,DataStream> |
updateGoogleAdsLink(GoogleAdsLink googleAdsLink, FieldMask updateMask)
public final GoogleAdsLink updateGoogleAdsLink(GoogleAdsLink googleAdsLink, FieldMask updateMask)
Updates a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GoogleAdsLink response =
analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask);
}
Name | Description |
googleAdsLink | GoogleAdsLink The GoogleAdsLink to update |
updateMask | FieldMask Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
GoogleAdsLink |
updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request)
public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request)
Updates a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateGoogleAdsLinkRequest request =
UpdateGoogleAdsLinkRequest.newBuilder()
.setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(request);
}
Name | Description |
request | UpdateGoogleAdsLinkRequest The request object containing all of the parameters for the API call. |
Type | Description |
GoogleAdsLink |
updateGoogleAdsLinkCallable()
public final UnaryCallable<UpdateGoogleAdsLinkRequest,GoogleAdsLink> updateGoogleAdsLinkCallable()
Updates a GoogleAdsLink on a property
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateGoogleAdsLinkRequest request =
UpdateGoogleAdsLinkRequest.newBuilder()
.setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<GoogleAdsLink> future =
analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request);
// Do something.
GoogleAdsLink response = future.get();
}
Type | Description |
UnaryCallable<UpdateGoogleAdsLinkRequest,GoogleAdsLink> |
updateMeasurementProtocolSecret(MeasurementProtocolSecret measurementProtocolSecret, FieldMask updateMask)
public final MeasurementProtocolSecret updateMeasurementProtocolSecret(MeasurementProtocolSecret measurementProtocolSecret, FieldMask updateMask)
Updates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
MeasurementProtocolSecret measurementProtocolSecret =
MeasurementProtocolSecret.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.updateMeasurementProtocolSecret(
measurementProtocolSecret, updateMask);
}
Name | Description |
measurementProtocolSecret | MeasurementProtocolSecret Required. The measurement protocol secret to update. |
updateMask | FieldMask The list of fields to be updated. Omitted fields will not be updated. |
Type | Description |
MeasurementProtocolSecret |
updateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest request)
public final MeasurementProtocolSecret updateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest request)
Updates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateMeasurementProtocolSecretRequest request =
UpdateMeasurementProtocolSecretRequest.newBuilder()
.setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.updateMeasurementProtocolSecret(request);
}
Name | Description |
request | UpdateMeasurementProtocolSecretRequest The request object containing all of the parameters for the API call. |
Type | Description |
MeasurementProtocolSecret |
updateMeasurementProtocolSecretCallable()
public final UnaryCallable<UpdateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> updateMeasurementProtocolSecretCallable()
Updates a measurement protocol secret.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateMeasurementProtocolSecretRequest request =
UpdateMeasurementProtocolSecretRequest.newBuilder()
.setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<MeasurementProtocolSecret> future =
analyticsAdminServiceClient.updateMeasurementProtocolSecretCallable().futureCall(request);
// Do something.
MeasurementProtocolSecret response = future.get();
}
Type | Description |
UnaryCallable<UpdateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> |
updateProperty(Property property, FieldMask updateMask)
public final Property updateProperty(Property property, FieldMask updateMask)
Updates a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
Property property = Property.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Property response = analyticsAdminServiceClient.updateProperty(property, updateMask);
}
Name | Description |
property | Property Required. The property to update. The property's |
updateMask | FieldMask Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
Type | Description |
Property |
updateProperty(UpdatePropertyRequest request)
public final Property updateProperty(UpdatePropertyRequest request)
Updates a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdatePropertyRequest request =
UpdatePropertyRequest.newBuilder()
.setProperty(Property.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Property response = analyticsAdminServiceClient.updateProperty(request);
}
Name | Description |
request | UpdatePropertyRequest The request object containing all of the parameters for the API call. |
Type | Description |
Property |
updatePropertyCallable()
public final UnaryCallable<UpdatePropertyRequest,Property> updatePropertyCallable()
Updates a property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdatePropertyRequest request =
UpdatePropertyRequest.newBuilder()
.setProperty(Property.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Property> future =
analyticsAdminServiceClient.updatePropertyCallable().futureCall(request);
// Do something.
Property response = future.get();
}
Type | Description |
UnaryCallable<UpdatePropertyRequest,Property> |