Class SampleQuerySetServiceClient (0.45.0)

GitHub RepositoryProduct Reference

Service Description: Service for managing SampleQuerySets,

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 (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   SampleQuerySetName name =
       SampleQuerySetName.of("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
   SampleQuerySet response = sampleQuerySetServiceClient.getSampleQuerySet(name);
 }
 

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

Methods
Method Description Method Variants

GetSampleQuerySet

Gets a SampleQuerySet.

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

  • getSampleQuerySet(GetSampleQuerySetRequest request)

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

  • getSampleQuerySet(SampleQuerySetName name)

  • getSampleQuerySet(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.

  • getSampleQuerySetCallable()

ListSampleQuerySets

Gets a list of SampleQuerySets.

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

  • listSampleQuerySets(ListSampleQuerySetsRequest request)

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

  • listSampleQuerySets(LocationName parent)

  • listSampleQuerySets(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.

  • listSampleQuerySetsPagedCallable()

  • listSampleQuerySetsCallable()

CreateSampleQuerySet

Creates a SampleQuerySet

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

  • createSampleQuerySet(CreateSampleQuerySetRequest request)

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

  • createSampleQuerySet(LocationName parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

  • createSampleQuerySet(String parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

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

  • createSampleQuerySetCallable()

UpdateSampleQuerySet

Updates a SampleQuerySet.

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

  • updateSampleQuerySet(UpdateSampleQuerySetRequest request)

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

  • updateSampleQuerySet(SampleQuerySet sampleQuerySet, FieldMask updateMask)

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

  • updateSampleQuerySetCallable()

DeleteSampleQuerySet

Deletes a SampleQuerySet.

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

  • deleteSampleQuerySet(DeleteSampleQuerySetRequest request)

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

  • deleteSampleQuerySet(SampleQuerySetName name)

  • deleteSampleQuerySet(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.

  • deleteSampleQuerySetCallable()

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 SampleQuerySetServiceSettings 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
 SampleQuerySetServiceSettings sampleQuerySetServiceSettings =
     SampleQuerySetServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create(sampleQuerySetServiceSettings);
 

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
 SampleQuerySetServiceSettings sampleQuerySetServiceSettings =
     SampleQuerySetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create(sampleQuerySetServiceSettings);
 

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
 SampleQuerySetServiceSettings sampleQuerySetServiceSettings =
     SampleQuerySetServiceSettings.newHttpJsonBuilder().build();
 SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create(sampleQuerySetServiceSettings);
 

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

Inheritance

java.lang.Object > SampleQuerySetServiceClient

Static Methods

create()

public static final SampleQuerySetServiceClient create()

Constructs an instance of SampleQuerySetServiceClient with default settings.

Returns
Type Description
SampleQuerySetServiceClient
Exceptions
Type Description
IOException

create(SampleQuerySetServiceSettings settings)

public static final SampleQuerySetServiceClient create(SampleQuerySetServiceSettings settings)

Constructs an instance of SampleQuerySetServiceClient, 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 SampleQuerySetServiceSettings
Returns
Type Description
SampleQuerySetServiceClient
Exceptions
Type Description
IOException

create(SampleQuerySetServiceStub stub)

public static final SampleQuerySetServiceClient create(SampleQuerySetServiceStub stub)

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

Parameter
Name Description
stub SampleQuerySetServiceStub
Returns
Type Description
SampleQuerySetServiceClient

Constructors

SampleQuerySetServiceClient(SampleQuerySetServiceSettings settings)

protected SampleQuerySetServiceClient(SampleQuerySetServiceSettings settings)

Constructs an instance of SampleQuerySetServiceClient, 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 SampleQuerySetServiceSettings

SampleQuerySetServiceClient(SampleQuerySetServiceStub stub)

protected SampleQuerySetServiceClient(SampleQuerySetServiceStub stub)
Parameter
Name Description
stub SampleQuerySetServiceStub

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()

createSampleQuerySet(CreateSampleQuerySetRequest request)

public final SampleQuerySet createSampleQuerySet(CreateSampleQuerySetRequest request)

Creates a SampleQuerySet

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   CreateSampleQuerySetRequest request =
       CreateSampleQuerySetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSampleQuerySet(SampleQuerySet.newBuilder().build())
           .setSampleQuerySetId("sampleQuerySetId1320431231")
           .build();
   SampleQuerySet response = sampleQuerySetServiceClient.createSampleQuerySet(request);
 }
 
Parameter
Name Description
request CreateSampleQuerySetRequest

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

Returns
Type Description
SampleQuerySet

createSampleQuerySet(LocationName parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

public final SampleQuerySet createSampleQuerySet(LocationName parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

Creates a SampleQuerySet

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SampleQuerySet sampleQuerySet = SampleQuerySet.newBuilder().build();
   String sampleQuerySetId = "sampleQuerySetId1320431231";
   SampleQuerySet response =
       sampleQuerySetServiceClient.createSampleQuerySet(
           parent, sampleQuerySet, sampleQuerySetId);
 }
 
Parameters
Name Description
parent LocationName

Required. The parent resource name, such as projects/{project}/locations/{location}.

sampleQuerySet SampleQuerySet

Required. The SampleQuerySet to create.

sampleQuerySetId String

Required. The ID to use for the SampleQuerySet, which will become the final component of the SampleQuerySet.name.

If the caller does not have permission to create the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

This field must be unique among all SampleQuerySets with the same parent. Otherwise, an ALREADY_EXISTS error is returned.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
Type Description
SampleQuerySet

createSampleQuerySet(String parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

public final SampleQuerySet createSampleQuerySet(String parent, SampleQuerySet sampleQuerySet, String sampleQuerySetId)

Creates a SampleQuerySet

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   SampleQuerySet sampleQuerySet = SampleQuerySet.newBuilder().build();
   String sampleQuerySetId = "sampleQuerySetId1320431231";
   SampleQuerySet response =
       sampleQuerySetServiceClient.createSampleQuerySet(
           parent, sampleQuerySet, sampleQuerySetId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource name, such as projects/{project}/locations/{location}.

sampleQuerySet SampleQuerySet

Required. The SampleQuerySet to create.

sampleQuerySetId String

Required. The ID to use for the SampleQuerySet, which will become the final component of the SampleQuerySet.name.

If the caller does not have permission to create the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

This field must be unique among all SampleQuerySets with the same parent. Otherwise, an ALREADY_EXISTS error is returned.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
Type Description
SampleQuerySet

createSampleQuerySetCallable()

public final UnaryCallable<CreateSampleQuerySetRequest,SampleQuerySet> createSampleQuerySetCallable()

Creates a SampleQuerySet

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   CreateSampleQuerySetRequest request =
       CreateSampleQuerySetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSampleQuerySet(SampleQuerySet.newBuilder().build())
           .setSampleQuerySetId("sampleQuerySetId1320431231")
           .build();
   ApiFuture<SampleQuerySet> future =
       sampleQuerySetServiceClient.createSampleQuerySetCallable().futureCall(request);
   // Do something.
   SampleQuerySet response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateSampleQuerySetRequest,SampleQuerySet>

deleteSampleQuerySet(DeleteSampleQuerySetRequest request)

public final void deleteSampleQuerySet(DeleteSampleQuerySetRequest request)

Deletes a SampleQuerySet.

Sample code:


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

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

deleteSampleQuerySet(SampleQuerySetName name)

public final void deleteSampleQuerySet(SampleQuerySetName name)

Deletes a SampleQuerySet.

Sample code:


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

Required. Full resource name of SampleQuerySet, such as projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}.

If the caller does not have permission to delete the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the SampleQuerySet to delete does not exist, a NOT_FOUND error is returned.

deleteSampleQuerySet(String name)

public final void deleteSampleQuerySet(String name)

Deletes a SampleQuerySet.

Sample code:


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

Required. Full resource name of SampleQuerySet, such as projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}.

If the caller does not have permission to delete the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the SampleQuerySet to delete does not exist, a NOT_FOUND error is returned.

deleteSampleQuerySetCallable()

public final UnaryCallable<DeleteSampleQuerySetRequest,Empty> deleteSampleQuerySetCallable()

Deletes a SampleQuerySet.

Sample code:


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

getSampleQuerySet(GetSampleQuerySetRequest request)

public final SampleQuerySet getSampleQuerySet(GetSampleQuerySetRequest request)

Gets a SampleQuerySet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   GetSampleQuerySetRequest request =
       GetSampleQuerySetRequest.newBuilder()
           .setName(
               SampleQuerySetName.of("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]").toString())
           .build();
   SampleQuerySet response = sampleQuerySetServiceClient.getSampleQuerySet(request);
 }
 
Parameter
Name Description
request GetSampleQuerySetRequest

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

Returns
Type Description
SampleQuerySet

getSampleQuerySet(SampleQuerySetName name)

public final SampleQuerySet getSampleQuerySet(SampleQuerySetName name)

Gets a SampleQuerySet.

Sample code:


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

Required. Full resource name of SampleQuerySet, such as projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}.

If the caller does not have permission to access the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested SampleQuerySet does not exist, a NOT_FOUND error is returned.

Returns
Type Description
SampleQuerySet

getSampleQuerySet(String name)

public final SampleQuerySet getSampleQuerySet(String name)

Gets a SampleQuerySet.

Sample code:


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

Required. Full resource name of SampleQuerySet, such as projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}.

If the caller does not have permission to access the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested SampleQuerySet does not exist, a NOT_FOUND error is returned.

Returns
Type Description
SampleQuerySet

getSampleQuerySetCallable()

public final UnaryCallable<GetSampleQuerySetRequest,SampleQuerySet> getSampleQuerySetCallable()

Gets a SampleQuerySet.

Sample code:


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

getSettings()

public final SampleQuerySetServiceSettings getSettings()
Returns
Type Description
SampleQuerySetServiceSettings

getStub()

public SampleQuerySetServiceStub getStub()
Returns
Type Description
SampleQuerySetServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listSampleQuerySets(ListSampleQuerySetsRequest request)

public final SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse listSampleQuerySets(ListSampleQuerySetsRequest request)

Gets a list of SampleQuerySets.

Sample code:


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

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

Returns
Type Description
SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse

listSampleQuerySets(LocationName parent)

public final SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse listSampleQuerySets(LocationName parent)

Gets a list of SampleQuerySets.

Sample code:


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

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list SampleQuerySets under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

Returns
Type Description
SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse

listSampleQuerySets(String parent)

public final SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse listSampleQuerySets(String parent)

Gets a list of SampleQuerySets.

Sample code:


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

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list SampleQuerySets under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

Returns
Type Description
SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse

listSampleQuerySetsCallable()

public final UnaryCallable<ListSampleQuerySetsRequest,ListSampleQuerySetsResponse> listSampleQuerySetsCallable()

Gets a list of SampleQuerySets.

Sample code:


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

listSampleQuerySetsPagedCallable()

public final UnaryCallable<ListSampleQuerySetsRequest,SampleQuerySetServiceClient.ListSampleQuerySetsPagedResponse> listSampleQuerySetsPagedCallable()

Gets a list of SampleQuerySets.

Sample code:


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

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateSampleQuerySet(SampleQuerySet sampleQuerySet, FieldMask updateMask)

public final SampleQuerySet updateSampleQuerySet(SampleQuerySet sampleQuerySet, FieldMask updateMask)

Updates a SampleQuerySet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   SampleQuerySet sampleQuerySet = SampleQuerySet.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   SampleQuerySet response =
       sampleQuerySetServiceClient.updateSampleQuerySet(sampleQuerySet, updateMask);
 }
 
Parameters
Name Description
sampleQuerySet SampleQuerySet

Required. The sample query set to update.

If the caller does not have permission to update the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the SampleQuerySet to update does not exist a NOT_FOUND error is returned.

updateMask FieldMask

Indicates which fields in the provided imported 'sample query set' to update. If not set, will by default update all fields.

Returns
Type Description
SampleQuerySet

updateSampleQuerySet(UpdateSampleQuerySetRequest request)

public final SampleQuerySet updateSampleQuerySet(UpdateSampleQuerySetRequest request)

Updates a SampleQuerySet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   UpdateSampleQuerySetRequest request =
       UpdateSampleQuerySetRequest.newBuilder()
           .setSampleQuerySet(SampleQuerySet.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   SampleQuerySet response = sampleQuerySetServiceClient.updateSampleQuerySet(request);
 }
 
Parameter
Name Description
request UpdateSampleQuerySetRequest

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

Returns
Type Description
SampleQuerySet

updateSampleQuerySetCallable()

public final UnaryCallable<UpdateSampleQuerySetRequest,SampleQuerySet> updateSampleQuerySetCallable()

Updates a SampleQuerySet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SampleQuerySetServiceClient sampleQuerySetServiceClient =
     SampleQuerySetServiceClient.create()) {
   UpdateSampleQuerySetRequest request =
       UpdateSampleQuerySetRequest.newBuilder()
           .setSampleQuerySet(SampleQuerySet.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<SampleQuerySet> future =
       sampleQuerySetServiceClient.updateSampleQuerySetCallable().futureCall(request);
   // Do something.
   SampleQuerySet response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateSampleQuerySetRequest,SampleQuerySet>