Class CloudProductRegistryReadServiceClient (0.1.0)

GitHub RepositoryProduct Reference

Service Description: Cloud Product Registry Read Service provides capabilities to access all first and third party Google Cloud products.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]");
   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
 }
 

Note: close() needs to be called on the CloudProductRegistryReadServiceClient 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

GetProductSuite

Get details of a ProductSuite.

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

  • getProductSuite(GetProductSuiteRequest request)

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

  • getProductSuite(ProductSuiteName name)

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

  • getProductSuiteCallable()

ListProductSuites

Lists ProductSuites.

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

  • listProductSuites(ListProductSuitesRequest request)

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

  • listProductSuitesPagedCallable()

  • listProductSuitesCallable()

GetLogicalProduct

Gets details of a LogicalProduct.

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

  • getLogicalProduct(GetLogicalProductRequest request)

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

  • getLogicalProduct(LogicalProductName name)

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

  • getLogicalProductCallable()

ListLogicalProducts

Lists LogicalProducts matching given criteria.

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

  • listLogicalProducts(ListLogicalProductsRequest request)

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

  • listLogicalProductsPagedCallable()

  • listLogicalProductsCallable()

GetLogicalProductVariant

Get details of a LogicalProductVariant.

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

  • getLogicalProductVariant(GetLogicalProductVariantRequest request)

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

  • getLogicalProductVariant(LogicalProductVariantName name)

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

  • getLogicalProductVariantCallable()

ListLogicalProductVariants

Lists LogicalProductVariants matching given criteria.

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

  • listLogicalProductVariants(ListLogicalProductVariantsRequest request)

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

  • listLogicalProductVariants(LogicalProductName parent)

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

  • listLogicalProductVariantsPagedCallable()

  • listLogicalProductVariantsCallable()

LookupEntity

Look up entities.

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

  • lookupEntity(LookupEntityRequest request)

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

  • lookupEntityCallable()

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 CloudProductRegistryReadServiceSettings 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
 CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
     CloudProductRegistryReadServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
 

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
 CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
     CloudProductRegistryReadServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
 

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
 CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
     CloudProductRegistryReadServiceSettings.newHttpJsonBuilder().build();
 CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
 

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

Inheritance

java.lang.Object > CloudProductRegistryReadServiceClient

Static Methods

create()

public static final CloudProductRegistryReadServiceClient create()

Constructs an instance of CloudProductRegistryReadServiceClient with default settings.

Returns
Type Description
CloudProductRegistryReadServiceClient
Exceptions
Type Description
IOException

create(CloudProductRegistryReadServiceSettings settings)

public static final CloudProductRegistryReadServiceClient create(CloudProductRegistryReadServiceSettings settings)

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

create(CloudProductRegistryReadServiceStub stub)

public static final CloudProductRegistryReadServiceClient create(CloudProductRegistryReadServiceStub stub)

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

Parameter
Name Description
stub CloudProductRegistryReadServiceStub
Returns
Type Description
CloudProductRegistryReadServiceClient

Constructors

CloudProductRegistryReadServiceClient(CloudProductRegistryReadServiceSettings settings)

protected CloudProductRegistryReadServiceClient(CloudProductRegistryReadServiceSettings settings)

Constructs an instance of CloudProductRegistryReadServiceClient, 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 CloudProductRegistryReadServiceSettings

CloudProductRegistryReadServiceClient(CloudProductRegistryReadServiceStub stub)

protected CloudProductRegistryReadServiceClient(CloudProductRegistryReadServiceStub stub)
Parameter
Name Description
stub CloudProductRegistryReadServiceStub

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

getLogicalProduct(@Nullable LogicalProductName name)

public final LogicalProduct getLogicalProduct(@Nullable LogicalProductName name)

Gets details of a LogicalProduct.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]");
   LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.productregistry.v1.LogicalProductName

Required. The name of the LogicalProduct to retrieve. Format: logicalProducts/{logical_product}

