eilam_test 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +0 -15
 - data/docs/SystemType.md +1 -1
 - data/docs/SystemTypeCreate.md +1 -1
 - data/lib/eilam_test/models/system_type.rb +3 -3
 - data/lib/eilam_test/models/system_type_create.rb +3 -3
 - data/lib/eilam_test/version.rb +2 -2
 - data/lib/eilam_test.rb +0 -8
 - data/spec/models/system_type_create_spec.rb +1 -1
 - data/spec/models/system_type_spec.rb +1 -1
 - metadata +62 -94
 - data/docs/Event.md +0 -32
 - data/docs/EventApi.md +0 -276
 - data/docs/User.md +0 -38
 - data/docs/UserApi.md +0 -346
 - data/docs/UserCreate.md +0 -38
 - data/docs/UserUpdate.md +0 -30
 - data/docs/ValidateSystem.md +0 -26
 - data/docs/ValidateSystemApi.md +0 -75
 - data/lib/eilam_test/api/event_api.rb +0 -254
 - data/lib/eilam_test/api/user_api.rb +0 -321
 - data/lib/eilam_test/api/validate_system_api.rb +0 -83
 - data/lib/eilam_test/models/event.rb +0 -289
 - data/lib/eilam_test/models/user.rb +0 -395
 - data/lib/eilam_test/models/user_create.rb +0 -395
 - data/lib/eilam_test/models/user_update.rb +0 -280
 - data/lib/eilam_test/models/validate_system.rb +0 -260
 - data/spec/api/event_api_spec.rb +0 -74
 - data/spec/api/user_api_spec.rb +0 -85
 - data/spec/api/validate_system_api_spec.rb +0 -45
 - data/spec/models/event_spec.rb +0 -76
 - data/spec/models/user_create_spec.rb +0 -94
 - data/spec/models/user_spec.rb +0 -94
 - data/spec/models/user_update_spec.rb +0 -70
 - data/spec/models/validate_system_spec.rb +0 -58
 
| 
         @@ -1,83 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Site Manager API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Site Manager API
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 1.0.0
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: autosde@il.ibm.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 5.0.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'cgi'
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            module EilamTest
         
     | 
| 
       16 
     | 
    
         
            -
              class ValidateSystemApi
         
     | 
| 
       17 
     | 
    
         
            -
                attr_accessor :api_client
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                def initialize(api_client = ApiClient.default)
         
     | 
| 
       20 
     | 
    
         
            -
                  @api_client = api_client
         
     | 
| 
       21 
     | 
    
         
            -
                end
         
     | 
| 
       22 
     | 
    
         
            -
                # @param storage_system_create [StorageSystemCreate] 
         
     | 
| 
       23 
     | 
    
         
            -
                # @param [Hash] opts the optional parameters
         
     | 
| 
       24 
     | 
    
         
            -
                # @return [ValidateSystem]
         
     | 
| 
       25 
     | 
    
         
            -
                def validate_system_post(storage_system_create, opts = {})
         
     | 
| 
       26 
     | 
    
         
            -
                  data, _status_code, _headers = validate_system_post_with_http_info(storage_system_create, opts)
         
     | 
| 
       27 
     | 
    
         
            -
                  data
         
     | 
| 
       28 
     | 
    
         
            -
                end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                # @param storage_system_create [StorageSystemCreate] 
         
     | 
| 
       31 
     | 
    
         
            -
                # @param [Hash] opts the optional parameters
         
     | 
| 
       32 
     | 
    
         
            -
                # @return [Array<(ValidateSystem, Integer, Hash)>] ValidateSystem data, response status code and response headers
         
     | 
| 
       33 
     | 
    
         
            -
                def validate_system_post_with_http_info(storage_system_create, opts = {})
         
     | 
| 
       34 
     | 
    
         
            -
                  if @api_client.config.debugging
         
     | 
| 
       35 
     | 
    
         
            -
                    @api_client.config.logger.debug 'Calling API: ValidateSystemApi.validate_system_post ...'
         
     | 
| 
       36 
     | 
    
         
            -
                  end
         
     | 
