Class DasardsServiceClient (2.46.0)

RepositoryProduct Reference

Service Description: Manages Stackdriver dasards. A dasard is an arrangement of data display widgets in a specific layout.

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 (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   Dasard dasard = Dasard.newBuilder().build();
   Dasard response = dasardsServiceClient.createDasard(parent, dasard);
 }
 

Note: close() needs to be called on the DasardsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
MethodDescriptionMethod Variants

CreateDasard

Creates a new custom dasard. For examples on how you can use this API to create dasards, see Managing dasards by API. This method requires the monitoring.dasards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createDasard(CreateDasardRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createDasard(ProjectName parent, Dasard dasard)

  • createDasard(String parent, Dasard dasard)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createDasardCallable()

ListDasards

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDasards(ListDasardsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDasards(ProjectName parent)

  • listDasards(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDasardsPagedCallable()

  • listDasardsCallable()

GetDasard

Fetches a specific dasard.

This method requires the monitoring.dasards.get permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getDasard(GetDasardRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getDasard(DasardName name)

  • getDasard(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getDasardCallable()

DeleteDasard

Deletes an existing custom dasard.

This method requires the monitoring.dasards.delete permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteDasard(DeleteDasardRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteDasard(DasardName name)

  • deleteDasard(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteDasardCallable()

UpdateDasard

Replaces an existing custom dasard with a new definition.

This method requires the monitoring.dasards.update permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateDasard(UpdateDasardRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateDasardCallable()

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 DasardsServiceSettings 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
 DasardsServiceSettings dasardsServiceSettings =
     DasardsServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DasardsServiceClient dasardsServiceClient =
     DasardsServiceClient.create(dasardsServiceSettings);
 

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
 DasardsServiceSettings dasardsServiceSettings =
     DasardsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DasardsServiceClient dasardsServiceClient =
     DasardsServiceClient.create(dasardsServiceSettings);
 

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
 DasardsServiceSettings dasardsServiceSettings =
     DasardsServiceSettings.newHttpJsonBuilder().build();
 DasardsServiceClient dasardsServiceClient =
     DasardsServiceClient.create(dasardsServiceSettings);
 

Please refer to the repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > DasardsServiceClient

Static Methods

create()

public static final DasardsServiceClient create()

Constructs an instance of DasardsServiceClient with default settings.

Returns
TypeDescription
DasardsServiceClient
Exceptions
TypeDescription
IOException

create(DasardsServiceSettings settings)

public static final DasardsServiceClient create(DasardsServiceSettings settings)

Constructs an instance of DasardsServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsDasardsServiceSettings
Returns
TypeDescription
DasardsServiceClient
Exceptions
TypeDescription
IOException

create(DasardsServiceStub stub)

public static final DasardsServiceClient create(DasardsServiceStub stub)

Constructs an instance of DasardsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DasardsServiceSettings).

Parameter
NameDescription
stubDasardsServiceStub
Returns
TypeDescription
DasardsServiceClient

Constructors

DasardsServiceClient(DasardsServiceSettings settings)

protected DasardsServiceClient(DasardsServiceSettings settings)

Constructs an instance of DasardsServiceClient, 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
NameDescription
settingsDasardsServiceSettings

DasardsServiceClient(DasardsServiceStub stub)

protected DasardsServiceClient(DasardsServiceStub stub)
Parameter
NameDescription
stubDasardsServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createDasard(CreateDasardRequest request)

public final Dasard createDasard(CreateDasardRequest request)

Creates a new custom dasard. For examples on how you can use this API to create dasards, see Managing dasards by API. This method requires the monitoring.dasards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   CreateDasardRequest request =
       CreateDasardRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setDasard(Dasard.newBuilder().build())
           .setValidateOnly(true)
           .build();
   Dasard response = dasardsServiceClient.createDasard(request);
 }
 
Parameter
NameDescription
requestCreateDasardRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Dasard

createDasard(ProjectName parent, Dasard dasard)

public final Dasard createDasard(ProjectName parent, Dasard dasard)

Creates a new custom dasard. For examples on how you can use this API to create dasards, see Managing dasards by API. This method requires the monitoring.dasards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   Dasard dasard = Dasard.newBuilder().build();
   Dasard response = dasardsServiceClient.createDasard(parent, dasard);
 }
 
Parameters
NameDescription
parentProjectName

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

The [PROJECT_ID_OR_NUMBER] must match the dasard resource name.

dasardDasard

Required. The initial dasard specification.

Returns
TypeDescription
Dasard

createDasard(String parent, Dasard dasard)

public final Dasard createDasard(String parent, Dasard dasard)

Creates a new custom dasard. For examples on how you can use this API to create dasards, see Managing dasards by API. This method requires the monitoring.dasards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   Dasard dasard = Dasard.newBuilder().build();
   Dasard response = dasardsServiceClient.createDasard(parent, dasard);
 }
 
Parameters
NameDescription
parentString

Required. The project on which to execute the request. The format is:

projects/[PROJECT_ID_OR_NUMBER]

The [PROJECT_ID_OR_NUMBER] must match the dasard resource name.

dasardDasard

Required. The initial dasard specification.

Returns
TypeDescription
Dasard

createDasardCallable()

public final UnaryCallable<CreateDasardRequest,Dasard> createDasardCallable()

Creates a new custom dasard. For examples on how you can use this API to create dasards, see Managing dasards by API. This method requires the monitoring.dasards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   CreateDasardRequest request =
       CreateDasardRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setDasard(Dasard.newBuilder().build())
           .setValidateOnly(true)
           .build();
   ApiFuture<Dasard> future =
       dasardsServiceClient.createDasardCallable().futureCall(request);
   // Do something.
   Dasard response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateDasardRequest,Dasard>

deleteDasard(DasardName name)

public final void deleteDasard(DasardName name)

Deletes an existing custom dasard.

This method requires the monitoring.dasards.delete permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   DasardName name = DasardName.of("[PROJECT]", "[DASARD]");
   dasardsServiceClient.deleteDasard(name);
 }
 
Parameter
NameDescription
nameDasardName

Required. The resource name of the Dasard. The format is:

projects/[PROJECT_ID_OR_NUMBER]/dasards/[DASARD_ID]

deleteDasard(DeleteDasardRequest request)

public final void deleteDasard(DeleteDasardRequest request)

Deletes an existing custom dasard.

This method requires the monitoring.dasards.delete permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   DeleteDasardRequest request =
       DeleteDasardRequest.newBuilder()
           .setName(DasardName.of("[PROJECT]", "[DASARD]").toString())
           .build();
   dasardsServiceClient.deleteDasard(request);
 }
 
Parameter
NameDescription
requestDeleteDasardRequest

The request object containing all of the parameters for the API call.

deleteDasard(String name)

public final void deleteDasard(String name)

Deletes an existing custom dasard.

This method requires the monitoring.dasards.delete permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   String name = DasardName.of("[PROJECT]", "[DASARD]").toString();
   dasardsServiceClient.deleteDasard(name);
 }
 
Parameter
NameDescription
nameString

Required. The resource name of the Dasard. The format is:

projects/[PROJECT_ID_OR_NUMBER]/dasards/[DASARD_ID]

deleteDasardCallable()

public final UnaryCallable<DeleteDasardRequest,Empty> deleteDasardCallable()

Deletes an existing custom dasard.

This method requires the monitoring.dasards.delete permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   DeleteDasardRequest request =
       DeleteDasardRequest.newBuilder()
           .setName(DasardName.of("[PROJECT]", "[DASARD]").toString())
           .build();
   ApiFuture<Empty> future =
       dasardsServiceClient.deleteDasardCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteDasardRequest,Empty>

getDasard(DasardName name)

public final Dasard getDasard(DasardName name)

Fetches a specific dasard.

This method requires the monitoring.dasards.get permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   DasardName name = DasardName.of("[PROJECT]", "[DASARD]");
   Dasard response = dasardsServiceClient.getDasard(name);
 }
 
