Class: CypressTestApi::MultipleArraysRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CypressTestApi::MultipleArraysRequest
- Defined in:
- lib/cypress_test_api/models/multiple_arrays_request.rb
Overview
MultipleArraysRequest Model.
Instance Attribute Summary collapse
-
#array1 ⇒ Array[String]
An array containing items of type string.
-
#array2 ⇒ Array[Integer]
An array containing items of type integer.
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(array1 = nil, array2 = SKIP) ⇒ MultipleArraysRequest
constructor
A new instance of MultipleArraysRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(array1 = nil, array2 = SKIP) ⇒ MultipleArraysRequest
Returns a new instance of MultipleArraysRequest.
40 41 42 43 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 40 def initialize(array1 = nil, array2 = SKIP) @array1 = array1 @array2 = array2 unless array2 == SKIP end |
Instance Attribute Details
#array1 ⇒ Array[String]
An array containing items of type string
14 15 16 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 14 def array1 @array1 end |
#array2 ⇒ Array[Integer]
An array containing items of type integer
18 19 20 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 18 def array2 @array2 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. array1 = hash.key?('Array1') ? hash['Array1'] : nil array2 = hash.key?('Array2') ? hash['Array2'] : SKIP # Create object from extracted values. MultipleArraysRequest.new(array1, array2) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['array1'] = 'Array1' @_hash['array2'] = 'Array2' @_hash end |
.nullables ⇒ Object
An array for nullable fields
36 37 38 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 36 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 29 def self.optionals %w[ array2 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
65 66 67 68 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 65 def inspect class_name = self.class.name.split('::').last "<#{class_name} array1: #{@array1.inspect}, array2: #{@array2.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
59 60 61 62 |
# File 'lib/cypress_test_api/models/multiple_arrays_request.rb', line 59 def to_s class_name = self.class.name.split('::').last "<#{class_name} array1: #{@array1}, array2: #{@array2}>" end |