Returns
Type Description
LogicalProduct

getLogicalProduct(GetLogicalProductRequest request)

public final LogicalProduct getLogicalProduct(GetLogicalProductRequest request)

Gets details of a LogicalProduct.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetLogicalProductRequest request =
       GetLogicalProductRequest.newBuilder()
           .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
           .build();
   LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(request);
 }
 
Parameter
Name Description
request GetLogicalProductRequest

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

Returns
Type Description
LogicalProduct

getLogicalProduct(String name)

public final LogicalProduct getLogicalProduct(String name)

Gets details of a LogicalProduct.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   String name = LogicalProductName.of("[LOGICAL_PRODUCT]").toString();
   LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name);
 }
 
Parameter
Name Description
name String

Required. The name of the LogicalProduct to retrieve. Format: logicalProducts/{logical_product}

Returns
Type Description
LogicalProduct

getLogicalProductCallable()

public final UnaryCallable<GetLogicalProductRequest,LogicalProduct> getLogicalProductCallable()

Gets details of a LogicalProduct.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetLogicalProductRequest request =
       GetLogicalProductRequest.newBuilder()
           .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
           .build();
   ApiFuture<LogicalProduct> future =
       cloudProductRegistryReadServiceClient.getLogicalProductCallable().futureCall(request);
   // Do something.
   LogicalProduct response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetLogicalProductRequest,LogicalProduct>

getLogicalProductVariant(@Nullable LogicalProductVariantName name)

public final LogicalProductVariant getLogicalProductVariant(@Nullable LogicalProductVariantName name)

Get details of a LogicalProductVariant.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   LogicalProductVariantName name =
       LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]");
   LogicalProductVariant response =
       cloudProductRegistryReadServiceClient.getLogicalProductVariant(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.productregistry.v1.LogicalProductVariantName

Required. The name of the LogicalProductVariant to retrieve. Format: logicalProducts/{logical_product}/variants/{variant}

Returns
Type Description
LogicalProductVariant

getLogicalProductVariant(GetLogicalProductVariantRequest request)

public final LogicalProductVariant getLogicalProductVariant(GetLogicalProductVariantRequest request)

Get details of a LogicalProductVariant.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetLogicalProductVariantRequest request =
       GetLogicalProductVariantRequest.newBuilder()
           .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString())
           .build();
   LogicalProductVariant response =
       cloudProductRegistryReadServiceClient.getLogicalProductVariant(request);
 }
 
Parameter
Name Description
request GetLogicalProductVariantRequest

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

Returns
Type Description
LogicalProductVariant

getLogicalProductVariant(String name)

public final LogicalProductVariant getLogicalProductVariant(String name)

Get details of a LogicalProductVariant.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   String name = LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString();
   LogicalProductVariant response =
       cloudProductRegistryReadServiceClient.getLogicalProductVariant(name);
 }
 
Parameter
Name Description
name String

Required. The name of the LogicalProductVariant to retrieve. Format: logicalProducts/{logical_product}/variants/{variant}

Returns
Type Description
LogicalProductVariant

getLogicalProductVariantCallable()

public final UnaryCallable<GetLogicalProductVariantRequest,LogicalProductVariant> getLogicalProductVariantCallable()

Get details of a LogicalProductVariant.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetLogicalProductVariantRequest request =
       GetLogicalProductVariantRequest.newBuilder()
           .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString())
           .build();
   ApiFuture<LogicalProductVariant> future =
       cloudProductRegistryReadServiceClient
           .getLogicalProductVariantCallable()
           .futureCall(request);
   // Do something.
   LogicalProductVariant response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetLogicalProductVariantRequest,LogicalProductVariant>

getProductSuite(@Nullable ProductSuiteName name)

public final ProductSuite getProductSuite(@Nullable ProductSuiteName name)

Get details of a ProductSuite.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]");
   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.productregistry.v1.ProductSuiteName

