Class: CtdDocumentation::GetQueriesIdsAndAssignedTaskResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CtdDocumentation::GetQueriesIdsAndAssignedTaskResponse
- Defined in:
- lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb
Overview
GetQueriesIdsAndAssignedTaskResponse Model.
Instance Attribute Summary collapse
-
#queries ⇒ List of Object
List of lists that contains the id and name of each query.
-
#selected_queries ⇒ List of Integer
List of lists that contains the id of each query assigned to the task.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(queries = SKIP, selected_queries = SKIP) ⇒ GetQueriesIdsAndAssignedTaskResponse
constructor
A new instance of GetQueriesIdsAndAssignedTaskResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(queries = SKIP, selected_queries = SKIP) ⇒ GetQueriesIdsAndAssignedTaskResponse
Returns a new instance of GetQueriesIdsAndAssignedTaskResponse.
41 42 43 44 45 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 41 def initialize(queries = SKIP, selected_queries = SKIP) @queries = queries unless queries == SKIP @selected_queries = selected_queries unless selected_queries == SKIP end |
Instance Attribute Details
#queries ⇒ List of Object
List of lists that contains the id and name of each query
14 15 16 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 14 def queries @queries end |
#selected_queries ⇒ List of Integer
List of lists that contains the id of each query assigned to the task
18 19 20 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 18 def selected_queries @selected_queries end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it queries = nil unless hash['queries'].nil? queries = [] hash['queries'].each do |structure| queries << (Object.from_hash(structure) if structure) end end queries = SKIP unless hash.key?('queries') selected_queries = hash.key?('selected_queries') ? hash['selected_queries'] : SKIP # Create object from extracted values. GetQueriesIdsAndAssignedTaskResponse.new(queries, selected_queries) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['queries'] = 'queries' @_hash['selected_queries'] = 'selected_queries' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 37 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/ctd_documentation/models/get_queries_ids_and_assigned_task_response.rb', line 29 def self.optionals %w[ queries selected_queries ] end |