Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaDocument

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Document captures all raw metadata information of items to be recommended or searched.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaDocument

Returns a new instance of GoogleCloudDiscoveryengineV1alphaDocument.



449
450
451
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 449

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

Instance Attribute Details

#idString

Immutable. The identifier of the document. Id should conform to RFC-1034 standard with a length limit of 63 characters. Corresponds to the JSON property id

Returns:

  • (String)


415
416
417
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 415

def id
  @id
end

#json_dataString

The JSON string representation of the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown. Corresponds to the JSON property jsonData

Returns:

  • (String)


421
422
423
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 421

def json_data
  @json_data
end

#nameString

Immutable. The full resource name of the document. Format: projects/project/ locations/location/collections/collection/dataStores/data_store/branches/ branch/documents/document_id`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Corresponds to the JSON propertyname`

Returns:

  • (String)


429
430
431
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 429

def name
  @name
end

#parent_document_idString

The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to RFC-1034 standard with a length limit of 63 characters. Corresponds to the JSON property parentDocumentId

Returns:

  • (String)


436
437
438
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 436

def parent_document_id
  @parent_document_id
end

#schema_idString

The identifier of the schema located in the same data store. Corresponds to the JSON property schemaId

Returns:

  • (String)


441
442
443
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 441

def schema_id
  @schema_id
end

#struct_dataHash<String,Object>

The structured JSON data for the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown. Corresponds to the JSON property structData

Returns:

  • (Hash<String,Object>)


447
448
449
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 447

def struct_data
  @struct_data
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



454
455
456
457
458
459
460
461
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 454

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @json_data = args[:json_data] if args.key?(:json_data)
  @name = args[:name] if args.key?(:name)
  @parent_document_id = args[:parent_document_id] if args.key?(:parent_document_id)
  @schema_id = args[:schema_id] if args.key?(:schema_id)
  @struct_data = args[:struct_data] if args.key?(:struct_data)
end