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.



5245
5246
5247
# File 'lib/google/apis/ces_v1/classes.rb', line 5245

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)


5210
5211
5212
# File 'lib/google/apis/ces_v1/classes.rb', line 5210

def data
  @data
end

#filenameString

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

Returns:

  • (String)


5215
5216
5217
# File 'lib/google/apis/ces_v1/classes.rb', line 5215

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)


5221
5222
5223
# File 'lib/google/apis/ces_v1/classes.rb', line 5221

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


5226
5227
5228
# File 'lib/google/apis/ces_v1/classes.rb', line 5226

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)


5233
5234
5235
# File 'lib/google/apis/ces_v1/classes.rb', line 5233

def raw
  @raw
end

#textString

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

Returns:

  • (String)


5238
5239
5240
# File 'lib/google/apis/ces_v1/classes.rb', line 5238

def text
  @text
end

#urlString

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

Returns:

  • (String)


5243
5244
5245
# File 'lib/google/apis/ces_v1/classes.rb', line 5243

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5250
5251
5252
5253
5254
5255
5256
5257
5258
# File 'lib/google/apis/ces_v1/classes.rb', line 5250

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