| GitHub Repository | Product Reference |
Service Description: This service provides functionality for managing FeaturedContentNativeDashboard.
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 (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
FeaturedContentNativeDashboardName name =
FeaturedContentNativeDashboardName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEATURED_CONTENT_NATIVE_DASHBOARD]");
FeaturedContentNativeDashboard response =
featuredContentNativeDashboardServiceClient.getFeaturedContentNativeDashboard(name);
}
Note: close() needs to be called on the FeaturedContentNativeDashboardServiceClient 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 |
|---|---|---|
GetFeaturedContentNativeDashboard |
Get a native dashboard featured content. |
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.
|
ListFeaturedContentNativeDashboards |
List all native dashboards featured content. |
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.
|
InstallFeaturedContentNativeDashboard |
Install a native dashboard featured content. |
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 FeaturedContentNativeDashboardServiceSettings 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
FeaturedContentNativeDashboardServiceSettings featuredContentNativeDashboardServiceSettings =
FeaturedContentNativeDashboardServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create(
featuredContentNativeDashboardServiceSettings);
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
FeaturedContentNativeDashboardServiceSettings featuredContentNativeDashboardServiceSettings =
FeaturedContentNativeDashboardServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create(
featuredContentNativeDashboardServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FeaturedContentNativeDashboardServiceSettings featuredContentNativeDashboardServiceSettings =
FeaturedContentNativeDashboardServiceSettings.newHttpJsonBuilder().build();
FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create(
featuredContentNativeDashboardServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final FeaturedContentNativeDashboardServiceClient create()Constructs an instance of FeaturedContentNativeDashboardServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FeaturedContentNativeDashboardServiceSettings settings)
public static final FeaturedContentNativeDashboardServiceClient create(FeaturedContentNativeDashboardServiceSettings settings)Constructs an instance of FeaturedContentNativeDashboardServiceClient, 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 |
FeaturedContentNativeDashboardServiceSettings |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FeaturedContentNativeDashboardServiceStub stub)
public static final FeaturedContentNativeDashboardServiceClient create(FeaturedContentNativeDashboardServiceStub stub)Constructs an instance of FeaturedContentNativeDashboardServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(FeaturedContentNativeDashboardServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
FeaturedContentNativeDashboardServiceStub |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient |
|
Constructors
FeaturedContentNativeDashboardServiceClient(FeaturedContentNativeDashboardServiceSettings settings)
protected FeaturedContentNativeDashboardServiceClient(FeaturedContentNativeDashboardServiceSettings settings)Constructs an instance of FeaturedContentNativeDashboardServiceClient, 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 |
FeaturedContentNativeDashboardServiceSettings |
FeaturedContentNativeDashboardServiceClient(FeaturedContentNativeDashboardServiceStub stub)
protected FeaturedContentNativeDashboardServiceClient(FeaturedContentNativeDashboardServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
FeaturedContentNativeDashboardServiceStub |
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 |
|
close()
public final void close()getFeaturedContentNativeDashboard(FeaturedContentNativeDashboardName name)
public final FeaturedContentNativeDashboard getFeaturedContentNativeDashboard(FeaturedContentNativeDashboardName name)Get a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
FeaturedContentNativeDashboardName name =
FeaturedContentNativeDashboardName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEATURED_CONTENT_NATIVE_DASHBOARD]");
FeaturedContentNativeDashboard response =
featuredContentNativeDashboardServiceClient.getFeaturedContentNativeDashboard(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
FeaturedContentNativeDashboardNameRequired. The resource name of the FeaturedContentNativeDashboard to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboard |
|
getFeaturedContentNativeDashboard(GetFeaturedContentNativeDashboardRequest request)
public final FeaturedContentNativeDashboard getFeaturedContentNativeDashboard(GetFeaturedContentNativeDashboardRequest request)Get a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
GetFeaturedContentNativeDashboardRequest request =
GetFeaturedContentNativeDashboardRequest.newBuilder()
.setName(
FeaturedContentNativeDashboardName.of(
"[PROJECT]",
"[LOCATION]",
"[INSTANCE]",
"[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString())
.build();
FeaturedContentNativeDashboard response =
featuredContentNativeDashboardServiceClient.getFeaturedContentNativeDashboard(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFeaturedContentNativeDashboardRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboard |
|
getFeaturedContentNativeDashboard(String name)
public final FeaturedContentNativeDashboard getFeaturedContentNativeDashboard(String name)Get a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
String name =
FeaturedContentNativeDashboardName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString();
FeaturedContentNativeDashboard response =
featuredContentNativeDashboardServiceClient.getFeaturedContentNativeDashboard(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the FeaturedContentNativeDashboard to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboard |
|
getFeaturedContentNativeDashboardCallable()
public final UnaryCallable<GetFeaturedContentNativeDashboardRequest,FeaturedContentNativeDashboard> getFeaturedContentNativeDashboardCallable()Get a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
GetFeaturedContentNativeDashboardRequest request =
GetFeaturedContentNativeDashboardRequest.newBuilder()
.setName(
FeaturedContentNativeDashboardName.of(
"[PROJECT]",
"[LOCATION]",
"[INSTANCE]",
"[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString())
.build();
ApiFuture<FeaturedContentNativeDashboard> future =
featuredContentNativeDashboardServiceClient
.getFeaturedContentNativeDashboardCallable()
.futureCall(request);
// Do something.
FeaturedContentNativeDashboard response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFeaturedContentNativeDashboardRequest,FeaturedContentNativeDashboard> |
|
getSettings()
public final FeaturedContentNativeDashboardServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceSettings |
|
getStub()
public FeaturedContentNativeDashboardServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceStub |
|
installFeaturedContentNativeDashboard(FeaturedContentNativeDashboardName name)
public final InstallFeaturedContentNativeDashboardResponse installFeaturedContentNativeDashboard(FeaturedContentNativeDashboardName name)Install a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
FeaturedContentNativeDashboardName name =
FeaturedContentNativeDashboardName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEATURED_CONTENT_NATIVE_DASHBOARD]");
InstallFeaturedContentNativeDashboardResponse response =
featuredContentNativeDashboardServiceClient.installFeaturedContentNativeDashboard(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
FeaturedContentNativeDashboardNameRequired. The resource name of the FeaturedContentNativeDashboard to install. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} |
| Returns | |
|---|---|
| Type | Description |
InstallFeaturedContentNativeDashboardResponse |
|
installFeaturedContentNativeDashboard(InstallFeaturedContentNativeDashboardRequest request)
public final InstallFeaturedContentNativeDashboardResponse installFeaturedContentNativeDashboard(InstallFeaturedContentNativeDashboardRequest request)Install a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
InstallFeaturedContentNativeDashboardRequest request =
InstallFeaturedContentNativeDashboardRequest.newBuilder()
.setName(
FeaturedContentNativeDashboardName.of(
"[PROJECT]",
"[LOCATION]",
"[INSTANCE]",
"[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString())
.setFeaturedContentNativeDashboard(
FeaturedContentNativeDashboard.newBuilder().build())
.build();
InstallFeaturedContentNativeDashboardResponse response =
featuredContentNativeDashboardServiceClient.installFeaturedContentNativeDashboard(
request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
InstallFeaturedContentNativeDashboardRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
InstallFeaturedContentNativeDashboardResponse |
|
installFeaturedContentNativeDashboard(String name)
public final InstallFeaturedContentNativeDashboardResponse installFeaturedContentNativeDashboard(String name)Install a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
String name =
FeaturedContentNativeDashboardName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString();
InstallFeaturedContentNativeDashboardResponse response =
featuredContentNativeDashboardServiceClient.installFeaturedContentNativeDashboard(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the FeaturedContentNativeDashboard to install. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} |
| Returns | |
|---|---|
| Type | Description |
InstallFeaturedContentNativeDashboardResponse |
|
installFeaturedContentNativeDashboardCallable()
public final UnaryCallable<InstallFeaturedContentNativeDashboardRequest,InstallFeaturedContentNativeDashboardResponse> installFeaturedContentNativeDashboardCallable()Install a native dashboard featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
InstallFeaturedContentNativeDashboardRequest request =
InstallFeaturedContentNativeDashboardRequest.newBuilder()
.setName(
FeaturedContentNativeDashboardName.of(
"[PROJECT]",
"[LOCATION]",
"[INSTANCE]",
"[FEATURED_CONTENT_NATIVE_DASHBOARD]")
.toString())
.setFeaturedContentNativeDashboard(
FeaturedContentNativeDashboard.newBuilder().build())
.build();
ApiFuture<InstallFeaturedContentNativeDashboardResponse> future =
featuredContentNativeDashboardServiceClient
.installFeaturedContentNativeDashboardCallable()
.futureCall(request);
// Do something.
InstallFeaturedContentNativeDashboardResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<InstallFeaturedContentNativeDashboardRequest,InstallFeaturedContentNativeDashboardResponse> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listFeaturedContentNativeDashboards(ContentHubName parent)
public final FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse listFeaturedContentNativeDashboards(ContentHubName parent)List all native dashboards featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
ContentHubName parent = ContentHubName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
for (FeaturedContentNativeDashboard element :
featuredContentNativeDashboardServiceClient
.listFeaturedContentNativeDashboards(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
ContentHubNameRequired. The parent, which owns this collection of FeaturedContentNativeDashboards. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse |
|
listFeaturedContentNativeDashboards(ListFeaturedContentNativeDashboardsRequest request)
public final FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse listFeaturedContentNativeDashboards(ListFeaturedContentNativeDashboardsRequest request)List all native dashboards featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
ListFeaturedContentNativeDashboardsRequest request =
ListFeaturedContentNativeDashboardsRequest.newBuilder()
.setParent(ContentHubName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (FeaturedContentNativeDashboard element :
featuredContentNativeDashboardServiceClient
.listFeaturedContentNativeDashboards(request)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFeaturedContentNativeDashboardsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse |
|
listFeaturedContentNativeDashboards(String parent)
public final FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse listFeaturedContentNativeDashboards(String parent)List all native dashboards featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
String parent = ContentHubName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
for (FeaturedContentNativeDashboard element :
featuredContentNativeDashboardServiceClient
.listFeaturedContentNativeDashboards(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of FeaturedContentNativeDashboards. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub |
| Returns | |
|---|---|
| Type | Description |
FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse |
|
listFeaturedContentNativeDashboardsCallable()
public final UnaryCallable<ListFeaturedContentNativeDashboardsRequest,ListFeaturedContentNativeDashboardsResponse> listFeaturedContentNativeDashboardsCallable()List all native dashboards featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
ListFeaturedContentNativeDashboardsRequest request =
ListFeaturedContentNativeDashboardsRequest.newBuilder()
.setParent(ContentHubName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListFeaturedContentNativeDashboardsResponse response =
featuredContentNativeDashboardServiceClient
.listFeaturedContentNativeDashboardsCallable()
.call(request);
for (FeaturedContentNativeDashboard element :
response.getFeaturedContentNativeDashboardsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeaturedContentNativeDashboardsRequest,ListFeaturedContentNativeDashboardsResponse> |
|
listFeaturedContentNativeDashboardsPagedCallable()
public final UnaryCallable<ListFeaturedContentNativeDashboardsRequest,FeaturedContentNativeDashboardServiceClient.ListFeaturedContentNativeDashboardsPagedResponse> listFeaturedContentNativeDashboardsPagedCallable()List all native dashboards featured content.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeaturedContentNativeDashboardServiceClient featuredContentNativeDashboardServiceClient =
FeaturedContentNativeDashboardServiceClient.create()) {
ListFeaturedContentNativeDashboardsRequest request =
ListFeaturedContentNativeDashboardsRequest.newBuilder()
.setParent(ContentHubName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<FeaturedContentNativeDashboard> future =
featuredContentNativeDashboardServiceClient
.listFeaturedContentNativeDashboardsPagedCallable()
.futureCall(request);
// Do something.
for (FeaturedContentNativeDashboard element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeaturedContentNativeDashboardsRequest,ListFeaturedContentNativeDashboardsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()