| 
       37 
     | 
    
         
            -
                  # verify the required parameter 'storage_system_create' is set
         
     | 
| 
       38 
     | 
    
         
            -
                  if @api_client.config.client_side_validation && storage_system_create.nil?
         
     | 
| 
       39 
     | 
    
         
            -
                    fail ArgumentError, "Missing the required parameter 'storage_system_create' when calling ValidateSystemApi.validate_system_post"
         
     | 
| 
       40 
     | 
    
         
            -
                  end
         
     | 
| 
       41 
     | 
    
         
            -
                  # resource path
         
     | 
| 
       42 
     | 
    
         
            -
                  local_var_path = '/validate-system'
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                  # query parameters
         
     | 
| 
       45 
     | 
    
         
            -
                  query_params = opts[:query_params] || {}
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                  # header parameters
         
     | 
| 
       48 
     | 
    
         
            -
                  header_params = opts[:header_params] || {}
         
     | 
| 
       49 
     | 
    
         
            -
                  # HTTP header 'Accept' (if needed)
         
     | 
| 
       50 
     | 
    
         
            -
                  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
         
     | 
| 
       51 
     | 
    
         
            -
                  # HTTP header 'Content-Type'
         
     | 
| 
       52 
     | 
    
         
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
                  # form parameters
         
     | 
| 
       55 
     | 
    
         
            -
                  form_params = opts[:form_params] || {}
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
                  # http body (model)
         
     | 
| 
       58 
     | 
    
         
            -
                  post_body = opts[:debug_body] || @api_client.object_to_http_body(storage_system_create)
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
                  # return_type
         
     | 
| 
       61 
     | 
    
         
            -
                  return_type = opts[:debug_return_type] || 'ValidateSystem'
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                  # auth_names
         
     | 
| 
       64 
     | 
    
         
            -
                  auth_names = opts[:debug_auth_names] || ['bearerAuth']
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
                  new_options = opts.merge(
         
     | 
| 
       67 
     | 
    
         
            -
                    :operation => :"ValidateSystemApi.validate_system_post",
         
     | 
| 
       68 
     | 
    
         
            -
                    :header_params => header_params,
         
     | 
| 
       69 
     | 
    
         
            -
                    :query_params => query_params,
         
     | 
| 
       70 
     | 
    
         
            -
                    :form_params => form_params,
         
     | 
| 
       71 
     | 
    
         
            -
                    :body => post_body,
         
     | 
| 
       72 
     | 
    
         
            -
                    :auth_names => auth_names,
         
     | 
| 
       73 
     | 
    
         
            -
                    :return_type => return_type
         
     | 
| 
       74 
     | 
    
         
            -
                  )
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
                  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
         
     | 
| 
       77 
     | 
    
         
            -
                  if @api_client.config.debugging
         
     | 
| 
       78 
     | 
    
         
            -
                    @api_client.config.logger.debug "API called: ValidateSystemApi#validate_system_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
         
     | 
| 
       79 
     | 
    
         
            -
                  end
         
     | 
| 
       80 
     | 
    
         
            -
                  return data, status_code, headers
         
     | 
| 
       81 
     | 
    
         
            -
                end
         
     | 
| 
       82 
     | 
    
         
            -
              end
         
     | 
| 
       83 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,289 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Site Manager API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Site Manager API
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 1.0.0
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: autosde@il.ibm.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 5.0.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'date'
         
     | 
| 
       14 
     | 
    
         
            -
            require 'time'
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            module EilamTest
         
     | 
| 
       17 
     | 
    
         
            -
              # Event object represents storage system alerts and messages.
         
     | 
| 
       18 
     | 
    
         
            -
              class Event
         
     | 
| 
       19 
     | 
    
         
            -
                # description
         
     | 
| 
       20 
     | 
    
         
            -
                attr_accessor :description
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                # error_code
         
     | 
| 
       23 
     | 
    
         
            -
                attr_accessor :error_code
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
                # event_id
         
     | 
| 
       26 
     | 
    
         
            -
                attr_accessor :event_id
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                # event_type
         
     | 
| 
       29 
     | 
    
         
            -
                attr_accessor :event_type
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                # fixed
         
     | 
