Class: Google::Apis::CesV1::Image

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

Represents an image input or output in the conversation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Image

Returns a new instance of Image.



3823
3824
3825
# File 'lib/google/apis/ces_v1/classes.rb', line 3823

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dataString

Required. Raw bytes of the image. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


3815
3816
3817
# File 'lib/google/apis/ces_v1/classes.rb', line 3815

def data
  @data
end

#mime_typeString

Required. The IANA standard MIME type of the source data. Supported image types includes: * image/png * image/jpeg * image/webp Corresponds to the JSON property mimeType

Returns:

  • (String)


3821
3822
3823
# File 'lib/google/apis/ces_v1/classes.rb', line 3821

def mime_type
  @mime_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3828
3829
3830
3831
# File 'lib/google/apis/ces_v1/classes.rb', line 3828

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
end