Class: Google::Apis::CesV1::LfA2aV1Part
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::LfA2aV1Part
- 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
-
#data ⇒ Object
Arbitrary structured
dataas a JSON value (object, array, string, number, boolean, or null). -
#filename ⇒ String
An optional
filenamefor the file (e.g., "document.pdf"). -
#media_type ⇒ String
The
media_type(MIME type) of the part content (e.g., "text/plain", " application/json", "image/png"). -
#metadata ⇒ Hash<String,Object>
Optional.
-
#raw ⇒ String
The
rawbyte content of a file. -
#text ⇒ String
The string content of the
textpart. -
#url ⇒ String
A
urlpointing to the file's content.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LfA2aV1Part
constructor
A new instance of LfA2aV1Part.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#data ⇒ Object
Arbitrary structured data as a JSON value (object, array, string, number,
boolean, or null).
Corresponds to the JSON property data
4356 4357 4358 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4356 def data @data end |
#filename ⇒ String
An optional filename for the file (e.g., "document.pdf").
Corresponds to the JSON property filename
4361 4362 4363 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4361 def filename @filename end |
#media_type ⇒ String
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
4367 4368 4369 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4367 def media_type @media_type end |
#metadata ⇒ Hash<String,Object>
Optional. metadata associated with this part.
Corresponds to the JSON property metadata
4372 4373 4374 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4372 def @metadata end |
#raw ⇒ String
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.
4379 4380 4381 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4379 def raw @raw end |
#text ⇒ String
The string content of the text part.
Corresponds to the JSON property text
4384 4385 4386 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4384 def text @text end |
#url ⇒ String
A url pointing to the file's content.
Corresponds to the JSON property url
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 |