| 
       32 
     | 
    
         
            -
                attr_accessor :fixed
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                # last_timestamp
         
     | 
| 
       35 
     | 
    
         
            -
                attr_accessor :last_timestamp
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                attr_accessor :storage_system
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                # uuid
         
     | 
| 
       40 
     | 
    
         
            -
                attr_accessor :uuid
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       43 
     | 
    
         
            -
                def self.attribute_map
         
     | 
| 
       44 
     | 
    
         
            -
                  {
         
     | 
| 
       45 
     | 
    
         
            -
                    :'description' => :'description',
         
     | 
| 
       46 
     | 
    
         
            -
                    :'error_code' => :'error_code',
         
     | 
| 
       47 
     | 
    
         
            -
                    :'event_id' => :'event_id',
         
     | 
| 
       48 
     | 
    
         
            -
                    :'event_type' => :'event_type',
         
     | 
| 
       49 
     | 
    
         
            -
                    :'fixed' => :'fixed',
         
     | 
| 
       50 
     | 
    
         
            -
                    :'last_timestamp' => :'last_timestamp',
         
     | 
| 
       51 
     | 
    
         
            -
                    :'storage_system' => :'storage_system',
         
     | 
| 
       52 
     | 
    
         
            -
                    :'uuid' => :'uuid'
         
     | 
| 
       53 
     | 
    
         
            -
                  }
         
     | 
| 
       54 
     | 
    
         
            -
                end
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
                # Returns all the JSON keys this model knows about
         
     | 
| 
       57 
     | 
    
         
            -
                def self.acceptable_attributes
         
     | 
| 
       58 
     | 
    
         
            -
                  attribute_map.values
         
     | 
| 
       59 
     | 
    
         
            -
                end
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                # Attribute type mapping.
         
     | 
| 
       62 
     | 
    
         
            -
                def self.openapi_types
         
     | 
| 
       63 
     | 
    
         
            -
                  {
         
     | 
| 
       64 
     | 
    
         
            -
                    :'description' => :'String',
         
     | 
| 
       65 
     | 
    
         
            -
                    :'error_code' => :'String',
         
     | 
| 
       66 
     | 
    
         
            -
                    :'event_id' => :'Integer',
         
     | 
| 
       67 
     | 
    
         
            -
                    :'event_type' => :'String',
         
     | 
| 
       68 
     | 
    
         
            -
                    :'fixed' => :'String',
         
     | 
| 
       69 
     | 
    
         
            -
                    :'last_timestamp' => :'Time',
         
     | 
| 
       70 
     | 
    
         
            -
                    :'storage_system' => :'StorageSystem',
         
     | 
| 
       71 
     | 
    
         
            -
                    :'uuid' => :'String'
         
     | 
| 
       72 
     | 
    
         
            -
                  }
         
     | 
| 
       73 
     | 
    
         
            -
                end
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                # List of attributes with nullable: true
         
     | 
| 
       76 
     | 
    
         
            -
                def self.openapi_nullable
         
     | 
| 
       77 
     | 
    
         
            -
                  Set.new([
         
     | 
| 
       78 
     | 
    
         
            -
                  ])
         
     | 
| 
       79 
     | 
    
         
            -
                end
         
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
                # Initializes the object
         
     | 
| 
       82 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       83 
     | 
    
         
            -
                def initialize(attributes = {})
         
     | 
| 
       84 
     | 
    
         
            -
                  if (!attributes.is_a?(Hash))
         
     | 
| 
       85 
     | 
    
         
            -
                    fail ArgumentError, "The input argument (attributes) must be a hash in `EilamTest::Event` initialize method"
         
     | 
| 
       86 
     | 
    
         
            -
                  end
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
       89 
     | 
    
         
            -
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
       90 
     | 
    
         
            -
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
       91 
     | 
    
         
            -
                      fail ArgumentError, "`#{k}` is not a valid attribute in `EilamTest::Event`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
       92 
     | 
    
         
            -
                    end
         
     | 
| 
       93 
     | 
    
         
            -
                    h[k.to_sym] = v
         
     | 
