Class AnalyticsAdminServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| Method | Description | Method Variants |
|---|---|---|
GetAccount |
Lookup for a single Account. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAccounts |
Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAccount |
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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAccount |
Updates an account. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ProvisionAccountTicket |
Requests a ticket for creating an account. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAccountSummaries |
Returns summaries of all accounts accessible by the caller. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetProperty |
Lookup for a single GA Property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListProperties |
Returns child Properties under the specified parent Account. 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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateProperty |
Creates a Google Analytics property with the specified location and attributes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteProperty |
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, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateProperty |
Updates a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFirebaseLink |
Creates a FirebaseLink. Properties can have at most one FirebaseLink. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFirebaseLink |
Deletes a FirebaseLink on a property |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFirebaseLinks |
Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateGoogleAdsLink |
Creates a GoogleAdsLink. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGoogleAdsLink |
Updates a GoogleAdsLink on a property |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGoogleAdsLink |
Deletes a GoogleAdsLink on a property |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGoogleAdsLinks |
Lists GoogleAdsLinks on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataSharingSettings |
Get data sharing settings on an account. Data sharing settings are singletons. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMeasurementProtocolSecret |
Lookup for a single MeasurementProtocolSecret. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMeasurementProtocolSecrets |
Returns child MeasurementProtocolSecrets under the specified parent Property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMeasurementProtocolSecret |
Creates a measurement protocol secret. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMeasurementProtocolSecret |
Deletes target MeasurementProtocolSecret. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMeasurementProtocolSecret |
Updates a measurement protocol secret. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AcknowledgeUserDataCollection |
Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SearchChangeHistoryEvents |
Searches through all changes to an account or its children given the specified set of filters. Only returns the subset of changes supported by the API. The UI may return additional changes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateConversionEvent |
Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event with the specified attributes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateConversionEvent |
Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event with the specified attributes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConversionEvent |
Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConversionEvent |
Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event in a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListConversionEvents |
Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateKeyEvent |
Creates a Key Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateKeyEvent |
Updates a Key Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetKeyEvent |
Retrieve a single Key Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteKeyEvent |
Deletes a Key Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListKeyEvents |
Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCustomDimension |
Creates a CustomDimension. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCustomDimension |
Updates a CustomDimension on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCustomDimensions |
Lists CustomDimensions on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ArchiveCustomDimension |
Archives a CustomDimension on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCustomDimension |
Lookup for a single CustomDimension. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCustomMetric |
Creates a CustomMetric. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCustomMetric |
Updates a CustomMetric on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCustomMetrics |
Lists CustomMetrics on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ArchiveCustomMetric |
Archives a CustomMetric on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCustomMetric |
Lookup for a single CustomMetric. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataRetentionSettings |
Returns the singleton data retention settings for this property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDataRetentionSettings |
Updates the singleton data retention settings for this property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDataStream |
Creates a DataStream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDataStream |
Deletes a DataStream on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDataStream |
Updates a DataStream on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDataStreams |
Lists DataStreams on a property. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataStream |
Lookup for a single DataStream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RunAccessReport |
Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of AnalyticsAdminServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionAcknowledges the terms of user data collection for the specified property.Acknowledges the terms of user data collection for the specified property.final voidArchives a CustomDimension on a property.final voidArchives a CustomDimension on a property.final voidarchiveCustomDimension(String name) Archives a CustomDimension on a property.final UnaryCallable<ArchiveCustomDimensionRequest,com.google.protobuf.Empty> Archives a CustomDimension on a property.final voidArchives a CustomMetric on a property.final voidArchives a CustomMetric on a property.final voidarchiveCustomMetric(String name) Archives a CustomMetric on a property.final UnaryCallable<ArchiveCustomMetricRequest,com.google.protobuf.Empty> Archives a CustomMetric on a property.booleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final AnalyticsAdminServiceClientcreate()Constructs an instance of AnalyticsAdminServiceClient with default settings.static final AnalyticsAdminServiceClientcreate(AnalyticsAdminServiceSettings settings) Constructs an instance of AnalyticsAdminServiceClient, using the given settings.static final AnalyticsAdminServiceClientConstructs an instance of AnalyticsAdminServiceClient, using the given stub for making calls.final ConversionEventDeprecated.This method is deprecated and will be removed in the next major version update.final ConversionEventcreateConversionEvent(PropertyName parent, ConversionEvent conversionEvent) Deprecated.This method is deprecated and will be removed in the next major version update.final ConversionEventcreateConversionEvent(String parent, ConversionEvent conversionEvent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.final CustomDimensionCreates a CustomDimension.final CustomDimensioncreateCustomDimension(PropertyName parent, CustomDimension customDimension) Creates a CustomDimension.final CustomDimensioncreateCustomDimension(String parent, CustomDimension customDimension) Creates a CustomDimension.Creates a CustomDimension.final CustomMetricCreates a CustomMetric.final CustomMetriccreateCustomMetric(PropertyName parent, CustomMetric customMetric) Creates a CustomMetric.final CustomMetriccreateCustomMetric(String parent, CustomMetric customMetric) Creates a CustomMetric.Creates a CustomMetric.final DataStreamcreateDataStream(CreateDataStreamRequest request) Creates a DataStream.final DataStreamcreateDataStream(PropertyName parent, DataStream dataStream) Creates a DataStream.final DataStreamcreateDataStream(String parent, DataStream dataStream) Creates a DataStream.Creates a DataStream.final FirebaseLinkCreates a FirebaseLink.final FirebaseLinkcreateFirebaseLink(PropertyName parent, FirebaseLink firebaseLink) Creates a FirebaseLink.final FirebaseLinkcreateFirebaseLink(String parent, FirebaseLink firebaseLink) Creates a FirebaseLink.Creates a FirebaseLink.final GoogleAdsLinkCreates a GoogleAdsLink.final GoogleAdsLinkcreateGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink) Creates a GoogleAdsLink.final GoogleAdsLinkcreateGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink) Creates a GoogleAdsLink.Creates a GoogleAdsLink.final KeyEventcreateKeyEvent(CreateKeyEventRequest request) Creates a Key Event.final KeyEventcreateKeyEvent(PropertyName parent, KeyEvent keyEvent) Creates a Key Event.final KeyEventcreateKeyEvent(String parent, KeyEvent keyEvent) Creates a Key Event.Creates a Key Event.Creates a measurement protocol secret.createMeasurementProtocolSecret(DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret) Creates a measurement protocol secret.createMeasurementProtocolSecret(String parent, MeasurementProtocolSecret measurementProtocolSecret) Creates a measurement protocol secret.Creates a measurement protocol secret.final PropertycreateProperty(CreatePropertyRequest request) Creates a Google Analytics property with the specified location and attributes.final PropertycreateProperty(Property property) Creates a Google Analytics property with the specified location and attributes.Creates a Google Analytics property with the specified location and attributes.final voiddeleteAccount(AccountName name) Marks target Account as soft-deleted (ie: "trashed") and returns it.final voiddeleteAccount(DeleteAccountRequest request) Marks target Account as soft-deleted (ie: "trashed") and returns it.final voiddeleteAccount(String name) Marks target Account as soft-deleted (ie: "trashed") and returns it.final UnaryCallable<DeleteAccountRequest,com.google.protobuf.Empty> Marks target Account as soft-deleted (ie: "trashed") and returns it.final voidDeprecated.This method is deprecated and will be removed in the next major version update.final voidDeprecated.This method is deprecated and will be removed in the next major version update.final voiddeleteConversionEvent(String name) Deprecated.This method is deprecated and will be removed in the next major version update.final UnaryCallable<DeleteConversionEventRequest,com.google.protobuf.Empty> Deprecated.This method is deprecated and will be removed in the next major version update.final voidDeletes a DataStream on a property.final voiddeleteDataStream(DeleteDataStreamRequest request) Deletes a DataStream on a property.final voiddeleteDataStream(String name) Deletes a DataStream on a property.final UnaryCallable<DeleteDataStreamRequest,com.google.protobuf.Empty> Deletes a DataStream on a property.final voidDeletes a FirebaseLink on a propertyfinal voidDeletes a FirebaseLink on a propertyfinal voiddeleteFirebaseLink(String name) Deletes a FirebaseLink on a propertyfinal UnaryCallable<DeleteFirebaseLinkRequest,com.google.protobuf.Empty> Deletes a FirebaseLink on a propertyfinal voidDeletes a GoogleAdsLink on a propertyfinal voidDeletes a GoogleAdsLink on a propertyfinal voiddeleteGoogleAdsLink(String name) Deletes a GoogleAdsLink on a propertyfinal UnaryCallable<DeleteGoogleAdsLinkRequest,com.google.protobuf.Empty> Deletes a GoogleAdsLink on a propertyfinal voiddeleteKeyEvent(DeleteKeyEventRequest request) Deletes a Key Event.final voiddeleteKeyEvent(KeyEventName name) Deletes a Key Event.final voiddeleteKeyEvent(String name) Deletes a Key Event.final UnaryCallable<DeleteKeyEventRequest,com.google.protobuf.Empty> Deletes a Key Event.final voidDeletes target MeasurementProtocolSecret.final voidDeletes target MeasurementProtocolSecret.final voidDeletes target MeasurementProtocolSecret.final UnaryCallable<DeleteMeasurementProtocolSecretRequest,com.google.protobuf.Empty> Deletes target MeasurementProtocolSecret.final PropertydeleteProperty(DeletePropertyRequest request) Marks target Property as soft-deleted (ie: "trashed") and returns it.final PropertydeleteProperty(PropertyName name) Marks target Property as soft-deleted (ie: "trashed") and returns it.final PropertydeleteProperty(String name) Marks target Property as soft-deleted (ie: "trashed") and returns it.Marks target Property as soft-deleted (ie: "trashed") and returns it.final AccountgetAccount(AccountName name) Lookup for a single Account.final AccountgetAccount(GetAccountRequest request) Lookup for a single Account.final AccountgetAccount(String name) Lookup for a single Account.Lookup for a single Account.final ConversionEventDeprecated.This method is deprecated and will be removed in the next major version update.final ConversionEventDeprecated.This method is deprecated and will be removed in the next major version update.final ConversionEventgetConversionEvent(String name) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.final CustomDimensionLookup for a single CustomDimension.final CustomDimensionLookup for a single CustomDimension.final CustomDimensiongetCustomDimension(String name) Lookup for a single CustomDimension.Lookup for a single CustomDimension.final CustomMetricLookup for a single CustomMetric.final CustomMetricgetCustomMetric(GetCustomMetricRequest request) Lookup for a single CustomMetric.final CustomMetricgetCustomMetric(String name) Lookup for a single CustomMetric.Lookup for a single CustomMetric.final DataRetentionSettingsReturns the singleton data retention settings for this property.final DataRetentionSettingsReturns the singleton data retention settings for this property.final DataRetentionSettingsReturns the singleton data retention settings for this property.Returns the singleton data retention settings for this property.final DataSharingSettingsGet data sharing settings on an account.final DataSharingSettingsGet data sharing settings on an account.final DataSharingSettingsgetDataSharingSettings(String name) Get data sharing settings on an account.Get data sharing settings on an account.final DataStreamgetDataStream(DataStreamName name) Lookup for a single DataStream.final DataStreamgetDataStream(GetDataStreamRequest request) Lookup for a single DataStream.final DataStreamgetDataStream(String name) Lookup for a single DataStream.Lookup for a single DataStream.final KeyEventgetKeyEvent(GetKeyEventRequest request) Retrieve a single Key Event.final KeyEventgetKeyEvent(KeyEventName name) Retrieve a single Key Event.final KeyEventgetKeyEvent(String name) Retrieve a single Key Event.Retrieve a single Key Event.Lookup for a single MeasurementProtocolSecret.Lookup for a single MeasurementProtocolSecret.Lookup for a single MeasurementProtocolSecret.Lookup for a single MeasurementProtocolSecret.final PropertygetProperty(GetPropertyRequest request) Lookup for a single GA Property.final PropertygetProperty(PropertyName name) Lookup for a single GA Property.final PropertygetProperty(String name) Lookup for a single GA Property.Lookup for a single GA Property.getStub()booleanbooleanlistAccounts(ListAccountsRequest request) Returns all accounts accessible by the caller.Returns all accounts accessible by the caller.Returns all accounts accessible by the caller.Returns summaries of all accounts accessible by the caller.Returns summaries of all accounts accessible by the caller.final UnaryCallable<ListAccountSummariesRequest,AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse> Returns summaries of all accounts accessible by the caller.Deprecated.This method is deprecated and will be removed in the next major version update.listConversionEvents(PropertyName parent) Deprecated.This method is deprecated and will be removed in the next major version update.listConversionEvents(String parent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.final UnaryCallable<ListConversionEventsRequest,AnalyticsAdminServiceClient.ListConversionEventsPagedResponse> Deprecated.This method is deprecated and will be removed in the next major version update.Lists CustomDimensions on a property.listCustomDimensions(PropertyName parent) Lists CustomDimensions on a property.listCustomDimensions(String parent) Lists CustomDimensions on a property.Lists CustomDimensions on a property.final UnaryCallable<ListCustomDimensionsRequest,AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse> Lists CustomDimensions on a property.Lists CustomMetrics on a property.listCustomMetrics(PropertyName parent) Lists CustomMetrics on a property.listCustomMetrics(String parent) Lists CustomMetrics on a property.Lists CustomMetrics on a property.final UnaryCallable<ListCustomMetricsRequest,AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse> Lists CustomMetrics on a property.listDataStreams(ListDataStreamsRequest request) Lists DataStreams on a property.listDataStreams(PropertyName parent) Lists DataStreams on a property.listDataStreams(String parent) Lists DataStreams on a property.Lists DataStreams on a property.final UnaryCallable<ListDataStreamsRequest,AnalyticsAdminServiceClient.ListDataStreamsPagedResponse> Lists DataStreams on a property.Lists FirebaseLinks on a property.listFirebaseLinks(PropertyName parent) Lists FirebaseLinks on a property.listFirebaseLinks(String parent) Lists FirebaseLinks on a property.Lists FirebaseLinks on a property.final UnaryCallable<ListFirebaseLinksRequest,AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse> Lists FirebaseLinks on a property.Lists GoogleAdsLinks on a property.listGoogleAdsLinks(PropertyName parent) Lists GoogleAdsLinks on a property.listGoogleAdsLinks(String parent) Lists GoogleAdsLinks on a property.Lists GoogleAdsLinks on a property.final UnaryCallable<ListGoogleAdsLinksRequest,AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse> Lists GoogleAdsLinks on a property.listKeyEvents(ListKeyEventsRequest request) Returns a list of Key Events in the specified parent property.listKeyEvents(PropertyName parent) Returns a list of Key Events in the specified parent property.listKeyEvents(String parent) Returns a list of Key Events in the specified parent property.Returns a list of Key Events in the specified parent property.Returns a list of Key Events in the specified parent property.Returns child MeasurementProtocolSecrets under the specified parent Property.Returns child MeasurementProtocolSecrets under the specified parent Property.listMeasurementProtocolSecrets(String parent) Returns child MeasurementProtocolSecrets under the specified parent Property.Returns child MeasurementProtocolSecrets under the specified parent Property.final UnaryCallable<ListMeasurementProtocolSecretsRequest,AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse> Returns child MeasurementProtocolSecrets under the specified parent Property.listProperties(ListPropertiesRequest request) Returns child Properties under the specified parent Account.Returns child Properties under the specified parent Account.Returns child Properties under the specified parent Account.Requests a ticket for creating an account.Requests a ticket for creating an account.final RunAccessReportResponserunAccessReport(RunAccessReportRequest request) Returns a customized report of data access records.Returns a customized report of data access records.Searches through all changes to an account or its children given the specified set of filters.Searches through all changes to an account or its children given the specified set of filters.final UnaryCallable<SearchChangeHistoryEventsRequest,AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse> Searches through all changes to an account or its children given the specified set of filters.voidshutdown()voidfinal AccountupdateAccount(Account account, com.google.protobuf.FieldMask updateMask) Updates an account.final AccountupdateAccount(UpdateAccountRequest request) Updates an account.Updates an account.final ConversionEventupdateConversionEvent(ConversionEvent conversionEvent, com.google.protobuf.FieldMask updateMask) Deprecated.This method is deprecated and will be removed in the next major version update.final ConversionEventDeprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.final CustomDimensionupdateCustomDimension(CustomDimension customDimension, com.google.protobuf.FieldMask updateMask) Updates a CustomDimension on a property.final CustomDimensionUpdates a CustomDimension on a property.Updates a CustomDimension on a property.final CustomMetricupdateCustomMetric(CustomMetric customMetric, com.google.protobuf.FieldMask updateMask) Updates a CustomMetric on a property.final CustomMetricUpdates a CustomMetric on a property.Updates a CustomMetric on a property.final DataRetentionSettingsupdateDataRetentionSettings(DataRetentionSettings dataRetentionSettings, com.google.protobuf.FieldMask updateMask) Updates the singleton data retention settings for this property.final DataRetentionSettingsUpdates the singleton data retention settings for this property.Updates the singleton data retention settings for this property.final DataStreamupdateDataStream(DataStream dataStream, com.google.protobuf.FieldMask updateMask) Updates a DataStream on a property.final DataStreamupdateDataStream(UpdateDataStreamRequest request) Updates a DataStream on a property.Updates a DataStream on a property.final GoogleAdsLinkupdateGoogleAdsLink(GoogleAdsLink googleAdsLink, com.google.protobuf.FieldMask updateMask) Updates a GoogleAdsLink on a propertyfinal GoogleAdsLinkUpdates a GoogleAdsLink on a propertyUpdates a GoogleAdsLink on a propertyfinal KeyEventupdateKeyEvent(KeyEvent keyEvent, com.google.protobuf.FieldMask updateMask) Updates a Key Event.final KeyEventupdateKeyEvent(UpdateKeyEventRequest request) Updates a Key Event.Updates a Key Event.updateMeasurementProtocolSecret(MeasurementProtocolSecret measurementProtocolSecret, com.google.protobuf.FieldMask updateMask) Updates a measurement protocol secret.Updates a measurement protocol secret.Updates a measurement protocol secret.final PropertyupdateProperty(Property property, com.google.protobuf.FieldMask updateMask) Updates a property.final PropertyupdateProperty(UpdatePropertyRequest request) Updates a property.Updates a property.
-
Constructor Details
-
AnalyticsAdminServiceClient
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.- Throws:
IOException
-
AnalyticsAdminServiceClient
-
-
Method Details
-
create
Constructs an instance of AnalyticsAdminServiceClient with default settings.- Throws:
IOException
-
create
public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceSettings settings) throws IOException 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.- Throws:
IOException
-
create
Constructs an instance of AnalyticsAdminServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(AnalyticsAdminServiceSettings). -
getSettings
-
getStub
-
getAccount
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); }- Parameters:
name- Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"- Throws:
ApiException- if the remote call fails
-
getAccount
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); }- Parameters:
name- Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"- Throws:
ApiException- if the remote call fails
-
getAccount
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listAccounts
public final AnalyticsAdminServiceClient.ListAccountsPagedResponse listAccounts(ListAccountsRequest request) Returns all accounts accessible by the caller.Note that these accounts might not currently have GA 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listAccountsPagedCallable
public final UnaryCallable<ListAccountsRequest,AnalyticsAdminServiceClient.ListAccountsPagedResponse> listAccountsPagedCallable()Returns all accounts accessible by the caller.Note that these accounts might not currently have GA 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); } } -
listAccountsCallable
Returns all accounts accessible by the caller.Note that these accounts might not currently have GA 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; } } } -
deleteAccount
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, AccessBindings) 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); }- Parameters:
name- Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"- Throws:
ApiException- if the remote call fails
-
deleteAccount
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, AccessBindings) 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); }- Parameters:
name- Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"- Throws:
ApiException- if the remote call fails
-
deleteAccount
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, AccessBindings) 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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, AccessBindings) 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(); } -
updateAccount
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); }- Parameters:
account- Required. The account to update. The account's `name` field is used to identify the account.updateMask- Required. The list of fields to be updated. Field names must be in snake case (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.- Throws:
ApiException- if the remote call fails
-
updateAccount
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
provisionAccountTicket
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listAccountSummaries
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getProperty
Lookup for a single GA 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); }- Parameters:
name- Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000"- Throws:
ApiException- if the remote call fails
-
getProperty
Lookup for a single GA 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); }- Parameters:
name- Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000"- Throws:
ApiException- if the remote call fails
-
getProperty
Lookup for a single GA 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPropertyCallable
Lookup for a single GA 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(); } -
listProperties
public final AnalyticsAdminServiceClient.ListPropertiesPagedResponse listProperties(ListPropertiesRequest request) Returns child Properties under the specified parent Account.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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPropertiesPagedCallable
public final UnaryCallable<ListPropertiesRequest,AnalyticsAdminServiceClient.ListPropertiesPagedResponse> listPropertiesPagedCallable()Returns child Properties under the specified parent Account.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); } } -
listPropertiesCallable
Returns child Properties under the specified parent Account.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; } } } -
createProperty
Creates a Google Analytics 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); }- Parameters:
property- Required. The property to create. Note: the supplied property must specify its parent.- Throws:
ApiException- if the remote call fails
-
createProperty
Creates a Google Analytics 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPropertyCallable
Creates a Google Analytics 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(); } -
deleteProperty
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, AccessBindings) 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()) { PropertyName name = PropertyName.of("[PROPERTY]"); Property response = analyticsAdminServiceClient.deleteProperty(name); }- Parameters:
name- Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"- Throws:
ApiException- if the remote call fails
-
deleteProperty
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, AccessBindings) 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 = PropertyName.of("[PROPERTY]").toString(); Property response = analyticsAdminServiceClient.deleteProperty(name); }- Parameters:
name- Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"- Throws:
ApiException- if the remote call fails
-
deleteProperty
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, AccessBindings) 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()) { DeletePropertyRequest request = DeletePropertyRequest.newBuilder() .setName(PropertyName.of("[PROPERTY]").toString()) .build(); Property response = analyticsAdminServiceClient.deleteProperty(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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, AccessBindings) 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()) { DeletePropertyRequest request = DeletePropertyRequest.newBuilder() .setName(PropertyName.of("[PROPERTY]").toString()) .build(); ApiFuture<Property> future = analyticsAdminServiceClient.deletePropertyCallable().futureCall(request); // Do something. Property response = future.get(); } -
updateProperty
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); }- Parameters:
property- Required. The property to update. The property's `name` field is used to identify the property to be updated.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateProperty
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createFirebaseLink
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); }- Parameters:
parent- Required. Format: properties/{property_id}Example: `properties/1234`
firebaseLink- Required. The Firebase link to create.- Throws:
ApiException- if the remote call fails
-
createFirebaseLink
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); }- Parameters:
parent- Required. Format: properties/{property_id}Example: `properties/1234`
firebaseLink- Required. The Firebase link to create.- Throws:
ApiException- if the remote call fails
-
createFirebaseLink
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
deleteFirebaseLink
Deletes a FirebaseLink on a propertySample 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); }- Parameters:
name- Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}Example: `properties/1234/firebaseLinks/5678`
- Throws:
ApiException- if the remote call fails
-
deleteFirebaseLink
Deletes a FirebaseLink on a propertySample 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); }- Parameters:
name- Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}Example: `properties/1234/firebaseLinks/5678`
- Throws:
ApiException- if the remote call fails
-
deleteFirebaseLink
Deletes a FirebaseLink on a propertySample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFirebaseLinkCallable
public final UnaryCallable<DeleteFirebaseLinkRequest,com.google.protobuf.Empty> deleteFirebaseLinkCallable()Deletes a FirebaseLink on a propertySample 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(); } -
listFirebaseLinks
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); } }- Parameters:
parent- Required. Format: properties/{property_id}Example: `properties/1234`
- Throws:
ApiException- if the remote call fails
-
listFirebaseLinks
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); } }- Parameters:
parent- Required. Format: properties/{property_id}Example: `properties/1234`
- Throws:
ApiException- if the remote call fails
-
listFirebaseLinks
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
createGoogleAdsLink
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); }- Parameters:
parent- Required. Example format: properties/1234googleAdsLink- Required. The GoogleAdsLink to create.- Throws:
ApiException- if the remote call fails
-
createGoogleAdsLink
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); }- Parameters:
parent- Required. Example format: properties/1234googleAdsLink- Required. The GoogleAdsLink to create.- Throws:
ApiException- if the remote call fails
-
createGoogleAdsLink
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateGoogleAdsLink
public final GoogleAdsLink updateGoogleAdsLink(GoogleAdsLink googleAdsLink, com.google.protobuf.FieldMask updateMask) Updates a GoogleAdsLink on a propertySample 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); }- Parameters:
googleAdsLink- The GoogleAdsLink to updateupdateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateGoogleAdsLink
Updates a GoogleAdsLink on a propertySample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateGoogleAdsLinkCallable
Updates a GoogleAdsLink on a propertySample 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(); } -
deleteGoogleAdsLink
Deletes a GoogleAdsLink on a propertySample 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); }- Parameters:
name- Required. Example format: properties/1234/googleAdsLinks/5678- Throws:
ApiException- if the remote call fails
-
deleteGoogleAdsLink
Deletes a GoogleAdsLink on a propertySample 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); }- Parameters:
name- Required. Example format: properties/1234/googleAdsLinks/5678- Throws:
ApiException- if the remote call fails
-
deleteGoogleAdsLink
Deletes a GoogleAdsLink on a propertySample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteGoogleAdsLinkCallable
public final UnaryCallable<DeleteGoogleAdsLinkRequest,com.google.protobuf.Empty> deleteGoogleAdsLinkCallable()Deletes a GoogleAdsLink on a propertySample 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(); } -
listGoogleAdsLinks
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listGoogleAdsLinks
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listGoogleAdsLinks
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getDataSharingSettings
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); }- Parameters:
name- Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettingsExample: `accounts/1000/dataSharingSettings`
- Throws:
ApiException- if the remote call fails
-
getDataSharingSettings
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); }- Parameters:
name- Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettingsExample: `accounts/1000/dataSharingSettings`
- Throws:
ApiException- if the remote call fails
-
getDataSharingSettings
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getMeasurementProtocolSecret
public final MeasurementProtocolSecret getMeasurementProtocolSecret(MeasurementProtocolSecretName name) Lookup for a single 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); }- Parameters:
name- Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}- Throws:
ApiException- if the remote call fails
-
getMeasurementProtocolSecret
Lookup for a single 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); }- Parameters:
name- Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}- Throws:
ApiException- if the remote call fails
-
getMeasurementProtocolSecret
public final MeasurementProtocolSecret getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest request) Lookup for a single 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMeasurementProtocolSecretCallable
public final UnaryCallable<GetMeasurementProtocolSecretRequest,MeasurementProtocolSecret> getMeasurementProtocolSecretCallable()Lookup for a single 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(); } -
listMeasurementProtocolSecrets
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); } }- Parameters:
parent- Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets- Throws:
ApiException- if the remote call fails
-
listMeasurementProtocolSecrets
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); } }- Parameters:
parent- Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets- Throws:
ApiException- if the remote call fails
-
listMeasurementProtocolSecrets
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
createMeasurementProtocolSecret
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); }- Parameters:
parent- Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}measurementProtocolSecret- Required. The measurement protocol secret to create.- Throws:
ApiException- if the remote call fails
-
createMeasurementProtocolSecret
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); }- Parameters:
parent- Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}measurementProtocolSecret- Required. The measurement protocol secret to create.- Throws:
ApiException- if the remote call fails
-
createMeasurementProtocolSecret
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
deleteMeasurementProtocolSecret
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); }- Parameters:
name- Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}- Throws:
ApiException- if the remote call fails
-
deleteMeasurementProtocolSecret
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); }- Parameters:
name- Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}- Throws:
ApiException- if the remote call fails
-
deleteMeasurementProtocolSecret
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMeasurementProtocolSecretCallable
public final UnaryCallable<DeleteMeasurementProtocolSecretRequest,com.google.protobuf.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(); } -
updateMeasurementProtocolSecret
public final MeasurementProtocolSecret updateMeasurementProtocolSecret(MeasurementProtocolSecret measurementProtocolSecret, com.google.protobuf.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); }- Parameters:
measurementProtocolSecret- Required. The measurement protocol secret to update.updateMask- Required. The list of fields to be updated. Omitted fields will not be updated.- Throws:
ApiException- if the remote call fails
-
updateMeasurementProtocolSecret
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
acknowledgeUserDataCollection
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 through 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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 through 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(); } -
searchChangeHistoryEvents
public final AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents(SearchChangeHistoryEventsRequest request) Searches through all changes to an account or its children given the specified set of filters.Only returns the subset of changes supported by the API. The UI may return additional changes.
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
searchChangeHistoryEventsPagedCallable
public final UnaryCallable<SearchChangeHistoryEventsRequest,AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse> searchChangeHistoryEventsPagedCallable()Searches through all changes to an account or its children given the specified set of filters.Only returns the subset of changes supported by the API. The UI may return additional changes.
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); } } -
searchChangeHistoryEventsCallable
public final UnaryCallable<SearchChangeHistoryEventsRequest,SearchChangeHistoryEventsResponse> searchChangeHistoryEventsCallable()Searches through all changes to an account or its children given the specified set of filters.Only returns the subset of changes supported by the API. The UI may return additional changes.
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; } } } -
createConversionEvent
@Deprecated public final ConversionEvent createConversionEvent(PropertyName parent, ConversionEvent conversionEvent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `CreateKeyEvent` instead. 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); }- Parameters:
parent- Required. The resource name of the parent property where this conversion event will be created. Format: properties/123conversionEvent- Required. The conversion event to create.- Throws:
ApiException- if the remote call fails
-
createConversionEvent
@Deprecated public final ConversionEvent createConversionEvent(String parent, ConversionEvent conversionEvent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `CreateKeyEvent` instead. 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); }- Parameters:
parent- Required. The resource name of the parent property where this conversion event will be created. Format: properties/123conversionEvent- Required. The conversion event to create.- Throws:
ApiException- if the remote call fails
-
createConversionEvent
@Deprecated public final ConversionEvent createConversionEvent(CreateConversionEventRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `CreateKeyEvent` instead. 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createConversionEventCallable
@Deprecated public final UnaryCallable<CreateConversionEventRequest,ConversionEvent> createConversionEventCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `CreateKeyEvent` instead. 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(); } -
updateConversionEvent
@Deprecated public final ConversionEvent updateConversionEvent(ConversionEvent conversionEvent, com.google.protobuf.FieldMask updateMask) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `UpdateKeyEvent` instead. Updates 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()) { ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ConversionEvent response = analyticsAdminServiceClient.updateConversionEvent(conversionEvent, updateMask); }- Parameters:
conversionEvent- Required. The conversion event to update. The `name` field is used to identify the settings to be updated.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateConversionEvent
@Deprecated public final ConversionEvent updateConversionEvent(UpdateConversionEventRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `UpdateKeyEvent` instead. Updates 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()) { UpdateConversionEventRequest request = UpdateConversionEventRequest.newBuilder() .setConversionEvent(ConversionEvent.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ConversionEvent response = analyticsAdminServiceClient.updateConversionEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateConversionEventCallable
@Deprecated public final UnaryCallable<UpdateConversionEventRequest,ConversionEvent> updateConversionEventCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `UpdateKeyEvent` instead. Updates 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()) { UpdateConversionEventRequest request = UpdateConversionEventRequest.newBuilder() .setConversionEvent(ConversionEvent.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<ConversionEvent> future = analyticsAdminServiceClient.updateConversionEventCallable().futureCall(request); // Do something. ConversionEvent response = future.get(); } -
getConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `GetKeyEvent` instead. 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); }- Parameters:
name- Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"- Throws:
ApiException- if the remote call fails
-
getConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `GetKeyEvent` instead. 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); }- Parameters:
name- Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"- Throws:
ApiException- if the remote call fails
-
getConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `GetKeyEvent` instead. 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getConversionEventCallable
@Deprecated public final UnaryCallable<GetConversionEventRequest,ConversionEvent> getConversionEventCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `GetKeyEvent` instead. 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(); } -
deleteConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `DeleteKeyEvent` instead. 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); }- Parameters:
name- Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"- Throws:
ApiException- if the remote call fails
-
deleteConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `DeleteKeyEvent` instead. 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); }- Parameters:
name- Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"- Throws:
ApiException- if the remote call fails
-
deleteConversionEvent
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `DeleteKeyEvent` instead. 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteConversionEventCallable
@Deprecated public final UnaryCallable<DeleteConversionEventRequest,com.google.protobuf.Empty> deleteConversionEventCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `DeleteKeyEvent` instead. 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(); } -
listConversionEvents
@Deprecated public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(PropertyName parent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `ListKeyEvents` instead. 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); } }- Parameters:
parent- Required. The resource name of the parent property. Example: 'properties/123'- Throws:
ApiException- if the remote call fails
-
listConversionEvents
@Deprecated public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(String parent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `ListKeyEvents` instead. 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); } }- Parameters:
parent- Required. The resource name of the parent property. Example: 'properties/123'- Throws:
ApiException- if the remote call fails
-
listConversionEvents
@Deprecated public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(ListConversionEventsRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `ListKeyEvents` instead. 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listConversionEventsPagedCallable
@Deprecated public final UnaryCallable<ListConversionEventsRequest,AnalyticsAdminServiceClient.ListConversionEventsPagedResponse> listConversionEventsPagedCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `ListKeyEvents` instead. 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); } } -
listConversionEventsCallable
@Deprecated public final UnaryCallable<ListConversionEventsRequest,ListConversionEventsResponse> listConversionEventsCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: Use `ListKeyEvents` instead. 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; } } } -
createKeyEvent
Creates a Key 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()) { PropertyName parent = PropertyName.of("[PROPERTY]"); KeyEvent keyEvent = KeyEvent.newBuilder().build(); KeyEvent response = analyticsAdminServiceClient.createKeyEvent(parent, keyEvent); }- Parameters:
parent- Required. The resource name of the parent property where this Key Event will be created. Format: properties/123keyEvent- Required. The Key Event to create.- Throws:
ApiException- if the remote call fails
-
createKeyEvent
Creates a Key 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 parent = PropertyName.of("[PROPERTY]").toString(); KeyEvent keyEvent = KeyEvent.newBuilder().build(); KeyEvent response = analyticsAdminServiceClient.createKeyEvent(parent, keyEvent); }- Parameters:
parent- Required. The resource name of the parent property where this Key Event will be created. Format: properties/123keyEvent- Required. The Key Event to create.- Throws:
ApiException- if the remote call fails
-
createKeyEvent
Creates a Key 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()) { CreateKeyEventRequest request = CreateKeyEventRequest.newBuilder() .setKeyEvent(KeyEvent.newBuilder().build()) .setParent(PropertyName.of("[PROPERTY]").toString()) .build(); KeyEvent response = analyticsAdminServiceClient.createKeyEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createKeyEventCallable
Creates a Key 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()) { CreateKeyEventRequest request = CreateKeyEventRequest.newBuilder() .setKeyEvent(KeyEvent.newBuilder().build()) .setParent(PropertyName.of("[PROPERTY]").toString()) .build(); ApiFuture<KeyEvent> future = analyticsAdminServiceClient.createKeyEventCallable().futureCall(request); // Do something. KeyEvent response = future.get(); } -
updateKeyEvent
Updates a Key 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()) { KeyEvent keyEvent = KeyEvent.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); KeyEvent response = analyticsAdminServiceClient.updateKeyEvent(keyEvent, updateMask); }- Parameters:
keyEvent- Required. The Key Event to update. The `name` field is used to identify the settings to be updated.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateKeyEvent
Updates a Key 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()) { UpdateKeyEventRequest request = UpdateKeyEventRequest.newBuilder() .setKeyEvent(KeyEvent.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); KeyEvent response = analyticsAdminServiceClient.updateKeyEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateKeyEventCallable
Updates a Key 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()) { UpdateKeyEventRequest request = UpdateKeyEventRequest.newBuilder() .setKeyEvent(KeyEvent.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<KeyEvent> future = analyticsAdminServiceClient.updateKeyEventCallable().futureCall(request); // Do something. KeyEvent response = future.get(); } -
getKeyEvent
Retrieve a single Key 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()) { KeyEventName name = KeyEventName.of("[PROPERTY]", "[KEY_EVENT]"); KeyEvent response = analyticsAdminServiceClient.getKeyEvent(name); }- Parameters:
name- Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: "properties/123/keyEvents/456"- Throws:
ApiException- if the remote call fails
-
getKeyEvent
Retrieve a single Key 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 = KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString(); KeyEvent response = analyticsAdminServiceClient.getKeyEvent(name); }- Parameters:
name- Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: "properties/123/keyEvents/456"- Throws:
ApiException- if the remote call fails
-
getKeyEvent
Retrieve a single Key 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()) { GetKeyEventRequest request = GetKeyEventRequest.newBuilder() .setName(KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString()) .build(); KeyEvent response = analyticsAdminServiceClient.getKeyEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getKeyEventCallable
Retrieve a single Key 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()) { GetKeyEventRequest request = GetKeyEventRequest.newBuilder() .setName(KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString()) .build(); ApiFuture<KeyEvent> future = analyticsAdminServiceClient.getKeyEventCallable().futureCall(request); // Do something. KeyEvent response = future.get(); } -
deleteKeyEvent
Deletes a Key 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()) { KeyEventName name = KeyEventName.of("[PROPERTY]", "[KEY_EVENT]"); analyticsAdminServiceClient.deleteKeyEvent(name); }- Parameters:
name- Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: "properties/123/keyEvents/456"- Throws:
ApiException- if the remote call fails
-
deleteKeyEvent
Deletes a Key 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 = KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString(); analyticsAdminServiceClient.deleteKeyEvent(name); }- Parameters:
name- Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: "properties/123/keyEvents/456"- Throws:
ApiException- if the remote call fails
-
deleteKeyEvent
Deletes a Key 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()) { DeleteKeyEventRequest request = DeleteKeyEventRequest.newBuilder() .setName(KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString()) .build(); analyticsAdminServiceClient.deleteKeyEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteKeyEventCallable
public final UnaryCallable<DeleteKeyEventRequest,com.google.protobuf.Empty> deleteKeyEventCallable()Deletes a Key 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()) { DeleteKeyEventRequest request = DeleteKeyEventRequest.newBuilder() .setName(KeyEventName.of("[PROPERTY]", "[KEY_EVENT]").toString()) .build(); ApiFuture<Empty> future = analyticsAdminServiceClient.deleteKeyEventCallable().futureCall(request); // Do something. future.get(); } -
listKeyEvents
public final AnalyticsAdminServiceClient.ListKeyEventsPagedResponse listKeyEvents(PropertyName parent) Returns a list of Key Events in the specified parent property. Returns an empty list if no Key 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 (KeyEvent element : analyticsAdminServiceClient.listKeyEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the parent property. Example: 'properties/123'- Throws:
ApiException- if the remote call fails
-
listKeyEvents
Returns a list of Key Events in the specified parent property. Returns an empty list if no Key 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 (KeyEvent element : analyticsAdminServiceClient.listKeyEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The resource name of the parent property. Example: 'properties/123'- Throws:
ApiException- if the remote call fails
-
listKeyEvents
public final AnalyticsAdminServiceClient.ListKeyEventsPagedResponse listKeyEvents(ListKeyEventsRequest request) Returns a list of Key Events in the specified parent property. Returns an empty list if no Key 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()) { ListKeyEventsRequest request = ListKeyEventsRequest.newBuilder() .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (KeyEvent element : analyticsAdminServiceClient.listKeyEvents(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listKeyEventsPagedCallable
public final UnaryCallable<ListKeyEventsRequest,AnalyticsAdminServiceClient.ListKeyEventsPagedResponse> listKeyEventsPagedCallable()Returns a list of Key Events in the specified parent property. Returns an empty list if no Key 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()) { ListKeyEventsRequest request = ListKeyEventsRequest.newBuilder() .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<KeyEvent> future = analyticsAdminServiceClient.listKeyEventsPagedCallable().futureCall(request); // Do something. for (KeyEvent element : future.get().iterateAll()) { // doThingsWith(element); } } -
listKeyEventsCallable
Returns a list of Key Events in the specified parent property. Returns an empty list if no Key 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()) { ListKeyEventsRequest request = ListKeyEventsRequest.newBuilder() .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListKeyEventsResponse response = analyticsAdminServiceClient.listKeyEventsCallable().call(request); for (KeyEvent element : response.getKeyEventsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createCustomDimension
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); }- Parameters:
parent- Required. Example format: properties/1234customDimension- Required. The CustomDimension to create.- Throws:
ApiException- if the remote call fails
-
createCustomDimension
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); }- Parameters:
parent- Required. Example format: properties/1234customDimension- Required. The CustomDimension to create.- Throws:
ApiException- if the remote call fails
-
createCustomDimension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateCustomDimension
public final CustomDimension updateCustomDimension(CustomDimension customDimension, com.google.protobuf.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); }- Parameters:
customDimension- The CustomDimension to updateupdateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateCustomDimension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listCustomDimensions
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listCustomDimensions
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listCustomDimensions
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
archiveCustomDimension
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); }- Parameters:
name- Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678- Throws:
ApiException- if the remote call fails
-
archiveCustomDimension
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); }- Parameters:
name- Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678- Throws:
ApiException- if the remote call fails
-
archiveCustomDimension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
archiveCustomDimensionCallable
public final UnaryCallable<ArchiveCustomDimensionRequest,com.google.protobuf.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(); } -
getCustomDimension
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); }- Parameters:
name- Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678- Throws:
ApiException- if the remote call fails
-
getCustomDimension
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); }- Parameters:
name- Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678- Throws:
ApiException- if the remote call fails
-
getCustomDimension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createCustomMetric
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); }- Parameters:
parent- Required. Example format: properties/1234customMetric- Required. The CustomMetric to create.- Throws:
ApiException- if the remote call fails
-
createCustomMetric
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); }- Parameters:
parent- Required. Example format: properties/1234customMetric- Required. The CustomMetric to create.- Throws:
ApiException- if the remote call fails
-
createCustomMetric
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateCustomMetric
public final CustomMetric updateCustomMetric(CustomMetric customMetric, com.google.protobuf.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); }- Parameters:
customMetric- The CustomMetric to updateupdateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateCustomMetric
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listCustomMetrics
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listCustomMetrics
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listCustomMetrics
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
archiveCustomMetric
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); }- Parameters:
name- Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678- Throws:
ApiException- if the remote call fails
-
archiveCustomMetric
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); }- Parameters:
name- Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678- Throws:
ApiException- if the remote call fails
-
archiveCustomMetric
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
archiveCustomMetricCallable
public final UnaryCallable<ArchiveCustomMetricRequest,com.google.protobuf.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(); } -
getCustomMetric
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); }- Parameters:
name- Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678- Throws:
ApiException- if the remote call fails
-
getCustomMetric
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); }- Parameters:
name- Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678- Throws:
ApiException- if the remote call fails
-
getCustomMetric
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getDataRetentionSettings
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); }- Parameters:
name- Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings"- Throws:
ApiException- if the remote call fails
-
getDataRetentionSettings
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); }- Parameters:
name- Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings"- Throws:
ApiException- if the remote call fails
-
getDataRetentionSettings
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateDataRetentionSettings
public final DataRetentionSettings updateDataRetentionSettings(DataRetentionSettings dataRetentionSettings, com.google.protobuf.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); }- Parameters:
dataRetentionSettings- Required. The settings to update. The `name` field is used to identify the settings to be updated.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateDataRetentionSettings
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createDataStream
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); }- Parameters:
parent- Required. Example format: properties/1234dataStream- Required. The DataStream to create.- Throws:
ApiException- if the remote call fails
-
createDataStream
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); }- Parameters:
parent- Required. Example format: properties/1234dataStream- Required. The DataStream to create.- Throws:
ApiException- if the remote call fails
-
createDataStream
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
deleteDataStream
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); }- Parameters:
name- Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678- Throws:
ApiException- if the remote call fails
-
deleteDataStream
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); }- Parameters:
name- Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678- Throws:
ApiException- if the remote call fails
-
deleteDataStream
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDataStreamCallable
public final UnaryCallable<DeleteDataStreamRequest,com.google.protobuf.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(); } -
updateDataStream
public final DataStream updateDataStream(DataStream dataStream, com.google.protobuf.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); }- Parameters:
dataStream- The DataStream to updateupdateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateDataStream
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
listDataStreams
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listDataStreams
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); } }- Parameters:
parent- Required. Example format: properties/1234- Throws:
ApiException- if the remote call fails
-
listDataStreams
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getDataStream
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); }- Parameters:
name- Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678- Throws:
ApiException- if the remote call fails
-
getDataStream
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); }- Parameters:
name- Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678- Throws:
ApiException- if the remote call fails
-
getDataStream
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
runAccessReport
Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years.Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators.
These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).
To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.
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()) { RunAccessReportRequest request = RunAccessReportRequest.newBuilder() .setEntity("entity-1298275357") .addAllDimensions(new ArrayList<AccessDimension>()) .addAllMetrics(new ArrayList<AccessMetric>()) .addAllDateRanges(new ArrayList<AccessDateRange>()) .setDimensionFilter(AccessFilterExpression.newBuilder().build()) .setMetricFilter(AccessFilterExpression.newBuilder().build()) .setOffset(-1019779949) .setLimit(102976443) .setTimeZone("timeZone-2077180903") .addAllOrderBys(new ArrayList<AccessOrderBy>()) .setReturnEntityQuota(true) .setIncludeAllUsers(true) .setExpandGroups(true) .build(); RunAccessReportResponse response = analyticsAdminServiceClient.runAccessReport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
runAccessReportCallable
public final UnaryCallable<RunAccessReportRequest,RunAccessReportResponse> runAccessReportCallable()Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years.Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators.
These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).
To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.
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()) { RunAccessReportRequest request = RunAccessReportRequest.newBuilder() .setEntity("entity-1298275357") .addAllDimensions(new ArrayList<AccessDimension>()) .addAllMetrics(new ArrayList<AccessMetric>()) .addAllDateRanges(new ArrayList<AccessDateRange>()) .setDimensionFilter(AccessFilterExpression.newBuilder().build()) .setMetricFilter(AccessFilterExpression.newBuilder().build()) .setOffset(-1019779949) .setLimit(102976443) .setTimeZone("timeZone-2077180903") .addAllOrderBys(new ArrayList<AccessOrderBy>()) .setReturnEntityQuota(true) .setIncludeAllUsers(true) .setExpandGroups(true) .build(); ApiFuture<RunAccessReportResponse> future = analyticsAdminServiceClient.runAccessReportCallable().futureCall(request); // Do something. RunAccessReportResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-