Class: Google::Apis::CloudsearchV1::ItemContent

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

Overview

Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ItemContent

Returns a new instance of ItemContent.



2556
2557
2558
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2556

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

Instance Attribute Details

#content_data_refGoogle::Apis::CloudsearchV1::UploadItemRef

Represents an upload session reference. This reference is created via upload method. This reference is valid for 30 days after its creation. Updating of item content may refer to this uploaded content via contentDataRef. Corresponds to the JSON property contentDataRef



2535
2536
2537
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2535

def content_data_ref
  @content_data_ref
end

#content_formatString

Corresponds to the JSON property contentFormat

Returns:

  • (String)


2540
2541
2542
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2540

def content_format
  @content_format
end

#hash_propString

Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. Corresponds to the JSON property hash

Returns:

  • (String)


2547
2548
2549
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2547

def hash_prop
  @hash_prop
end

#inline_contentString

Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). Corresponds to the JSON property inlineContent NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2554
2555
2556
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2554

def inline_content
  @inline_content
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2561
2562
2563
2564
2565
2566
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2561

def update!(**args)
  @content_data_ref = args[:content_data_ref] if args.key?(:content_data_ref)
  @content_format = args[:content_format] if args.key?(:content_format)
  @hash_prop = args[:hash_prop] if args.key?(:hash_prop)
  @inline_content = args[:inline_content] if args.key?(:inline_content)
end