Class: PlainRouter::OpenAPI::GetSandbox200Response
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PlainRouter::OpenAPI::GetSandbox200Response
- Defined in:
- lib/plainrouter/openapi/models/get_sandbox200_response.rb
Instance Attribute Summary collapse
-
#account_required ⇒ Object
Returns the value of attribute account_required.
-
#authentication_required ⇒ Object
Returns the value of attribute authentication_required.
-
#description ⇒ Object
Returns the value of attribute description.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#persists_data ⇒ Object
Returns the value of attribute persists_data.
-
#production_data ⇒ Object
Returns the value of attribute production_data.
-
#provider_delivery ⇒ Object
Returns the value of attribute provider_delivery.
-
#self_serve_key ⇒ Object
Returns the value of attribute self_serve_key.
-
#try ⇒ Object
Returns the value of attribute try.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetSandbox200Response
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetSandbox200Response
Initializes the object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 84 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetSandbox200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetSandbox200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'environment') self.environment = attributes[:'environment'] else self.environment = nil end if attributes.key?(:'authentication_required') self.authentication_required = attributes[:'authentication_required'] else self.authentication_required = nil end if attributes.key?(:'account_required') self.account_required = attributes[:'account_required'] else self.account_required = nil end if attributes.key?(:'production_data') self.production_data = attributes[:'production_data'] else self.production_data = nil end if attributes.key?(:'persists_data') self.persists_data = attributes[:'persists_data'] else self.persists_data = nil end if attributes.key?(:'provider_delivery') self.provider_delivery = attributes[:'provider_delivery'] else self.provider_delivery = nil end if attributes.key?(:'description') self.description = attributes[:'description'] else self.description = nil end if attributes.key?(:'self_serve_key') self.self_serve_key = attributes[:'self_serve_key'] else self.self_serve_key = nil end if attributes.key?(:'try') self.try = attributes[:'try'] else self.try = nil end end |
Instance Attribute Details
#account_required ⇒ Object
Returns the value of attribute account_required.
22 23 24 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 22 def account_required @account_required end |
#authentication_required ⇒ Object
Returns the value of attribute authentication_required.
20 21 22 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 20 def authentication_required @authentication_required end |
#description ⇒ Object
Returns the value of attribute description.
30 31 32 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 30 def description @description end |
#environment ⇒ Object
Returns the value of attribute environment.
18 19 20 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 18 def environment @environment end |
#persists_data ⇒ Object
Returns the value of attribute persists_data.
26 27 28 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 26 def persists_data @persists_data end |
#production_data ⇒ Object
Returns the value of attribute production_data.
24 25 26 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 24 def production_data @production_data end |
#provider_delivery ⇒ Object
Returns the value of attribute provider_delivery.
28 29 30 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 28 def provider_delivery @provider_delivery end |
#self_serve_key ⇒ Object
Returns the value of attribute self_serve_key.
32 33 34 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 32 def self_serve_key @self_serve_key end |
#try ⇒ Object
Returns the value of attribute try.
34 35 36 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 34 def try @try end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
52 53 54 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 52 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
57 58 59 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 57 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 37 def self.attribute_map { :'environment' => :'environment', :'authentication_required' => :'authentication_required', :'account_required' => :'account_required', :'production_data' => :'production_data', :'persists_data' => :'persists_data', :'provider_delivery' => :'provider_delivery', :'description' => :'description', :'self_serve_key' => :'self_serve_key', :'try' => :'try' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 334 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
77 78 79 80 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 77 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 62 def self.openapi_types { :'environment' => :'String', :'authentication_required' => :'Boolean', :'account_required' => :'Boolean', :'production_data' => :'Boolean', :'persists_data' => :'Boolean', :'provider_delivery' => :'Boolean', :'description' => :'String', :'self_serve_key' => :'GetSandbox200ResponseSelfServeKey', :'try' => :'GetSandbox200ResponseTry' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 305 def ==(o) return true if self.equal?(o) self.class == o.class && environment == o.environment && authentication_required == o.authentication_required && account_required == o.account_required && production_data == o.production_data && persists_data == o.persists_data && provider_delivery == o.provider_delivery && description == o.description && self_serve_key == o.self_serve_key && try == o.try end |
#eql?(o) ⇒ Boolean
321 322 323 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 321 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
327 328 329 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 327 def hash [environment, authentication_required, account_required, production_data, persists_data, provider_delivery, description, self_serve_key, try].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 155 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @environment.nil? invalid_properties.push('invalid value for "environment", environment cannot be nil.') end if @authentication_required.nil? invalid_properties.push('invalid value for "authentication_required", authentication_required cannot be nil.') end if @account_required.nil? invalid_properties.push('invalid value for "account_required", account_required cannot be nil.') end if @production_data.nil? invalid_properties.push('invalid value for "production_data", production_data cannot be nil.') end if @persists_data.nil? invalid_properties.push('invalid value for "persists_data", persists_data cannot be nil.') end if @provider_delivery.nil? invalid_properties.push('invalid value for "provider_delivery", provider_delivery cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @self_serve_key.nil? invalid_properties.push('invalid value for "self_serve_key", self_serve_key cannot be nil.') end if @try.nil? invalid_properties.push('invalid value for "try", try cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 356 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/plainrouter/openapi/models/get_sandbox200_response.rb', line 199 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @environment.nil? return false if @authentication_required.nil? return false if @account_required.nil? return false if @production_data.nil? return false if @persists_data.nil? return false if @provider_delivery.nil? return false if @description.nil? return false if @self_serve_key.nil? return false if @try.nil? true end |