Class: Altertable::Lakehouse::Models::AutocompleteRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(statement:, catalog: nil, schema: nil, session_id: nil, max_suggestions: nil) ⇒ AutocompleteRequest

Returns a new instance of AutocompleteRequest.



188
189
190
191
192
193
194
# File 'lib/altertable/lakehouse/models.rb', line 188

def initialize(statement:, catalog: nil, schema: nil, session_id: nil, max_suggestions: nil)
  @statement = statement
  @catalog = catalog
  @schema = schema
  @session_id = session_id
  @max_suggestions = max_suggestions
end

Instance Attribute Details

#catalogString? (readonly)

Returns the value of attribute catalog.

Returns:

  • (String, nil)


186
187
188
# File 'lib/altertable/lakehouse/models.rb', line 186

def catalog
  @catalog
end

#max_suggestionsInteger? (readonly)

Returns the value of attribute max_suggestions.

Returns:

  • (Integer, nil)


186
187
188
# File 'lib/altertable/lakehouse/models.rb', line 186

def max_suggestions
  @max_suggestions
end

#schemaString? (readonly)

Returns the value of attribute schema.

Returns:

  • (String, nil)


186
187
188
# File 'lib/altertable/lakehouse/models.rb', line 186

def schema
  @schema
end

#session_idString? (readonly)

Returns the value of attribute session_id.

Returns:

  • (String, nil)


186
187
188
# File 'lib/altertable/lakehouse/models.rb', line 186

def session_id
  @session_id
end

#statementString (readonly)

Returns the value of attribute statement.

Returns:

  • (String)


186
187
188
# File 'lib/altertable/lakehouse/models.rb', line 186

def statement
  @statement
end

Instance Method Details

#to_h::Hash[Symbol, untyped]

Returns:

  • (::Hash[Symbol, untyped])


196
197
198
199
200
201
202
203
# File 'lib/altertable/lakehouse/models.rb', line 196

def to_h
  h = { statement: @statement }
  h[:catalog] = @catalog if @catalog
  h[:schema] = @schema if @schema
  h[:session_id] = @session_id if @session_id
  h[:max_suggestions] = @max_suggestions if @max_suggestions
  h
end