Class: Altertable::Lakehouse::Models::AutocompleteResponse

Inherits:
Request
  • Object
show all
Defined in:
lib/altertable/lakehouse/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#to_h

Constructor Details

#initialize(suggestions:, statement:, connections_errors:) ⇒ AutocompleteResponse

Returns a new instance of AutocompleteResponse.



231
232
233
234
235
# File 'lib/altertable/lakehouse/models.rb', line 231

def initialize(suggestions:, statement:, connections_errors:)
  @suggestions = suggestions
  @statement = statement
  @connections_errors = connections_errors
end

Instance Attribute Details

#connections_errorsObject (readonly)

Returns the value of attribute connections_errors.



229
230
231
# File 'lib/altertable/lakehouse/models.rb', line 229

def connections_errors
  @connections_errors
end

#statementObject (readonly)

Returns the value of attribute statement.



229
230
231
# File 'lib/altertable/lakehouse/models.rb', line 229

def statement
  @statement
end

#suggestionsObject (readonly)

Returns the value of attribute suggestions.



229
230
231
# File 'lib/altertable/lakehouse/models.rb', line 229

def suggestions
  @suggestions
end

Class Method Details

.from_h(h) ⇒ Object



237
238
239
240
241
242
243
# File 'lib/altertable/lakehouse/models.rb', line 237

def self.from_h(h)
  new(
    suggestions: Array(h["suggestions"]).map { |suggestion| AutocompleteSuggestion.from_h(suggestion) },
    statement: h["statement"],
    connections_errors: h["connections_errors"] || {}
  )
end