Required. The name of the ProductSuite to retrieve. Format: productSuites/{product_suite}

Returns
Type Description
ProductSuite

getProductSuite(GetProductSuiteRequest request)

public final ProductSuite getProductSuite(GetProductSuiteRequest request)

Get details of a ProductSuite.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetProductSuiteRequest request =
       GetProductSuiteRequest.newBuilder()
           .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString())
           .build();
   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(request);
 }
 
Parameter
Name Description
request GetProductSuiteRequest

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

Returns
Type Description
ProductSuite

getProductSuite(String name)

public final ProductSuite getProductSuite(String name)

Get details of a ProductSuite.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   String name = ProductSuiteName.of("[PRODUCT_SUITE]").toString();
   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
 }
 
Parameter
Name Description
name String

Required. The name of the ProductSuite to retrieve. Format: productSuites/{product_suite}

Returns
Type Description
ProductSuite

getProductSuiteCallable()

public final UnaryCallable<GetProductSuiteRequest,ProductSuite> getProductSuiteCallable()

Get details of a ProductSuite.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   GetProductSuiteRequest request =
       GetProductSuiteRequest.newBuilder()
           .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString())
           .build();
   ApiFuture<ProductSuite> future =
       cloudProductRegistryReadServiceClient.getProductSuiteCallable().futureCall(request);
   // Do something.
   ProductSuite response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetProductSuiteRequest,ProductSuite>

getSettings()

public final @Nullable CloudProductRegistryReadServiceSettings getSettings()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceSettings

getStub()

public CloudProductRegistryReadServiceStub getStub()
Returns
Type Description
CloudProductRegistryReadServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listLogicalProductVariants(@Nullable LogicalProductName parent)

public final CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse listLogicalProductVariants(@Nullable LogicalProductName parent)

