Class: Google::Apis::WorkspaceeventsV1::Part
- Inherits:
-
Object
- Object
- Google::Apis::WorkspaceeventsV1::Part
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workspaceevents_v1/classes.rb,
lib/google/apis/workspaceevents_v1/representations.rb,
lib/google/apis/workspaceevents_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 ⇒ Google::Apis::WorkspaceeventsV1::DataPart
DataPart represents a structured blob.
-
#file ⇒ Google::Apis::WorkspaceeventsV1::FilePart
FilePart represents the different ways files can be provided.
-
#metadata ⇒ Hash<String,Object>
Optional metadata associated with this part.
-
#text ⇒ String
Corresponds to the JSON property
text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Part
constructor
A new instance of Part.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Part
Returns a new instance of Part.
435 436 437 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 435 def initialize(**args) update!(**args) end |
Instance Attribute Details
#data ⇒ Google::Apis::WorkspaceeventsV1::DataPart
DataPart represents a structured blob. This is most commonly a JSON payload.
Corresponds to the JSON property data
415 416 417 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 415 def data @data end |
#file ⇒ Google::Apis::WorkspaceeventsV1::FilePart
FilePart represents the different ways files can be provided. If files are
small, directly feeding the bytes is supported via file_with_bytes. If the
file is large, the agent should read the content as appropriate directly from
the file_with_uri source.
Corresponds to the JSON property file
423 424 425 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 423 def file @file end |
#metadata ⇒ Hash<String,Object>
Optional metadata associated with this part.
Corresponds to the JSON property metadata
428 429 430 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 428 def @metadata end |
#text ⇒ String
Corresponds to the JSON property text
433 434 435 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 433 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
440 441 442 443 444 445 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 440 def update!(**args) @data = args[:data] if args.key?(:data) @file = args[:file] if args.key?(:file) @metadata = args[:metadata] if args.key?(:metadata) @text = args[:text] if args.key?(:text) end |