Class: Altertable::Lakehouse::Models::ValidateRequest

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) ⇒ ValidateRequest

Returns a new instance of ValidateRequest.

Parameters:

  • statement: (String)
  • catalog: (String, nil) (defaults to: nil)
  • schema: (String, nil) (defaults to: nil)
  • session_id: (String, nil) (defaults to: nil)


98
99
100
101
102
103
# File 'lib/altertable/lakehouse/models.rb', line 98

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

Instance Attribute Details

#catalogString? (readonly)

Returns the value of attribute catalog.

Returns:

  • (String, nil)


96
97
98
# File 'lib/altertable/lakehouse/models.rb', line 96

def catalog
  @catalog
end

#schemaString? (readonly)

Returns the value of attribute schema.

Returns:

  • (String, nil)


96
97
98
# File 'lib/altertable/lakehouse/models.rb', line 96

def schema
  @schema
end

#session_idString? (readonly)

Returns the value of attribute session_id.

Returns:

  • (String, nil)


96
97
98
# File 'lib/altertable/lakehouse/models.rb', line 96

def session_id
  @session_id
end

#statementString (readonly)

Returns the value of attribute statement.

Returns:

  • (String)


96
97
98
# File 'lib/altertable/lakehouse/models.rb', line 96

def statement
  @statement
end

Instance Method Details

#to_h::Hash[Symbol, untyped]

Returns:

  • (::Hash[Symbol, untyped])


105
106
107
108
109
110
111
# File 'lib/altertable/lakehouse/models.rb', line 105

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
end