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.



5287
5288
5289
# File 'lib/google/apis/ces_v1/classes.rb', line 5287

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)


5252
5253
5254
# File 'lib/google/apis/ces_v1/classes.rb', line 5252

def data
  @data
end

#filenameString

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

Returns:

  • (String)


5257
5258
5259
# File 'lib/google/apis/ces_v1/classes.rb', line 5257

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)


5263
5264
5265
# File 'lib/google/apis/ces_v1/classes.rb', line 5263

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


5268
5269
5270
# File 'lib/google/apis/ces_v1/classes.rb', line 5268

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)


5275
5276
5277
# File 'lib/google/apis/ces_v1/classes.rb', line 5275

def raw
  @raw
end

#textString

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

Returns:

  • (String)


5280
5281
5282
# File 'lib/google/apis/ces_v1/classes.rb', line 5280

def text
  @text
end

#urlString

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

Returns:

  • (String)


5285
5286
5287
# File 'lib/google/apis/ces_v1/classes.rb', line 5285

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5292
5293
5294
5295
5296
5297
5298
5299
5300
# File 'lib/google/apis/ces_v1/classes.rb', line 5292

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