swagger_aem 3.1.0 → 3.2.0

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +44 -43
  4. data/README.md +15 -7
  5. data/docs/ConsoleApi.md +43 -33
  6. data/docs/CqApi.md +12 -8
  7. data/docs/CrxApi.md +41 -27
  8. data/docs/CustomApi.md +19 -13
  9. data/docs/InlineObject.md +17 -0
  10. data/docs/InlineObject1.md +17 -0
  11. data/docs/InlineObject2.md +17 -0
  12. data/docs/InlineObject3.md +17 -0
  13. data/docs/InlineObject4.md +21 -0
  14. data/docs/InstallStatus.md +9 -0
  15. data/docs/InstallStatusStatus.md +11 -1
  16. data/docs/KeystoreChainItems.md +13 -0
  17. data/docs/KeystoreInfo.md +11 -1
  18. data/docs/KeystoreItems.md +13 -0
  19. data/docs/SamlConfigurationInfo.md +14 -0
  20. data/docs/SamlConfigurationProperties.md +32 -0
  21. data/docs/SamlConfigurationPropertyItemsArray.md +16 -2
  22. data/docs/SamlConfigurationPropertyItemsBoolean.md +17 -3
  23. data/docs/SamlConfigurationPropertyItemsLong.md +16 -2
  24. data/docs/SamlConfigurationPropertyItemsString.md +16 -2
  25. data/docs/SlingApi.md +320 -214
  26. data/docs/TruststoreInfo.md +11 -1
  27. data/docs/TruststoreItems.md +15 -0
  28. data/git_push.sh +10 -7
  29. data/lib/swagger_aem.rb +7 -2
  30. data/lib/swagger_aem/api/console_api.rb +118 -67
  31. data/lib/swagger_aem/api/cq_api.rb +43 -23
  32. data/lib/swagger_aem/api/crx_api.rb +154 -84
  33. data/lib/swagger_aem/api/custom_api.rb +60 -29
  34. data/lib/swagger_aem/api/sling_api.rb +850 -500
  35. data/lib/swagger_aem/api_client.rb +42 -43
  36. data/lib/swagger_aem/api_error.rb +21 -2
  37. data/lib/swagger_aem/configuration.rb +46 -7
  38. data/lib/swagger_aem/models/inline_object.rb +206 -0
  39. data/lib/swagger_aem/models/inline_object1.rb +206 -0
  40. data/lib/swagger_aem/models/inline_object2.rb +206 -0
  41. data/lib/swagger_aem/models/inline_object3.rb +206 -0
  42. data/lib/swagger_aem/models/inline_object4.rb +224 -0
  43. data/lib/swagger_aem/models/install_status.rb +35 -12
  44. data/lib/swagger_aem/models/install_status_status.rb +38 -15
  45. data/lib/swagger_aem/models/keystore_chain_items.rb +42 -19
  46. data/lib/swagger_aem/models/keystore_info.rb +37 -14
  47. data/lib/swagger_aem/models/keystore_items.rb +41 -18
  48. data/lib/swagger_aem/models/saml_configuration_info.rb +40 -17
  49. data/lib/swagger_aem/models/saml_configuration_properties.rb +81 -58
  50. data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +42 -19
  51. data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +43 -20
  52. data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +42 -19
  53. data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +42 -19
  54. data/lib/swagger_aem/models/truststore_info.rb +37 -14
  55. data/lib/swagger_aem/models/truststore_items.rb +46 -23
  56. data/lib/swagger_aem/version.rb +3 -3
  57. data/spec/models/inline_object1_spec.rb +41 -0
  58. data/spec/models/inline_object2_spec.rb +41 -0
  59. data/spec/models/inline_object3_spec.rb +41 -0
  60. data/spec/models/inline_object4_spec.rb +53 -0
  61. data/spec/models/inline_object_spec.rb +41 -0
  62. data/swagger_aem.gemspec +2 -8
  63. metadata +22 -122