| 
       94 
     | 
    
         
            -
                  }
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                  if attributes.key?(:'description')
         
     | 
| 
       97 
     | 
    
         
            -
                    self.description = attributes[:'description']
         
     | 
| 
       98 
     | 
    
         
            -
                  end
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                  if attributes.key?(:'error_code')
         
     | 
| 
       101 
     | 
    
         
            -
                    self.error_code = attributes[:'error_code']
         
     | 
| 
       102 
     | 
    
         
            -
                  end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                  if attributes.key?(:'event_id')
         
     | 
| 
       105 
     | 
    
         
            -
                    self.event_id = attributes[:'event_id']
         
     | 
| 
       106 
     | 
    
         
            -
                  end
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                  if attributes.key?(:'event_type')
         
     | 
| 
       109 
     | 
    
         
            -
                    self.event_type = attributes[:'event_type']
         
     | 
| 
       110 
     | 
    
         
            -
                  end
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                  if attributes.key?(:'fixed')
         
     | 
| 
       113 
     | 
    
         
            -
                    self.fixed = attributes[:'fixed']
         
     | 
| 
       114 
     | 
    
         
            -
                  end
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
                  if attributes.key?(:'last_timestamp')
         
     | 
| 
       117 
     | 
    
         
            -
                    self.last_timestamp = attributes[:'last_timestamp']
         
     | 
| 
       118 
     | 
    
         
            -
                  end
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                  if attributes.key?(:'storage_system')
         
     | 
| 
       121 
     | 
    
         
            -
                    self.storage_system = attributes[:'storage_system']
         
     | 
| 
       122 
     | 
    
         
            -
                  end
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                  if attributes.key?(:'uuid')
         
     | 
| 
       125 
     | 
    
         
            -
                    self.uuid = attributes[:'uuid']
         
     | 
| 
       126 
     | 
    
         
            -
                  end
         
     | 
| 
       127 
     | 
    
         
            -
                end
         
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
       130 
     | 
    
         
            -
                # @return Array for valid properties with the reasons
         
     | 
| 
       131 
     | 
    
         
            -
                def list_invalid_properties
         
     | 
| 
       132 
     | 
    
         
            -
                  invalid_properties = Array.new
         
     | 
| 
       133 
     | 
    
         
            -
                  invalid_properties
         
     | 
| 
       134 
     | 
    
         
            -
                end
         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
                # Check to see if the all the properties in the model are valid
         
     | 
| 
       137 
     | 
    
         
            -
                # @return true if the model is valid
         
     | 
| 
       138 
     | 
    
         
            -
                def valid?
         
     | 
| 
       139 
     | 
    
         
            -
                  true
         
     | 
| 
       140 
     | 
    
         
            -
                end
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
                # Checks equality by comparing each attribute.
         
     | 
| 
       143 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       144 
     | 
    
         
            -
                def ==(o)
         
     | 
| 
       145 
     | 
    
         
            -
                  return true if self.equal?(o)
         
     | 
| 
       146 
     | 
    
         
            -
                  self.class == o.class &&
         
     | 
| 
       147 
     | 
    
         
            -
                      description == o.description &&
         
     | 
| 
       148 
     | 
    
         
            -
                      error_code == o.error_code &&
         
     | 
| 
       149 
     | 
    
         
            -
                      event_id == o.event_id &&
         
     | 
| 
       150 
     | 
    
         
            -
                      event_type == o.event_type &&
         
     | 
| 
       151 
     | 
    
         
            -
                      fixed == o.fixed &&
         
     | 
| 
       152 
     | 
    
         
            -
                      last_timestamp == o.last_timestamp &&
         
     | 
| 
       153 
     | 
    
         
            -
                      storage_system == o.storage_system &&
         
     | 
| 
       154 
     | 
    
         
            -
                      uuid == o.uuid
         
     | 
| 
       155 
     | 
    
         
            -
                end
         
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
                # @see the `==` method
         
     | 
| 
       158 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       159 
     | 
    
         
            -
                def eql?(o)
         
     | 
| 
       160 
     | 
    
         
            -
                  self == o
         
     | 
| 
       161 
     | 
    
         
            -
                end
         
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
                # Calculates hash code according to all attributes.
         
     | 