Parameter
NameDescription
nameDasardName

Required. The resource name of the Dasard. The format is one of:

- dasards/[DASARD_ID] (for system dasards) - projects/[PROJECT_ID_OR_NUMBER]/dasards/[DASARD_ID] (for custom dasards).

Returns
TypeDescription
Dasard

getDasard(GetDasardRequest request)

public final Dasard getDasard(GetDasardRequest request)

Fetches a specific dasard.

This method requires the monitoring.dasards.get permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   GetDasardRequest request =
       GetDasardRequest.newBuilder()
           .setName(DasardName.of("[PROJECT]", "[DASARD]").toString())
           .build();
   Dasard response = dasardsServiceClient.getDasard(request);
 }
 
Parameter
NameDescription
requestGetDasardRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Dasard

getDasard(String name)

public final Dasard getDasard(String name)

Fetches a specific dasard.

This method requires the monitoring.dasards.get permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   String name = DasardName.of("[PROJECT]", "[DASARD]").toString();
   Dasard response = dasardsServiceClient.getDasard(name);
 }
 
Parameter
NameDescription
nameString

Required. The resource name of the Dasard. The format is one of:

- dasards/[DASARD_ID] (for system dasards) - projects/[PROJECT_ID_OR_NUMBER]/dasards/[DASARD_ID] (for custom dasards).

