swagger_aem 2.5.0 → 3.4.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +47 -46
  4. data/README.md +20 -9
  5. data/Rakefile +2 -0
  6. data/docs/ConsoleApi.md +107 -58
  7. data/docs/CqApi.md +14 -13
  8. data/docs/CrxApi.md +60 -60
  9. data/docs/CustomApi.md +27 -24
  10. data/docs/GraniteApi.md +75 -0
  11. data/docs/InlineObject.md +17 -0
  12. data/docs/InlineObject1.md +17 -0
  13. data/docs/InlineObject2.md +17 -0
  14. data/docs/InlineObject3.md +17 -0
  15. data/docs/InlineObject4.md +21 -0
  16. data/docs/InlineObject5.md +19 -0
  17. data/docs/InstallStatus.md +9 -0
  18. data/docs/InstallStatusStatus.md +11 -1
  19. data/docs/KeystoreChainItems.md +13 -0
  20. data/docs/KeystoreInfo.md +11 -1
  21. data/docs/KeystoreItems.md +13 -0
  22. data/docs/SamlConfigurationInfo.md +15 -1
  23. data/docs/SamlConfigurationProperties.md +56 -24
  24. data/docs/SamlConfigurationPropertyItemsArray.md +16 -2
  25. data/docs/SamlConfigurationPropertyItemsBoolean.md +17 -3
  26. data/docs/SamlConfigurationPropertyItemsLong.md +17 -3
  27. data/docs/SamlConfigurationPropertyItemsString.md +17 -3
  28. data/docs/SlingApi.md +482 -445
  29. data/docs/TruststoreInfo.md +11 -1
  30. data/docs/TruststoreItems.md +15 -0
  31. data/git_push.sh +11 -8
  32. data/lib/swagger_aem.rb +10 -3
  33. data/lib/swagger_aem/api/console_api.rb +160 -91
  34. data/lib/swagger_aem/api/cq_api.rb +49 -41
  35. data/lib/swagger_aem/api/crx_api.rb +170 -135
  36. data/lib/swagger_aem/api/custom_api.rb +68 -56
  37. data/lib/swagger_aem/api/granite_api.rb +124 -0
  38. data/lib/swagger_aem/api/sling_api.rb +900 -720
  39. data/lib/swagger_aem/api_client.rb +53 -54
  40. data/lib/swagger_aem/api_error.rb +22 -3
  41. data/lib/swagger_aem/configuration.rb +49 -10
  42. data/lib/swagger_aem/models/inline_object.rb +206 -0
  43. data/lib/swagger_aem/models/inline_object1.rb +206 -0
  44. data/lib/swagger_aem/models/inline_object2.rb +206 -0
  45. data/lib/swagger_aem/models/inline_object3.rb +206 -0
  46. data/lib/swagger_aem/models/inline_object4.rb +224 -0
  47. data/lib/swagger_aem/models/inline_object5.rb +215 -0
  48. data/lib/swagger_aem/models/install_status.rb +43 -25
  49. data/lib/swagger_aem/models/install_status_status.rb +46 -28
  50. data/lib/swagger_aem/models/keystore_chain_items.rb +50 -32
  51. data/lib/swagger_aem/models/keystore_info.rb +45 -27
  52. data/lib/swagger_aem/models/keystore_items.rb +49 -31
  53. data/lib/swagger_aem/models/saml_configuration_info.rb +49 -31
  54. data/lib/swagger_aem/models/saml_configuration_properties.rb +114 -168
  55. data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +50 -32
  56. data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +56 -38
  57. data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +56 -38
  58. data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +56 -38
  59. data/lib/swagger_aem/models/truststore_info.rb +45 -27
  60. data/lib/swagger_aem/models/truststore_items.rb +54 -36
  61. data/lib/swagger_aem/version.rb +4 -4
  62. data/spec/api/console_api_spec.rb +17 -16
  63. data/spec/api/cq_api_spec.rb +6 -10
  64. data/spec/api/crx_api_spec.rb +11 -25
  65. data/spec/api/custom_api_spec.rb +7 -13
  66. data/spec/api/granite_api_spec.rb +52 -0
  67. data/spec/api/sling_api_spec.rb +32 -88
  68. data/spec/api_client_spec.rb +37 -37
  69. data/spec/configuration_spec.rb +11 -11
  70. data/spec/models/inline_object1_spec.rb +41 -0
  71. data/spec/models/inline_object2_spec.rb +41 -0
  72. data/spec/models/inline_object3_spec.rb +41 -0
  73. data/spec/models/inline_object4_spec.rb +53 -0
  74. data/spec/models/inline_object5_spec.rb +47 -0
  75. data/spec/models/inline_object_spec.rb +41 -0
  76. data/spec/models/install_status_spec.rb +5 -6
  77. data/spec/models/install_status_status_spec.rb +6 -7
  78. data/spec/models/keystore_chain_items_spec.rb +9 -10
  79. data/spec/models/keystore_info_spec.rb +6 -7
  80. data/spec/models/keystore_items_spec.rb +9 -10
  81. data/spec/models/saml_configuration_info_spec.rb +10 -11
  82. data/spec/models/saml_configuration_properties_spec.rb +28 -29
  83. data/spec/models/saml_configuration_property_items_array_spec.rb +10 -11
  84. data/spec/models/saml_configuration_property_items_boolean_spec.rb +11 -12
  85. data/spec/models/saml_configuration_property_items_long_spec.rb +11 -12
  86. data/spec/models/saml_configuration_property_items_string_spec.rb +11 -12
  87. data/spec/models/truststore_info_spec.rb +6 -7
  88. data/spec/models/truststore_items_spec.rb +11 -12
  89. data/spec/spec_helper.rb +3 -3
  90. data/swagger_aem.gemspec +8 -14
  91. metadata +36 -128
