diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java index 29e56742..c9e82081 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java @@ -43,6 +43,14 @@ *
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: * + *
{@code + * 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(). @@ -150,6 +158,16 @@ public AnalyticsAdminServiceStub getStub() { /** * Lookup for a single Account. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AccountName name = AccountName.of("[ACCOUNT]"); + * Account response = analyticsAdminServiceClient.getAccount(name); + * } + * }+ * * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: * "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -164,6 +182,16 @@ public final Account getAccount(AccountName name) { /** * Lookup for a single Account. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = AccountName.of("[ACCOUNT]").toString(); + * Account response = analyticsAdminServiceClient.getAccount(name); + * } + * }+ * * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: * "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -177,6 +205,17 @@ public final Account getAccount(String name) { /** * Lookup for a single Account. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetAccountRequest request = + * GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build(); + * Account response = analyticsAdminServiceClient.getAccount(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -189,6 +228,18 @@ public final Account getAccount(GetAccountRequest request) { * Lookup for a single Account. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetAccountRequest request = + * GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getAccountCallable().futureCall(request); + * // Do something. + * Account response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -218,6 +286,24 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) * found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListAccountsRequest request = + * ListAccountsRequest.newBuilder() + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setShowDeleted(true) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request); + * // Do something. + * for (Account element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListAccountsResponse response = + * analyticsAdminServiceClient.listAccountsCallable().call(request); + * for (Account element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Returns an error if the target is not found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AccountName name = AccountName.of("[ACCOUNT]"); + * analyticsAdminServiceClient.deleteAccount(name); + * } + * }+ * * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} * Example: "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -274,6 +389,16 @@ public final void deleteAccount(AccountName name) { * *
Returns an error if the target is not found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = AccountName.of("[ACCOUNT]").toString(); + * analyticsAdminServiceClient.deleteAccount(name); + * } + * }+ * * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} * Example: "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -296,6 +421,17 @@ public final void deleteAccount(String name) { * *
Returns an error if the target is not found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteAccountRequest request = + * DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build(); + * analyticsAdminServiceClient.deleteAccount(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -317,6 +453,18 @@ public final void deleteAccount(DeleteAccountRequest request) { *
Returns an error if the target is not found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteAccountRequest request = + * DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteAccountCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * Account account = Account.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Account response = analyticsAdminServiceClient.updateAccount(account, updateMask); + * } + * }+ * * @param account Required. The account to update. The account's `name` field is used to identify * the account. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -343,6 +502,20 @@ public final Account updateAccount(Account account, FieldMask updateMask) { /** * Updates an account. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateAccountRequest request = + * UpdateAccountRequest.newBuilder() + * .setAccount(Account.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Account response = analyticsAdminServiceClient.updateAccount(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -355,6 +528,21 @@ public final Account updateAccount(UpdateAccountRequest request) { * Updates an account. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateAccountRequest request = + * UpdateAccountRequest.newBuilder() + * .setAccount(Account.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateAccountCallable().futureCall(request); + * // Do something. + * Account response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ProvisionAccountTicketRequest request = + * ProvisionAccountTicketRequest.newBuilder() + * .setAccount(Account.newBuilder().build()) + * .setRedirectUri("redirectUri1970337776") + * .build(); + * ProvisionAccountTicketResponse response = + * analyticsAdminServiceClient.provisionAccountTicket(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -377,6 +580,21 @@ public final ProvisionAccountTicketResponse provisionAccountTicket( * Requests a ticket for creating an account. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ProvisionAccountTicketRequest request = + * ProvisionAccountTicketRequest.newBuilder() + * .setAccount(Account.newBuilder().build()) + * .setRedirectUri("redirectUri1970337776") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.provisionAccountTicketCallable().futureCall(request); + * // Do something. + * ProvisionAccountTicketResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListAccountSummariesRequest request = + * ListAccountSummariesRequest.newBuilder() + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AccountSummary element : + * analyticsAdminServiceClient.listAccountSummaries(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -400,6 +635,23 @@ public final ListAccountSummariesPagedResponse listAccountSummaries( * Returns summaries of all accounts accessible by the caller. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListAccountSummariesRequest request = + * ListAccountSummariesRequest.newBuilder() + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listAccountSummariesPagedCallable().futureCall(request); + * // Do something. + * for (AccountSummary element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListAccountSummariesResponse response = + * analyticsAdminServiceClient.listAccountSummariesCallable().call(request); + * for (AccountSummary element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName name = PropertyName.of("[PROPERTY]"); + * Property response = analyticsAdminServiceClient.getProperty(name); + * } + * }+ * * @param name Required. The name of the property to lookup. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -435,6 +716,16 @@ public final Property getProperty(PropertyName name) { /** * Lookup for a single "GA4" Property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = PropertyName.of("[PROPERTY]").toString(); + * Property response = analyticsAdminServiceClient.getProperty(name); + * } + * }+ * * @param name Required. The name of the property to lookup. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -448,6 +739,17 @@ public final Property getProperty(String name) { /** * Lookup for a single "GA4" Property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetPropertyRequest request = + * GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build(); + * Property response = analyticsAdminServiceClient.getProperty(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -460,6 +762,18 @@ public final Property getProperty(GetPropertyRequest request) { * Lookup for a single "GA4" Property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetPropertyRequest request = + * GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getPropertyCallable().futureCall(request); + * // Do something. + * Property response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -489,6 +821,25 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re * list if no relevant properties are found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListPropertiesRequest request = + * ListPropertiesRequest.newBuilder() + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setShowDeleted(true) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request); + * // Do something. + * for (Property element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListPropertiesResponse response = + * analyticsAdminServiceClient.listPropertiesCallable().call(request); + * for (Property element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * Property property = Property.newBuilder().build(); + * Property response = analyticsAdminServiceClient.createProperty(property); + * } + * }+ * * @param property Required. The property to create. Note: the supplied property must specify its * parent. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -528,6 +908,17 @@ public final Property createProperty(Property property) { /** * Creates an "GA4" property with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreatePropertyRequest request = + * CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build(); + * Property response = analyticsAdminServiceClient.createProperty(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -540,6 +931,18 @@ public final Property createProperty(CreatePropertyRequest request) { * Creates an "GA4" property with the specified location and attributes. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreatePropertyRequest request = + * CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createPropertyCallable().futureCall(request); + * // Do something. + * Property response = future.get(); + * } + * }
Returns an error if the target is not found, or is not an GA4 Property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName name = PropertyName.of("[PROPERTY]"); + * analyticsAdminServiceClient.deleteProperty(name); + * } + * }+ * * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -581,6 +994,16 @@ public final void deleteProperty(PropertyName name) { * *
Returns an error if the target is not found, or is not an GA4 Property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = PropertyName.of("[PROPERTY]").toString(); + * analyticsAdminServiceClient.deleteProperty(name); + * } + * }+ * * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -603,6 +1026,19 @@ public final void deleteProperty(String name) { * *
Returns an error if the target is not found, or is not an GA4 Property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeletePropertyRequest request = + * DeletePropertyRequest.newBuilder() + * .setName(PropertyName.of("[PROPERTY]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteProperty(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -624,6 +1060,20 @@ public final void deleteProperty(DeletePropertyRequest request) { *
Returns an error if the target is not found, or is not an GA4 Property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeletePropertyRequest request = + * DeletePropertyRequest.newBuilder() + * .setName(PropertyName.of("[PROPERTY]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deletePropertyCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * Property property = Property.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Property response = analyticsAdminServiceClient.updateProperty(property, updateMask); + * } + * }+ * * @param property Required. The property to update. The property's `name` field is used to * identify the property to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -650,6 +1111,20 @@ public final Property updateProperty(Property property, FieldMask updateMask) { /** * Updates a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdatePropertyRequest request = + * UpdatePropertyRequest.newBuilder() + * .setProperty(Property.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Property response = analyticsAdminServiceClient.updateProperty(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -662,6 +1137,21 @@ public final Property updateProperty(UpdatePropertyRequest request) { * Updates a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdatePropertyRequest request = + * UpdatePropertyRequest.newBuilder() + * .setProperty(Property.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updatePropertyCallable().futureCall(request); + * // Do something. + * Property response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + * UserLink response = analyticsAdminServiceClient.getUserLink(name); + * } + * }+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -684,6 +1184,16 @@ public final UserLink getUserLink(UserLinkName name) { /** * Gets information about a user's link to an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); + * UserLink response = analyticsAdminServiceClient.getUserLink(name); + * } + * }+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -696,6 +1206,19 @@ public final UserLink getUserLink(String name) { /** * Gets information about a user's link to an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetUserLinkRequest request = + * GetUserLinkRequest.newBuilder() + * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .build(); + * UserLink response = analyticsAdminServiceClient.getUserLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -708,6 +1231,20 @@ public final UserLink getUserLink(GetUserLinkRequest request) { * Gets information about a user's link to an account or property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetUserLinkRequest request = + * GetUserLinkRequest.newBuilder() + * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getUserLinkCallable().futureCall(request); + * // Do something. + * UserLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchGetUserLinksRequest request = + * BatchGetUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllNames(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -729,6 +1280,21 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques * Gets information about multiple users' links to an account or property. * *()) + * .build(); + * BatchGetUserLinksResponse response = analyticsAdminServiceClient.batchGetUserLinks(request); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchGetUserLinksRequest request = + * BatchGetUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllNames(new ArrayList*/ public final UnaryCallable()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.batchGetUserLinksCallable().futureCall(request); + * // Do something. + * BatchGetUserLinksResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -754,6 +1332,18 @@ public final ListUserLinksPagedResponse listUserLinks(AccountName parent) { /** * Lists all user links on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -769,6 +1359,18 @@ public final ListUserLinksPagedResponse listUserLinks(PropertyName parent) { /** * Lists all user links on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); + * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -781,6 +1383,23 @@ public final ListUserLinksPagedResponse listUserLinks(String parent) { /** * Lists all user links on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListUserLinksRequest request = + * ListUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (UserLink element : analyticsAdminServiceClient.listUserLinks(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -793,6 +1412,24 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * Lists all user links on an account or property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListUserLinksRequest request = + * ListUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listUserLinksPagedCallable().futureCall(request); + * // Do something. + * for (UserLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListUserLinksResponse response = + * analyticsAdminServiceClient.listUserLinksCallable().call(request); + * for (UserLink element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AuditUserLinksRequest request = + * AuditUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AuditUserLink element : + * analyticsAdminServiceClient.auditUserLinks(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -837,6 +1511,24 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * GMP UIs. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AuditUserLinksRequest request = + * AuditUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.auditUserLinksPagedCallable().futureCall(request); + * // Do something. + * for (AuditUserLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * AuditUserLinksResponse response = + * analyticsAdminServiceClient.auditUserLinksCallable().call(request); + * for (AuditUserLink element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * UserLink userLink = UserLink.newBuilder().build(); + * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -889,6 +1611,17 @@ public final UserLink createUserLink(AccountName parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * UserLink userLink = UserLink.newBuilder().build(); + * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -910,6 +1643,17 @@ public final UserLink createUserLink(PropertyName parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); + * UserLink userLink = UserLink.newBuilder().build(); + * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * } + * }+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -928,6 +1672,21 @@ public final UserLink createUserLink(String parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateUserLinkRequest request = + * CreateUserLinkRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setNotifyNewUser(true) + * .setUserLink(UserLink.newBuilder().build()) + * .build(); + * UserLink response = analyticsAdminServiceClient.createUserLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -944,6 +1703,22 @@ public final UserLink createUserLink(CreateUserLinkRequest request) { * UserLink. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateUserLinkRequest request = + * CreateUserLinkRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setNotifyNewUser(true) + * .setUserLink(UserLink.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createUserLinkCallable().futureCall(request); + * // Do something. + * UserLink response = future.get(); + * } + * }
This method is transactional. If any UserLink cannot be created, none of the UserLinks will * be created. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchCreateUserLinksRequest request = + * BatchCreateUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setNotifyNewUsers(true) + * .addAllRequests(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -972,6 +1763,22 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( * be created. * *()) + * .build(); + * BatchCreateUserLinksResponse response = + * analyticsAdminServiceClient.batchCreateUserLinks(request); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchCreateUserLinksRequest request = + * BatchCreateUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .setNotifyNewUsers(true) + * .addAllRequests(new ArrayList*/ public final UnaryCallable()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.batchCreateUserLinksCallable().futureCall(request); + * // Do something. + * BatchCreateUserLinksResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UserLink userLink = UserLink.newBuilder().build(); + * UserLink response = analyticsAdminServiceClient.updateUserLink(userLink); + * } + * }+ * * @param userLink Required. The user link to update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -995,6 +1812,17 @@ public final UserLink updateUserLink(UserLink userLink) { /** * Updates a user link on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateUserLinkRequest request = + * UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); + * UserLink response = analyticsAdminServiceClient.updateUserLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1007,6 +1835,18 @@ public final UserLink updateUserLink(UpdateUserLinkRequest request) { * Updates a user link on an account or property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateUserLinkRequest request = + * UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateUserLinkCallable().futureCall(request); + * // Do something. + * UserLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchUpdateUserLinksRequest request = + * BatchUpdateUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllRequests(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1029,6 +1884,21 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( * Updates information about multiple users' links to an account or property. * *()) + * .build(); + * BatchUpdateUserLinksResponse response = + * analyticsAdminServiceClient.batchUpdateUserLinks(request); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchUpdateUserLinksRequest request = + * BatchUpdateUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllRequests(new ArrayList*/ public final UnaryCallable()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.batchUpdateUserLinksCallable().futureCall(request); + * // Do something. + * BatchUpdateUserLinksResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + * analyticsAdminServiceClient.deleteUserLink(name); + * } + * }+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1052,6 +1932,16 @@ public final void deleteUserLink(UserLinkName name) { /** * Deletes a user link on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); + * analyticsAdminServiceClient.deleteUserLink(name); + * } + * }+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1064,6 +1954,19 @@ public final void deleteUserLink(String name) { /** * Deletes a user link on an account or property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteUserLinkRequest request = + * DeleteUserLinkRequest.newBuilder() + * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteUserLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1076,6 +1979,20 @@ public final void deleteUserLink(DeleteUserLinkRequest request) { * Deletes a user link on an account or property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteUserLinkRequest request = + * DeleteUserLinkRequest.newBuilder() + * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteUserLinkCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchDeleteUserLinksRequest request = + * BatchDeleteUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllRequests(new ArrayList+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1097,6 +2028,21 @@ public final void batchDeleteUserLinks(BatchDeleteUserLinksRequest request) { * Deletes information about multiple users' links to an account or property. * *()) + * .build(); + * analyticsAdminServiceClient.batchDeleteUserLinks(request); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * BatchDeleteUserLinksRequest request = + * BatchDeleteUserLinksRequest.newBuilder() + * .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * .addAllRequests(new ArrayList*/ public final UnaryCallable()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.batchDeleteUserLinksCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + * WebDataStream response = analyticsAdminServiceClient.getWebDataStream(name); + * } + * }+ * * @param name Required. The name of the web data stream to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1121,6 +2077,16 @@ public final WebDataStream getWebDataStream(WebDataStreamName name) { /** * Lookup for a single WebDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString(); + * WebDataStream response = analyticsAdminServiceClient.getWebDataStream(name); + * } + * }+ * * @param name Required. The name of the web data stream to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1135,6 +2101,19 @@ public final WebDataStream getWebDataStream(String name) { /** * Lookup for a single WebDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetWebDataStreamRequest request = + * GetWebDataStreamRequest.newBuilder() + * .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * WebDataStream response = analyticsAdminServiceClient.getWebDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1147,6 +2126,20 @@ public final WebDataStream getWebDataStream(GetWebDataStreamRequest request) { * Lookup for a single WebDataStream * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetWebDataStreamRequest request = + * GetWebDataStreamRequest.newBuilder() + * .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getWebDataStreamCallable().futureCall(request); + * // Do something. + * WebDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + * analyticsAdminServiceClient.deleteWebDataStream(name); + * } + * }+ * * @param name Required. The name of the web data stream to delete. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1173,6 +2176,16 @@ public final void deleteWebDataStream(WebDataStreamName name) { /** * Deletes a web stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString(); + * analyticsAdminServiceClient.deleteWebDataStream(name); + * } + * }+ * * @param name Required. The name of the web data stream to delete. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1188,6 +2201,19 @@ public final void deleteWebDataStream(String name) { /** * Deletes a web stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteWebDataStreamRequest request = + * DeleteWebDataStreamRequest.newBuilder() + * .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteWebDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1200,6 +2226,20 @@ public final void deleteWebDataStream(DeleteWebDataStreamRequest request) { * Deletes a web stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteWebDataStreamRequest request = + * DeleteWebDataStreamRequest.newBuilder() + * .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteWebDataStreamCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * WebDataStream webDataStream = WebDataStream.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * WebDataStream response = + * analyticsAdminServiceClient.updateWebDataStream(webDataStream, updateMask); + * } + * }+ * * @param webDataStream Required. The web stream to update. The `name` field is used to identify * the web stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1230,6 +2282,20 @@ public final WebDataStream updateWebDataStream( /** * Updates a web stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateWebDataStreamRequest request = + * UpdateWebDataStreamRequest.newBuilder() + * .setWebDataStream(WebDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * WebDataStream response = analyticsAdminServiceClient.updateWebDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1242,6 +2308,21 @@ public final WebDataStream updateWebDataStream(UpdateWebDataStreamRequest reques * Updates a web stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateWebDataStreamRequest request = + * UpdateWebDataStreamRequest.newBuilder() + * .setWebDataStream(WebDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateWebDataStreamCallable().futureCall(request); + * // Do something. + * WebDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * WebDataStream webDataStream = WebDataStream.newBuilder().build(); + * WebDataStream response = + * analyticsAdminServiceClient.createWebDataStream(parent, webDataStream); + * } + * }+ * * @param parent Required. The parent resource where this web data stream will be created. Format: * properties/123 * @param webDataStream Required. The web stream to create. @@ -1270,6 +2363,18 @@ public final WebDataStream createWebDataStream(PropertyName parent, WebDataStrea /** * Creates a web stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString(); + * WebDataStream webDataStream = WebDataStream.newBuilder().build(); + * WebDataStream response = + * analyticsAdminServiceClient.createWebDataStream(parent, webDataStream); + * } + * }+ * * @param parent Required. The parent resource where this web data stream will be created. Format: * properties/123 * @param webDataStream Required. The web stream to create. @@ -1288,6 +2393,20 @@ public final WebDataStream createWebDataStream(String parent, WebDataStream webD /** * Creates a web stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateWebDataStreamRequest request = + * CreateWebDataStreamRequest.newBuilder() + * .setWebDataStream(WebDataStream.newBuilder().build()) + * .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * WebDataStream response = analyticsAdminServiceClient.createWebDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1300,6 +2419,21 @@ public final WebDataStream createWebDataStream(CreateWebDataStreamRequest reques * Creates a web stream with the specified location and attributes. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateWebDataStreamRequest request = + * CreateWebDataStreamRequest.newBuilder() + * .setWebDataStream(WebDataStream.newBuilder().build()) + * .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createWebDataStreamCallable().futureCall(request); + * // Do something. + * WebDataStream response = future.get(); + * } + * }
Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (WebDataStream element : + * analyticsAdminServiceClient.listWebDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to list results of web * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1332,6 +2479,19 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(PropertyName par *
Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString(); + * for (WebDataStream element : + * analyticsAdminServiceClient.listWebDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to list results of web * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1349,6 +2509,24 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(String parent) { *
Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListWebDataStreamsRequest request = + * ListWebDataStreamsRequest.newBuilder() + * .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (WebDataStream element : + * analyticsAdminServiceClient.listWebDataStreams(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1365,6 +2543,24 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( * if no relevant web data streams are found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListWebDataStreamsRequest request = + * ListWebDataStreamsRequest.newBuilder() + * .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listWebDataStreamsPagedCallable().futureCall(request); + * // Do something. + * for (WebDataStream element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListWebDataStreamsResponse response = + * analyticsAdminServiceClient.listWebDataStreamsCallable().call(request); + * for (WebDataStream element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); + * IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(name); + * } + * }+ * * @param name Required. The name of the iOS app data stream to lookup. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1406,6 +2631,16 @@ public final IosAppDataStream getIosAppDataStream(IosAppDataStreamName name) { /** * Lookup for a single IosAppDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString(); + * IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(name); + * } + * }+ * * @param name Required. The name of the iOS app data stream to lookup. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1421,6 +2656,19 @@ public final IosAppDataStream getIosAppDataStream(String name) { /** * Lookup for a single IosAppDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetIosAppDataStreamRequest request = + * GetIosAppDataStreamRequest.newBuilder() + * .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1433,6 +2681,20 @@ public final IosAppDataStream getIosAppDataStream(GetIosAppDataStreamRequest req * Lookup for a single IosAppDataStream * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetIosAppDataStreamRequest request = + * GetIosAppDataStreamRequest.newBuilder() + * .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getIosAppDataStreamCallable().futureCall(request); + * // Do something. + * IosAppDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); + * analyticsAdminServiceClient.deleteIosAppDataStream(name); + * } + * }+ * * @param name Required. The name of the iOS app data stream to delete. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1460,6 +2732,16 @@ public final void deleteIosAppDataStream(IosAppDataStreamName name) { /** * Deletes an iOS app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString(); + * analyticsAdminServiceClient.deleteIosAppDataStream(name); + * } + * }+ * * @param name Required. The name of the iOS app data stream to delete. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1475,6 +2757,19 @@ public final void deleteIosAppDataStream(String name) { /** * Deletes an iOS app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteIosAppDataStreamRequest request = + * DeleteIosAppDataStreamRequest.newBuilder() + * .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteIosAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1487,6 +2782,20 @@ public final void deleteIosAppDataStream(DeleteIosAppDataStreamRequest request) * Deletes an iOS app stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteIosAppDataStreamRequest request = + * DeleteIosAppDataStreamRequest.newBuilder() + * .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteIosAppDataStreamCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * IosAppDataStream response = + * analyticsAdminServiceClient.updateIosAppDataStream(iosAppDataStream, updateMask); + * } + * }+ * * @param iosAppDataStream Required. The iOS app stream to update. The `name` field is used to * identify the iOS app stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1518,6 +2839,20 @@ public final IosAppDataStream updateIosAppDataStream( /** * Updates an iOS app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateIosAppDataStreamRequest request = + * UpdateIosAppDataStreamRequest.newBuilder() + * .setIosAppDataStream(IosAppDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * IosAppDataStream response = analyticsAdminServiceClient.updateIosAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1530,6 +2865,21 @@ public final IosAppDataStream updateIosAppDataStream(UpdateIosAppDataStreamReque * Updates an iOS app stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateIosAppDataStreamRequest request = + * UpdateIosAppDataStreamRequest.newBuilder() + * .setIosAppDataStream(IosAppDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateIosAppDataStreamCallable().futureCall(request); + * // Do something. + * IosAppDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); + * IosAppDataStream response = + * analyticsAdminServiceClient.createIosAppDataStream(parent, iosAppDataStream); + * } + * }+ * * @param parent Required. The parent resource where this ios app data stream will be created. * Format: properties/123 * @param iosAppDataStream Required. The iOS app data stream to create. @@ -1559,6 +2921,18 @@ public final IosAppDataStream createIosAppDataStream( /** * Creates an iOS app data stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString(); + * IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); + * IosAppDataStream response = + * analyticsAdminServiceClient.createIosAppDataStream(parent, iosAppDataStream); + * } + * }+ * * @param parent Required. The parent resource where this ios app data stream will be created. * Format: properties/123 * @param iosAppDataStream Required. The iOS app data stream to create. @@ -1578,6 +2952,20 @@ public final IosAppDataStream createIosAppDataStream( /** * Creates an iOS app data stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateIosAppDataStreamRequest request = + * CreateIosAppDataStreamRequest.newBuilder() + * .setIosAppDataStream(IosAppDataStream.newBuilder().build()) + * .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * IosAppDataStream response = analyticsAdminServiceClient.createIosAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1590,6 +2978,21 @@ public final IosAppDataStream createIosAppDataStream(CreateIosAppDataStreamReque * Creates an iOS app data stream with the specified location and attributes. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateIosAppDataStreamRequest request = + * CreateIosAppDataStreamRequest.newBuilder() + * .setIosAppDataStream(IosAppDataStream.newBuilder().build()) + * .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createIosAppDataStreamCallable().futureCall(request); + * // Do something. + * IosAppDataStream response = future.get(); + * } + * }
iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (IosAppDataStream element : + * analyticsAdminServiceClient.listIosAppDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to list results of app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1622,6 +3038,19 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(PropertyNa *
iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString(); + * for (IosAppDataStream element : + * analyticsAdminServiceClient.listIosAppDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to list results of app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1639,6 +3068,24 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(String par *
iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListIosAppDataStreamsRequest request = + * ListIosAppDataStreamsRequest.newBuilder() + * .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (IosAppDataStream element : + * analyticsAdminServiceClient.listIosAppDataStreams(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1655,6 +3102,24 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( * list if no relevant iOS app data streams are found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListIosAppDataStreamsRequest request = + * ListIosAppDataStreamsRequest.newBuilder() + * .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listIosAppDataStreamsPagedCallable().futureCall(request); + * // Do something. + * for (IosAppDataStream element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListIosAppDataStreamsResponse response = + * analyticsAdminServiceClient.listIosAppDataStreamsCallable().call(request); + * for (IosAppDataStream element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AndroidAppDataStreamName name = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); + * AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(name); + * } + * }+ * * @param name Required. The name of the android app data stream to lookup. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1696,6 +3191,17 @@ public final AndroidAppDataStream getAndroidAppDataStream(AndroidAppDataStreamNa /** * Lookup for a single AndroidAppDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString(); + * AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(name); + * } + * }+ * * @param name Required. The name of the android app data stream to lookup. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1711,6 +3217,20 @@ public final AndroidAppDataStream getAndroidAppDataStream(String name) { /** * Lookup for a single AndroidAppDataStream * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetAndroidAppDataStreamRequest request = + * GetAndroidAppDataStreamRequest.newBuilder() + * .setName( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1724,6 +3244,21 @@ public final AndroidAppDataStream getAndroidAppDataStream( * Lookup for a single AndroidAppDataStream * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetAndroidAppDataStreamRequest request = + * GetAndroidAppDataStreamRequest.newBuilder() + * .setName( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getAndroidAppDataStreamCallable().futureCall(request); + * // Do something. + * AndroidAppDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AndroidAppDataStreamName name = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); + * analyticsAdminServiceClient.deleteAndroidAppDataStream(name); + * } + * }+ * * @param name Required. The name of the android app data stream to delete. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1751,6 +3297,17 @@ public final void deleteAndroidAppDataStream(AndroidAppDataStreamName name) { /** * Deletes an android app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString(); + * analyticsAdminServiceClient.deleteAndroidAppDataStream(name); + * } + * }+ * * @param name Required. The name of the android app data stream to delete. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1766,6 +3323,20 @@ public final void deleteAndroidAppDataStream(String name) { /** * Deletes an android app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteAndroidAppDataStreamRequest request = + * DeleteAndroidAppDataStreamRequest.newBuilder() + * .setName( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteAndroidAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1778,6 +3349,21 @@ public final void deleteAndroidAppDataStream(DeleteAndroidAppDataStreamRequest r * Deletes an android app stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteAndroidAppDataStreamRequest request = + * DeleteAndroidAppDataStreamRequest.newBuilder() + * .setName( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteAndroidAppDataStreamCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * AndroidAppDataStream response = + * analyticsAdminServiceClient.updateAndroidAppDataStream(androidAppDataStream, updateMask); + * } + * }+ * * @param androidAppDataStream Required. The android app stream to update. The `name` field is * used to identify the android app stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1809,6 +3407,21 @@ public final AndroidAppDataStream updateAndroidAppDataStream( /** * Updates an android app stream on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateAndroidAppDataStreamRequest request = + * UpdateAndroidAppDataStreamRequest.newBuilder() + * .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * AndroidAppDataStream response = + * analyticsAdminServiceClient.updateAndroidAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1822,6 +3435,21 @@ public final AndroidAppDataStream updateAndroidAppDataStream( * Updates an android app stream on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateAndroidAppDataStreamRequest request = + * UpdateAndroidAppDataStreamRequest.newBuilder() + * .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateAndroidAppDataStreamCallable().futureCall(request); + * // Do something. + * AndroidAppDataStream response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); + * AndroidAppDataStream response = + * analyticsAdminServiceClient.createAndroidAppDataStream(parent, androidAppDataStream); + * } + * }+ * * @param parent Required. The parent resource where this android app data stream will be created. * Format: properties/123 * @param androidAppDataStream Required. The android app stream to create. @@ -1851,6 +3491,19 @@ public final AndroidAppDataStream createAndroidAppDataStream( /** * Creates an android app stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString(); + * AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); + * AndroidAppDataStream response = + * analyticsAdminServiceClient.createAndroidAppDataStream(parent, androidAppDataStream); + * } + * }+ * * @param parent Required. The parent resource where this android app data stream will be created. * Format: properties/123 * @param androidAppDataStream Required. The android app stream to create. @@ -1870,6 +3523,22 @@ public final AndroidAppDataStream createAndroidAppDataStream( /** * Creates an android app stream with the specified location and attributes. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateAndroidAppDataStreamRequest request = + * CreateAndroidAppDataStreamRequest.newBuilder() + * .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build()) + * .setParent( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * AndroidAppDataStream response = + * analyticsAdminServiceClient.createAndroidAppDataStream(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1883,6 +3552,22 @@ public final AndroidAppDataStream createAndroidAppDataStream( * Creates an android app stream with the specified location and attributes. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateAndroidAppDataStreamRequest request = + * CreateAndroidAppDataStreamRequest.newBuilder() + * .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build()) + * .setParent( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createAndroidAppDataStreamCallable().futureCall(request); + * // Do something. + * AndroidAppDataStream response = future.get(); + * } + * }
Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (AndroidAppDataStream element : + * analyticsAdminServiceClient.listAndroidAppDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to limit results to app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1916,6 +3614,20 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( *
Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString(); + * for (AndroidAppDataStream element : + * analyticsAdminServiceClient.listAndroidAppDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The name of the parent property. For example, to limit results to app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1933,6 +3645,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams(St *
Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListAndroidAppDataStreamsRequest request = + * ListAndroidAppDataStreamsRequest.newBuilder() + * .setParent( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AndroidAppDataStream element : + * analyticsAdminServiceClient.listAndroidAppDataStreams(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1949,6 +3680,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListAndroidAppDataStreamsRequest request = + * ListAndroidAppDataStreamsRequest.newBuilder() + * .setParent( + * AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallable< ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsPagedResponse> @@ -1964,6 +3714,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *future = + * analyticsAdminServiceClient.listAndroidAppDataStreamsPagedCallable().futureCall(request); + * // Do something. + * for (AndroidAppDataStream element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListAndroidAppDataStreamsResponse response = + * analyticsAdminServiceClient.listAndroidAppDataStreamsCallable().call(request); + * for (AndroidAppDataStream element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * EnhancedMeasurementSettingsName name = + * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); + * } + * }+ * * @param name Required. The name of the settings to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: * "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" @@ -1994,6 +3775,18 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * Returns the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = + * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); + * } + * }+ * * @param name Required. The name of the settings to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: * "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" @@ -2010,6 +3803,21 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String n * Returns the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetEnhancedMeasurementSettingsRequest request = + * GetEnhancedMeasurementSettingsRequest.newBuilder() + * .setName( + * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2024,6 +3832,21 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * must enable enhanced measurement for these settings to take effect. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetEnhancedMeasurementSettingsRequest request = + * GetEnhancedMeasurementSettingsRequest.newBuilder() + * .setName( + * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request); + * // Do something. + * EnhancedMeasurementSettings response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * EnhancedMeasurementSettings enhancedMeasurementSettings = + * EnhancedMeasurementSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.updateEnhancedMeasurementSettings( + * enhancedMeasurementSettings, updateMask); + * } + * }+ * * @param enhancedMeasurementSettings Required. The settings to update. The `name` field is used * to identify the settings to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -2057,6 +3894,21 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * Updates the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateEnhancedMeasurementSettingsRequest request = + * UpdateEnhancedMeasurementSettingsRequest.newBuilder() + * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.updateEnhancedMeasurementSettings(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2071,6 +3923,23 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * must enable enhanced measurement for these settings to take effect. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateEnhancedMeasurementSettingsRequest request = + * UpdateEnhancedMeasurementSettingsRequest.newBuilder() + * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient + * .updateEnhancedMeasurementSettingsCallable() + * .futureCall(request); + * // Do something. + * EnhancedMeasurementSettings response = future.get(); + * } + * }
Properties can have at most one FirebaseLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink); + * } + * }+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2102,6 +3982,17 @@ public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink f * *
Properties can have at most one FirebaseLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString(); + * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink); + * } + * }+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2121,6 +4012,20 @@ public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebas * *
Properties can have at most one FirebaseLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateFirebaseLinkRequest request = + * CreateFirebaseLinkRequest.newBuilder() + * .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * .build(); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2135,6 +4040,21 @@ public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) *
Properties can have at most one FirebaseLink. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateFirebaseLinkRequest request = + * CreateFirebaseLinkRequest.newBuilder() + * .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request); + * // Do something. + * FirebaseLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * FirebaseLink response = + * analyticsAdminServiceClient.updateFirebaseLink(firebaseLink, updateMask); + * } + * }+ * * @param firebaseLink Required. The Firebase link to update. * @param updateMask 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 @@ -2163,6 +4095,20 @@ public final FirebaseLink updateFirebaseLink(FirebaseLink firebaseLink, FieldMas /** * Updates a FirebaseLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateFirebaseLinkRequest request = + * UpdateFirebaseLinkRequest.newBuilder() + * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * FirebaseLink response = analyticsAdminServiceClient.updateFirebaseLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2175,6 +4121,21 @@ public final FirebaseLink updateFirebaseLink(UpdateFirebaseLinkRequest request) * Updates a FirebaseLink on a property * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateFirebaseLinkRequest request = + * UpdateFirebaseLinkRequest.newBuilder() + * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateFirebaseLinkCallable().futureCall(request); + * // Do something. + * FirebaseLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + * analyticsAdminServiceClient.deleteFirebaseLink(name); + * } + * }+ * * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} * Example: properties/1234/firebaseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2200,6 +4171,16 @@ public final void deleteFirebaseLink(FirebaseLinkName name) { /** * Deletes a FirebaseLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString(); + * analyticsAdminServiceClient.deleteFirebaseLink(name); + * } + * }+ * * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} * Example: properties/1234/firebaseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2214,6 +4195,19 @@ public final void deleteFirebaseLink(String name) { /** * Deletes a FirebaseLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteFirebaseLinkRequest request = + * DeleteFirebaseLinkRequest.newBuilder() + * .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteFirebaseLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2226,6 +4220,20 @@ public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { * Deletes a FirebaseLink on a property * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteFirebaseLinkRequest request = + * DeleteFirebaseLinkRequest.newBuilder() + * .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2250,6 +4271,19 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName paren /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString(); + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2263,6 +4297,24 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListFirebaseLinksRequest request = + * ListFirebaseLinksRequest.newBuilder() + * .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2275,6 +4327,24 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListFirebaseLinksRequest request = + * ListFirebaseLinksRequest.newBuilder() + * .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request); + * // Do something. + * for (FirebaseLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListFirebaseLinksResponse response = + * analyticsAdminServiceClient.listFirebaseLinksCallable().call(request); + * for (FirebaseLink element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]"); + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); + * } + * }+ * * @param 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}/webDataStreams/{stream_id}/globalSiteTag Example: @@ -2312,6 +4411,16 @@ public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = GlobalSiteTagName.of("[PROPERTY]").toString(); + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); + * } + * }+ * * @param 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}/webDataStreams/{stream_id}/globalSiteTag Example: @@ -2327,6 +4436,19 @@ public final GlobalSiteTag getGlobalSiteTag(String name) { /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetGlobalSiteTagRequest request = + * GetGlobalSiteTagRequest.newBuilder() + * .setName(GlobalSiteTagName.of("[PROPERTY]").toString()) + * .build(); + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2339,6 +4461,20 @@ public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetGlobalSiteTagRequest request = + * GetGlobalSiteTagRequest.newBuilder() + * .setName(GlobalSiteTagName.of("[PROPERTY]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request); + * // Do something. + * GlobalSiteTag response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); + * } + * }+ * * @param parent Required. Example format: properties/1234 * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2365,6 +4513,18 @@ public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLin /** * Creates a GoogleAdsLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString(); + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); + * } + * }+ * * @param parent Required. Example format: properties/1234 * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2382,6 +4542,20 @@ public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink goog /** * Creates a GoogleAdsLink. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateGoogleAdsLinkRequest request = + * CreateGoogleAdsLinkRequest.newBuilder() + * .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .build(); + * GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2394,6 +4568,21 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques * Creates a GoogleAdsLink. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * CreateGoogleAdsLinkRequest request = + * CreateGoogleAdsLinkRequest.newBuilder() + * .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request); + * // Do something. + * GoogleAdsLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask); + * } + * }+ * * @param googleAdsLink The GoogleAdsLink to update * @param updateMask 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 @@ -2424,6 +4625,20 @@ public final GoogleAdsLink updateGoogleAdsLink( /** * Updates a GoogleAdsLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateGoogleAdsLinkRequest request = + * UpdateGoogleAdsLinkRequest.newBuilder() + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2436,6 +4651,21 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques * Updates a GoogleAdsLink on a property * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * UpdateGoogleAdsLinkRequest request = + * UpdateGoogleAdsLinkRequest.newBuilder() + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request); + * // Do something. + * GoogleAdsLink response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + * analyticsAdminServiceClient.deleteGoogleAdsLink(name); + * } + * }+ * * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2461,6 +4701,16 @@ public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { /** * Deletes a GoogleAdsLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString(); + * analyticsAdminServiceClient.deleteGoogleAdsLink(name); + * } + * }+ * * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2474,6 +4724,19 @@ public final void deleteGoogleAdsLink(String name) { /** * Deletes a GoogleAdsLink on a property * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteGoogleAdsLinkRequest request = + * DeleteGoogleAdsLinkRequest.newBuilder() + * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteGoogleAdsLink(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2486,6 +4749,20 @@ public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { * Deletes a GoogleAdsLink on a property * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DeleteGoogleAdsLinkRequest request = + * DeleteGoogleAdsLinkRequest.newBuilder() + * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2510,6 +4800,19 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName par /** * Lists GoogleAdsLinks on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String parent = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString(); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2523,6 +4826,24 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { /** * Lists GoogleAdsLinks on a property. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListGoogleAdsLinksRequest request = + * ListGoogleAdsLinksRequest.newBuilder() + * .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2536,6 +4857,24 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * Lists GoogleAdsLinks on a property. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * ListGoogleAdsLinksRequest request = + * ListGoogleAdsLinksRequest.newBuilder() + * .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request); + * // Do something. + * for (GoogleAdsLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * while (true) { + * ListGoogleAdsLinksResponse response = + * analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request); + * for (GoogleAdsLink element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); + * } + * }+ * * @param name Required. The name of the settings to lookup. Format: * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2573,6 +4941,16 @@ public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName /** * Get data sharing settings on an account. Data sharing settings are singletons. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * String name = DataSharingSettingsName.of("[ACCOUNT]").toString(); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); + * } + * }+ * * @param name Required. The name of the settings to lookup. Format: * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2587,6 +4965,19 @@ public final DataSharingSettings getDataSharingSettings(String name) { /** * Get data sharing settings on an account. Data sharing settings are singletons. * + *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetDataSharingSettingsRequest request = + * GetDataSharingSettingsRequest.newBuilder() + * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + * .build(); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2599,6 +4990,20 @@ public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRe * Get data sharing settings on an account. Data sharing settings are singletons. * *
Sample code: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * GetDataSharingSettingsRequest request = + * GetDataSharingSettingsRequest.newBuilder() + * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = + * analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request); + * // Do something. + * DataSharingSettings response = future.get(); + * } + * }
Service Description: Service Interface for the Analytics Admin API (GA4). * *
Sample for AnalyticsAdminServiceClient: + * + *
{@code + * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + * AnalyticsAdminServiceClient.create()) { + * AccountName name = AccountName.of("[ACCOUNT]"); + * Account response = analyticsAdminServiceClient.getAccount(name); + * } + * }*/ @Generated("by gapic-generator-java") package com.google.analytics.admin.v1alpha; diff --git a/synth.metadata b/synth.metadata index f35e4322..46285591 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-admin.git", - "sha": "ca6c4790c2d3bf608568eaff83abc0b3ee192c2b" + "sha": "3d7298c9de83309984447f985cc578c35d594758" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "23e7356f4cf449d6e9977698c5d9383b566be7af", - "internalRef": "351651504" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, {