Returns
TypeDescription
Dasard

getDasardCallable()

public final UnaryCallable<GetDasardRequest,Dasard> getDasardCallable()

Fetches a specific dasard.

This method requires the monitoring.dasards.get permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   GetDasardRequest request =
       GetDasardRequest.newBuilder()
           .setName(DasardName.of("[PROJECT]", "[DASARD]").toString())
           .build();
   ApiFuture<Dasard> future =
       dasardsServiceClient.getDasardCallable().futureCall(request);
   // Do something.
   Dasard response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetDasardRequest,Dasard>

getSettings()

public final DasardsServiceSettings getSettings()
Returns
TypeDescription
DasardsServiceSettings

getStub()

public DasardsServiceStub getStub()
Returns
TypeDescription
DasardsServiceStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listDasards(ListDasardsRequest request)

public final DasardsServiceClient.ListDasardsPagedResponse listDasards(ListDasardsRequest request)

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ListDasardsRequest request =
       ListDasardsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Dasard element : dasardsServiceClient.listDasards(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListDasardsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
DasardsServiceClient.ListDasardsPagedResponse

listDasards(ProjectName parent)

public final DasardsServiceClient.ListDasardsPagedResponse listDasards(ProjectName parent)

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (Dasard element : dasardsServiceClient.listDasards(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The scope of the dasards to list. The format is:

projects/[PROJECT_ID_OR_NUMBER]

Returns
TypeDescription
DasardsServiceClient.ListDasardsPagedResponse

listDasards(String parent)

public final DasardsServiceClient.ListDasardsPagedResponse listDasards(String parent)

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   for (Dasard element : dasardsServiceClient.listDasards(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The scope of the dasards to list. The format is:

projects/[PROJECT_ID_OR_NUMBER]

Returns
TypeDescription
DasardsServiceClient.ListDasardsPagedResponse

listDasardsCallable()

public final UnaryCallable<ListDasardsRequest,ListDasardsResponse> listDasardsCallable()

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ListDasardsRequest request =
       ListDasardsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListDasardsResponse response =
         dasardsServiceClient.listDasardsCallable().call(request);
     for (Dasard element : response.getDasardsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListDasardsRequest,ListDasardsResponse>

listDasardsPagedCallable()

public final UnaryCallable<ListDasardsRequest,DasardsServiceClient.ListDasardsPagedResponse> listDasardsPagedCallable()

Lists the existing dasards.

This method requires the monitoring.dasards.list permission on the specified project. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   ListDasardsRequest request =
       ListDasardsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Dasard> future =
       dasardsServiceClient.listDasardsPagedCallable().futureCall(request);
   // Do something.
   for (Dasard element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListDasardsRequest,ListDasardsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateDasard(UpdateDasardRequest request)

public final Dasard updateDasard(UpdateDasardRequest request)

Replaces an existing custom dasard with a new definition.

This method requires the monitoring.dasards.update permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   UpdateDasardRequest request =
       UpdateDasardRequest.newBuilder()
           .setDasard(Dasard.newBuilder().build())
           .setValidateOnly(true)
           .build();
   Dasard response = dasardsServiceClient.updateDasard(request);
 }
 
Parameter
NameDescription
requestUpdateDasardRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Dasard

updateDasardCallable()

public final UnaryCallable<UpdateDasardRequest,Dasard> updateDasardCallable()

Replaces an existing custom dasard with a new definition.

This method requires the monitoring.dasards.update permission on the specified dasard. For more information, see Cloud Identity and Access Management.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DasardsServiceClient dasardsServiceClient = DasardsServiceClient.create()) {
   UpdateDasardRequest request =
       UpdateDasardRequest.newBuilder()
           .setDasard(Dasard.newBuilder().build())
           .setValidateOnly(true)
           .build();
   ApiFuture<Dasard> future =
       dasardsServiceClient.updateDasardCallable().futureCall(request);
   // Do something.
   Dasard response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateDasardRequest,Dasard>