@@ -3,17 +3,16 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module SwaggerAemClient
16
-
17
16
  class SamlConfigurationPropertyItemsArray
18
17
  # property name
19
18
  attr_accessor :name
@@ -33,7 +32,6 @@ module SwaggerAemClient
33
32
  # Property description
34
33
  attr_accessor :description
35
34
 
36
-
37
35
  # Attribute mapping from ruby-style variable name to JSON key.
38
36
  def self.attribute_map
39
37
  {
@@ -47,64 +45,76 @@ module SwaggerAemClient
47
45
  end
48
46
 
49
47
  # Attribute type mapping.
50
- def self.swagger_types
48
+ def self.openapi_types
51
49
  {
52
50
  :'name' => :'String',
53
- :'optional' => :'BOOLEAN',
54
- :'is_set' => :'BOOLEAN',
51
+ :'optional' => :'Boolean',
52
+ :'is_set' => :'Boolean',
55
53
  :'type' => :'Integer',
56
54
  :'values' => :'Array<String>',
57
55
  :'description' => :'String'
58
56
  }
59
57
  end
60
58
 
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
61
65
  # Initializes the object
62
66
  # @param [Hash] attributes Model attributes in the form of hash
63
67
  def initialize(attributes = {})
64
- return unless attributes.is_a?(Hash)
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::SamlConfigurationPropertyItemsArray` initialize method"
70
+ end
65
71
 
66
- # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationPropertyItemsArray`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
68
79
 
69
- if attributes.has_key?(:'name')
80
+ if attributes.key?(:'name')
70
81
  self.name = attributes[:'name']
71
82
  end
72
83
 
73
- if attributes.has_key?(:'optional')
84
+ if attributes.key?(:'optional')
74
85
  self.optional = attributes[:'optional']
75
86
  end
76
87
 
77
- if attributes.has_key?(:'is_set')
88
+ if attributes.key?(:'is_set')
78
89
  self.is_set = attributes[:'is_set']
79
90
  end
80
91
 
81
- if attributes.has_key?(:'type')
92
+ if attributes.key?(:'type')
82
93
  self.type = attributes[:'type']
83
94
  end
84
95
 
85
- if attributes.has_key?(:'values')
96
+ if attributes.key?(:'values')
86
97
  if (value = attributes[:'values']).is_a?(Array)
87
98
  self.values = value
88
99
  end
89
100
  end
90
101
 
91
- if attributes.has_key?(:'description')
102
+ if attributes.key?(:'description')
92
103
  self.description = attributes[:'description']
93
104
  end
94
-
95
105
  end
96
106
 
97
107
  # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properies with the reasons
108
+ # @return Array for valid properties with the reasons
99
109
  def list_invalid_properties
100
110
  invalid_properties = Array.new
101
- return invalid_properties
111
+ invalid_properties
102
112
  end
103
113
 
104
114
  # Check to see if the all the properties in the model are valid
105
115
  # @return true if the model is valid
106
116
  def valid?
107
- return true
117
+ true
108
118
  end
109
119
 
110
120
  # Checks equality by comparing each attribute.
@@ -127,22 +137,29 @@ module SwaggerAemClient
127
137
  end
128
138
 
129
139
  # Calculates hash code according to all attributes.
130
- # @return [Fixnum] Hash code
140
+ # @return [Integer] Hash code
131
141
  def hash
132
142
  [name, optional, is_set, type, values, description].hash
133
143
  end
134
144
 
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
135
152
  # Builds the object from hash
136
153
  # @param [Hash] attributes Model attributes in the form of hash
137
154
  # @return [Object] Returns the model itself
138
155
  def build_from_hash(attributes)
139
156
  return nil unless attributes.is_a?(Hash)
140
- self.class.swagger_types.each_pair do |key, type|
157
+ self.class.openapi_types.each_pair do |key, type|
141
158
  if type =~ /\AArray<(.*)>/i
142
- # check to ensure the input is an array given that the the attribute
159
+ # check to ensure the input is an array given that the attribute
143
160
  # is documented as an array but the input is not
144
161
  if attributes[self.class.attribute_map[key]].is_a?(Array)
145
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
163
  end
147
164
  elsif !attributes[self.class.attribute_map[key]].nil?
148
165
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -168,7 +185,7 @@ module SwaggerAemClient
168
185
  value.to_i
169
186
  when :Float
170
187
  value.to_f
171
- when :BOOLEAN
188
+ when :Boolean
172
189
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
190
  true
174
191
  else
@@ -189,8 +206,7 @@ module SwaggerAemClient
189
206
  end
190
207
  end
191
208
  else # model
192
- temp_model = SwaggerAemClient.const_get(type).new
193
- temp_model.build_from_hash(value)
209
+ SwaggerAemClient.const_get(type).build_from_hash(value)
194
210
  end
195
211
  end
196
212
 
@@ -212,7 +228,11 @@ module SwaggerAemClient
212
228
  hash = {}
213
229
  self.class.attribute_map.each_pair do |attr, param|
214
230
  value = self.send(attr)
215
- next if value.nil?
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
216
236
  hash[param] = _to_hash(value)
217
237
  end
218
238
  hash
@@ -224,7 +244,7 @@ module SwaggerAemClient
224
244
  # @return [Hash] Returns the value in the form of hash
225
245
  def _to_hash(value)
226
246
  if value.is_a?(Array)
227
- value.compact.map{ |v| _to_hash(v) }
247
+ value.compact.map { |v| _to_hash(v) }
228
248
  elsif value.is_a?(Hash)
229
249
  {}.tap do |hash|
230
250
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -235,7 +255,5 @@ module SwaggerAemClient
235
255
  value
236
256
  end
237
257
  end
238
-
239
258
  end
240
-
241
259
  end
@@ -3,17 +3,16 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module SwaggerAemClient
16
-
17
16
  class SamlConfigurationPropertyItemsBoolean
18
17
  # property name
19
18
  attr_accessor :name
@@ -28,12 +27,11 @@ module SwaggerAemClient
28
27
  attr_accessor :type
29
28
 
30
29
  # Property value
31
- attr_accessor :values
30
+ attr_accessor :value
32
31
 
33
32
  # Property description
34
33
  attr_accessor :description
35
34
 
36
-
37
35
  # Attribute mapping from ruby-style variable name to JSON key.
38
36
  def self.attribute_map
39
37
  {
@@ -41,68 +39,80 @@ module SwaggerAemClient
41
39
  :'optional' => :'optional',
42
40
  :'is_set' => :'is_set',
43
41
  :'type' => :'type',
44
- :'values' => :'values',
42
+ :'value' => :'value',
45
43
  :'description' => :'description'
46
44
  }
47
45
  end
48
46
 
49
47
  # Attribute type mapping.
50
- def self.swagger_types
48
+ def self.openapi_types
51
49
  {
52
50
  :'name' => :'String',
53
- :'optional' => :'BOOLEAN',
54
- :'is_set' => :'BOOLEAN',
51
+ :'optional' => :'Boolean',
52
+ :'is_set' => :'Boolean',
55
53
  :'type' => :'Integer',
56
- :'values' => :'BOOLEAN',
54
+ :'value' => :'Boolean',
57
55
  :'description' => :'String'
58
56
  }
59
57
  end
60
58
 
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
61
65
  # Initializes the object
62
66
  # @param [Hash] attributes Model attributes in the form of hash
63
67
  def initialize(attributes = {})
64
- return unless attributes.is_a?(Hash)
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::SamlConfigurationPropertyItemsBoolean` initialize method"
70
+ end
65
71
 
66
- # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationPropertyItemsBoolean`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
68
79
 
69
- if attributes.has_key?(:'name')
80
+ if attributes.key?(:'name')
70
81
  self.name = attributes[:'name']
71
82
  end
72
83
 
73
- if attributes.has_key?(:'optional')
84
+ if attributes.key?(:'optional')
74
85
  self.optional = attributes[:'optional']
75
86
  end
76
87
 
77
- if attributes.has_key?(:'is_set')
88
+ if attributes.key?(:'is_set')
78
89
  self.is_set = attributes[:'is_set']
79
90
  end
80
91
 
81
- if attributes.has_key?(:'type')
92
+ if attributes.key?(:'type')
82
93
  self.type = attributes[:'type']
83
94
  end
84
95
 
85
- if attributes.has_key?(:'values')
86
- self.values = attributes[:'values']
96
+ if attributes.key?(:'value')
97
+ self.value = attributes[:'value']
87
98
  end
88
99
 
89
- if attributes.has_key?(:'description')
100
+ if attributes.key?(:'description')
90
101
  self.description = attributes[:'description']
91
102
  end
92
-
93
103
  end
94
104
 
95
105
  # Show invalid properties with the reasons. Usually used together with valid?
96
- # @return Array for valid properies with the reasons
106
+ # @return Array for valid properties with the reasons
97
107
  def list_invalid_properties
98
108
  invalid_properties = Array.new
99
- return invalid_properties
109
+ invalid_properties
100
110
  end
101
111
 
102
112
  # Check to see if the all the properties in the model are valid
103
113
  # @return true if the model is valid
104
114
  def valid?
105
- return true
115
+ true
106
116
  end
107
117
 
108
118
  # Checks equality by comparing each attribute.
@@ -114,7 +124,7 @@ module SwaggerAemClient
114
124
  optional == o.optional &&
115
125
  is_set == o.is_set &&
116
126
  type == o.type &&
117
- values == o.values &&
127
+ value == o.value &&
118
128
  description == o.description
119
129
  end
120
130
 
@@ -125,9 +135,16 @@ module SwaggerAemClient
125
135
  end
126
136
 
127
137
  # Calculates hash code according to all attributes.
128
- # @return [Fixnum] Hash code
138
+ # @return [Integer] Hash code
129
139
  def hash
130
- [name, optional, is_set, type, values, description].hash
140
+ [name, optional, is_set, type, value, description].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
131
148
  end
132
149
 
133
150
  # Builds the object from hash
@@ -135,12 +152,12 @@ module SwaggerAemClient
135
152
  # @return [Object] Returns the model itself
136
153
  def build_from_hash(attributes)
137
154
  return nil unless attributes.is_a?(Hash)
138
- self.class.swagger_types.each_pair do |key, type|
155
+ self.class.openapi_types.each_pair do |key, type|
139
156
  if type =~ /\AArray<(.*)>/i
140
- # check to ensure the input is an array given that the the attribute
157
+ # check to ensure the input is an array given that the attribute
141
158
  # is documented as an array but the input is not
142
159
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
160
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
161
  end
145
162
  elsif !attributes[self.class.attribute_map[key]].nil?
146
163
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -166,7 +183,7 @@ module SwaggerAemClient
166
183
  value.to_i
167
184
  when :Float
168
185
  value.to_f
169
- when :BOOLEAN
186
+ when :Boolean
170
187
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
188
  true
172
189
  else
@@ -187,8 +204,7 @@ module SwaggerAemClient
187
204
  end
188
205
  end
189
206
  else # model
190
- temp_model = SwaggerAemClient.const_get(type).new
191
- temp_model.build_from_hash(value)
207
+ SwaggerAemClient.const_get(type).build_from_hash(value)
192
208
  end
193
209
  end
194
210
 
@@ -210,7 +226,11 @@ module SwaggerAemClient
210
226
  hash = {}
211
227
  self.class.attribute_map.each_pair do |attr, param|
212
228
  value = self.send(attr)
213
- next if value.nil?
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
214
234
  hash[param] = _to_hash(value)
215
235
  end
216
236
  hash
@@ -222,7 +242,7 @@ module SwaggerAemClient
222
242
  # @return [Hash] Returns the value in the form of hash
223
243
  def _to_hash(value)
224
244
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
245
+ value.compact.map { |v| _to_hash(v) }
226
246
  elsif value.is_a?(Hash)
227
247
  {}.tap do |hash|
228
248
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -233,7 +253,5 @@ module SwaggerAemClient
233
253
  value
234
254
  end
235
255
  end
236
-
237
256
  end
238
-
239
257
  end
@@ -3,17 +3,16 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module SwaggerAemClient
16
-
17
16
  class SamlConfigurationPropertyItemsLong
18
17
  # property name
19
18
  attr_accessor :name
@@ -28,12 +27,11 @@ module SwaggerAemClient
28
27
  attr_accessor :type
29
28
 
30
29
  # Property value
31
- attr_accessor :values
30
+ attr_accessor :value
32
31
 
33
32
  # Property description
34
33
  attr_accessor :description
35
34
 
36
-
37
35
  # Attribute mapping from ruby-style variable name to JSON key.
38
36
  def self.attribute_map
39
37
  {
@@ -41,68 +39,80 @@ module SwaggerAemClient
41
39
  :'optional' => :'optional',
42
40
  :'is_set' => :'is_set',
43
41
  :'type' => :'type',
44
- :'values' => :'values',
42
+ :'value' => :'value',
45
43
  :'description' => :'description'
46
44
  }
47
45
  end
48
46
 
49
47
  # Attribute type mapping.
50
- def self.swagger_types
48
+ def self.openapi_types
51
49
  {
52
50
  :'name' => :'String',
53
- :'optional' => :'BOOLEAN',
54
- :'is_set' => :'BOOLEAN',
51
+ :'optional' => :'Boolean',
52
+ :'is_set' => :'Boolean',
55
53
  :'type' => :'Integer',
56
- :'values' => :'Integer',
54
+ :'value' => :'Integer',
57
55
  :'description' => :'String'
58
56
  }
59
57
  end
60
58
 
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
61
65
  # Initializes the object
62
66
  # @param [Hash] attributes Model attributes in the form of hash
63
67
  def initialize(attributes = {})
64
- return unless attributes.is_a?(Hash)
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::SamlConfigurationPropertyItemsLong` initialize method"
70
+ end
65
71
 
66
- # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationPropertyItemsLong`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
68
79
 
69
- if attributes.has_key?(:'name')
80
+ if attributes.key?(:'name')
70
81
  self.name = attributes[:'name']
71
82
  end
72
83
 
73
- if attributes.has_key?(:'optional')
84
+ if attributes.key?(:'optional')
74
85
  self.optional = attributes[:'optional']
75
86
  end
76
87
 
77
- if attributes.has_key?(:'is_set')
88
+ if attributes.key?(:'is_set')
78
89
  self.is_set = attributes[:'is_set']
79
90
  end
80
91
 
81
- if attributes.has_key?(:'type')
92
+ if attributes.key?(:'type')
82
93
  self.type = attributes[:'type']
83
94
  end
84
95
 
85
- if attributes.has_key?(:'values')
86
- self.values = attributes[:'values']
96
+ if attributes.key?(:'value')
97
+ self.value = attributes[:'value']
87
98
  end
88
99
 
89
- if attributes.has_key?(:'description')
100
+ if attributes.key?(:'description')
90
101
  self.description = attributes[:'description']
91
102
  end
92
-
93
103
  end
94
104
 
95
105
  # Show invalid properties with the reasons. Usually used together with valid?
96
- # @return Array for valid properies with the reasons
106
+ # @return Array for valid properties with the reasons
97
107
  def list_invalid_properties
98
108
  invalid_properties = Array.new
99
- return invalid_properties
109
+ invalid_properties
100
110
  end
101
111
 
102
112
  # Check to see if the all the properties in the model are valid
103
113
  # @return true if the model is valid
104
114
  def valid?
105
- return true
115
+ true
106
116
  end
107
117
 
108
118
  # Checks equality by comparing each attribute.
@@ -114,7 +124,7 @@ module SwaggerAemClient
114
124
  optional == o.optional &&
115
125
  is_set == o.is_set &&
116
126
  type == o.type &&
117
- values == o.values &&
127
+ value == o.value &&
118
128
  description == o.description
119
129
  end
120
130
 
@@ -125,9 +135,16 @@ module SwaggerAemClient
125
135
  end
126
136
 
127
137
  # Calculates hash code according to all attributes.
128
- # @return [Fixnum] Hash code
138
+ # @return [Integer] Hash code
129
139
  def hash
130
- [name, optional, is_set, type, values, description].hash
140
+ [name, optional, is_set, type, value, description].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
131
148
  end
132
149
 
133
150
  # Builds the object from hash
@@ -135,12 +152,12 @@ module SwaggerAemClient
135
152
  # @return [Object] Returns the model itself
136
153
  def build_from_hash(attributes)
137
154
  return nil unless attributes.is_a?(Hash)
138
- self.class.swagger_types.each_pair do |key, type|
155
+ self.class.openapi_types.each_pair do |key, type|
139
156
  if type =~ /\AArray<(.*)>/i
140
- # check to ensure the input is an array given that the the attribute
157
+ # check to ensure the input is an array given that the attribute
141
158
  # is documented as an array but the input is not
142
159
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
160
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
161
  end
145
162
  elsif !attributes[self.class.attribute_map[key]].nil?
146
163
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -166,7 +183,7 @@ module SwaggerAemClient
166
183
  value.to_i
167
184
  when :Float
168
185
  value.to_f
169
- when :BOOLEAN
186
+ when :Boolean
170
187
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
188
  true
172
189
  else
@@ -187,8 +204,7 @@ module SwaggerAemClient
187
204
  end
188
205
  end
189
206
  else # model
190
- temp_model = SwaggerAemClient.const_get(type).new
191
- temp_model.build_from_hash(value)
207
+ SwaggerAemClient.const_get(type).build_from_hash(value)
192
208
  end
193
209
  end
194
210
 
@@ -210,7 +226,11 @@ module SwaggerAemClient
210
226
  hash = {}
211
227
  self.class.attribute_map.each_pair do |attr, param|
212
228
  value = self.send(attr)
213
- next if value.nil?
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
214
234
  hash[param] = _to_hash(value)
215
235
  end
216
236
  hash
@@ -222,7 +242,7 @@ module SwaggerAemClient
222
242
  # @return [Hash] Returns the value in the form of hash
223
243
  def _to_hash(value)
224
244
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
245
+ value.compact.map { |v| _to_hash(v) }
226
246
  elsif value.is_a?(Hash)
227
247
  {}.tap do |hash|
228
248
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -233,7 +253,5 @@ module SwaggerAemClient
233
253
  value
234
254
  end
235
255
  end
236
-
237
256
  end
238
-
239
257
  end