Class: Google::Apis::CesV1::LfA2aV1Part

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

Overview

Part represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LfA2aV1Part

Returns a new instance of LfA2aV1Part.



4391
4392
4393
# File 'lib/google/apis/ces_v1/classes.rb', line 4391

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

Instance Attribute Details

#dataObject

Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null). Corresponds to the JSON property data

Returns:

  • (Object)


4356
4357
4358
# File 'lib/google/apis/ces_v1/classes.rb', line 4356

def data
  @data
end

#filenameString

An optional filename for the file (e.g., "document.pdf"). Corresponds to the JSON property filename

Returns:

  • (String)


4361
4362
4363
# File 'lib/google/apis/ces_v1/classes.rb', line 4361

def filename
  @filename
end

#media_typeString

The media_type (MIME type) of the part content (e.g., "text/plain", " application/json", "image/png"). This field is available for all part types. Corresponds to the JSON property mediaType

Returns:

  • (String)


4367
4368
4369
# File 'lib/google/apis/ces_v1/classes.rb', line 4367

def media_type
  @media_type
end

#metadataHash<String,Object>

Optional. metadata associated with this part. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


4372
4373
4374
# File 'lib/google/apis/ces_v1/classes.rb', line 4372

def 
  @metadata
end

#rawString

The raw byte content of a file. In JSON serialization, this is encoded as a base64 string. Corresponds to the JSON property raw NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


4379
4380
4381
# File 'lib/google/apis/ces_v1/classes.rb', line 4379

def raw
  @raw
end

#textString

The string content of the text part. Corresponds to the JSON property text

Returns:

  • (String)


4384
4385
4386
# File 'lib/google/apis/ces_v1/classes.rb', line 4384

def text
  @text
end

#urlString

A url pointing to the file's content. Corresponds to the JSON property url

Returns:

  • (String)


4389
4390
4391
# File 'lib/google/apis/ces_v1/classes.rb', line 4389

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4396
4397
4398
4399
4400
4401
4402
4403
4404
# File 'lib/google/apis/ces_v1/classes.rb', line 4396

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @filename = args[:filename] if args.key?(:filename)
  @media_type = args[:media_type] if args.key?(:media_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @raw = args[:raw] if args.key?(:raw)
  @text = args[:text] if args.key?(:text)
  @url = args[:url] if args.key?(:url)
end