Class: Google::Apis::CloudprivatecatalogproducerV1beta1::GoogleCloudPrivatecatalogproducerV1beta1Product

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb,
generated/google/apis/cloudprivatecatalogproducer_v1beta1/representations.rb,
generated/google/apis/cloudprivatecatalogproducer_v1beta1/representations.rb

Overview

The producer representation of a product which is a child resource of Catalog with display metadata and a list of Version resources.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudPrivatecatalogproducerV1beta1Product

Returns a new instance of GoogleCloudPrivatecatalogproducerV1beta1Product.



455
456
457
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 455

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#asset_typeString

Required. The type of the product asset, which cannot be changed after the product is created. It supports the values google.deploymentmanager.Template and google.cloudprivatecatalog.ListingOnly. Other values will be rejected by the server. Read only after creation. The following fields or resource types have different validation rules under each asset_type values:

  • Product.display_metadata has different validation schema for each asset type value. See its comment for details.
  • Version resource isn't allowed to be added under the google.cloudprivatecatalog.ListingOnly type. Corresponds to the JSON property assetType

Returns:

  • (String)


320
321
322
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 320

def asset_type
  @asset_type
end

#create_timeString

Output only. The time when the product was created. Corresponds to the JSON property createTime

Returns:

  • (String)


325
326
327
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 325

def create_time
  @create_time
end

#display_metadataHash<String,Object>

The user-supplied display metadata to describe the product. The JSON schema of the metadata differs by Product.asset_type. When the type is google.deploymentmanager.Template, the schema is as follows:

"$schema": http://json-schema.org/draft-04/schema#
type: object
properties:
name:
type: string
minLength: 1
maxLength: 64
description:
type: string
minLength: 1
maxLength: 2048
tagline:
type: string
minLength: 1
maxLength: 100
support_info:
type: string
minLength: 1
maxLength: 2048
creator:
type: string
minLength: 1
maxLength: 100
documentation:
type: array
items:
type: object
properties:
url:
type: string
pattern:
"^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
title:
type: string
minLength: 1
maxLength: 64
description:
type: string
minLength: 1
maxLength: 2048
required:
- name
- description
additionalProperties: false

When the asset type is google.cloudprivatecatalog.ListingOnly, the schema is as follows:

"$schema": http://json-schema.org/draft-04/schema#
type: object
properties:
name:
type: string
minLength: 1
maxLength: 64
description:
type: string
minLength: 1
maxLength: 2048
tagline:
type: string
minLength: 1
maxLength: 100
support_info:
type: string
minLength: 1
maxLength: 2048
creator:
type: string
minLength: 1
maxLength: 100
documentation:
type: array
items:
type: object
properties:
url:
type: string
pattern:
"^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
title:
type: string
minLength: 1
maxLength: 64
description:
type: string
minLength: 1
maxLength: 2048
signup_url:
type: string
pattern:
"^(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
required:
- name
- description
- signup_url
additionalProperties: false

Corresponds to the JSON property displayMetadata

Returns:

  • (Hash<String,Object>)


432
433
434
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 432

def 
  @display_metadata
end

#icon_uriString

Output only. The public accessible URI of the icon uploaded by PrivateCatalogProducer.UploadIcon. If no icon is uploaded, it will be the default icon's URI. Corresponds to the JSON property iconUri

Returns:

  • (String)


439
440
441
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 439

def icon_uri
  @icon_uri
end

#nameString

Required. The resource name of the product in the format catalogs/catalog_id/products/a-z*[a-z0-9]'. A unique identifier for the product under a catalog, which cannot be changed after the product is created. The final segment of the name must between 1 and 256 characters in length. Corresponds to the JSON propertyname`

Returns:

  • (String)


448
449
450
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 448

def name
  @name
end

#update_timeString

Output only. The time when the product was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


453
454
455
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 453

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



460
461
462
463
464
465
466
467
# File 'generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb', line 460

def update!(**args)
  @asset_type = args[:asset_type] if args.key?(:asset_type)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_metadata = args[:display_metadata] if args.key?(:display_metadata)
  @icon_uri = args[:icon_uri] if args.key?(:icon_uri)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end