@@ -0,0 +1,224 @@
1
+ =begin
2
+ #Adobe Experience Manager (AEM) API
3
+
4
+ #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
+
6
+ The version of the OpenAPI document: 3.2.0
7
+ Contact: opensource@shinesolutions.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SwaggerAemClient
16
+ class InlineObject4
17
+ attr_accessor :cert_chain
18
+
19
+ attr_accessor :pk
20
+
21
+ attr_accessor :key_store
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'cert_chain' => :'cert-chain',
27
+ :'pk' => :'pk',
28
+ :'key_store' => :'keyStore'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'cert_chain' => :'File',
36
+ :'pk' => :'File',
37
+ :'key_store' => :'File'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::InlineObject4` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'cert_chain')
63
+ self.cert_chain = attributes[:'cert_chain']
64
+ end
65
+
66
+ if attributes.key?(:'pk')
67
+ self.pk = attributes[:'pk']
68
+ end
69
+
70
+ if attributes.key?(:'key_store')
71
+ self.key_store = attributes[:'key_store']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ cert_chain == o.cert_chain &&
94
+ pk == o.pk &&
95
+ key_store == o.key_store
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [cert_chain, pk, key_store].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ new.build_from_hash(attributes)
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :DateTime
144
+ DateTime.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ SwaggerAemClient.const_get(type).build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Outputs non-array value in the form of hash
207
+ # For object, use to_hash. Otherwise, just return the value
208
+ # @param [Object] value Any valid value
209
+ # @return [Hash] Returns the value in the form of hash
210
+ def _to_hash(value)
211
+ if value.is_a?(Array)
212
+ value.compact.map { |v| _to_hash(v) }
213
+ elsif value.is_a?(Hash)
214
+ {}.tap do |hash|
215
+ value.each { |k, v| hash[k] = _to_hash(v) }
216
+ end
217
+ elsif value.respond_to? :to_hash
218
+ value.to_hash
219
+ else
220
+ value
221
+ end
222
+ end
223
+ end
224
+ end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 3.1.0
6
+ The version of the OpenAPI document: 3.2.0
7
7
  Contact: opensource@shinesolutions.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.3.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -30,15 +30,28 @@ module SwaggerAemClient
30
30
  }
31
31
  end
32
32
 
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
33
39
  # Initializes the object
34
40
  # @param [Hash] attributes Model attributes in the form of hash
35
41
  def initialize(attributes = {})
36
- return unless attributes.is_a?(Hash)
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::InstallStatus` initialize method"
44
+ end
37
45
 
38
- # convert string to symbol for hash key
39
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::InstallStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
40
53
 
41
- if attributes.has_key?(:'status')
54
+ if attributes.key?(:'status')
42
55
  self.status = attributes[:'status']
43
56
  end
44
57
  end
@@ -71,11 +84,18 @@ module SwaggerAemClient
71
84
  end
72
85
 
73
86
  # Calculates hash code according to all attributes.
74
- # @return [Fixnum] Hash code
87
+ # @return [Integer] Hash code
75
88
  def hash
76
89
  [status].hash
77
90
  end
78
91
 
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def self.build_from_hash(attributes)
96
+ new.build_from_hash(attributes)
97
+ end
98
+
79
99
  # Builds the object from hash
80
100
  # @param [Hash] attributes Model attributes in the form of hash
81
101
  # @return [Object] Returns the model itself
@@ -83,7 +103,7 @@ module SwaggerAemClient
83
103
  return nil unless attributes.is_a?(Hash)
84
104
  self.class.openapi_types.each_pair do |key, type|
85
105
  if type =~ /\AArray<(.*)>/i
86
- # check to ensure the input is an array given that the the attribute
106
+ # check to ensure the input is an array given that the attribute
87
107
  # is documented as an array but the input is not
88
108
  if attributes[self.class.attribute_map[key]].is_a?(Array)
89
109
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -112,7 +132,7 @@ module SwaggerAemClient
112
132
  value.to_i
