Class: Google::Apis::CloudproductregistryV1::CloudProductRegistryService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/cloudproductregistry_v1/service.rb

Overview

Cloud Product Registry API

cloudproductregistry.googleapis.com API.

Examples:

require 'google/apis/cloudproductregistry_v1'

Cloudproductregistry = Google::Apis::CloudproductregistryV1 # Alias the module
service = Cloudproductregistry::CloudProductRegistryService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudproductregistry.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCloudProductRegistryService

Returns a new instance of CloudProductRegistryService.



47
48
49
50
51
52
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-cloudproductregistry_v1',
        client_version: Google::Apis::CloudproductregistryV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



40
41
42
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 40

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



45
46
47
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#get_logical_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::LogicalProduct

Gets details of a LogicalProduct.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



75
76
77
78
79
80
81
82
83
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 75

def get_logical_product(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::LogicalProduct::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::LogicalProduct
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_logical_product_variant(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::LogicalProductVariant

Get details of a LogicalProductVariant.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



181
182
183
184
185
186
187
188
189
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 181

def get_logical_product_variant(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::LogicalProductVariant::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::LogicalProductVariant
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_product_suite(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::ProductSuite

Get details of a ProductSuite.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



286
287
288
289
290
291
292
293
294
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 286

def get_product_suite(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::ProductSuite::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::ProductSuite
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_logical_product_variants(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::ListLogicalProductVariantsResponse

Lists LogicalProductVariants matching given criteria.

Parameters:

  • parent (String)

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

  • page_size (Fixnum) (defaults to: nil)

    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) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



221
222
223
224
225
226
227
228
229
230
231
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 221

def list_logical_product_variants(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/variants', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::ListLogicalProductVariantsResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::ListLogicalProductVariantsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_logical_products(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::ListLogicalProductsResponse

Lists LogicalProducts matching given criteria.

Parameters:

  • filter (String) (defaults to: nil)

    Optional. The filter expression for listing logical products. Filter syntax: https://google.aip.dev/160 Supported fields: suite_id

  • page_size (Fixnum) (defaults to: nil)

    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) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



116
117
118
119
120
121
122
123
124
125
126
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 116

def list_logical_products(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/logicalProducts', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::ListLogicalProductsResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::ListLogicalProductsResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_product_suites(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::ListProductSuitesResponse

Lists ProductSuites.

Parameters:

  • page_size (Fixnum) (defaults to: nil)

    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) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



323
324
325
326
327
328
329
330
331
332
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 323

def list_product_suites(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/productSuites', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::ListProductSuitesResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::ListProductSuitesResponse
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_logical_product_entity(lookup_uri, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::LookupEntityResponse

Look up entities.

Parameters:

  • lookup_uri (String)

    Required. Entity uri to look up. Supported Formats: logicalProducts/ logical_product logicalProducts/logical_product/variants/variant productSuites/product_suite

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



150
151
152
153
154
155
156
157
158
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 150

def lookup_logical_product_entity(lookup_uri, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+lookupUri}:lookupEntity', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::LookupEntityResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::LookupEntityResponse
  command.params['lookupUri'] = lookup_uri unless lookup_uri.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_logical_product_variant_entity(lookup_uri, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::LookupEntityResponse

Look up entities.

Parameters:

  • lookup_uri (String)

    Required. Entity uri to look up. Supported Formats: logicalProducts/ logical_product logicalProducts/logical_product/variants/variant productSuites/product_suite

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



255
256
257
258
259
260
261
262
263
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 255

def lookup_logical_product_variant_entity(lookup_uri, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+lookupUri}:lookupEntity', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::LookupEntityResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::LookupEntityResponse
  command.params['lookupUri'] = lookup_uri unless lookup_uri.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_product_suite_entity(lookup_uri, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudproductregistryV1::LookupEntityResponse

Look up entities.

Parameters:

  • lookup_uri (String)

    Required. Entity uri to look up. Supported Formats: logicalProducts/ logical_product logicalProducts/logical_product/variants/variant productSuites/product_suite

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



356
357
358
359
360
361
362
363
364
# File 'lib/google/apis/cloudproductregistry_v1/service.rb', line 356

def lookup_product_suite_entity(lookup_uri, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+lookupUri}:lookupEntity', options)
  command.response_representation = Google::Apis::CloudproductregistryV1::LookupEntityResponse::Representation
  command.response_class = Google::Apis::CloudproductregistryV1::LookupEntityResponse
  command.params['lookupUri'] = lookup_uri unless lookup_uri.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end