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.



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

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)


5191
5192
5193
# File 'lib/google/apis/ces_v1/classes.rb', line 5191

def data
  @data
end

#filenameString

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

Returns:

  • (String)


5196
5197
5198
# File 'lib/google/apis/ces_v1/classes.rb', line 5196

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)


5202
5203
5204
# File 'lib/google/apis/ces_v1/classes.rb', line 5202

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


5207
5208
5209
# File 'lib/google/apis/ces_v1/classes.rb', line 5207

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)


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

def raw
  @raw
end

#textString

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

Returns:

  • (String)


5219
5220
5221
# File 'lib/google/apis/ces_v1/classes.rb', line 5219

def text
  @text
end

#urlString

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

Returns:

  • (String)


5224
5225
5226
# File 'lib/google/apis/ces_v1/classes.rb', line 5224

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5231
5232
5233
5234
5235
5236
5237
5238
5239
# File 'lib/google/apis/ces_v1/classes.rb', line 5231

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