Class: Etna::Clients::Metis::FindRequest
- Inherits:
-
Struct
- Object
- Struct
- Etna::Clients::Metis::FindRequest
- Includes:
- JsonSerializableStruct
- Defined in:
- lib/etna/clients/metis/models.rb
Instance Attribute Summary collapse
-
#bucket_name ⇒ Object
Returns the value of attribute bucket_name.
-
#hide_paths ⇒ Object
Returns the value of attribute hide_paths.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#params ⇒ Object
Returns the value of attribute params.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
Instance Method Summary collapse
- #add_param(param) ⇒ Object
- #clone ⇒ Object
-
#initialize(**args) ⇒ FindRequest
constructor
A new instance of FindRequest.
- #to_h ⇒ Object
Methods included from JsonSerializableStruct
Constructor Details
#initialize(**args) ⇒ FindRequest
Returns a new instance of FindRequest.
179 180 181 |
# File 'lib/etna/clients/metis/models.rb', line 179 def initialize(**args) super({params: [], hide_paths: false}.update(args)) end |
Instance Attribute Details
#bucket_name ⇒ Object
Returns the value of attribute bucket_name
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def bucket_name @bucket_name end |
#hide_paths ⇒ Object
Returns the value of attribute hide_paths
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def hide_paths @hide_paths end |
#limit ⇒ Object
Returns the value of attribute limit
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def offset @offset end |
#params ⇒ Object
Returns the value of attribute params
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def params @params end |
#project_name ⇒ Object
Returns the value of attribute project_name
176 177 178 |
# File 'lib/etna/clients/metis/models.rb', line 176 def project_name @project_name end |
Instance Method Details
#add_param(param) ⇒ Object
183 184 185 |
# File 'lib/etna/clients/metis/models.rb', line 183 def add_param(param) params << param end |
#clone ⇒ Object
193 194 195 196 197 198 199 200 201 202 |
# File 'lib/etna/clients/metis/models.rb', line 193 def clone FindRequest.new( project_name: self.project_name, bucket_name: self.bucket_name, limit: self.limit, offset: self.offset, params: self.params.dup, hide_paths: self.hide_paths ) end |
#to_h ⇒ Object
187 188 189 190 191 |
# File 'lib/etna/clients/metis/models.rb', line 187 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 |