| 
       164 
     | 
    
         
            -
                # @return [Integer] Hash code
         
     | 
| 
       165 
     | 
    
         
            -
                def hash
         
     | 
| 
       166 
     | 
    
         
            -
                  [description, error_code, event_id, event_type, fixed, last_timestamp, storage_system, uuid].hash
         
     | 
| 
       167 
     | 
    
         
            -
                end
         
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       170 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       171 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       172 
     | 
    
         
            -
                def self.build_from_hash(attributes)
         
     | 
| 
       173 
     | 
    
         
            -
                  new.build_from_hash(attributes)
         
     | 
| 
       174 
     | 
    
         
            -
                end
         
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       177 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       178 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       179 
     | 
    
         
            -
                def build_from_hash(attributes)
         
     | 
| 
       180 
     | 
    
         
            -
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
       181 
     | 
    
         
            -
                  self.class.openapi_types.each_pair do |key, type|
         
     | 
| 
       182 
     | 
    
         
            -
                    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
         
     | 
| 
       183 
     | 
    
         
            -
                      self.send("#{key}=", nil)
         
     | 
| 
       184 
     | 
    
         
            -
                    elsif type =~ /\AArray<(.*)>/i
         
     | 
| 
       185 
     | 
    
         
            -
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
       186 
     | 
    
         
            -
                      # is documented as an array but the input is not
         
     | 
| 
       187 
     | 
    
         
            -
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
       188 
     | 
    
         
            -
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
       189 
     | 
    
         
            -
                      end
         
     | 
| 
       190 
     | 
    
         
            -
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
       191 
     | 
    
         
            -
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
       192 
     | 
    
         
            -
                    end
         
     | 
| 
       193 
     | 
    
         
            -
                  end
         
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
                  self
         
     | 
| 
       196 
     | 
    
         
            -
                end
         
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
                # Deserializes the data based on type
         
     | 
| 
       199 
     | 
    
         
            -
                # @param string type Data type
         
     | 
| 
       200 
     | 
    
         
            -
                # @param string value Value to be deserialized
         
     | 
| 
       201 
     | 
    
         
            -
                # @return [Object] Deserialized data
         
     | 
| 
       202 
     | 
    
         
            -
                def _deserialize(type, value)
         
     | 
| 
       203 
     | 
    
         
            -
                  case type.to_sym
         
     | 
| 
       204 
     | 
    
         
            -
                  when :Time
         
     | 
| 
       205 
     | 
    
         
            -
                    Time.parse(value)
         
     | 
| 
       206 
     | 
    
         
            -
                  when :Date
         
     | 
| 
       207 
     | 
    
         
            -
                    Date.parse(value)
         
     | 
| 
       208 
     | 
    
         
            -
                  when :String
         
     | 
| 
       209 
     | 
    
         
            -
                    value.to_s
         
     | 
| 
       210 
     | 
    
         
            -
                  when :Integer
         
     | 
| 
       211 
     | 
    
         
            -
                    value.to_i
         
     | 
| 
       212 
     | 
    
         
            -
                  when :Float
         
     | 
| 
       213 
     | 
    
         
            -
                    value.to_f
         
     | 
| 
       214 
     | 
    
         
            -
                  when :Boolean
         
     | 
| 
       215 
     | 
    
         
            -
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
       216 
     | 
    
         
            -
                      true
         
     | 
| 
       217 
     | 
    
         
            -
                    else
         
     | 
| 
       218 
     | 
    
         
            -
                      false
         
     | 
| 
       219 
     | 
    
         
            -
                    end
         
     | 
| 
       220 
     | 
    
         
            -
                  when :Object
         
     | 
| 
       221 
     | 
    
         
            -
                    # generic object (usually a Hash), return directly
         
     | 
| 
       222 
     | 
    
         
            -
                    value
         
     | 
| 
       223 
     | 
    
         
            -
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
       224 
     | 
    
         
            -
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
       225 
     | 
    
         
            -
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
       226 
     | 
    
         
            -
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
       227 
     | 
    
         
            -
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
       228 
     | 
    
         
            -
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
       229 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       230 
     | 
    
         
            -
                      value.each do |k, v|
         
     | 