113
133
  when :Float
114
134
  value.to_f
115
- when :BOOLEAN
135
+ when :Boolean
116
136
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
137
  true
118
138
  else
@@ -133,8 +153,7 @@ module SwaggerAemClient
133
153
  end
134
154
  end
135
155
  else # model
136
- temp_model = SwaggerAemClient.const_get(type).new
137
- temp_model.build_from_hash(value)
156
+ SwaggerAemClient.const_get(type).build_from_hash(value)
138
157
  end
139
158
  end
140
159
 
@@ -156,7 +175,11 @@ module SwaggerAemClient
156
175
  hash = {}
157
176
  self.class.attribute_map.each_pair do |attr, param|
158
177
  value = self.send(attr)
159
- next if value.nil?
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
160
183
  hash[param] = _to_hash(value)
161
184
  end
162
185
  hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 3.1.0
6
+ The version of the OpenAPI document: 3.2.0
7
7
  Contact: opensource@shinesolutions.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.3.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -29,25 +29,38 @@ module SwaggerAemClient
29
29
  # Attribute type mapping.
30
30
  def self.openapi_types
31
31
  {
32
- :'finished' => :'BOOLEAN',
32
+ :'finished' => :'Boolean',
33
33
  :'item_count' => :'Integer'
34
34
  }
35
35
  end
36
36
 
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
37
43
  # Initializes the object
38
44
  # @param [Hash] attributes Model attributes in the form of hash
39
45
  def initialize(attributes = {})
40
- return unless attributes.is_a?(Hash)
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::InstallStatusStatus` initialize method"
48
+ end
41
49
 
42
- # convert string to symbol for hash key
43
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::InstallStatusStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
44
57
 
45
- if attributes.has_key?(:'finished')
58
+ if attributes.key?(:'finished')
46
59
  self.finished = attributes[:'finished']
47
60
  end
48
61
 
49
- if attributes.has_key?(:'itemCount')
50
- self.item_count = attributes[:'itemCount']
62
+ if attributes.key?(:'item_count')
63
+ self.item_count = attributes[:'item_count']
51
64
  end
52
65
  end
53
66
 
@@ -80,11 +93,18 @@ module SwaggerAemClient
80
93
  end
81
94
 
82
95
  # Calculates hash code according to all attributes.
83
- # @return [Fixnum] Hash code
96
+ # @return [Integer] Hash code
84
97
  def hash
85
98
  [finished, item_count].hash
86
99
  end
87
100
 
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
88
108
  # Builds the object from hash
89
109
  # @param [Hash] attributes Model attributes in the form of hash
90
110
  # @return [Object] Returns the model itself
@@ -92,7 +112,7 @@ module SwaggerAemClient
92
112
  return nil unless attributes.is_a?(Hash)
93
113
  self.class.openapi_types.each_pair do |key, type|
94
114
  if type =~ /\AArray<(.*)>/i
95
- # check to ensure the input is an array given that the the attribute
115
+ # check to ensure the input is an array given that the attribute
96
116
  # is documented as an array but the input is not
97
117
  if attributes[self.class.attribute_map[key]].is_a?(Array)
98
118
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -121,7 +141,7 @@ module SwaggerAemClient
121
141
  value.to_i
122
142
  when :Float
123
143
  value.to_f
124
- when :BOOLEAN
144
+ when :Boolean
125
145
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
146
  true
127
147
  else
@@ -142,8 +162,7 @@ module SwaggerAemClient
142
162
  end
143
163
  end
144
164
  else # model
145
- temp_model = SwaggerAemClient.const_get(type).new
146
- temp_model.build_from_hash(value)
165
+ SwaggerAemClient.const_get(type).build_from_hash(value)
147
166
  end
148
167
  end
149
168
 
@@ -165,7 +184,11 @@ module SwaggerAemClient
165
184
  hash = {}
166
185
  self.class.attribute_map.each_pair do |attr, param|
167
186
  value = self.send(attr)
168
- next if value.nil?
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
169
192
  hash[param] = _to_hash(value)
170
193
  end
171
194
  hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 3.1.0
6
+ The version of the OpenAPI document: 3.2.0
7
7
  Contact: opensource@shinesolutions.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.3.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -51,32 +51,45 @@ module SwaggerAemClient
51
51
  }
52
52
  end
53
53
 
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
54
60
  # Initializes the object
55
61
  # @param [Hash] attributes Model attributes in the form of hash
56
62
  def initialize(attributes = {})
57
- return unless attributes.is_a?(Hash)
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::KeystoreChainItems` initialize method"
65
+ end
58
66
 
