Class: Google::Genai::Types::Part

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

#file_dataObject

Returns the value of attribute file_data.



33
34
35
# File 'lib/google/genai/types.rb', line 33

def file_data
  @file_data
end

#inline_dataObject

Returns the value of attribute inline_data.



33
34
35
# File 'lib/google/genai/types.rb', line 33

def inline_data
  @inline_data
end

#textObject

Returns the value of attribute text.



33
34
35
# File 'lib/google/genai/types.rb', line 33

def text
  @text
end

Instance Method Details

#to_hObject



35
36
37
38
39
40
41
# File 'lib/google/genai/types.rb', line 35

def to_h
  data = {}
  data[:text] = text if text
  data[:inlineData] = inline_data.to_h if inline_data
  data[:fileData] = file_data.to_h if file_data
  data
end