Class: Google::Genai::Types::Blob

Inherits:
Base
  • Object
show all
Defined in:
lib/google/genai/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Google::Genai::Types::Base

Instance Attribute Details

#dataObject

Returns the value of attribute data.



17
18
19
# File 'lib/google/genai/types.rb', line 17

def data
  @data
end

#mime_typeObject

Returns the value of attribute mime_type.



17
18
19
# File 'lib/google/genai/types.rb', line 17

def mime_type
  @mime_type
end

Instance Method Details

#to_hObject



19
20
21
# File 'lib/google/genai/types.rb', line 19

def to_h
  { mimeType: mime_type, data: Base64.strict_encode64(data) }
end