Class: Google::Apis::CloudsearchV1::Item

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

Overview

Represents a single object that is an item in the search index, such as a file, folder, or a database record.

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) ⇒ Item

Returns a new instance of Item.



1775
1776
1777
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1775

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

Instance Attribute Details

#aclGoogle::Apis::CloudsearchV1::ItemAcl

Access control list information for the item. For more information see https://developers.google.com/cloud-search/docs/guides/index-your-data#acls Corresponds to the JSON property acl



1714
1715
1716
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1714

def acl
  @acl
end

#contentGoogle::Apis::CloudsearchV1::ItemContent

Content of an item to be indexed and surfaced by Cloud Search. Corresponds to the JSON property content



1719
1720
1721
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1719

def content
  @content
end

#item_typeString

Type for this item. Corresponds to the JSON property itemType

Returns:

  • (String)


1724
1725
1726
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1724

def item_type
  @item_type
end

#metadataGoogle::Apis::CloudsearchV1::ItemMetadata

Available metadata fields for the item. Corresponds to the JSON property metadata



1729
1730
1731
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1729

def 
  @metadata
end

#nameString

Name of the Item. Format: datasources/source_id/items/item_id
This is a required field. The maximum length is 1536 characters. Corresponds to the JSON property name

Returns:

  • (String)


1737
1738
1739
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1737

def name
  @name
end

#payloadString

Additional state connector can store for this item. The maximum length is 10000 bytes. Corresponds to the JSON property payload NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1744
1745
1746
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1744

def payload
  @payload
end

#queueString

Queue this item belongs to. The maximum length is 100 characters. Corresponds to the JSON property queue

Returns:

  • (String)


1750
1751
1752
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1750

def queue
  @queue
end

#statusGoogle::Apis::CloudsearchV1::ItemStatus

This contains item's status and any errors. Corresponds to the JSON property status



1755
1756
1757
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1755

def status
  @status
end

#structured_dataGoogle::Apis::CloudsearchV1::ItemStructuredData

Available structured data fields for the item. Corresponds to the JSON property structuredData



1760
1761
1762
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1760

def structured_data
  @structured_data
end

#versionString

Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering.

Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. Corresponds to the JSON property version NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1773
1774
1775
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1773

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1780

def update!(**args)
  @acl = args[:acl] if args.key?(:acl)
  @content = args[:content] if args.key?(:content)
  @item_type = args[:item_type] if args.key?(:item_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @name = args[:name] if args.key?(:name)
  @payload = args[:payload] if args.key?(:payload)
  @queue = args[:queue] if args.key?(:queue)
  @status = args[:status] if args.key?(:status)
  @structured_data = args[:structured_data] if args.key?(:structured_data)
  @version = args[:version] if args.key?(:version)
end