Class: Etna::Clients::Metis::FindRequest

Inherits:
Struct
  • Object
show all
Includes:
JsonSerializableStruct
Defined in:
lib/etna/clients/metis/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JsonSerializableStruct

#as_json, included, #to_json

Constructor Details

#initialize(**args) ⇒ FindRequest

Returns a new instance of FindRequest.



101
102
103
# File 'lib/etna/clients/metis/models.rb', line 101

def initialize(**args)
  super({params: []}.update(args))
end

Instance Attribute Details

#bucket_nameObject

Returns the value of attribute bucket_name

Returns:

  • (Object)

    the current value of bucket_name



98
99
100
# File 'lib/etna/clients/metis/models.rb', line 98

def bucket_name
  @bucket_name
end

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



98
99
100
# File 'lib/etna/clients/metis/models.rb', line 98

def limit
  @limit
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



98
99
100
# File 'lib/etna/clients/metis/models.rb', line 98

def offset
  @offset
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



98
99
100
# File 'lib/etna/clients/metis/models.rb', line 98

def params
  @params
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



98
99
100
# File 'lib/etna/clients/metis/models.rb', line 98

def project_name
  @project_name
end

Instance Method Details

#add_param(param) ⇒ Object



105
106
107
# File 'lib/etna/clients/metis/models.rb', line 105

def add_param(param)
  params << param
end

#to_hObject



109
110
111
112
113
# File 'lib/etna/clients/metis/models.rb', line 109

def to_h
  # The nested :params values don't get converted correctly with transform_values, so it's
  #   easier to do from a JSON string
  JSON.parse(to_json, :symbolize_names => true)
end