| GitHub Repository | Product Reference |
Service Description: Provides methods for handling CmsMetadataValue objects.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
CmsMetadataValueName name = CmsMetadataValueName.of("[NETWORK_CODE]", "[CMS_METADATA_VALUE]");
CmsMetadataValue response = cmsMetadataValueServiceClient.getCmsMetadataValue(name);
}
Note: close() needs to be called on the CmsMetadataValueServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
GetCmsMetadataValue |
Retrieves a |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCmsMetadataValues |
Lists |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchActivateCmsMetadataValues |
Activates a list of |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchDeactivateCmsMetadataValues |
Deactivates a list of |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of CmsMetadataValueServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CmsMetadataValueServiceSettings cmsMetadataValueServiceSettings =
CmsMetadataValueServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create(cmsMetadataValueServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CmsMetadataValueServiceSettings cmsMetadataValueServiceSettings =
CmsMetadataValueServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create(cmsMetadataValueServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final CmsMetadataValueServiceClient create()Constructs an instance of CmsMetadataValueServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CmsMetadataValueServiceSettings settings)
public static final CmsMetadataValueServiceClient create(CmsMetadataValueServiceSettings settings)Constructs an instance of CmsMetadataValueServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
CmsMetadataValueServiceSettings |
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CmsMetadataValueServiceStub stub)
public static final CmsMetadataValueServiceClient create(CmsMetadataValueServiceStub stub)Constructs an instance of CmsMetadataValueServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(CmsMetadataValueServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
CmsMetadataValueServiceStub |
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient |
|
Constructors
CmsMetadataValueServiceClient(CmsMetadataValueServiceSettings settings)
protected CmsMetadataValueServiceClient(CmsMetadataValueServiceSettings settings)Constructs an instance of CmsMetadataValueServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
CmsMetadataValueServiceSettings |
CmsMetadataValueServiceClient(CmsMetadataValueServiceStub stub)
protected CmsMetadataValueServiceClient(CmsMetadataValueServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
CmsMetadataValueServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
batchActivateCmsMetadataValues(@Nullable NetworkName parent, List<String> names)
public final BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues(@Nullable NetworkName parent, List<String> names)Activates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchActivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCmsMetadataValuesResponse |
|
batchActivateCmsMetadataValues(BatchActivateCmsMetadataValuesRequest request)
public final BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues(BatchActivateCmsMetadataValuesRequest request)Activates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
BatchActivateCmsMetadataValuesRequest request =
BatchActivateCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateCmsMetadataValuesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCmsMetadataValuesResponse |
|
batchActivateCmsMetadataValues(String parent, List<String> names)
public final BatchActivateCmsMetadataValuesResponse batchActivateCmsMetadataValues(String parent, List<String> names)Activates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchActivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchActivateCmsMetadataValues(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCmsMetadataValuesResponse |
|
batchActivateCmsMetadataValuesCallable()
public final UnaryCallable<BatchActivateCmsMetadataValuesRequest,BatchActivateCmsMetadataValuesResponse> batchActivateCmsMetadataValuesCallable()Activates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
BatchActivateCmsMetadataValuesRequest request =
BatchActivateCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateCmsMetadataValuesResponse> future =
cmsMetadataValueServiceClient
.batchActivateCmsMetadataValuesCallable()
.futureCall(request);
// Do something.
BatchActivateCmsMetadataValuesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateCmsMetadataValuesRequest,BatchActivateCmsMetadataValuesResponse> |
|
batchDeactivateCmsMetadataValues(@Nullable NetworkName parent, List<String> names)
public final BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues(@Nullable NetworkName parent, List<String> names)Deactivates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchDeactivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateCmsMetadataValuesResponse |
|
batchDeactivateCmsMetadataValues(BatchDeactivateCmsMetadataValuesRequest request)
public final BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues(BatchDeactivateCmsMetadataValuesRequest request)Deactivates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
BatchDeactivateCmsMetadataValuesRequest request =
BatchDeactivateCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchDeactivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeactivateCmsMetadataValuesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateCmsMetadataValuesResponse |
|
batchDeactivateCmsMetadataValues(String parent, List<String> names)
public final BatchDeactivateCmsMetadataValuesResponse batchDeactivateCmsMetadataValues(String parent, List<String> names)Deactivates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchDeactivateCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.batchDeactivateCmsMetadataValues(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateCmsMetadataValuesResponse |
|
batchDeactivateCmsMetadataValuesCallable()
public final UnaryCallable<BatchDeactivateCmsMetadataValuesRequest,BatchDeactivateCmsMetadataValuesResponse> batchDeactivateCmsMetadataValuesCallable()Deactivates a list of CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
BatchDeactivateCmsMetadataValuesRequest request =
BatchDeactivateCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchDeactivateCmsMetadataValuesResponse> future =
cmsMetadataValueServiceClient
.batchDeactivateCmsMetadataValuesCallable()
.futureCall(request);
// Do something.
BatchDeactivateCmsMetadataValuesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeactivateCmsMetadataValuesRequest,BatchDeactivateCmsMetadataValuesResponse> |
|
close()
public final void close()getCmsMetadataValue(@Nullable CmsMetadataValueName name)
public final CmsMetadataValue getCmsMetadataValue(@Nullable CmsMetadataValueName name)Retrieves a CmsMetadataValue object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
CmsMetadataValueName name = CmsMetadataValueName.of("[NETWORK_CODE]", "[CMS_METADATA_VALUE]");
CmsMetadataValue response = cmsMetadataValueServiceClient.getCmsMetadataValue(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CmsMetadataValueNameRequired. The resource name of the CmsMetadataValue. Format:
|
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValue |
|
getCmsMetadataValue(GetCmsMetadataValueRequest request)
public final CmsMetadataValue getCmsMetadataValue(GetCmsMetadataValueRequest request)Retrieves a CmsMetadataValue object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
GetCmsMetadataValueRequest request =
GetCmsMetadataValueRequest.newBuilder()
.setName(CmsMetadataValueName.of("[NETWORK_CODE]", "[CMS_METADATA_VALUE]").toString())
.build();
CmsMetadataValue response = cmsMetadataValueServiceClient.getCmsMetadataValue(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetCmsMetadataValueRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValue |
|
getCmsMetadataValue(String name)
public final CmsMetadataValue getCmsMetadataValue(String name)Retrieves a CmsMetadataValue object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
String name = CmsMetadataValueName.of("[NETWORK_CODE]", "[CMS_METADATA_VALUE]").toString();
CmsMetadataValue response = cmsMetadataValueServiceClient.getCmsMetadataValue(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the CmsMetadataValue. Format:
|
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValue |
|
getCmsMetadataValueCallable()
public final UnaryCallable<GetCmsMetadataValueRequest,CmsMetadataValue> getCmsMetadataValueCallable()Retrieves a CmsMetadataValue object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
GetCmsMetadataValueRequest request =
GetCmsMetadataValueRequest.newBuilder()
.setName(CmsMetadataValueName.of("[NETWORK_CODE]", "[CMS_METADATA_VALUE]").toString())
.build();
ApiFuture<CmsMetadataValue> future =
cmsMetadataValueServiceClient.getCmsMetadataValueCallable().futureCall(request);
// Do something.
CmsMetadataValue response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetCmsMetadataValueRequest,CmsMetadataValue> |
|
getSettings()
public final @Nullable CmsMetadataValueServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CmsMetadataValueServiceSettings |
|
getStub()
public CmsMetadataValueServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listCmsMetadataValues(@Nullable NetworkName parent)
public final CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse listCmsMetadataValues(@Nullable NetworkName parent)Lists CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (CmsMetadataValue element :
cmsMetadataValueServiceClient.listCmsMetadataValues(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent, which owns this collection of CmsMetadataValues. Format:
|
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse |
|
listCmsMetadataValues(ListCmsMetadataValuesRequest request)
public final CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse listCmsMetadataValues(ListCmsMetadataValuesRequest request)Lists CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
ListCmsMetadataValuesRequest request =
ListCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (CmsMetadataValue element :
cmsMetadataValueServiceClient.listCmsMetadataValues(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListCmsMetadataValuesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse |
|
listCmsMetadataValues(String parent)
public final CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse listCmsMetadataValues(String parent)Lists CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (CmsMetadataValue element :
cmsMetadataValueServiceClient.listCmsMetadataValues(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of CmsMetadataValues. Format:
|
| Returns | |
|---|---|
| Type | Description |
CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse |
|
listCmsMetadataValuesCallable()
public final UnaryCallable<ListCmsMetadataValuesRequest,ListCmsMetadataValuesResponse> listCmsMetadataValuesCallable()Lists CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
ListCmsMetadataValuesRequest request =
ListCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListCmsMetadataValuesResponse response =
cmsMetadataValueServiceClient.listCmsMetadataValuesCallable().call(request);
for (CmsMetadataValue element : response.getCmsMetadataValuesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCmsMetadataValuesRequest,ListCmsMetadataValuesResponse> |
|
listCmsMetadataValuesPagedCallable()
public final UnaryCallable<ListCmsMetadataValuesRequest,CmsMetadataValueServiceClient.ListCmsMetadataValuesPagedResponse> listCmsMetadataValuesPagedCallable()Lists CmsMetadataValue objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CmsMetadataValueServiceClient cmsMetadataValueServiceClient =
CmsMetadataValueServiceClient.create()) {
ListCmsMetadataValuesRequest request =
ListCmsMetadataValuesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<CmsMetadataValue> future =
cmsMetadataValueServiceClient.listCmsMetadataValuesPagedCallable().futureCall(request);
// Do something.
for (CmsMetadataValue element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCmsMetadataValuesRequest,ListCmsMetadataValuesPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()