Class: Google::Apis::WorkspaceeventsV1::Part

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dataGoogle::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

#fileGoogle::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

#metadataHash<String,Object>

Optional metadata associated with this part. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


428
429
430
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 428

def 
  @metadata
end

#textString

Corresponds to the JSON property text

Returns:

  • (String)


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