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.
462 463 464 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 462 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
442 443 444 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 442 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
450 451 452 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 450 def file @file end |
#metadata ⇒ Hash<String,Object>
Optional metadata associated with this part.
Corresponds to the JSON property metadata
455 456 457 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 455 def @metadata end |
#text ⇒ String
Corresponds to the JSON property text
460 461 462 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 460 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
467 468 469 470 471 472 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 467 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 |