| 
       231 
     | 
    
         
            -
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
       232 
     | 
    
         
            -
                      end
         
     | 
| 
       233 
     | 
    
         
            -
                    end
         
     | 
| 
       234 
     | 
    
         
            -
                  else # model
         
     | 
| 
       235 
     | 
    
         
            -
                    # models (e.g. Pet) or oneOf
         
     | 
| 
       236 
     | 
    
         
            -
                    klass = EilamTest.const_get(type)
         
     | 
| 
       237 
     | 
    
         
            -
                    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
         
     | 
| 
       238 
     | 
    
         
            -
                  end
         
     | 
| 
       239 
     | 
    
         
            -
                end
         
     | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
                # Returns the string representation of the object
         
     | 
| 
       242 
     | 
    
         
            -
                # @return [String] String presentation of the object
         
     | 
| 
       243 
     | 
    
         
            -
                def to_s
         
     | 
| 
       244 
     | 
    
         
            -
                  to_hash.to_s
         
     | 
| 
       245 
     | 
    
         
            -
                end
         
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
     | 
    
         
            -
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
       248 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       249 
     | 
    
         
            -
                def to_body
         
     | 
| 
       250 
     | 
    
         
            -
                  to_hash
         
     | 
| 
       251 
     | 
    
         
            -
                end
         
     | 
| 
       252 
     | 
    
         
            -
             
     | 
| 
       253 
     | 
    
         
            -
                # Returns the object in the form of hash
         
     | 
| 
       254 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       255 
     | 
    
         
            -
                def to_hash
         
     | 
| 
       256 
     | 
    
         
            -
                  hash = {}
         
     | 
| 
       257 
     | 
    
         
            -
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
       258 
     | 
    
         
            -
                    value = self.send(attr)
         
     | 
| 
       259 
     | 
    
         
            -
                    if value.nil?
         
     | 
| 
       260 
     | 
    
         
            -
                      is_nullable = self.class.openapi_nullable.include?(attr)
         
     | 
| 
       261 
     | 
    
         
            -
                      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
         
     | 
| 
       262 
     | 
    
         
            -
                    end
         
     | 
| 
       263 
     | 
    
         
            -
             
     | 
| 
       264 
     | 
    
         
            -
                    hash[param] = _to_hash(value)
         
     | 
| 
       265 
     | 
    
         
            -
                  end
         
     | 
| 
       266 
     | 
    
         
            -
                  hash
         
     | 
| 
       267 
     | 
    
         
            -
                end
         
     | 
| 
       268 
     | 
    
         
            -
             
     | 
| 
       269 
     | 
    
         
            -
                # Outputs non-array value in the form of hash
         
     | 
| 
       270 
     | 
    
         
            -
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
       271 
     | 
    
         
            -
                # @param [Object] value Any valid value
         
     | 
| 
       272 
     | 
    
         
            -
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
       273 
     | 
    
         
            -
                def _to_hash(value)
         
     | 
| 
       274 
     | 
    
         
            -
                  if value.is_a?(Array)
         
     | 
| 
       275 
     | 
    
         
            -
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
       276 
     | 
    
         
            -
                  elsif value.is_a?(Hash)
         
     | 
| 
       277 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       278 
     | 
    
         
            -
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
       279 
     | 
    
         
            -
                    end
         
     | 
| 
       280 
     | 
    
         
            -
                  elsif value.respond_to? :to_hash
         
     | 
| 
       281 
     | 
    
         
            -
                    value.to_hash
         
     | 
| 
       282 
     | 
    
         
            -
                  else
         
     | 
| 
       283 
     | 
    
         
            -
                    value
         
     | 
| 
       284 
     | 
    
         
            -
                  end
         
     | 
| 
       285 
     | 
    
         
            -
                end
         
     | 
| 
       286 
     | 
    
         
            -
             
     | 
| 
       287 
     | 
    
         
            -
              end
         
     | 
| 
       288 
     | 
    
         
            -
             
     | 
| 
       289 
     | 
    
         
            -
            end
         
     |