Cloud Product Registry V1 API - Class Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client (v0.1.0)

Reference documentation and code samples for the Cloud Product Registry V1 API class Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.

Client for the CloudProductRegistryReadService service.

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

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the CloudProductRegistryReadService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all CloudProductRegistryReadService clients
::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the CloudProductRegistryReadService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get_logical_product

def get_logical_product(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProduct
def get_logical_product(name: nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProduct

Gets details of a LogicalProduct.

Overloads
def get_logical_product(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProduct
Pass arguments to get_logical_product via a request object, either of type GetLogicalProductRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_logical_product(name: nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProduct
Pass arguments to get_logical_product via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the LogicalProduct to retrieve. Format: logicalProducts/{logical_product}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new

# Call the get_logical_product method.
result = client.get_logical_product request

# The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct.
p result

#get_logical_product_variant

def get_logical_product_variant(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant
def get_logical_product_variant(name: nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant

Get details of a LogicalProductVariant.

Overloads
def get_logical_product_variant(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant
Pass arguments to get_logical_product_variant via a request object, either of type GetLogicalProductVariantRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_logical_product_variant(name: nil) -> ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant
Pass arguments to get_logical_product_variant via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the LogicalProductVariant to retrieve. Format: logicalProducts/{logical_product}/variants/{variant}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new

# Call the get_logical_product_variant method.
result = client.get_logical_product_variant request

# The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant.
p result

#get_product_suite

def get_product_suite(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::ProductSuite
def get_product_suite(name: nil) -> ::Google::Cloud::ProductRegistry::V1::ProductSuite

Get details of a ProductSuite.

Overloads
def get_product_suite(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::ProductSuite
Pass arguments to get_product_suite via a request object, either of type GetProductSuiteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_product_suite(name: nil) -> ::Google::Cloud::ProductRegistry::V1::ProductSuite
Pass arguments to get_product_suite via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the ProductSuite to retrieve. Format: productSuites/{product_suite}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new

# Call the get_product_suite method.
result = client.get_product_suite request

# The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new CloudProductRegistryReadService client object.

Yields
  • (config) — Configure the CloudProductRegistryReadService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config|
  config.timeout = 10.0
end

#list_logical_product_variants

def list_logical_product_variants(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>
def list_logical_product_variants(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>

Lists LogicalProductVariants matching given criteria.

Overloads
def list_logical_product_variants(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>
Pass arguments to list_logical_product_variants via a request object, either of type ListLogicalProductVariantsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_logical_product_variants(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>
Pass arguments to list_logical_product_variants via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent logical product id. Format: logicalProducts/{logical_product}
  • page_size (::Integer) — Optional. The maximum number of logical product variants to return. The service may return fewer than this value. If unspecified, at most 100 logical product variants will be returned. The maximum value is 500; values above 500 will be coerced to 500.
  • page_token (::String) — Optional. A page token, received from a previous ListLogicalProductVariants call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListLogicalProductVariants must match the call that provided the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new

# Call the list_logical_product_variants method.
result = client.list_logical_product_variants request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.
  p item
end

#list_logical_products

def list_logical_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>
def list_logical_products(filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>

Lists LogicalProducts matching given criteria.

Overloads
def list_logical_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>
Pass arguments to list_logical_products via a request object, either of type ListLogicalProductsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_logical_products(filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>
Pass arguments to list_logical_products via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — Optional. The filter expression for listing logical products. Filter syntax: https://google.aip.dev/160 Supported fields: suite_id
  • page_size (::Integer) — Optional. The maximum number of logical products to return. The service may return fewer than this value. If unspecified, at most 100 logical products will be returned. The maximum value is 500; values above 500 will be coerced to 500.
  • page_token (::String) — Optional. A page token, received from a previous ListLogicalProducts call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListLogicalProducts must match the call that provided the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new

# Call the list_logical_products method.
result = client.list_logical_products request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ProductRegistry::V1::LogicalProduct.
  p item
end

#list_product_suites

def list_product_suites(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>
def list_product_suites(page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>

Lists ProductSuites.

Overloads
def list_product_suites(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>
Pass arguments to list_product_suites via a request object, either of type ListProductSuitesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_product_suites(page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>
Pass arguments to list_product_suites via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • page_size (::Integer) — Optional. The maximum number of suites to return. The service may return fewer than this value. If unspecified, at most 100 suites will be returned. The maximum value is 500; values above 500 will be coerced to 500.
  • page_token (::String) — Optional. A page token, received from a previous ListProductSuites call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListProductSuites must match the call that provided the page token.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new

# Call the list_product_suites method.
result = client.list_product_suites request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ProductRegistry::V1::ProductSuite.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#lookup_entity

def lookup_entity(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse
def lookup_entity(lookup_uri: nil) -> ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse

Look up entities.

Overloads
def lookup_entity(request, options = nil) -> ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse
Pass arguments to lookup_entity via a request object, either of type LookupEntityRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def lookup_entity(lookup_uri: nil) -> ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse
Pass arguments to lookup_entity via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • lookup_uri (::String) — Required. Entity uri to look up. Supported Formats: logicalProducts/{logical_product} logicalProducts/{logical_product}/variants/{variant} productSuites/{product_suite}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/product_registry/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new

# Call the lookup_entity method.
result = client.lookup_entity request

# The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)