Class: Rafflesia::QueryExportRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/query_exports/query_export_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  format: :format,
  max_rows: :max_rows,
  query: :query,
  retention_days: :retention_days
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ QueryExportRequest

Returns a new instance of QueryExportRequest.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/query_exports/query_export_request.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @format = hash[:format]
  @max_rows = hash[:max_rows]
  @query = hash[:query] ? Rafflesia::QueryRequest.new(hash[:query]) : nil
  @retention_days = hash[:retention_days]
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



15
16
17
# File 'lib/rafflesia/query_exports/query_export_request.rb', line 15

def format
  @format
end

#max_rowsObject

Returns the value of attribute max_rows.



15
16
17
# File 'lib/rafflesia/query_exports/query_export_request.rb', line 15

def max_rows
  @max_rows
end

#queryObject

Returns the value of attribute query.



15
16
17
# File 'lib/rafflesia/query_exports/query_export_request.rb', line 15

def query
  @query
end

#retention_daysObject

Returns the value of attribute retention_days.



15
16
17
# File 'lib/rafflesia/query_exports/query_export_request.rb', line 15

def retention_days
  @retention_days
end