Lists LogicalProductVariants matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]");
   for (LogicalProductVariant element :
       cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.productregistry.v1.LogicalProductName

Required. Parent logical product id. Format: logicalProducts/{logical_product}

Returns
Type Description
CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse

listLogicalProductVariants(ListLogicalProductVariantsRequest request)

public final CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse listLogicalProductVariants(ListLogicalProductVariantsRequest request)

Lists LogicalProductVariants matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductVariantsRequest request =
       ListLogicalProductVariantsRequest.newBuilder()
           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (LogicalProductVariant element :
       cloudProductRegistryReadServiceClient.listLogicalProductVariants(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListLogicalProductVariantsRequest

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

Returns
Type Description
CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse

listLogicalProductVariants(String parent)

public final CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse listLogicalProductVariants(String parent)

Lists LogicalProductVariants matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   String parent = LogicalProductName.of("[LOGICAL_PRODUCT]").toString();
   for (LogicalProductVariant element :
       cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent logical product id. Format: logicalProducts/{logical_product}

Returns
Type Description
CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse

listLogicalProductVariantsCallable()

public final UnaryCallable<ListLogicalProductVariantsRequest,ListLogicalProductVariantsResponse> listLogicalProductVariantsCallable()

Lists LogicalProductVariants matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductVariantsRequest request =
       ListLogicalProductVariantsRequest.newBuilder()
           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLogicalProductVariantsResponse response =
         cloudProductRegistryReadServiceClient
             .listLogicalProductVariantsCallable()
             .call(request);
     for (LogicalProductVariant element : response.getLogicalProductVariantsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListLogicalProductVariantsRequest,ListLogicalProductVariantsResponse>

listLogicalProductVariantsPagedCallable()

public final UnaryCallable<ListLogicalProductVariantsRequest,CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse> listLogicalProductVariantsPagedCallable()

Lists LogicalProductVariants matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductVariantsRequest request =
       ListLogicalProductVariantsRequest.newBuilder()
           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<LogicalProductVariant> future =
       cloudProductRegistryReadServiceClient
           .listLogicalProductVariantsPagedCallable()
           .futureCall(request);
   // Do something.
   for (LogicalProductVariant element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListLogicalProductVariantsRequest,ListLogicalProductVariantsPagedResponse>

listLogicalProducts(ListLogicalProductsRequest request)

public final CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse listLogicalProducts(ListLogicalProductsRequest request)

Lists LogicalProducts matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductsRequest request =
       ListLogicalProductsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (LogicalProduct element :
       cloudProductRegistryReadServiceClient.listLogicalProducts(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListLogicalProductsRequest

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

Returns
Type Description
CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse

listLogicalProductsCallable()

public final UnaryCallable<ListLogicalProductsRequest,ListLogicalProductsResponse> listLogicalProductsCallable()

Lists LogicalProducts matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductsRequest request =
       ListLogicalProductsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLogicalProductsResponse response =
         cloudProductRegistryReadServiceClient.listLogicalProductsCallable().call(request);
     for (LogicalProduct element : response.getLogicalProductsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListLogicalProductsRequest,ListLogicalProductsResponse>

listLogicalProductsPagedCallable()

public final UnaryCallable<ListLogicalProductsRequest,CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse> listLogicalProductsPagedCallable()

Lists LogicalProducts matching given criteria.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListLogicalProductsRequest request =
       ListLogicalProductsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<LogicalProduct> future =
       cloudProductRegistryReadServiceClient
           .listLogicalProductsPagedCallable()
           .futureCall(request);
   // Do something.
   for (LogicalProduct element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListLogicalProductsRequest,ListLogicalProductsPagedResponse>

listProductSuites(ListProductSuitesRequest request)

public final CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse listProductSuites(ListProductSuitesRequest request)

Lists ProductSuites.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListProductSuitesRequest request =
       ListProductSuitesRequest.newBuilder()
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (ProductSuite element :
       cloudProductRegistryReadServiceClient.listProductSuites(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListProductSuitesRequest

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

Returns
Type Description
CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse

listProductSuitesCallable()

public final UnaryCallable<ListProductSuitesRequest,ListProductSuitesResponse> listProductSuitesCallable()

Lists ProductSuites.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListProductSuitesRequest request =
       ListProductSuitesRequest.newBuilder()
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListProductSuitesResponse response =
         cloudProductRegistryReadServiceClient.listProductSuitesCallable().call(request);
     for (ProductSuite element : response.getProductSuitesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListProductSuitesRequest,ListProductSuitesResponse>

listProductSuitesPagedCallable()

public final UnaryCallable<ListProductSuitesRequest,CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse> listProductSuitesPagedCallable()

Lists ProductSuites.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   ListProductSuitesRequest request =
       ListProductSuitesRequest.newBuilder()
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<ProductSuite> future =
       cloudProductRegistryReadServiceClient
           .listProductSuitesPagedCallable()
           .futureCall(request);
   // Do something.
   for (ProductSuite element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListProductSuitesRequest,ListProductSuitesPagedResponse>

lookupEntity(LookupEntityRequest request)

public final LookupEntityResponse lookupEntity(LookupEntityRequest request)

Look up entities.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   LookupEntityRequest request =
       LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build();
   LookupEntityResponse response = cloudProductRegistryReadServiceClient.lookupEntity(request);
 }
 
Parameter
Name Description
request LookupEntityRequest

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

Returns
Type Description
LookupEntityResponse

lookupEntityCallable()

public final UnaryCallable<LookupEntityRequest,LookupEntityResponse> lookupEntityCallable()

Look up entities.

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
     CloudProductRegistryReadServiceClient.create()) {
   LookupEntityRequest request =
       LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build();
   ApiFuture<LookupEntityResponse> future =
       cloudProductRegistryReadServiceClient.lookupEntityCallable().futureCall(request);
   // Do something.
   LookupEntityResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<LookupEntityRequest,LookupEntityResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()