59
- # convert string to symbol for hash key
60
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::KeystoreChainItems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
61
74
 
62
- if attributes.has_key?(:'subject')
75
+ if attributes.key?(:'subject')
63
76
  self.subject = attributes[:'subject']
64
77
  end
65
78
 
66
- if attributes.has_key?(:'issuer')
79
+ if attributes.key?(:'issuer')
67
80
  self.issuer = attributes[:'issuer']
68
81
  end
69
82
 
70
- if attributes.has_key?(:'notBefore')
71
- self.not_before = attributes[:'notBefore']
83
+ if attributes.key?(:'not_before')
84
+ self.not_before = attributes[:'not_before']
72
85
  end
73
86
 
74
- if attributes.has_key?(:'notAfter')
75
- self.not_after = attributes[:'notAfter']
87
+ if attributes.key?(:'not_after')
88
+ self.not_after = attributes[:'not_after']
76
89
  end
77
90
 
78
- if attributes.has_key?(:'serialNumber')
79
- self.serial_number = attributes[:'serialNumber']
91
+ if attributes.key?(:'serial_number')
92
+ self.serial_number = attributes[:'serial_number']
80
93
  end
81
94
  end
82
95
 
@@ -112,11 +125,18 @@ module SwaggerAemClient
112
125
  end
113
126
 
114
127
  # Calculates hash code according to all attributes.
115
- # @return [Fixnum] Hash code
128
+ # @return [Integer] Hash code
116
129
  def hash
117
130
  [subject, issuer, not_before, not_after, serial_number].hash
118
131
  end
119
132
 
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ new.build_from_hash(attributes)
138
+ end
139
+
120
140
  # Builds the object from hash
121
141
  # @param [Hash] attributes Model attributes in the form of hash
122
142
  # @return [Object] Returns the model itself
@@ -124,7 +144,7 @@ module SwaggerAemClient
124
144
  return nil unless attributes.is_a?(Hash)
125
145
  self.class.openapi_types.each_pair do |key, type|
126
146
  if type =~ /\AArray<(.*)>/i
127
- # check to ensure the input is an array given that the the attribute
147
+ # check to ensure the input is an array given that the attribute
128
148
  # is documented as an array but the input is not
129
149
  if attributes[self.class.attribute_map[key]].is_a?(Array)
130
150
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -153,7 +173,7 @@ module SwaggerAemClient
153
173
  value.to_i
154
174
  when :Float
155
175
  value.to_f
156
- when :BOOLEAN
176
+ when :Boolean
157
177
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
178
  true
159
179
  else
@@ -174,8 +194,7 @@ module SwaggerAemClient
174
194
  end
175
195
  end
176
196
  else # model
177
- temp_model = SwaggerAemClient.const_get(type).new
178
- temp_model.build_from_hash(value)
197
+ SwaggerAemClient.const_get(type).build_from_hash(value)
179
198
  end
180
199
  end
181
200
 
@@ -197,7 +216,11 @@ module SwaggerAemClient
197
216
  hash = {}
198
217
  self.class.attribute_map.each_pair do |attr, param|
199
218
  value = self.send(attr)
200
- next if value.nil?
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
201
224
  hash[param] = _to_hash(value)
202
225
  end
203
226
  hash