@BetaApi @Generated(value="by gapic-generator-java") public class AnalyticsAdminServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
Account response = analyticsAdminServiceClient.getAccount(name);
}
Note: close() needs to be called on the AnalyticsAdminServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
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.
| Modifier | Constructor and Description |
|---|---|
protected |
AnalyticsAdminServiceClient(AnalyticsAdminServiceSettings settings)
Constructs an instance of AnalyticsAdminServiceClient, using the given settings.
|
protected |
AnalyticsAdminServiceClient(AnalyticsAdminServiceStub stub) |
protected AnalyticsAdminServiceClient(AnalyticsAdminServiceSettings settings) throws IOException
IOExceptionprotected AnalyticsAdminServiceClient(AnalyticsAdminServiceStub stub)
public static final AnalyticsAdminServiceClient create() throws IOException
IOExceptionpublic static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceSettings settings) throws IOException
IOExceptionpublic static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceStub stub)
public final AnalyticsAdminServiceSettings getSettings()
public AnalyticsAdminServiceStub getStub()
public final Account getAccount(AccountName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
Account response = analyticsAdminServiceClient.getAccount(name);
}
name - Required. The name of the account to lookup. Format: accounts/{account} Example:
"accounts/100"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Account getAccount(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = AccountName.of("[ACCOUNT]").toString();
Account response = analyticsAdminServiceClient.getAccount(name);
}
name - Required. The name of the account to lookup. Format: accounts/{account} Example:
"accounts/100"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Account getAccount(GetAccountRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAccountRequest,Account> getAccountCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListAccountsPagedResponse listAccounts(ListAccountsRequest request)
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
for (Account element : analyticsAdminServiceClient.listAccounts(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAccountsRequest,AnalyticsAdminServiceClient.ListAccountsPagedResponse> listAccountsPagedCallable()
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
ApiFuture<Account> future =
analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request);
// Do something.
for (Account element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAccountsRequest,ListAccountsResponse> listAccountsCallable()
Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccountsRequest request =
ListAccountsRequest.newBuilder()
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
while (true) {
ListAccountsResponse response =
analyticsAdminServiceClient.listAccountsCallable().call(request);
for (Account element : response.getAccountsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void deleteAccount(AccountName name)
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);
}
name - Required. The name of the Account to soft-delete. Format: accounts/{account}
Example: "accounts/100"com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAccount(String name)
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);
}
name - Required. The name of the Account to soft-delete. Format: accounts/{account}
Example: "accounts/100"com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAccount(DeleteAccountRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteAccountRequest,com.google.protobuf.Empty> deleteAccountCallable()
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();
}
public final Account updateAccount(Account account, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Account updateAccount(UpdateAccountRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAccountRequest,Account> updateAccountCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final ProvisionAccountTicketResponse provisionAccountTicket(ProvisionAccountTicketRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ProvisionAccountTicketRequest,ProvisionAccountTicketResponse> provisionAccountTicketCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse listAccountSummaries(ListAccountSummariesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAccountSummariesRequest,AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse> listAccountSummariesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAccountSummariesRequest,ListAccountSummariesResponse> listAccountSummariesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final Property getProperty(PropertyName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName name = PropertyName.of("[PROPERTY]");
Property response = analyticsAdminServiceClient.getProperty(name);
}
name - Required. The name of the property to lookup. Format: properties/{property_id}
Example: "properties/1000"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property getProperty(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = PropertyName.of("[PROPERTY]").toString();
Property response = analyticsAdminServiceClient.getProperty(name);
}
name - Required. The name of the property to lookup. Format: properties/{property_id}
Example: "properties/1000"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property getProperty(GetPropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetPropertyRequest,Property> getPropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListPropertiesPagedResponse listProperties(ListPropertiesRequest request)
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
for (Property element : analyticsAdminServiceClient.listProperties(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListPropertiesRequest,AnalyticsAdminServiceClient.ListPropertiesPagedResponse> listPropertiesPagedCallable()
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
ApiFuture<Property> future =
analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request);
// Do something.
for (Property element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListPropertiesRequest,ListPropertiesResponse> listPropertiesCallable()
Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListPropertiesRequest request =
ListPropertiesRequest.newBuilder()
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setShowDeleted(true)
.build();
while (true) {
ListPropertiesResponse response =
analyticsAdminServiceClient.listPropertiesCallable().call(request);
for (Property element : response.getPropertiesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Property createProperty(Property 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();
Property response = analyticsAdminServiceClient.createProperty(property);
}
property - Required. The property to create. Note: the supplied property must specify its
parent.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property createProperty(CreatePropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreatePropertyRequest,Property> createPropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Property deleteProperty(PropertyName name)
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, or is not a GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
PropertyName name = PropertyName.of("[PROPERTY]");
Property response = analyticsAdminServiceClient.deleteProperty(name);
}
name - Required. The name of the Property to soft-delete. Format: properties/{property_id}
Example: "properties/1000"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property deleteProperty(String name)
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, or is not a GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = PropertyName.of("[PROPERTY]").toString();
Property response = analyticsAdminServiceClient.deleteProperty(name);
}
name - Required. The name of the Property to soft-delete. Format: properties/{property_id}
Example: "properties/1000"com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property deleteProperty(DeletePropertyRequest request)
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, or is not a GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeletePropertyRequest request =
DeletePropertyRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
Property response = analyticsAdminServiceClient.deleteProperty(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeletePropertyRequest,Property> deletePropertyCallable()
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, or is not a GA4 Property.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeletePropertyRequest request =
DeletePropertyRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
ApiFuture<Property> future =
analyticsAdminServiceClient.deletePropertyCallable().futureCall(request);
// Do something.
Property response = future.get();
}
public final Property updateProperty(Property property, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Property updateProperty(UpdatePropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdatePropertyRequest,Property> updatePropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink 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);
}
parent - Required. Format: properties/{property_id} Example: properties/1234firebaseLink - Required. The Firebase link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final FirebaseLink createFirebaseLink(String parent, FirebaseLink 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);
}
parent - Required. Format: properties/{property_id} Example: properties/1234firebaseLink - Required. The Firebase link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateFirebaseLinkRequest,FirebaseLink> createFirebaseLinkCallable()
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();
}
public final void deleteFirebaseLink(FirebaseLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
analyticsAdminServiceClient.deleteFirebaseLink(name);
}
name - Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
Example: properties/1234/firebaseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteFirebaseLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
analyticsAdminServiceClient.deleteFirebaseLink(name);
}
name - Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
Example: properties/1234/firebaseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteFirebaseLink(DeleteFirebaseLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteFirebaseLinkRequest,com.google.protobuf.Empty> deleteFirebaseLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Format: properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Format: properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListFirebaseLinksRequest,AnalyticsAdminServiceClient.ListFirebaseLinksPagedResponse> listFirebaseLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListFirebaseLinksRequest,ListFirebaseLinksResponse> listFirebaseLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]");
GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name);
}
name - Required. The name of the site tag to lookup. Note that site tags are singletons
and do not have unique IDs. Format:
properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example:
"properties/123/dataStreams/456/globalSiteTag"com.google.api.gax.rpc.ApiException - if the remote call failspublic final GlobalSiteTag getGlobalSiteTag(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString();
GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name);
}
name - Required. The name of the site tag to lookup. Note that site tags are singletons
and do not have unique IDs. Format:
properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example:
"properties/123/dataStreams/456/globalSiteTag"com.google.api.gax.rpc.ApiException - if the remote call failspublic final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetGlobalSiteTagRequest request =
GetGlobalSiteTagRequest.newBuilder()
.setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetGlobalSiteTagRequest,GlobalSiteTag> getGlobalSiteTagCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetGlobalSiteTagRequest request =
GetGlobalSiteTagRequest.newBuilder()
.setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
ApiFuture<GlobalSiteTag> future =
analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request);
// Do something.
GlobalSiteTag response = future.get();
}
public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLink 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);
}
parent - Required. Example format: properties/1234googleAdsLink - Required. The GoogleAdsLink to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink 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);
}
parent - Required. Example format: properties/1234googleAdsLink - Required. The GoogleAdsLink to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateGoogleAdsLinkRequest,GoogleAdsLink> createGoogleAdsLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final GoogleAdsLink updateGoogleAdsLink(GoogleAdsLink googleAdsLink, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateGoogleAdsLinkRequest,GoogleAdsLink> updateGoogleAdsLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteGoogleAdsLink(GoogleAdsLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
analyticsAdminServiceClient.deleteGoogleAdsLink(name);
}
name - Required. Example format: properties/1234/googleAdsLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteGoogleAdsLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
analyticsAdminServiceClient.deleteGoogleAdsLink(name);
}
name - Required. Example format: properties/1234/googleAdsLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteGoogleAdsLinkRequest,com.google.protobuf.Empty> deleteGoogleAdsLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(ListGoogleAdsLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListGoogleAdsLinksRequest,AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse> listGoogleAdsLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListGoogleAdsLinksRequest,ListGoogleAdsLinksResponse> listGoogleAdsLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
}
name - Required. The name of the settings to lookup. Format:
accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSharingSettings getDataSharingSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataSharingSettingsName.of("[ACCOUNT]").toString();
DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
}
name - Required. The name of the settings to lookup. Format:
accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataSharingSettingsRequest,DataSharingSettings> getDataSharingSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final MeasurementProtocolSecret getMeasurementProtocolSecret(MeasurementProtocolSecretName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
MeasurementProtocolSecretName name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
MeasurementProtocolSecret response =
analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
}
name - Required. The name of the measurement protocol secret to lookup. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}com.google.api.gax.rpc.ApiException - if the remote call failspublic final MeasurementProtocolSecret getMeasurementProtocolSecret(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.getMeasurementProtocolSecret(name);
}
name - Required. The name of the measurement protocol secret to lookup. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}com.google.api.gax.rpc.ApiException - if the remote call failspublic final MeasurementProtocolSecret getMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetMeasurementProtocolSecretRequest,MeasurementProtocolSecret> getMeasurementProtocolSecretCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(DataStreamName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The resource name of the parent stream. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecretscom.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The resource name of the parent stream. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecretscom.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListMeasurementProtocolSecretsRequest,AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse> listMeasurementProtocolSecretsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListMeasurementProtocolSecretsRequest,ListMeasurementProtocolSecretsResponse> listMeasurementProtocolSecretsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final MeasurementProtocolSecret createMeasurementProtocolSecret(DataStreamName parent, MeasurementProtocolSecret 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()) {
DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
MeasurementProtocolSecret measurementProtocolSecret =
MeasurementProtocolSecret.newBuilder().build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.createMeasurementProtocolSecret(
parent, measurementProtocolSecret);
}
parent - Required. The parent resource where this secret will be created. Format:
properties/{property}/dataStreams/{dataStream}measurementProtocolSecret - Required. The measurement protocol secret to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final MeasurementProtocolSecret createMeasurementProtocolSecret(String parent, MeasurementProtocolSecret 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 parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
MeasurementProtocolSecret measurementProtocolSecret =
MeasurementProtocolSecret.newBuilder().build();
MeasurementProtocolSecret response =
analyticsAdminServiceClient.createMeasurementProtocolSecret(
parent, measurementProtocolSecret);
}
parent - Required. The parent resource where this secret will be created. Format:
properties/{property}/dataStreams/{dataStream}measurementProtocolSecret - Required. The measurement protocol secret to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final MeasurementProtocolSecret createMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> createMeasurementProtocolSecretCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
MeasurementProtocolSecretName name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
}
name - Required. The name of the MeasurementProtocolSecret to delete. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteMeasurementProtocolSecret(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name =
MeasurementProtocolSecretName.of(
"[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]")
.toString();
analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name);
}
name - Required. The name of the MeasurementProtocolSecret to delete. Format:
properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteMeasurementProtocolSecretRequest,com.google.protobuf.Empty> deleteMeasurementProtocolSecretCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final MeasurementProtocolSecret updateMeasurementProtocolSecret(MeasurementProtocolSecret measurementProtocolSecret, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
measurementProtocolSecret - Required. The measurement protocol secret to update.updateMask - Required. The list of fields to be updated. Omitted fields will not be
updated.com.google.api.gax.rpc.ApiException - if the remote call failspublic final MeasurementProtocolSecret updateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateMeasurementProtocolSecretRequest,MeasurementProtocolSecret> updateMeasurementProtocolSecretCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<AcknowledgeUserDataCollectionRequest,AcknowledgeUserDataCollectionResponse> acknowledgeUserDataCollectionCallable()
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();
}
public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema(SKAdNetworkConversionValueSchemaName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SKAdNetworkConversionValueSchemaName name =
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]");
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name);
}
name - Required. The resource name of SKAdNetwork conversion value schema to look up.
Format:
properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}com.google.api.gax.rpc.ApiException - if the remote call failspublic final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name);
}
name - Required. The resource name of SKAdNetwork conversion value schema to look up.
Format:
properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}com.google.api.gax.rpc.ApiException - if the remote call failspublic final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema(GetSKAdNetworkConversionValueSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetSKAdNetworkConversionValueSchemaRequest request =
GetSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setName(
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString())
.build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSKAdNetworkConversionValueSchemaRequest,SKAdNetworkConversionValueSchema> getSKAdNetworkConversionValueSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetSKAdNetworkConversionValueSchemaRequest request =
GetSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setName(
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString())
.build();
ApiFuture<SKAdNetworkConversionValueSchema> future =
analyticsAdminServiceClient
.getSKAdNetworkConversionValueSchemaCallable()
.futureCall(request);
// Do something.
SKAdNetworkConversionValueSchema response = future.get();
}
public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema(DataStreamName parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema =
SKAdNetworkConversionValueSchema.newBuilder().build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema(
parent, skadnetworkConversionValueSchema);
}
parent - Required. The parent resource where this schema will be created. Format:
properties/{property}/dataStreams/{dataStream}skadnetworkConversionValueSchema - Required. SKAdNetwork conversion value schema to
create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema(String parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema =
SKAdNetworkConversionValueSchema.newBuilder().build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema(
parent, skadnetworkConversionValueSchema);
}
parent - Required. The parent resource where this schema will be created. Format:
properties/{property}/dataStreams/{dataStream}skadnetworkConversionValueSchema - Required. SKAdNetwork conversion value schema to
create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema(CreateSKAdNetworkConversionValueSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSKAdNetworkConversionValueSchemaRequest request =
CreateSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setSkadnetworkConversionValueSchema(
SKAdNetworkConversionValueSchema.newBuilder().build())
.build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSKAdNetworkConversionValueSchemaRequest,SKAdNetworkConversionValueSchema> createSKAdNetworkConversionValueSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSKAdNetworkConversionValueSchemaRequest request =
CreateSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setSkadnetworkConversionValueSchema(
SKAdNetworkConversionValueSchema.newBuilder().build())
.build();
ApiFuture<SKAdNetworkConversionValueSchema> future =
analyticsAdminServiceClient
.createSKAdNetworkConversionValueSchemaCallable()
.futureCall(request);
// Do something.
SKAdNetworkConversionValueSchema response = future.get();
}
public final void deleteSKAdNetworkConversionValueSchema(SKAdNetworkConversionValueSchemaName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SKAdNetworkConversionValueSchemaName name =
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]");
analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name);
}
name - Required. The name of the SKAdNetworkConversionValueSchema to delete. Format:
properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSKAdNetworkConversionValueSchema(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString();
analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name);
}
name - Required. The name of the SKAdNetworkConversionValueSchema to delete. Format:
properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSKAdNetworkConversionValueSchema(DeleteSKAdNetworkConversionValueSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSKAdNetworkConversionValueSchemaRequest request =
DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setName(
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString())
.build();
analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSKAdNetworkConversionValueSchemaRequest,com.google.protobuf.Empty> deleteSKAdNetworkConversionValueSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSKAdNetworkConversionValueSchemaRequest request =
DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setName(
SKAdNetworkConversionValueSchemaName.of(
"[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient
.deleteSKAdNetworkConversionValueSchemaCallable()
.futureCall(request);
// Do something.
future.get();
}
public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema(SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema =
SKAdNetworkConversionValueSchema.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema(
skadnetworkConversionValueSchema, updateMask);
}
skadnetworkConversionValueSchema - Required. SKAdNetwork conversion value schema to
update.updateMask - Required. The list of fields to be updated. Omitted fields will not be
updated.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema(UpdateSKAdNetworkConversionValueSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateSKAdNetworkConversionValueSchemaRequest request =
UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setSkadnetworkConversionValueSchema(
SKAdNetworkConversionValueSchema.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
SKAdNetworkConversionValueSchema response =
analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSKAdNetworkConversionValueSchemaRequest,SKAdNetworkConversionValueSchema> updateSKAdNetworkConversionValueSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateSKAdNetworkConversionValueSchemaRequest request =
UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder()
.setSkadnetworkConversionValueSchema(
SKAdNetworkConversionValueSchema.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<SKAdNetworkConversionValueSchema> future =
analyticsAdminServiceClient
.updateSKAdNetworkConversionValueSchemaCallable()
.futureCall(request);
// Do something.
SKAdNetworkConversionValueSchema response = future.get();
}
public final AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse listSKAdNetworkConversionValueSchemas(DataStreamName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (SKAdNetworkConversionValueSchema element :
analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The DataStream resource to list schemas for. Format:
properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse listSKAdNetworkConversionValueSchemas(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (SKAdNetworkConversionValueSchema element :
analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The DataStream resource to list schemas for. Format:
properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse listSKAdNetworkConversionValueSchemas(ListSKAdNetworkConversionValueSchemasRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSKAdNetworkConversionValueSchemasRequest request =
ListSKAdNetworkConversionValueSchemasRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SKAdNetworkConversionValueSchema element :
analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSKAdNetworkConversionValueSchemasRequest,AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse> listSKAdNetworkConversionValueSchemasPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSKAdNetworkConversionValueSchemasRequest request =
ListSKAdNetworkConversionValueSchemasRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SKAdNetworkConversionValueSchema> future =
analyticsAdminServiceClient
.listSKAdNetworkConversionValueSchemasPagedCallable()
.futureCall(request);
// Do something.
for (SKAdNetworkConversionValueSchema element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSKAdNetworkConversionValueSchemasRequest,ListSKAdNetworkConversionValueSchemasResponse> listSKAdNetworkConversionValueSchemasCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSKAdNetworkConversionValueSchemasRequest request =
ListSKAdNetworkConversionValueSchemasRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSKAdNetworkConversionValueSchemasResponse response =
analyticsAdminServiceClient
.listSKAdNetworkConversionValueSchemasCallable()
.call(request);
for (SKAdNetworkConversionValueSchema element :
response.getSkadnetworkConversionValueSchemasList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents(SearchChangeHistoryEventsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SearchChangeHistoryEventsRequest,AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse> searchChangeHistoryEventsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<SearchChangeHistoryEventsRequest,SearchChangeHistoryEventsResponse> searchChangeHistoryEventsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final GoogleSignalsSettings getGoogleSignalsSettings(GoogleSignalsSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]");
GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name);
}
name - Required. The name of the google signals settings to retrieve. Format:
properties/{property}/googleSignalsSettingscom.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleSignalsSettings getGoogleSignalsSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = GoogleSignalsSettingsName.of("[PROPERTY]").toString();
GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name);
}
name - Required. The name of the google signals settings to retrieve. Format:
properties/{property}/googleSignalsSettingscom.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleSignalsSettings getGoogleSignalsSettings(GetGoogleSignalsSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetGoogleSignalsSettingsRequest request =
GetGoogleSignalsSettingsRequest.newBuilder()
.setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString())
.build();
GoogleSignalsSettings response =
analyticsAdminServiceClient.getGoogleSignalsSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetGoogleSignalsSettingsRequest,GoogleSignalsSettings> getGoogleSignalsSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetGoogleSignalsSettingsRequest request =
GetGoogleSignalsSettingsRequest.newBuilder()
.setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString())
.build();
ApiFuture<GoogleSignalsSettings> future =
analyticsAdminServiceClient.getGoogleSignalsSettingsCallable().futureCall(request);
// Do something.
GoogleSignalsSettings response = future.get();
}
public final GoogleSignalsSettings updateGoogleSignalsSettings(GoogleSignalsSettings googleSignalsSettings, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GoogleSignalsSettings response =
analyticsAdminServiceClient.updateGoogleSignalsSettings(
googleSignalsSettings, updateMask);
}
googleSignalsSettings - 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GoogleSignalsSettings updateGoogleSignalsSettings(UpdateGoogleSignalsSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateGoogleSignalsSettingsRequest request =
UpdateGoogleSignalsSettingsRequest.newBuilder()
.setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
GoogleSignalsSettings response =
analyticsAdminServiceClient.updateGoogleSignalsSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateGoogleSignalsSettingsRequest,GoogleSignalsSettings> updateGoogleSignalsSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateGoogleSignalsSettingsRequest request =
UpdateGoogleSignalsSettingsRequest.newBuilder()
.setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<GoogleSignalsSettings> future =
analyticsAdminServiceClient.updateGoogleSignalsSettingsCallable().futureCall(request);
// Do something.
GoogleSignalsSettings response = future.get();
}
public final ConversionEvent createConversionEvent(PropertyName parent, ConversionEvent conversionEvent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversionEvent createConversionEvent(String parent, ConversionEvent conversionEvent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversionEvent createConversionEvent(CreateConversionEventRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateConversionEventRequest,ConversionEvent> createConversionEventCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final ConversionEvent updateConversionEvent(ConversionEvent conversionEvent, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversionEvent updateConversionEvent(UpdateConversionEventRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateConversionEventRequest,ConversionEvent> updateConversionEventCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final ConversionEvent getConversionEvent(ConversionEventName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
}
name - Required. The resource name of the conversion event to retrieve. Format:
properties/{property}/conversionEvents/{conversion_event} Example:
"properties/123/conversionEvents/456"com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversionEvent getConversionEvent(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name);
}
name - Required. The resource name of the conversion event to retrieve. Format:
properties/{property}/conversionEvents/{conversion_event} Example:
"properties/123/conversionEvents/456"com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversionEvent getConversionEvent(GetConversionEventRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetConversionEventRequest,ConversionEvent> getConversionEventCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteConversionEvent(ConversionEventName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
analyticsAdminServiceClient.deleteConversionEvent(name);
}
name - Required. The resource name of the conversion event to delete. Format:
properties/{property}/conversionEvents/{conversion_event} Example:
"properties/123/conversionEvents/456"com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteConversionEvent(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString();
analyticsAdminServiceClient.deleteConversionEvent(name);
}
name - Required. The resource name of the conversion event to delete. Format:
properties/{property}/conversionEvents/{conversion_event} Example:
"properties/123/conversionEvents/456"com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteConversionEvent(DeleteConversionEventRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteConversionEventRequest,com.google.protobuf.Empty> deleteConversionEventCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(PropertyName parent)
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);
}
}
parent - Required. The resource name of the parent property. Example: 'properties/123'com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(String parent)
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);
}
}
parent - Required. The resource name of the parent property. Example: 'properties/123'com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListConversionEventsPagedResponse listConversionEvents(ListConversionEventsRequest request)
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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListConversionEventsRequest,AnalyticsAdminServiceClient.ListConversionEventsPagedResponse> listConversionEventsPagedCallable()
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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListConversionEventsRequest,ListConversionEventsResponse> listConversionEventsCallable()
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;
}
}
}
public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DisplayVideo360AdvertiserLinkName name =
DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]");
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLink to get. Example format:
properties/1234/displayVideo360AdvertiserLink/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLink to get. Example format:
properties/1234/displayVideo360AdvertiserLink/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(GetDisplayVideo360AdvertiserLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDisplayVideo360AdvertiserLinkRequest request =
GetDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString())
.build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDisplayVideo360AdvertiserLinkRequest,DisplayVideo360AdvertiserLink> getDisplayVideo360AdvertiserLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDisplayVideo360AdvertiserLinkRequest request =
GetDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString())
.build();
ApiFuture<DisplayVideo360AdvertiserLink> future =
analyticsAdminServiceClient
.getDisplayVideo360AdvertiserLinkCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLink response = future.get();
}
public final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (DisplayVideo360AdvertiserLink element :
analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (DisplayVideo360AdvertiserLink element :
analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks(ListDisplayVideo360AdvertiserLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinksRequest request =
ListDisplayVideo360AdvertiserLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DisplayVideo360AdvertiserLink element :
analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDisplayVideo360AdvertiserLinksRequest,AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinksPagedResponse> listDisplayVideo360AdvertiserLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinksRequest request =
ListDisplayVideo360AdvertiserLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DisplayVideo360AdvertiserLink> future =
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinksPagedCallable()
.futureCall(request);
// Do something.
for (DisplayVideo360AdvertiserLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDisplayVideo360AdvertiserLinksRequest,ListDisplayVideo360AdvertiserLinksResponse> listDisplayVideo360AdvertiserLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinksRequest request =
ListDisplayVideo360AdvertiserLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDisplayVideo360AdvertiserLinksResponse response =
analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinksCallable().call(request);
for (DisplayVideo360AdvertiserLink element :
response.getDisplayVideo360AdvertiserLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink(PropertyName parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink =
DisplayVideo360AdvertiserLink.newBuilder().build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink(
parent, displayVideo360AdvertiserLink);
}
parent - Required. Example format: properties/1234displayVideo360AdvertiserLink - Required. The DisplayVideo360AdvertiserLink to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink(String parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink =
DisplayVideo360AdvertiserLink.newBuilder().build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink(
parent, displayVideo360AdvertiserLink);
}
parent - Required. Example format: properties/1234displayVideo360AdvertiserLink - Required. The DisplayVideo360AdvertiserLink to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink(CreateDisplayVideo360AdvertiserLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDisplayVideo360AdvertiserLinkRequest request =
CreateDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build())
.build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateDisplayVideo360AdvertiserLinkRequest,DisplayVideo360AdvertiserLink> createDisplayVideo360AdvertiserLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDisplayVideo360AdvertiserLinkRequest request =
CreateDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build())
.build();
ApiFuture<DisplayVideo360AdvertiserLink> future =
analyticsAdminServiceClient
.createDisplayVideo360AdvertiserLinkCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLink response = future.get();
}
public final void deleteDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DisplayVideo360AdvertiserLinkName name =
DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]");
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format:
properties/1234/displayVideo360AdvertiserLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDisplayVideo360AdvertiserLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString();
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format:
properties/1234/displayVideo360AdvertiserLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDisplayVideo360AdvertiserLink(DeleteDisplayVideo360AdvertiserLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDisplayVideo360AdvertiserLinkRequest request =
DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString())
.build();
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteDisplayVideo360AdvertiserLinkRequest,com.google.protobuf.Empty> deleteDisplayVideo360AdvertiserLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDisplayVideo360AdvertiserLinkRequest request =
DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient
.deleteDisplayVideo360AdvertiserLinkCallable()
.futureCall(request);
// Do something.
future.get();
}
public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink =
DisplayVideo360AdvertiserLink.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink(
displayVideo360AdvertiserLink, updateMask);
}
displayVideo360AdvertiserLink - The DisplayVideo360AdvertiserLink 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink(UpdateDisplayVideo360AdvertiserLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDisplayVideo360AdvertiserLinkRequest request =
UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DisplayVideo360AdvertiserLink response =
analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateDisplayVideo360AdvertiserLinkRequest,DisplayVideo360AdvertiserLink> updateDisplayVideo360AdvertiserLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDisplayVideo360AdvertiserLinkRequest request =
UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder()
.setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DisplayVideo360AdvertiserLink> future =
analyticsAdminServiceClient
.updateDisplayVideo360AdvertiserLinkCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLink response = future.get();
}
public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal(DisplayVideo360AdvertiserLinkProposalName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DisplayVideo360AdvertiserLinkProposalName name =
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]");
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example
format: properties/1234/displayVideo360AdvertiserLinkProposals/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example
format: properties/1234/displayVideo360AdvertiserLinkProposals/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal(GetDisplayVideo360AdvertiserLinkProposalRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDisplayVideo360AdvertiserLinkProposalRequest request =
GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDisplayVideo360AdvertiserLinkProposalRequest,DisplayVideo360AdvertiserLinkProposal> getDisplayVideo360AdvertiserLinkProposalCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDisplayVideo360AdvertiserLinkProposalRequest request =
GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
ApiFuture<DisplayVideo360AdvertiserLinkProposal> future =
analyticsAdminServiceClient
.getDisplayVideo360AdvertiserLinkProposalCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLinkProposal response = future.get();
}
public final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinkProposalsPagedResponse listDisplayVideo360AdvertiserLinkProposals(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (DisplayVideo360AdvertiserLinkProposal element :
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinkProposals(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinkProposalsPagedResponse listDisplayVideo360AdvertiserLinkProposals(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (DisplayVideo360AdvertiserLinkProposal element :
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinkProposals(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinkProposalsPagedResponse listDisplayVideo360AdvertiserLinkProposals(ListDisplayVideo360AdvertiserLinkProposalsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinkProposalsRequest request =
ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DisplayVideo360AdvertiserLinkProposal element :
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinkProposals(request)
.iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDisplayVideo360AdvertiserLinkProposalsRequest,AnalyticsAdminServiceClient.ListDisplayVideo360AdvertiserLinkProposalsPagedResponse> listDisplayVideo360AdvertiserLinkProposalsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinkProposalsRequest request =
ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DisplayVideo360AdvertiserLinkProposal> future =
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinkProposalsPagedCallable()
.futureCall(request);
// Do something.
for (DisplayVideo360AdvertiserLinkProposal element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDisplayVideo360AdvertiserLinkProposalsRequest,ListDisplayVideo360AdvertiserLinkProposalsResponse> listDisplayVideo360AdvertiserLinkProposalsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListDisplayVideo360AdvertiserLinkProposalsRequest request =
ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDisplayVideo360AdvertiserLinkProposalsResponse response =
analyticsAdminServiceClient
.listDisplayVideo360AdvertiserLinkProposalsCallable()
.call(request);
for (DisplayVideo360AdvertiserLinkProposal element :
response.getDisplayVideo360AdvertiserLinkProposalsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal(PropertyName parent, DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal =
DisplayVideo360AdvertiserLinkProposal.newBuilder().build();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal(
parent, displayVideo360AdvertiserLinkProposal);
}
parent - Required. Example format: properties/1234displayVideo360AdvertiserLinkProposal - Required. The
DisplayVideo360AdvertiserLinkProposal to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal(String parent, DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal =
DisplayVideo360AdvertiserLinkProposal.newBuilder().build();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal(
parent, displayVideo360AdvertiserLinkProposal);
}
parent - Required. Example format: properties/1234displayVideo360AdvertiserLinkProposal - Required. The
DisplayVideo360AdvertiserLinkProposal to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal(CreateDisplayVideo360AdvertiserLinkProposalRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDisplayVideo360AdvertiserLinkProposalRequest request =
CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDisplayVideo360AdvertiserLinkProposal(
DisplayVideo360AdvertiserLinkProposal.newBuilder().build())
.build();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateDisplayVideo360AdvertiserLinkProposalRequest,DisplayVideo360AdvertiserLinkProposal> createDisplayVideo360AdvertiserLinkProposalCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateDisplayVideo360AdvertiserLinkProposalRequest request =
CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setDisplayVideo360AdvertiserLinkProposal(
DisplayVideo360AdvertiserLinkProposal.newBuilder().build())
.build();
ApiFuture<DisplayVideo360AdvertiserLinkProposal> future =
analyticsAdminServiceClient
.createDisplayVideo360AdvertiserLinkProposalCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLinkProposal response = future.get();
}
public final void deleteDisplayVideo360AdvertiserLinkProposal(DisplayVideo360AdvertiserLinkProposalName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DisplayVideo360AdvertiserLinkProposalName name =
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]");
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example
format: properties/1234/displayVideo360AdvertiserLinkProposals/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDisplayVideo360AdvertiserLinkProposal(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString();
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name);
}
name - Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example
format: properties/1234/displayVideo360AdvertiserLinkProposals/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDisplayVideo360AdvertiserLinkProposal(DeleteDisplayVideo360AdvertiserLinkProposalRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDisplayVideo360AdvertiserLinkProposalRequest request =
DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteDisplayVideo360AdvertiserLinkProposalRequest,com.google.protobuf.Empty> deleteDisplayVideo360AdvertiserLinkProposalCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteDisplayVideo360AdvertiserLinkProposalRequest request =
DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient
.deleteDisplayVideo360AdvertiserLinkProposalCallable()
.futureCall(request);
// Do something.
future.get();
}
public final ApproveDisplayVideo360AdvertiserLinkProposalResponse approveDisplayVideo360AdvertiserLinkProposal(ApproveDisplayVideo360AdvertiserLinkProposalRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ApproveDisplayVideo360AdvertiserLinkProposalRequest request =
ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
ApproveDisplayVideo360AdvertiserLinkProposalResponse response =
analyticsAdminServiceClient.approveDisplayVideo360AdvertiserLinkProposal(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ApproveDisplayVideo360AdvertiserLinkProposalRequest,ApproveDisplayVideo360AdvertiserLinkProposalResponse> approveDisplayVideo360AdvertiserLinkProposalCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ApproveDisplayVideo360AdvertiserLinkProposalRequest request =
ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
ApiFuture<ApproveDisplayVideo360AdvertiserLinkProposalResponse> future =
analyticsAdminServiceClient
.approveDisplayVideo360AdvertiserLinkProposalCallable()
.futureCall(request);
// Do something.
ApproveDisplayVideo360AdvertiserLinkProposalResponse response = future.get();
}
public final DisplayVideo360AdvertiserLinkProposal cancelDisplayVideo360AdvertiserLinkProposal(CancelDisplayVideo360AdvertiserLinkProposalRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CancelDisplayVideo360AdvertiserLinkProposalRequest request =
CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
DisplayVideo360AdvertiserLinkProposal response =
analyticsAdminServiceClient.cancelDisplayVideo360AdvertiserLinkProposal(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CancelDisplayVideo360AdvertiserLinkProposalRequest,DisplayVideo360AdvertiserLinkProposal> cancelDisplayVideo360AdvertiserLinkProposalCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CancelDisplayVideo360AdvertiserLinkProposalRequest request =
CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
.setName(
DisplayVideo360AdvertiserLinkProposalName.of(
"[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
.toString())
.build();
ApiFuture<DisplayVideo360AdvertiserLinkProposal> future =
analyticsAdminServiceClient
.cancelDisplayVideo360AdvertiserLinkProposalCallable()
.futureCall(request);
// Do something.
DisplayVideo360AdvertiserLinkProposal response = future.get();
}
public final CustomDimension createCustomDimension(PropertyName parent, CustomDimension 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);
}
parent - Required. Example format: properties/1234customDimension - Required. The CustomDimension to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomDimension createCustomDimension(String parent, CustomDimension 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);
}
parent - Required. Example format: properties/1234customDimension - Required. The CustomDimension to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomDimension createCustomDimension(CreateCustomDimensionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateCustomDimensionRequest,CustomDimension> createCustomDimensionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final CustomDimension updateCustomDimension(CustomDimension customDimension, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomDimension updateCustomDimension(UpdateCustomDimensionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateCustomDimensionRequest,CustomDimension> updateCustomDimensionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse listCustomDimensions(ListCustomDimensionsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCustomDimensionsRequest,AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse> listCustomDimensionsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCustomDimensionsRequest,ListCustomDimensionsResponse> listCustomDimensionsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final void archiveCustomDimension(CustomDimensionName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
analyticsAdminServiceClient.archiveCustomDimension(name);
}
name - Required. The name of the CustomDimension to archive. Example format:
properties/1234/customDimensions/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void archiveCustomDimension(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
analyticsAdminServiceClient.archiveCustomDimension(name);
}
name - Required. The name of the CustomDimension to archive. Example format:
properties/1234/customDimensions/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void archiveCustomDimension(ArchiveCustomDimensionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ArchiveCustomDimensionRequest,com.google.protobuf.Empty> archiveCustomDimensionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final CustomDimension getCustomDimension(CustomDimensionName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]");
CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
}
name - Required. The name of the CustomDimension to get. Example format:
properties/1234/customDimensions/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomDimension getCustomDimension(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
}
name - Required. The name of the CustomDimension to get. Example format:
properties/1234/customDimensions/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomDimension getCustomDimension(GetCustomDimensionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCustomDimensionRequest,CustomDimension> getCustomDimensionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric 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);
}
parent - Required. Example format: properties/1234customMetric - Required. The CustomMetric to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomMetric createCustomMetric(String parent, CustomMetric 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);
}
parent - Required. Example format: properties/1234customMetric - Required. The CustomMetric to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomMetric createCustomMetric(CreateCustomMetricRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateCustomMetricRequest,CustomMetric> createCustomMetricCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final CustomMetric updateCustomMetric(CustomMetric customMetric, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomMetric updateCustomMetric(UpdateCustomMetricRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateCustomMetricRequest,CustomMetric> updateCustomMetricCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCustomMetricsRequest,AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse> listCustomMetricsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCustomMetricsRequest,ListCustomMetricsResponse> listCustomMetricsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final void archiveCustomMetric(CustomMetricName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
analyticsAdminServiceClient.archiveCustomMetric(name);
}
name - Required. The name of the CustomMetric to archive. Example format:
properties/1234/customMetrics/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void archiveCustomMetric(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
analyticsAdminServiceClient.archiveCustomMetric(name);
}
name - Required. The name of the CustomMetric to archive. Example format:
properties/1234/customMetrics/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void archiveCustomMetric(ArchiveCustomMetricRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ArchiveCustomMetricRequest,com.google.protobuf.Empty> archiveCustomMetricCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final CustomMetric getCustomMetric(CustomMetricName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]");
CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
}
name - Required. The name of the CustomMetric to get. Example format:
properties/1234/customMetrics/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomMetric getCustomMetric(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
}
name - Required. The name of the CustomMetric to get. Example format:
properties/1234/customMetrics/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomMetric getCustomMetric(GetCustomMetricRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCustomMetricRequest,CustomMetric> getCustomMetricCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataRetentionSettings getDataRetentionSettings(DataRetentionSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]");
DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataRetentionSettings Example:
"properties/1000/dataRetentionSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRetentionSettings getDataRetentionSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataRetentionSettingsName.of("[PROPERTY]").toString();
DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataRetentionSettings Example:
"properties/1000/dataRetentionSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRetentionSettings getDataRetentionSettings(GetDataRetentionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataRetentionSettingsRequest,DataRetentionSettings> getDataRetentionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataRetentionSettings updateDataRetentionSettings(DataRetentionSettings dataRetentionSettings, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRetentionSettings updateDataRetentionSettings(UpdateDataRetentionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateDataRetentionSettingsRequest,DataRetentionSettings> updateDataRetentionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataStream createDataStream(PropertyName parent, DataStream 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);
}
parent - Required. Example format: properties/1234dataStream - Required. The DataStream to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataStream createDataStream(String parent, DataStream 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);
}
parent - Required. Example format: properties/1234dataStream - Required. The DataStream to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataStream createDataStream(CreateDataStreamRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateDataStreamRequest,DataStream> createDataStreamCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteDataStream(DataStreamName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
analyticsAdminServiceClient.deleteDataStream(name);
}
name - Required. The name of the DataStream to delete. Example format:
properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDataStream(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
analyticsAdminServiceClient.deleteDataStream(name);
}
name - Required. The name of the DataStream to delete. Example format:
properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDataStream(DeleteDataStreamRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteDataStreamRequest,com.google.protobuf.Empty> deleteDataStreamCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataStream updateDataStream(DataStream dataStream, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataStream updateDataStream(UpdateDataStreamRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateDataStreamRequest,DataStream> updateDataStreamCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDataStreamsRequest,AnalyticsAdminServiceClient.ListDataStreamsPagedResponse> listDataStreamsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDataStreamsRequest,ListDataStreamsResponse> listDataStreamsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final DataStream getDataStream(DataStreamName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
DataStream response = analyticsAdminServiceClient.getDataStream(name);
}
name - Required. The name of the DataStream to get. Example format:
properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataStream getDataStream(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString();
DataStream response = analyticsAdminServiceClient.getDataStream(name);
}
name - Required. The name of the DataStream to get. Example format:
properties/1234/dataStreams/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataStream getDataStream(GetDataStreamRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataStreamRequest,DataStream> getDataStreamCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Audience getAudience(AudienceName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]");
Audience response = analyticsAdminServiceClient.getAudience(name);
}
name - Required. The name of the Audience to get. Example format:
properties/1234/audiences/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final Audience getAudience(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString();
Audience response = analyticsAdminServiceClient.getAudience(name);
}
name - Required. The name of the Audience to get. Example format:
properties/1234/audiences/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final Audience getAudience(GetAudienceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAudienceRequest request =
GetAudienceRequest.newBuilder()
.setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString())
.build();
Audience response = analyticsAdminServiceClient.getAudience(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAudienceRequest,Audience> getAudienceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAudienceRequest request =
GetAudienceRequest.newBuilder()
.setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString())
.build();
ApiFuture<Audience> future =
analyticsAdminServiceClient.getAudienceCallable().futureCall(request);
// Do something.
Audience response = future.get();
}
public final AnalyticsAdminServiceClient.ListAudiencesPagedResponse listAudiences(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAudiencesPagedResponse listAudiences(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAudiencesPagedResponse listAudiences(ListAudiencesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAudiencesRequest request =
ListAudiencesRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Audience element : analyticsAdminServiceClient.listAudiences(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAudiencesRequest,AnalyticsAdminServiceClient.ListAudiencesPagedResponse> listAudiencesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAudiencesRequest request =
ListAudiencesRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Audience> future =
analyticsAdminServiceClient.listAudiencesPagedCallable().futureCall(request);
// Do something.
for (Audience element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAudiencesRequest,ListAudiencesResponse> listAudiencesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAudiencesRequest request =
ListAudiencesRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAudiencesResponse response =
analyticsAdminServiceClient.listAudiencesCallable().call(request);
for (Audience element : response.getAudiencesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Audience createAudience(PropertyName parent, Audience audience)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
Audience audience = Audience.newBuilder().build();
Audience response = analyticsAdminServiceClient.createAudience(parent, audience);
}
parent - Required. Example format: properties/1234audience - Required. The audience to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Audience createAudience(String parent, Audience audience)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
Audience audience = Audience.newBuilder().build();
Audience response = analyticsAdminServiceClient.createAudience(parent, audience);
}
parent - Required. Example format: properties/1234audience - Required. The audience to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Audience createAudience(CreateAudienceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAudienceRequest request =
CreateAudienceRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setAudience(Audience.newBuilder().build())
.build();
Audience response = analyticsAdminServiceClient.createAudience(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateAudienceRequest,Audience> createAudienceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAudienceRequest request =
CreateAudienceRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setAudience(Audience.newBuilder().build())
.build();
ApiFuture<Audience> future =
analyticsAdminServiceClient.createAudienceCallable().futureCall(request);
// Do something.
Audience response = future.get();
}
public final Audience updateAudience(Audience audience, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
Audience audience = Audience.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Audience response = analyticsAdminServiceClient.updateAudience(audience, updateMask);
}
audience - Required. The audience to update. The audience's `name` field is used to
identify the audience 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Audience updateAudience(UpdateAudienceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAudienceRequest request =
UpdateAudienceRequest.newBuilder()
.setAudience(Audience.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Audience response = analyticsAdminServiceClient.updateAudience(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAudienceRequest,Audience> updateAudienceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAudienceRequest request =
UpdateAudienceRequest.newBuilder()
.setAudience(Audience.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Audience> future =
analyticsAdminServiceClient.updateAudienceCallable().futureCall(request);
// Do something.
Audience response = future.get();
}
public final void archiveAudience(ArchiveAudienceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveAudienceRequest request =
ArchiveAudienceRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
analyticsAdminServiceClient.archiveAudience(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ArchiveAudienceRequest,com.google.protobuf.Empty> archiveAudienceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ArchiveAudienceRequest request =
ArchiveAudienceRequest.newBuilder()
.setName(PropertyName.of("[PROPERTY]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.archiveAudienceCallable().futureCall(request);
// Do something.
future.get();
}
public final SearchAds360Link getSearchAds360Link(SearchAds360LinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]");
SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name);
}
name - Required. The name of the SearchAds360Link to get. Example format:
properties/1234/SearchAds360Link/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchAds360Link getSearchAds360Link(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString();
SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name);
}
name - Required. The name of the SearchAds360Link to get. Example format:
properties/1234/SearchAds360Link/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchAds360Link getSearchAds360Link(GetSearchAds360LinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetSearchAds360LinkRequest request =
GetSearchAds360LinkRequest.newBuilder()
.setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString())
.build();
SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSearchAds360LinkRequest,SearchAds360Link> getSearchAds360LinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetSearchAds360LinkRequest request =
GetSearchAds360LinkRequest.newBuilder()
.setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString())
.build();
ApiFuture<SearchAds360Link> future =
analyticsAdminServiceClient.getSearchAds360LinkCallable().futureCall(request);
// Do something.
SearchAds360Link response = future.get();
}
public final AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse listSearchAds360Links(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (SearchAds360Link element :
analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse listSearchAds360Links(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (SearchAds360Link element :
analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse listSearchAds360Links(ListSearchAds360LinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSearchAds360LinksRequest request =
ListSearchAds360LinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SearchAds360Link element :
analyticsAdminServiceClient.listSearchAds360Links(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSearchAds360LinksRequest,AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse> listSearchAds360LinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSearchAds360LinksRequest request =
ListSearchAds360LinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SearchAds360Link> future =
analyticsAdminServiceClient.listSearchAds360LinksPagedCallable().futureCall(request);
// Do something.
for (SearchAds360Link element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSearchAds360LinksRequest,ListSearchAds360LinksResponse> listSearchAds360LinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListSearchAds360LinksRequest request =
ListSearchAds360LinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSearchAds360LinksResponse response =
analyticsAdminServiceClient.listSearchAds360LinksCallable().call(request);
for (SearchAds360Link element : response.getSearchAds360LinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final SearchAds360Link createSearchAds360Link(PropertyName parent, SearchAds360Link searchAds360Link)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build();
SearchAds360Link response =
analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link);
}
parent - Required. Example format: properties/1234searchAds360Link - Required. The SearchAds360Link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchAds360Link createSearchAds360Link(String parent, SearchAds360Link searchAds360Link)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build();
SearchAds360Link response =
analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link);
}
parent - Required. Example format: properties/1234searchAds360Link - Required. The SearchAds360Link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchAds360Link createSearchAds360Link(CreateSearchAds360LinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSearchAds360LinkRequest request =
CreateSearchAds360LinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSearchAds360Link(SearchAds360Link.newBuilder().build())
.build();
SearchAds360Link response = analyticsAdminServiceClient.createSearchAds360Link(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSearchAds360LinkRequest,SearchAds360Link> createSearchAds360LinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSearchAds360LinkRequest request =
CreateSearchAds360LinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSearchAds360Link(SearchAds360Link.newBuilder().build())
.build();
ApiFuture<SearchAds360Link> future =
analyticsAdminServiceClient.createSearchAds360LinkCallable().futureCall(request);
// Do something.
SearchAds360Link response = future.get();
}
public final void deleteSearchAds360Link(SearchAds360LinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]");
analyticsAdminServiceClient.deleteSearchAds360Link(name);
}
name - Required. The name of the SearchAds360Link to delete. Example format:
properties/1234/SearchAds360Links/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchAds360Link(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString();
analyticsAdminServiceClient.deleteSearchAds360Link(name);
}
name - Required. The name of the SearchAds360Link to delete. Example format:
properties/1234/SearchAds360Links/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchAds360Link(DeleteSearchAds360LinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSearchAds360LinkRequest request =
DeleteSearchAds360LinkRequest.newBuilder()
.setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString())
.build();
analyticsAdminServiceClient.deleteSearchAds360Link(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSearchAds360LinkRequest,com.google.protobuf.Empty> deleteSearchAds360LinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSearchAds360LinkRequest request =
DeleteSearchAds360LinkRequest.newBuilder()
.setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteSearchAds360LinkCallable().futureCall(request);
// Do something.
future.get();
}
public final SearchAds360Link updateSearchAds360Link(SearchAds360Link searchAds360Link, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SearchAds360Link response =
analyticsAdminServiceClient.updateSearchAds360Link(searchAds360Link, updateMask);
}
searchAds360Link - The SearchAds360Link 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchAds360Link updateSearchAds360Link(UpdateSearchAds360LinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateSearchAds360LinkRequest request =
UpdateSearchAds360LinkRequest.newBuilder()
.setSearchAds360Link(SearchAds360Link.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
SearchAds360Link response = analyticsAdminServiceClient.updateSearchAds360Link(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSearchAds360LinkRequest,SearchAds360Link> updateSearchAds360LinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateSearchAds360LinkRequest request =
UpdateSearchAds360LinkRequest.newBuilder()
.setSearchAds360Link(SearchAds360Link.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<SearchAds360Link> future =
analyticsAdminServiceClient.updateSearchAds360LinkCallable().futureCall(request);
// Do something.
SearchAds360Link response = future.get();
}
public final AttributionSettings getAttributionSettings(AttributionSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]");
AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name);
}
name - Required. The name of the attribution settings to retrieve. Format:
properties/{property}/attributionSettingscom.google.api.gax.rpc.ApiException - if the remote call failspublic final AttributionSettings getAttributionSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AttributionSettingsName.of("[PROPERTY]").toString();
AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name);
}
name - Required. The name of the attribution settings to retrieve. Format:
properties/{property}/attributionSettingscom.google.api.gax.rpc.ApiException - if the remote call failspublic final AttributionSettings getAttributionSettings(GetAttributionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAttributionSettingsRequest request =
GetAttributionSettingsRequest.newBuilder()
.setName(AttributionSettingsName.of("[PROPERTY]").toString())
.build();
AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAttributionSettingsRequest,AttributionSettings> getAttributionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAttributionSettingsRequest request =
GetAttributionSettingsRequest.newBuilder()
.setName(AttributionSettingsName.of("[PROPERTY]").toString())
.build();
ApiFuture<AttributionSettings> future =
analyticsAdminServiceClient.getAttributionSettingsCallable().futureCall(request);
// Do something.
AttributionSettings response = future.get();
}
public final AttributionSettings updateAttributionSettings(AttributionSettings attributionSettings, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AttributionSettings attributionSettings = AttributionSettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AttributionSettings response =
analyticsAdminServiceClient.updateAttributionSettings(attributionSettings, updateMask);
}
attributionSettings - Required. The attribution 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AttributionSettings updateAttributionSettings(UpdateAttributionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAttributionSettingsRequest request =
UpdateAttributionSettingsRequest.newBuilder()
.setAttributionSettings(AttributionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AttributionSettings response = analyticsAdminServiceClient.updateAttributionSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAttributionSettingsRequest,AttributionSettings> updateAttributionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAttributionSettingsRequest request =
UpdateAttributionSettingsRequest.newBuilder()
.setAttributionSettings(AttributionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<AttributionSettings> future =
analyticsAdminServiceClient.updateAttributionSettingsCallable().futureCall(request);
// Do something.
AttributionSettings response = future.get();
}
public final RunAccessReportResponse runAccessReport(RunAccessReportRequest request)
Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators.
These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<RunAccessReportRequest,RunAccessReportResponse> runAccessReportCallable()
Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators.
These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final AccessBinding createAccessBinding(AccountName parent, AccessBinding accessBinding)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 parent = AccountName.of("[ACCOUNT]");
AccessBinding accessBinding = AccessBinding.newBuilder().build();
AccessBinding response =
analyticsAdminServiceClient.createAccessBinding(parent, accessBinding);
}
parent - Required. Formats: - accounts/{account} - properties/{property}accessBinding - Required. The access binding to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding createAccessBinding(PropertyName parent, AccessBinding accessBinding)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
AccessBinding accessBinding = AccessBinding.newBuilder().build();
AccessBinding response =
analyticsAdminServiceClient.createAccessBinding(parent, accessBinding);
}
parent - Required. Formats: - accounts/{account} - properties/{property}accessBinding - Required. The access binding to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding createAccessBinding(String parent, AccessBinding accessBinding)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AccountName.of("[ACCOUNT]").toString();
AccessBinding accessBinding = AccessBinding.newBuilder().build();
AccessBinding response =
analyticsAdminServiceClient.createAccessBinding(parent, accessBinding);
}
parent - Required. Formats: - accounts/{account} - properties/{property}accessBinding - Required. The access binding to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding createAccessBinding(CreateAccessBindingRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAccessBindingRequest request =
CreateAccessBindingRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.setAccessBinding(AccessBinding.newBuilder().build())
.build();
AccessBinding response = analyticsAdminServiceClient.createAccessBinding(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateAccessBindingRequest,AccessBinding> createAccessBindingCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAccessBindingRequest request =
CreateAccessBindingRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.setAccessBinding(AccessBinding.newBuilder().build())
.build();
ApiFuture<AccessBinding> future =
analyticsAdminServiceClient.createAccessBindingCallable().futureCall(request);
// Do something.
AccessBinding response = future.get();
}
public final AccessBinding getAccessBinding(AccessBindingName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccessBindingName name =
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]");
AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name);
}
name - Required. The name of the access binding to retrieve. Formats: -
accounts/{account}/accessBindings/{accessBinding} -
properties/{property}/accessBindings/{accessBinding}com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding getAccessBinding(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString();
AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name);
}
name - Required. The name of the access binding to retrieve. Formats: -
accounts/{account}/accessBindings/{accessBinding} -
properties/{property}/accessBindings/{accessBinding}com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding getAccessBinding(GetAccessBindingRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAccessBindingRequest request =
GetAccessBindingRequest.newBuilder()
.setName(
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]")
.toString())
.build();
AccessBinding response = analyticsAdminServiceClient.getAccessBinding(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAccessBindingRequest,AccessBinding> getAccessBindingCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAccessBindingRequest request =
GetAccessBindingRequest.newBuilder()
.setName(
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]")
.toString())
.build();
ApiFuture<AccessBinding> future =
analyticsAdminServiceClient.getAccessBindingCallable().futureCall(request);
// Do something.
AccessBinding response = future.get();
}
public final AccessBinding updateAccessBinding(AccessBinding accessBinding)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccessBinding accessBinding = AccessBinding.newBuilder().build();
AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(accessBinding);
}
accessBinding - Required. The access binding to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AccessBinding updateAccessBinding(UpdateAccessBindingRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAccessBindingRequest request =
UpdateAccessBindingRequest.newBuilder()
.setAccessBinding(AccessBinding.newBuilder().build())
.build();
AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAccessBindingRequest,AccessBinding> updateAccessBindingCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateAccessBindingRequest request =
UpdateAccessBindingRequest.newBuilder()
.setAccessBinding(AccessBinding.newBuilder().build())
.build();
ApiFuture<AccessBinding> future =
analyticsAdminServiceClient.updateAccessBindingCallable().futureCall(request);
// Do something.
AccessBinding response = future.get();
}
public final void deleteAccessBinding(AccessBindingName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AccessBindingName name =
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]");
analyticsAdminServiceClient.deleteAccessBinding(name);
}
name - Required. Formats: - accounts/{account}/accessBindings/{accessBinding} -
properties/{property}/accessBindings/{accessBinding}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAccessBinding(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString();
analyticsAdminServiceClient.deleteAccessBinding(name);
}
name - Required. Formats: - accounts/{account}/accessBindings/{accessBinding} -
properties/{property}/accessBindings/{accessBinding}com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAccessBinding(DeleteAccessBindingRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAccessBindingRequest request =
DeleteAccessBindingRequest.newBuilder()
.setName(
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]")
.toString())
.build();
analyticsAdminServiceClient.deleteAccessBinding(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteAccessBindingRequest,com.google.protobuf.Empty> deleteAccessBindingCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAccessBindingRequest request =
DeleteAccessBindingRequest.newBuilder()
.setName(
AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteAccessBindingCallable().futureCall(request);
// Do something.
future.get();
}
public final AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse listAccessBindings(AccountName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 parent = AccountName.of("[ACCOUNT]");
for (AccessBinding element :
analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Formats: - accounts/{account} - properties/{property}com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse listAccessBindings(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (AccessBinding element :
analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Formats: - accounts/{account} - properties/{property}com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse listAccessBindings(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AccountName.of("[ACCOUNT]").toString();
for (AccessBinding element :
analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Formats: - accounts/{account} - properties/{property}com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse listAccessBindings(ListAccessBindingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccessBindingsRequest request =
ListAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AccessBinding element :
analyticsAdminServiceClient.listAccessBindings(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAccessBindingsRequest,AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse> listAccessBindingsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccessBindingsRequest request =
ListAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AccessBinding> future =
analyticsAdminServiceClient.listAccessBindingsPagedCallable().futureCall(request);
// Do something.
for (AccessBinding element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAccessBindingsRequest,ListAccessBindingsResponse> listAccessBindingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAccessBindingsRequest request =
ListAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAccessBindingsResponse response =
analyticsAdminServiceClient.listAccessBindingsCallable().call(request);
for (AccessBinding element : response.getAccessBindingsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final BatchCreateAccessBindingsResponse batchCreateAccessBindings(BatchCreateAccessBindingsRequest request)
This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will 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()) {
BatchCreateAccessBindingsRequest request =
BatchCreateAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<CreateAccessBindingRequest>())
.build();
BatchCreateAccessBindingsResponse response =
analyticsAdminServiceClient.batchCreateAccessBindings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchCreateAccessBindingsRequest,BatchCreateAccessBindingsResponse> batchCreateAccessBindingsCallable()
This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will 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()) {
BatchCreateAccessBindingsRequest request =
BatchCreateAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<CreateAccessBindingRequest>())
.build();
ApiFuture<BatchCreateAccessBindingsResponse> future =
analyticsAdminServiceClient.batchCreateAccessBindingsCallable().futureCall(request);
// Do something.
BatchCreateAccessBindingsResponse response = future.get();
}
public final BatchGetAccessBindingsResponse batchGetAccessBindings(BatchGetAccessBindingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchGetAccessBindingsRequest request =
BatchGetAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchGetAccessBindingsResponse response =
analyticsAdminServiceClient.batchGetAccessBindings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchGetAccessBindingsRequest,BatchGetAccessBindingsResponse> batchGetAccessBindingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchGetAccessBindingsRequest request =
BatchGetAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchGetAccessBindingsResponse> future =
analyticsAdminServiceClient.batchGetAccessBindingsCallable().futureCall(request);
// Do something.
BatchGetAccessBindingsResponse response = future.get();
}
public final BatchUpdateAccessBindingsResponse batchUpdateAccessBindings(BatchUpdateAccessBindingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchUpdateAccessBindingsRequest request =
BatchUpdateAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<UpdateAccessBindingRequest>())
.build();
BatchUpdateAccessBindingsResponse response =
analyticsAdminServiceClient.batchUpdateAccessBindings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchUpdateAccessBindingsRequest,BatchUpdateAccessBindingsResponse> batchUpdateAccessBindingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchUpdateAccessBindingsRequest request =
BatchUpdateAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<UpdateAccessBindingRequest>())
.build();
ApiFuture<BatchUpdateAccessBindingsResponse> future =
analyticsAdminServiceClient.batchUpdateAccessBindingsCallable().futureCall(request);
// Do something.
BatchUpdateAccessBindingsResponse response = future.get();
}
public final void batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchDeleteAccessBindingsRequest request =
BatchDeleteAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<DeleteAccessBindingRequest>())
.build();
analyticsAdminServiceClient.batchDeleteAccessBindings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchDeleteAccessBindingsRequest,com.google.protobuf.Empty> batchDeleteAccessBindingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BatchDeleteAccessBindingsRequest request =
BatchDeleteAccessBindingsRequest.newBuilder()
.setParent(AccountName.of("[ACCOUNT]").toString())
.addAllRequests(new ArrayList<DeleteAccessBindingRequest>())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.batchDeleteAccessBindingsCallable().futureCall(request);
// Do something.
future.get();
}
public final ExpandedDataSet getExpandedDataSet(ExpandedDataSetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]");
ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name);
}
name - Required. The name of the ExpandedDataSet to get. Example format:
properties/1234/expandedDataSets/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final ExpandedDataSet getExpandedDataSet(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString();
ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name);
}
name - Required. The name of the ExpandedDataSet to get. Example format:
properties/1234/expandedDataSets/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final ExpandedDataSet getExpandedDataSet(GetExpandedDataSetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetExpandedDataSetRequest request =
GetExpandedDataSetRequest.newBuilder()
.setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString())
.build();
ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetExpandedDataSetRequest,ExpandedDataSet> getExpandedDataSetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetExpandedDataSetRequest request =
GetExpandedDataSetRequest.newBuilder()
.setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString())
.build();
ApiFuture<ExpandedDataSet> future =
analyticsAdminServiceClient.getExpandedDataSetCallable().futureCall(request);
// Do something.
ExpandedDataSet response = future.get();
}
public final AnalyticsAdminServiceClient.ListExpandedDataSetsPagedResponse listExpandedDataSets(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (ExpandedDataSet element :
analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListExpandedDataSetsPagedResponse listExpandedDataSets(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (ExpandedDataSet element :
analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListExpandedDataSetsPagedResponse listExpandedDataSets(ListExpandedDataSetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListExpandedDataSetsRequest request =
ListExpandedDataSetsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ExpandedDataSet element :
analyticsAdminServiceClient.listExpandedDataSets(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListExpandedDataSetsRequest,AnalyticsAdminServiceClient.ListExpandedDataSetsPagedResponse> listExpandedDataSetsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListExpandedDataSetsRequest request =
ListExpandedDataSetsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ExpandedDataSet> future =
analyticsAdminServiceClient.listExpandedDataSetsPagedCallable().futureCall(request);
// Do something.
for (ExpandedDataSet element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListExpandedDataSetsRequest,ListExpandedDataSetsResponse> listExpandedDataSetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListExpandedDataSetsRequest request =
ListExpandedDataSetsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListExpandedDataSetsResponse response =
analyticsAdminServiceClient.listExpandedDataSetsCallable().call(request);
for (ExpandedDataSet element : response.getExpandedDataSetsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final ExpandedDataSet createExpandedDataSet(PropertyName parent, ExpandedDataSet expandedDataSet)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build();
ExpandedDataSet response =
analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet);
}
parent - Required. Example format: properties/1234expandedDataSet - Required. The ExpandedDataSet to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ExpandedDataSet createExpandedDataSet(String parent, ExpandedDataSet expandedDataSet)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build();
ExpandedDataSet response =
analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet);
}
parent - Required. Example format: properties/1234expandedDataSet - Required. The ExpandedDataSet to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ExpandedDataSet createExpandedDataSet(CreateExpandedDataSetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateExpandedDataSetRequest request =
CreateExpandedDataSetRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setExpandedDataSet(ExpandedDataSet.newBuilder().build())
.build();
ExpandedDataSet response = analyticsAdminServiceClient.createExpandedDataSet(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateExpandedDataSetRequest,ExpandedDataSet> createExpandedDataSetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateExpandedDataSetRequest request =
CreateExpandedDataSetRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setExpandedDataSet(ExpandedDataSet.newBuilder().build())
.build();
ApiFuture<ExpandedDataSet> future =
analyticsAdminServiceClient.createExpandedDataSetCallable().futureCall(request);
// Do something.
ExpandedDataSet response = future.get();
}
public final ExpandedDataSet updateExpandedDataSet(ExpandedDataSet expandedDataSet, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ExpandedDataSet response =
analyticsAdminServiceClient.updateExpandedDataSet(expandedDataSet, updateMask);
}
expandedDataSet - Required. The ExpandedDataSet to update. The resource's `name` field is
used to identify the ExpandedDataSet 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ExpandedDataSet updateExpandedDataSet(UpdateExpandedDataSetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateExpandedDataSetRequest request =
UpdateExpandedDataSetRequest.newBuilder()
.setExpandedDataSet(ExpandedDataSet.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ExpandedDataSet response = analyticsAdminServiceClient.updateExpandedDataSet(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateExpandedDataSetRequest,ExpandedDataSet> updateExpandedDataSetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateExpandedDataSetRequest request =
UpdateExpandedDataSetRequest.newBuilder()
.setExpandedDataSet(ExpandedDataSet.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<ExpandedDataSet> future =
analyticsAdminServiceClient.updateExpandedDataSetCallable().futureCall(request);
// Do something.
ExpandedDataSet response = future.get();
}
public final void deleteExpandedDataSet(ExpandedDataSetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]");
analyticsAdminServiceClient.deleteExpandedDataSet(name);
}
name - Required. Example format: properties/1234/expandedDataSets/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteExpandedDataSet(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString();
analyticsAdminServiceClient.deleteExpandedDataSet(name);
}
name - Required. Example format: properties/1234/expandedDataSets/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteExpandedDataSet(DeleteExpandedDataSetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteExpandedDataSetRequest request =
DeleteExpandedDataSetRequest.newBuilder()
.setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString())
.build();
analyticsAdminServiceClient.deleteExpandedDataSet(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteExpandedDataSetRequest,com.google.protobuf.Empty> deleteExpandedDataSetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteExpandedDataSetRequest request =
DeleteExpandedDataSetRequest.newBuilder()
.setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteExpandedDataSetCallable().futureCall(request);
// Do something.
future.get();
}
public final ChannelGroup getChannelGroup(ChannelGroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]");
ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name);
}
name - Required. The ChannelGroup to get. Example format:
properties/1234/channelGroups/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final ChannelGroup getChannelGroup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString();
ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name);
}
name - Required. The ChannelGroup to get. Example format:
properties/1234/channelGroups/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final ChannelGroup getChannelGroup(GetChannelGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetChannelGroupRequest request =
GetChannelGroupRequest.newBuilder()
.setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString())
.build();
ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetChannelGroupRequest,ChannelGroup> getChannelGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetChannelGroupRequest request =
GetChannelGroupRequest.newBuilder()
.setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString())
.build();
ApiFuture<ChannelGroup> future =
analyticsAdminServiceClient.getChannelGroupCallable().futureCall(request);
// Do something.
ChannelGroup response = future.get();
}
public final AnalyticsAdminServiceClient.ListChannelGroupsPagedResponse listChannelGroups(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (ChannelGroup element :
analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The property for which to list ChannelGroups. Example format:
properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListChannelGroupsPagedResponse listChannelGroups(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (ChannelGroup element :
analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The property for which to list ChannelGroups. Example format:
properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListChannelGroupsRequest request =
ListChannelGroupsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ChannelGroup element :
analyticsAdminServiceClient.listChannelGroups(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListChannelGroupsRequest,AnalyticsAdminServiceClient.ListChannelGroupsPagedResponse> listChannelGroupsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListChannelGroupsRequest request =
ListChannelGroupsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ChannelGroup> future =
analyticsAdminServiceClient.listChannelGroupsPagedCallable().futureCall(request);
// Do something.
for (ChannelGroup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListChannelGroupsRequest,ListChannelGroupsResponse> listChannelGroupsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListChannelGroupsRequest request =
ListChannelGroupsRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListChannelGroupsResponse response =
analyticsAdminServiceClient.listChannelGroupsCallable().call(request);
for (ChannelGroup element : response.getChannelGroupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final ChannelGroup createChannelGroup(PropertyName parent, ChannelGroup channelGroup)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
ChannelGroup channelGroup = ChannelGroup.newBuilder().build();
ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup);
}
parent - Required. The property for which to create a ChannelGroup. Example format:
properties/1234channelGroup - Required. The ChannelGroup to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ChannelGroup createChannelGroup(String parent, ChannelGroup channelGroup)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
ChannelGroup channelGroup = ChannelGroup.newBuilder().build();
ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup);
}
parent - Required. The property for which to create a ChannelGroup. Example format:
properties/1234channelGroup - Required. The ChannelGroup to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ChannelGroup createChannelGroup(CreateChannelGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateChannelGroupRequest request =
CreateChannelGroupRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setChannelGroup(ChannelGroup.newBuilder().build())
.build();
ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateChannelGroupRequest,ChannelGroup> createChannelGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateChannelGroupRequest request =
CreateChannelGroupRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setChannelGroup(ChannelGroup.newBuilder().build())
.build();
ApiFuture<ChannelGroup> future =
analyticsAdminServiceClient.createChannelGroupCallable().futureCall(request);
// Do something.
ChannelGroup response = future.get();
}
public final ChannelGroup updateChannelGroup(ChannelGroup channelGroup, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ChannelGroup channelGroup = ChannelGroup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ChannelGroup response =
analyticsAdminServiceClient.updateChannelGroup(channelGroup, updateMask);
}
channelGroup - Required. The ChannelGroup to update. The resource's `name` field is used
to identify the ChannelGroup 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ChannelGroup updateChannelGroup(UpdateChannelGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateChannelGroupRequest request =
UpdateChannelGroupRequest.newBuilder()
.setChannelGroup(ChannelGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ChannelGroup response = analyticsAdminServiceClient.updateChannelGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateChannelGroupRequest,ChannelGroup> updateChannelGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateChannelGroupRequest request =
UpdateChannelGroupRequest.newBuilder()
.setChannelGroup(ChannelGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<ChannelGroup> future =
analyticsAdminServiceClient.updateChannelGroupCallable().futureCall(request);
// Do something.
ChannelGroup response = future.get();
}
public final void deleteChannelGroup(ChannelGroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]");
analyticsAdminServiceClient.deleteChannelGroup(name);
}
name - Required. The ChannelGroup to delete. Example format:
properties/1234/channelGroups/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteChannelGroup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString();
analyticsAdminServiceClient.deleteChannelGroup(name);
}
name - Required. The ChannelGroup to delete. Example format:
properties/1234/channelGroups/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteChannelGroup(DeleteChannelGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteChannelGroupRequest request =
DeleteChannelGroupRequest.newBuilder()
.setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString())
.build();
analyticsAdminServiceClient.deleteChannelGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteChannelGroupRequest,com.google.protobuf.Empty> deleteChannelGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteChannelGroupRequest request =
DeleteChannelGroupRequest.newBuilder()
.setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteChannelGroupCallable().futureCall(request);
// Do something.
future.get();
}
public final SetAutomatedGa4ConfigurationOptOutResponse setAutomatedGa4ConfigurationOptOut(SetAutomatedGa4ConfigurationOptOutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SetAutomatedGa4ConfigurationOptOutRequest request =
SetAutomatedGa4ConfigurationOptOutRequest.newBuilder()
.setProperty("property-993141291")
.setOptOut(true)
.build();
SetAutomatedGa4ConfigurationOptOutResponse response =
analyticsAdminServiceClient.setAutomatedGa4ConfigurationOptOut(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SetAutomatedGa4ConfigurationOptOutRequest,SetAutomatedGa4ConfigurationOptOutResponse> setAutomatedGa4ConfigurationOptOutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SetAutomatedGa4ConfigurationOptOutRequest request =
SetAutomatedGa4ConfigurationOptOutRequest.newBuilder()
.setProperty("property-993141291")
.setOptOut(true)
.build();
ApiFuture<SetAutomatedGa4ConfigurationOptOutResponse> future =
analyticsAdminServiceClient
.setAutomatedGa4ConfigurationOptOutCallable()
.futureCall(request);
// Do something.
SetAutomatedGa4ConfigurationOptOutResponse response = future.get();
}
public final FetchAutomatedGa4ConfigurationOptOutResponse fetchAutomatedGa4ConfigurationOptOut(FetchAutomatedGa4ConfigurationOptOutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FetchAutomatedGa4ConfigurationOptOutRequest request =
FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder()
.setProperty("property-993141291")
.build();
FetchAutomatedGa4ConfigurationOptOutResponse response =
analyticsAdminServiceClient.fetchAutomatedGa4ConfigurationOptOut(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<FetchAutomatedGa4ConfigurationOptOutRequest,FetchAutomatedGa4ConfigurationOptOutResponse> fetchAutomatedGa4ConfigurationOptOutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FetchAutomatedGa4ConfigurationOptOutRequest request =
FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder()
.setProperty("property-993141291")
.build();
ApiFuture<FetchAutomatedGa4ConfigurationOptOutResponse> future =
analyticsAdminServiceClient
.fetchAutomatedGa4ConfigurationOptOutCallable()
.futureCall(request);
// Do something.
FetchAutomatedGa4ConfigurationOptOutResponse response = future.get();
}
public final BigQueryLink getBigQueryLink(BigQueryLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]");
BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name);
}
name - Required. The name of the BigQuery link to lookup. Format:
properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example:
properties/123/bigQueryLinks/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final BigQueryLink getBigQueryLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString();
BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name);
}
name - Required. The name of the BigQuery link to lookup. Format:
properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example:
properties/123/bigQueryLinks/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final BigQueryLink getBigQueryLink(GetBigQueryLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetBigQueryLinkRequest request =
GetBigQueryLinkRequest.newBuilder()
.setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString())
.build();
BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetBigQueryLinkRequest,BigQueryLink> getBigQueryLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetBigQueryLinkRequest request =
GetBigQueryLinkRequest.newBuilder()
.setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString())
.build();
ApiFuture<BigQueryLink> future =
analyticsAdminServiceClient.getBigQueryLinkCallable().futureCall(request);
// Do something.
BigQueryLink response = future.get();
}
public final AnalyticsAdminServiceClient.ListBigQueryLinksPagedResponse listBigQueryLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (BigQueryLink element :
analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The name of the property to list BigQuery links under. Format:
properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListBigQueryLinksPagedResponse listBigQueryLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (BigQueryLink element :
analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The name of the property to list BigQuery links under. Format:
properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListBigQueryLinksRequest request =
ListBigQueryLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (BigQueryLink element :
analyticsAdminServiceClient.listBigQueryLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListBigQueryLinksRequest,AnalyticsAdminServiceClient.ListBigQueryLinksPagedResponse> listBigQueryLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListBigQueryLinksRequest request =
ListBigQueryLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<BigQueryLink> future =
analyticsAdminServiceClient.listBigQueryLinksPagedCallable().futureCall(request);
// Do something.
for (BigQueryLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListBigQueryLinksRequest,ListBigQueryLinksResponse> listBigQueryLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListBigQueryLinksRequest request =
ListBigQueryLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListBigQueryLinksResponse response =
analyticsAdminServiceClient.listBigQueryLinksCallable().call(request);
for (BigQueryLink element : response.getBigqueryLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(EnhancedMeasurementSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
EnhancedMeasurementSettingsName name =
EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]");
EnhancedMeasurementSettings response =
analyticsAdminServiceClient.getEnhancedMeasurementSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example:
"properties/1000/dataStreams/2000/enhancedMeasurementSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString();
EnhancedMeasurementSettings response =
analyticsAdminServiceClient.getEnhancedMeasurementSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example:
"properties/1000/dataStreams/2000/enhancedMeasurementSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final EnhancedMeasurementSettings getEnhancedMeasurementSettings(GetEnhancedMeasurementSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetEnhancedMeasurementSettingsRequest request =
GetEnhancedMeasurementSettingsRequest.newBuilder()
.setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
EnhancedMeasurementSettings response =
analyticsAdminServiceClient.getEnhancedMeasurementSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEnhancedMeasurementSettingsRequest,EnhancedMeasurementSettings> getEnhancedMeasurementSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetEnhancedMeasurementSettingsRequest request =
GetEnhancedMeasurementSettingsRequest.newBuilder()
.setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
ApiFuture<EnhancedMeasurementSettings> future =
analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request);
// Do something.
EnhancedMeasurementSettings response = future.get();
}
public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings(EnhancedMeasurementSettings enhancedMeasurementSettings, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
EnhancedMeasurementSettings enhancedMeasurementSettings =
EnhancedMeasurementSettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
EnhancedMeasurementSettings response =
analyticsAdminServiceClient.updateEnhancedMeasurementSettings(
enhancedMeasurementSettings, updateMask);
}
enhancedMeasurementSettings - 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EnhancedMeasurementSettings updateEnhancedMeasurementSettings(UpdateEnhancedMeasurementSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateEnhancedMeasurementSettingsRequest request =
UpdateEnhancedMeasurementSettingsRequest.newBuilder()
.setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
EnhancedMeasurementSettings response =
analyticsAdminServiceClient.updateEnhancedMeasurementSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateEnhancedMeasurementSettingsRequest,EnhancedMeasurementSettings> updateEnhancedMeasurementSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateEnhancedMeasurementSettingsRequest request =
UpdateEnhancedMeasurementSettingsRequest.newBuilder()
.setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<EnhancedMeasurementSettings> future =
analyticsAdminServiceClient
.updateEnhancedMeasurementSettingsCallable()
.futureCall(request);
// Do something.
EnhancedMeasurementSettings response = future.get();
}
public final CreateConnectedSiteTagResponse createConnectedSiteTag(CreateConnectedSiteTagRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateConnectedSiteTagRequest request =
CreateConnectedSiteTagRequest.newBuilder()
.setProperty("property-993141291")
.setConnectedSiteTag(ConnectedSiteTag.newBuilder().build())
.build();
CreateConnectedSiteTagResponse response =
analyticsAdminServiceClient.createConnectedSiteTag(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateConnectedSiteTagRequest,CreateConnectedSiteTagResponse> createConnectedSiteTagCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateConnectedSiteTagRequest request =
CreateConnectedSiteTagRequest.newBuilder()
.setProperty("property-993141291")
.setConnectedSiteTag(ConnectedSiteTag.newBuilder().build())
.build();
ApiFuture<CreateConnectedSiteTagResponse> future =
analyticsAdminServiceClient.createConnectedSiteTagCallable().futureCall(request);
// Do something.
CreateConnectedSiteTagResponse response = future.get();
}
public final void deleteConnectedSiteTag(DeleteConnectedSiteTagRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteConnectedSiteTagRequest request =
DeleteConnectedSiteTagRequest.newBuilder()
.setProperty("property-993141291")
.setTagId("tagId110119509")
.build();
analyticsAdminServiceClient.deleteConnectedSiteTag(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteConnectedSiteTagRequest,com.google.protobuf.Empty> deleteConnectedSiteTagCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteConnectedSiteTagRequest request =
DeleteConnectedSiteTagRequest.newBuilder()
.setProperty("property-993141291")
.setTagId("tagId110119509")
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteConnectedSiteTagCallable().futureCall(request);
// Do something.
future.get();
}
public final ListConnectedSiteTagsResponse listConnectedSiteTags(ListConnectedSiteTagsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListConnectedSiteTagsRequest request =
ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build();
ListConnectedSiteTagsResponse response =
analyticsAdminServiceClient.listConnectedSiteTags(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListConnectedSiteTagsRequest,ListConnectedSiteTagsResponse> listConnectedSiteTagsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListConnectedSiteTagsRequest request =
ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build();
ApiFuture<ListConnectedSiteTagsResponse> future =
analyticsAdminServiceClient.listConnectedSiteTagsCallable().futureCall(request);
// Do something.
ListConnectedSiteTagsResponse response = future.get();
}
public final FetchConnectedGa4PropertyResponse fetchConnectedGa4Property(FetchConnectedGa4PropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FetchConnectedGa4PropertyRequest request =
FetchConnectedGa4PropertyRequest.newBuilder()
.setProperty(PropertyName.of("[PROPERTY]").toString())
.build();
FetchConnectedGa4PropertyResponse response =
analyticsAdminServiceClient.fetchConnectedGa4Property(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<FetchConnectedGa4PropertyRequest,FetchConnectedGa4PropertyResponse> fetchConnectedGa4PropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
FetchConnectedGa4PropertyRequest request =
FetchConnectedGa4PropertyRequest.newBuilder()
.setProperty(PropertyName.of("[PROPERTY]").toString())
.build();
ApiFuture<FetchConnectedGa4PropertyResponse> future =
analyticsAdminServiceClient.fetchConnectedGa4PropertyCallable().futureCall(request);
// Do something.
FetchConnectedGa4PropertyResponse response = future.get();
}
public final AdSenseLink getAdSenseLink(AdSenseLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]");
AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name);
}
name - Required. Unique identifier for the AdSense Link requested. Format:
properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final AdSenseLink getAdSenseLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString();
AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name);
}
name - Required. Unique identifier for the AdSense Link requested. Format:
properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final AdSenseLink getAdSenseLink(GetAdSenseLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAdSenseLinkRequest request =
GetAdSenseLinkRequest.newBuilder()
.setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString())
.build();
AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAdSenseLinkRequest,AdSenseLink> getAdSenseLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetAdSenseLinkRequest request =
GetAdSenseLinkRequest.newBuilder()
.setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString())
.build();
ApiFuture<AdSenseLink> future =
analyticsAdminServiceClient.getAdSenseLinkCallable().futureCall(request);
// Do something.
AdSenseLink response = future.get();
}
public final AdSenseLink createAdSenseLink(PropertyName parent, AdSenseLink adsenseLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
AdSenseLink adsenseLink = AdSenseLink.newBuilder().build();
AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink);
}
parent - Required. The property for which to create an AdSense Link. Format:
properties/{propertyId} Example: properties/1234adsenseLink - Required. The AdSense Link to createcom.google.api.gax.rpc.ApiException - if the remote call failspublic final AdSenseLink createAdSenseLink(String parent, AdSenseLink adsenseLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
AdSenseLink adsenseLink = AdSenseLink.newBuilder().build();
AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink);
}
parent - Required. The property for which to create an AdSense Link. Format:
properties/{propertyId} Example: properties/1234adsenseLink - Required. The AdSense Link to createcom.google.api.gax.rpc.ApiException - if the remote call failspublic final AdSenseLink createAdSenseLink(CreateAdSenseLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAdSenseLinkRequest request =
CreateAdSenseLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setAdsenseLink(AdSenseLink.newBuilder().build())
.build();
AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateAdSenseLinkRequest,AdSenseLink> createAdSenseLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateAdSenseLinkRequest request =
CreateAdSenseLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setAdsenseLink(AdSenseLink.newBuilder().build())
.build();
ApiFuture<AdSenseLink> future =
analyticsAdminServiceClient.createAdSenseLinkCallable().futureCall(request);
// Do something.
AdSenseLink response = future.get();
}
public final void deleteAdSenseLink(AdSenseLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]");
analyticsAdminServiceClient.deleteAdSenseLink(name);
}
name - Required. Unique identifier for the AdSense Link to be deleted. Format:
properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAdSenseLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString();
analyticsAdminServiceClient.deleteAdSenseLink(name);
}
name - Required. Unique identifier for the AdSense Link to be deleted. Format:
properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAdSenseLink(DeleteAdSenseLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAdSenseLinkRequest request =
DeleteAdSenseLinkRequest.newBuilder()
.setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString())
.build();
analyticsAdminServiceClient.deleteAdSenseLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteAdSenseLinkRequest,com.google.protobuf.Empty> deleteAdSenseLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteAdSenseLinkRequest request =
DeleteAdSenseLinkRequest.newBuilder()
.setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteAdSenseLinkCallable().futureCall(request);
// Do something.
future.get();
}
public final AnalyticsAdminServiceClient.ListAdSenseLinksPagedResponse listAdSenseLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (AdSenseLink element :
analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Resource name of the parent property. Format: properties/{propertyId}
Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAdSenseLinksPagedResponse listAdSenseLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (AdSenseLink element :
analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Resource name of the parent property. Format: properties/{propertyId}
Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAdSenseLinksRequest request =
ListAdSenseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AdSenseLink element :
analyticsAdminServiceClient.listAdSenseLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAdSenseLinksRequest,AnalyticsAdminServiceClient.ListAdSenseLinksPagedResponse> listAdSenseLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAdSenseLinksRequest request =
ListAdSenseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AdSenseLink> future =
analyticsAdminServiceClient.listAdSenseLinksPagedCallable().futureCall(request);
// Do something.
for (AdSenseLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAdSenseLinksRequest,ListAdSenseLinksResponse> listAdSenseLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListAdSenseLinksRequest request =
ListAdSenseLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAdSenseLinksResponse response =
analyticsAdminServiceClient.listAdSenseLinksCallable().call(request);
for (AdSenseLink element : response.getAdsenseLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final EventCreateRule getEventCreateRule(EventCreateRuleName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
EventCreateRuleName name =
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]");
EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name);
}
name - Required. The name of the EventCreateRule to get. Example format:
properties/123/dataStreams/456/eventCreateRules/789com.google.api.gax.rpc.ApiException - if the remote call failspublic final EventCreateRule getEventCreateRule(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString();
EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name);
}
name - Required. The name of the EventCreateRule to get. Example format:
properties/123/dataStreams/456/eventCreateRules/789com.google.api.gax.rpc.ApiException - if the remote call failspublic final EventCreateRule getEventCreateRule(GetEventCreateRuleRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetEventCreateRuleRequest request =
GetEventCreateRuleRequest.newBuilder()
.setName(
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]")
.toString())
.build();
EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEventCreateRuleRequest,EventCreateRule> getEventCreateRuleCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetEventCreateRuleRequest request =
GetEventCreateRuleRequest.newBuilder()
.setName(
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]")
.toString())
.build();
ApiFuture<EventCreateRule> future =
analyticsAdminServiceClient.getEventCreateRuleCallable().futureCall(request);
// Do something.
EventCreateRule response = future.get();
}
public final AnalyticsAdminServiceClient.ListEventCreateRulesPagedResponse listEventCreateRules(DataStreamName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (EventCreateRule element :
analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/123/dataStreams/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListEventCreateRulesPagedResponse listEventCreateRules(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (EventCreateRule element :
analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Example format: properties/123/dataStreams/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListEventCreateRulesPagedResponse listEventCreateRules(ListEventCreateRulesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListEventCreateRulesRequest request =
ListEventCreateRulesRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (EventCreateRule element :
analyticsAdminServiceClient.listEventCreateRules(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListEventCreateRulesRequest,AnalyticsAdminServiceClient.ListEventCreateRulesPagedResponse> listEventCreateRulesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListEventCreateRulesRequest request =
ListEventCreateRulesRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<EventCreateRule> future =
analyticsAdminServiceClient.listEventCreateRulesPagedCallable().futureCall(request);
// Do something.
for (EventCreateRule element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEventCreateRulesRequest,ListEventCreateRulesResponse> listEventCreateRulesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListEventCreateRulesRequest request =
ListEventCreateRulesRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListEventCreateRulesResponse response =
analyticsAdminServiceClient.listEventCreateRulesCallable().call(request);
for (EventCreateRule element : response.getEventCreateRulesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final EventCreateRule createEventCreateRule(DataStreamName parent, EventCreateRule eventCreateRule)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build();
EventCreateRule response =
analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule);
}
parent - Required. Example format: properties/123/dataStreams/456eventCreateRule - Required. The EventCreateRule to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EventCreateRule createEventCreateRule(String parent, EventCreateRule eventCreateRule)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build();
EventCreateRule response =
analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule);
}
parent - Required. Example format: properties/123/dataStreams/456eventCreateRule - Required. The EventCreateRule to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EventCreateRule createEventCreateRule(CreateEventCreateRuleRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateEventCreateRuleRequest request =
CreateEventCreateRuleRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setEventCreateRule(EventCreateRule.newBuilder().build())
.build();
EventCreateRule response = analyticsAdminServiceClient.createEventCreateRule(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateEventCreateRuleRequest,EventCreateRule> createEventCreateRuleCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateEventCreateRuleRequest request =
CreateEventCreateRuleRequest.newBuilder()
.setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.setEventCreateRule(EventCreateRule.newBuilder().build())
.build();
ApiFuture<EventCreateRule> future =
analyticsAdminServiceClient.createEventCreateRuleCallable().futureCall(request);
// Do something.
EventCreateRule response = future.get();
}
public final EventCreateRule updateEventCreateRule(EventCreateRule eventCreateRule, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
EventCreateRule response =
analyticsAdminServiceClient.updateEventCreateRule(eventCreateRule, updateMask);
}
eventCreateRule - Required. The EventCreateRule to update. The resource's `name` field is
used to identify the EventCreateRule 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EventCreateRule updateEventCreateRule(UpdateEventCreateRuleRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateEventCreateRuleRequest request =
UpdateEventCreateRuleRequest.newBuilder()
.setEventCreateRule(EventCreateRule.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
EventCreateRule response = analyticsAdminServiceClient.updateEventCreateRule(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateEventCreateRuleRequest,EventCreateRule> updateEventCreateRuleCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateEventCreateRuleRequest request =
UpdateEventCreateRuleRequest.newBuilder()
.setEventCreateRule(EventCreateRule.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<EventCreateRule> future =
analyticsAdminServiceClient.updateEventCreateRuleCallable().futureCall(request);
// Do something.
EventCreateRule response = future.get();
}
public final void deleteEventCreateRule(EventCreateRuleName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
EventCreateRuleName name =
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]");
analyticsAdminServiceClient.deleteEventCreateRule(name);
}
name - Required. Example format: properties/123/dataStreams/456/eventCreateRules/789com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteEventCreateRule(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString();
analyticsAdminServiceClient.deleteEventCreateRule(name);
}
name - Required. Example format: properties/123/dataStreams/456/eventCreateRules/789com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteEventCreateRule(DeleteEventCreateRuleRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteEventCreateRuleRequest request =
DeleteEventCreateRuleRequest.newBuilder()
.setName(
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]")
.toString())
.build();
analyticsAdminServiceClient.deleteEventCreateRule(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteEventCreateRuleRequest,com.google.protobuf.Empty> deleteEventCreateRuleCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteEventCreateRuleRequest request =
DeleteEventCreateRuleRequest.newBuilder()
.setName(
EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteEventCreateRuleCallable().futureCall(request);
// Do something.
future.get();
}
public final DataRedactionSettings updateDataRedactionSettings(DataRedactionSettings dataRedactionSettings, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataRedactionSettings dataRedactionSettings = DataRedactionSettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataRedactionSettings response =
analyticsAdminServiceClient.updateDataRedactionSettings(
dataRedactionSettings, updateMask);
}
dataRedactionSettings - 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRedactionSettings updateDataRedactionSettings(UpdateDataRedactionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataRedactionSettingsRequest request =
UpdateDataRedactionSettingsRequest.newBuilder()
.setDataRedactionSettings(DataRedactionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
DataRedactionSettings response =
analyticsAdminServiceClient.updateDataRedactionSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateDataRedactionSettingsRequest,DataRedactionSettings> updateDataRedactionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
UpdateDataRedactionSettingsRequest request =
UpdateDataRedactionSettingsRequest.newBuilder()
.setDataRedactionSettings(DataRedactionSettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<DataRedactionSettings> future =
analyticsAdminServiceClient.updateDataRedactionSettingsCallable().futureCall(request);
// Do something.
DataRedactionSettings response = future.get();
}
public final DataRedactionSettings getDataRedactionSettings(DataRedactionSettingsName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]");
DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example:
"properties/1000/dataStreams/2000/dataRedactionSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRedactionSettings getDataRedactionSettings(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString();
DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name);
}
name - Required. The name of the settings to lookup. Format:
properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example:
"properties/1000/dataStreams/2000/dataRedactionSettings"com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataRedactionSettings getDataRedactionSettings(GetDataRedactionSettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataRedactionSettingsRequest request =
GetDataRedactionSettingsRequest.newBuilder()
.setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
DataRedactionSettings response =
analyticsAdminServiceClient.getDataRedactionSettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataRedactionSettingsRequest,DataRedactionSettings> getDataRedactionSettingsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetDataRedactionSettingsRequest request =
GetDataRedactionSettingsRequest.newBuilder()
.setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString())
.build();
ApiFuture<DataRedactionSettings> future =
analyticsAdminServiceClient.getDataRedactionSettingsCallable().futureCall(request);
// Do something.
DataRedactionSettings response = future.get();
}
public final CreateRollupPropertyResponse createRollupProperty(CreateRollupPropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateRollupPropertyRequest request =
CreateRollupPropertyRequest.newBuilder()
.setRollupProperty(Property.newBuilder().build())
.addAllSourceProperties(new ArrayList<String>())
.build();
CreateRollupPropertyResponse response =
analyticsAdminServiceClient.createRollupProperty(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateRollupPropertyRequest,CreateRollupPropertyResponse> createRollupPropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateRollupPropertyRequest request =
CreateRollupPropertyRequest.newBuilder()
.setRollupProperty(Property.newBuilder().build())
.addAllSourceProperties(new ArrayList<String>())
.build();
ApiFuture<CreateRollupPropertyResponse> future =
analyticsAdminServiceClient.createRollupPropertyCallable().futureCall(request);
// Do something.
CreateRollupPropertyResponse response = future.get();
}
public final RollupPropertySourceLink getRollupPropertySourceLink(RollupPropertySourceLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
RollupPropertySourceLinkName name =
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]");
RollupPropertySourceLink response =
analyticsAdminServiceClient.getRollupPropertySourceLink(name);
}
name - Required. The name of the roll-up property source link to lookup. Format:
properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
Example: properties/123/rollupPropertySourceLinks/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollupPropertySourceLink getRollupPropertySourceLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString();
RollupPropertySourceLink response =
analyticsAdminServiceClient.getRollupPropertySourceLink(name);
}
name - Required. The name of the roll-up property source link to lookup. Format:
properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
Example: properties/123/rollupPropertySourceLinks/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollupPropertySourceLink getRollupPropertySourceLink(GetRollupPropertySourceLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetRollupPropertySourceLinkRequest request =
GetRollupPropertySourceLinkRequest.newBuilder()
.setName(
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]")
.toString())
.build();
RollupPropertySourceLink response =
analyticsAdminServiceClient.getRollupPropertySourceLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetRollupPropertySourceLinkRequest,RollupPropertySourceLink> getRollupPropertySourceLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
GetRollupPropertySourceLinkRequest request =
GetRollupPropertySourceLinkRequest.newBuilder()
.setName(
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]")
.toString())
.build();
ApiFuture<RollupPropertySourceLink> future =
analyticsAdminServiceClient.getRollupPropertySourceLinkCallable().futureCall(request);
// Do something.
RollupPropertySourceLink response = future.get();
}
public final AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks(PropertyName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (RollupPropertySourceLink element :
analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The name of the roll-up property to list roll-up property source links
under. Format: properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 (RollupPropertySourceLink element :
analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The name of the roll-up property to list roll-up property source links
under. Format: properties/{property_id} Example: properties/1234com.google.api.gax.rpc.ApiException - if the remote call failspublic final AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks(ListRollupPropertySourceLinksRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListRollupPropertySourceLinksRequest request =
ListRollupPropertySourceLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (RollupPropertySourceLink element :
analyticsAdminServiceClient.listRollupPropertySourceLinks(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListRollupPropertySourceLinksRequest,AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse> listRollupPropertySourceLinksPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListRollupPropertySourceLinksRequest request =
ListRollupPropertySourceLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<RollupPropertySourceLink> future =
analyticsAdminServiceClient
.listRollupPropertySourceLinksPagedCallable()
.futureCall(request);
// Do something.
for (RollupPropertySourceLink element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListRollupPropertySourceLinksRequest,ListRollupPropertySourceLinksResponse> listRollupPropertySourceLinksCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
ListRollupPropertySourceLinksRequest request =
ListRollupPropertySourceLinksRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListRollupPropertySourceLinksResponse response =
analyticsAdminServiceClient.listRollupPropertySourceLinksCallable().call(request);
for (RollupPropertySourceLink element : response.getRollupPropertySourceLinksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final RollupPropertySourceLink createRollupPropertySourceLink(PropertyName parent, RollupPropertySourceLink rollupPropertySourceLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
RollupPropertySourceLink rollupPropertySourceLink =
RollupPropertySourceLink.newBuilder().build();
RollupPropertySourceLink response =
analyticsAdminServiceClient.createRollupPropertySourceLink(
parent, rollupPropertySourceLink);
}
parent - Required. Format: properties/{property_id} Example: properties/1234rollupPropertySourceLink - Required. The roll-up property source link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollupPropertySourceLink createRollupPropertySourceLink(String parent, RollupPropertySourceLink rollupPropertySourceLink)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
RollupPropertySourceLink rollupPropertySourceLink =
RollupPropertySourceLink.newBuilder().build();
RollupPropertySourceLink response =
analyticsAdminServiceClient.createRollupPropertySourceLink(
parent, rollupPropertySourceLink);
}
parent - Required. Format: properties/{property_id} Example: properties/1234rollupPropertySourceLink - Required. The roll-up property source link to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollupPropertySourceLink createRollupPropertySourceLink(CreateRollupPropertySourceLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateRollupPropertySourceLinkRequest request =
CreateRollupPropertySourceLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build())
.build();
RollupPropertySourceLink response =
analyticsAdminServiceClient.createRollupPropertySourceLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateRollupPropertySourceLinkRequest,RollupPropertySourceLink> createRollupPropertySourceLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateRollupPropertySourceLinkRequest request =
CreateRollupPropertySourceLinkRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build())
.build();
ApiFuture<RollupPropertySourceLink> future =
analyticsAdminServiceClient.createRollupPropertySourceLinkCallable().futureCall(request);
// Do something.
RollupPropertySourceLink response = future.get();
}
public final void deleteRollupPropertySourceLink(RollupPropertySourceLinkName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
RollupPropertySourceLinkName name =
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]");
analyticsAdminServiceClient.deleteRollupPropertySourceLink(name);
}
name - Required. Format:
properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
Example: properties/1234/rollupPropertySourceLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteRollupPropertySourceLink(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString();
analyticsAdminServiceClient.deleteRollupPropertySourceLink(name);
}
name - Required. Format:
properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
Example: properties/1234/rollupPropertySourceLinks/5678com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteRollupPropertySourceLink(DeleteRollupPropertySourceLinkRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteRollupPropertySourceLinkRequest request =
DeleteRollupPropertySourceLinkRequest.newBuilder()
.setName(
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]")
.toString())
.build();
analyticsAdminServiceClient.deleteRollupPropertySourceLink(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteRollupPropertySourceLinkRequest,com.google.protobuf.Empty> deleteRollupPropertySourceLinkCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteRollupPropertySourceLinkRequest request =
DeleteRollupPropertySourceLinkRequest.newBuilder()
.setName(
RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteRollupPropertySourceLinkCallable().futureCall(request);
// Do something.
future.get();
}
public final CreateSubpropertyResponse createSubproperty(CreateSubpropertyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSubpropertyRequest request =
CreateSubpropertyRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSubproperty(Property.newBuilder().build())
.setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build())
.build();
CreateSubpropertyResponse response = analyticsAdminServiceClient.createSubproperty(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSubpropertyRequest,CreateSubpropertyResponse> createSubpropertyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSubpropertyRequest request =
CreateSubpropertyRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSubproperty(Property.newBuilder().build())
.setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build())
.build();
ApiFuture<CreateSubpropertyResponse> future =
analyticsAdminServiceClient.createSubpropertyCallable().futureCall(request);
// Do something.
CreateSubpropertyResponse response = future.get();
}
public final void deleteSubpropertyEventFilter(SubpropertyEventFilterName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
SubpropertyEventFilterName name =
SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]");
analyticsAdminServiceClient.deleteSubpropertyEventFilter(name);
}
name - Required. Resource name of the subproperty event filter to delete. Format:
properties/property_id/subpropertyEventFilters/subproperty_event_filter Example:
properties/123/subpropertyEventFilters/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSubpropertyEventFilter(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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 =
SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]").toString();
analyticsAdminServiceClient.deleteSubpropertyEventFilter(name);
}
name - Required. Resource name of the subproperty event filter to delete. Format:
properties/property_id/subpropertyEventFilters/subproperty_event_filter Example:
properties/123/subpropertyEventFilters/456com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSubpropertyEventFilter(DeleteSubpropertyEventFilterRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSubpropertyEventFilterRequest request =
DeleteSubpropertyEventFilterRequest.newBuilder()
.setName(
SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]")
.toString())
.build();
analyticsAdminServiceClient.deleteSubpropertyEventFilter(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSubpropertyEventFilterRequest,com.google.protobuf.Empty> deleteSubpropertyEventFilterCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
DeleteSubpropertyEventFilterRequest request =
DeleteSubpropertyEventFilterRequest.newBuilder()
.setName(
SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]")
.toString())
.build();
ApiFuture<Empty> future =
analyticsAdminServiceClient.deleteSubpropertyEventFilterCallable().futureCall(request);
// Do something.
future.get();
}
public final SubpropertyEventFilter createSubpropertyEventFilter(PropertyName parent, SubpropertyEventFilter subpropertyEventFilter)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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]");
SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build();
SubpropertyEventFilter response =
analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter);
}
parent - Required. The ordinary property for which to create a subproperty event filter.
Format: properties/property_id Example: properties/123subpropertyEventFilter - Required. The subproperty event filter to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SubpropertyEventFilter createSubpropertyEventFilter(String parent, SubpropertyEventFilter subpropertyEventFilter)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build();
SubpropertyEventFilter response =
analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter);
}
parent - Required. The ordinary property for which to create a subproperty event filter.
Format: properties/property_id Example: properties/123subpropertyEventFilter - Required. The subproperty event filter to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SubpropertyEventFilter createSubpropertyEventFilter(CreateSubpropertyEventFilterRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSubpropertyEventFilterRequest request =
CreateSubpropertyEventFilterRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build())
.build();
SubpropertyEventFilter response =
analyticsAdminServiceClient.createSubpropertyEventFilter(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSubpropertyEventFilterRequest,SubpropertyEventFilter> createSubpropertyEventFilterCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
AnalyticsAdminServiceClient.create()) {
CreateSubpropertyEventFilterRequest request =
CreateSubpropertyEventFilterRequest.newBuilder()
.setParent(PropertyName.of("[PROPERTY]").toString())
.setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build())
.build();
ApiFuture<SubpropertyEventFilter> future =
analyticsAdminServiceClient.createSubpropertyEventFilterCallable().futureCall(request);
// Do something.
SubpropertyEventFilter response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2023 Google LLC. All rights reserved.