swagger_aem 3.8.0 → 4.0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +107 -34
- data/README.md +8 -12
- data/bin/byebug +16 -0
- data/bin/coderay +16 -0
- data/bin/htmldiff +16 -0
- data/bin/ldiff +16 -0
- data/bin/pry +16 -0
- data/bin/racc +16 -0
- data/bin/rake +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/bin/ruby-parse +16 -0
- data/bin/ruby-rewrite +16 -0
- data/docs/BundleData.md +24 -23
- data/docs/BundleDataProp.md +10 -9
- data/docs/BundleInfo.md +12 -11
- data/docs/ConsoleApi.md +188 -79
- data/docs/CqApi.md +52 -16
- data/docs/CrxApi.md +192 -64
- data/docs/CustomApi.md +85 -32
- data/docs/GraniteApi.md +37 -20
- data/docs/InstallStatus.md +8 -7
- data/docs/InstallStatusStatus.md +10 -9
- data/docs/KeystoreChainItems.md +16 -15
- data/docs/KeystoreInfo.md +10 -9
- data/docs/KeystoreItems.md +16 -15
- data/docs/SamlConfigurationInfo.md +18 -17
- data/docs/SamlConfigurationProperties.md +54 -53
- data/docs/SamlConfigurationPropertyItemsArray.md +18 -17
- data/docs/SamlConfigurationPropertyItemsBoolean.md +18 -17
- data/docs/SamlConfigurationPropertyItemsLong.md +18 -17
- data/docs/SamlConfigurationPropertyItemsString.md +18 -17
- data/docs/SlingApi.md +1021 -496
- data/docs/TruststoreInfo.md +10 -9
- data/docs/TruststoreItems.md +20 -19
- data/git_push.sh +3 -4
- data/lib/swagger_aem/api/console_api.rb +33 -27
- data/lib/swagger_aem/api/cq_api.rb +11 -9
- data/lib/swagger_aem/api/crx_api.rb +42 -32
- data/lib/swagger_aem/api/custom_api.rb +15 -12
- data/lib/swagger_aem/api/granite_api.rb +11 -7
- data/lib/swagger_aem/api/sling_api.rb +342 -298
- data/lib/swagger_aem/api_client.rb +73 -64
- data/lib/swagger_aem/api_error.rb +3 -2
- data/lib/swagger_aem/api_model_base.rb +88 -0
- data/lib/swagger_aem/configuration.rb +75 -15
- data/lib/swagger_aem/models/bundle_data.rb +32 -91
- data/lib/swagger_aem/models/bundle_data_prop.rb +32 -91
- data/lib/swagger_aem/models/bundle_info.rb +32 -91
- data/lib/swagger_aem/models/install_status.rb +32 -91
- data/lib/swagger_aem/models/install_status_status.rb +32 -91
- data/lib/swagger_aem/models/keystore_chain_items.rb +32 -91
- data/lib/swagger_aem/models/keystore_info.rb +32 -91
- data/lib/swagger_aem/models/keystore_items.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_info.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_properties.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +32 -91
- data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +32 -91
- data/lib/swagger_aem/models/truststore_info.rb +32 -91
- data/lib/swagger_aem/models/truststore_items.rb +32 -91
- data/lib/swagger_aem/version.rb +3 -3
- data/lib/swagger_aem.rb +3 -8
- data/spec/api/console_api_spec.rb +8 -8
- data/spec/api/cq_api_spec.rb +4 -4
- data/spec/api/crx_api_spec.rb +9 -9
- data/spec/api/custom_api_spec.rb +5 -5
- data/spec/api/granite_api_spec.rb +3 -3
- data/spec/api/sling_api_spec.rb +89 -87
- data/spec/models/bundle_data_prop_spec.rb +8 -6
- data/spec/models/bundle_data_spec.rb +15 -13
- data/spec/models/bundle_info_spec.rb +9 -7
- data/spec/models/install_status_spec.rb +7 -5
- data/spec/models/install_status_status_spec.rb +8 -6
- data/spec/models/keystore_chain_items_spec.rb +11 -9
- data/spec/models/keystore_info_spec.rb +8 -6
- data/spec/models/keystore_items_spec.rb +11 -9
- data/spec/models/saml_configuration_info_spec.rb +12 -10
- data/spec/models/saml_configuration_properties_spec.rb +30 -28
- data/spec/models/saml_configuration_property_items_array_spec.rb +12 -10
- data/spec/models/saml_configuration_property_items_boolean_spec.rb +12 -10
- data/spec/models/saml_configuration_property_items_long_spec.rb +12 -10
- data/spec/models/saml_configuration_property_items_string_spec.rb +12 -10
- data/spec/models/truststore_info_spec.rb +8 -6
- data/spec/models/truststore_items_spec.rb +13 -11
- data/spec/spec_helper.rb +2 -2
- data/swagger_aem.gemspec +4 -4
- metadata +15 -54
- data/docs/InlineObject.md +0 -17
- data/docs/InlineObject1.md +0 -17
- data/docs/InlineObject2.md +0 -17
- data/docs/InlineObject3.md +0 -17
- data/docs/InlineObject4.md +0 -21
- data/docs/InlineObject5.md +0 -19
- data/lib/swagger_aem/models/inline_object.rb +0 -206
- data/lib/swagger_aem/models/inline_object1.rb +0 -206
- data/lib/swagger_aem/models/inline_object2.rb +0 -206
- data/lib/swagger_aem/models/inline_object3.rb +0 -206
- data/lib/swagger_aem/models/inline_object4.rb +0 -224
- data/lib/swagger_aem/models/inline_object5.rb +0 -215
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/inline_object1_spec.rb +0 -41
- data/spec/models/inline_object2_spec.rb +0 -41
- data/spec/models/inline_object3_spec.rb +0 -41
- data/spec/models/inline_object4_spec.rb +0 -53
- data/spec/models/inline_object5_spec.rb +0 -47
- data/spec/models/inline_object_spec.rb +0 -41
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
#Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
Contact: opensource@shinesolutions.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module SwaggerAemClient
|
|
16
|
-
class SamlConfigurationProperties
|
|
17
|
+
class SamlConfigurationProperties < ApiModelBase
|
|
17
18
|
attr_accessor :path
|
|
18
19
|
|
|
19
20
|
attr_accessor :service_ranking
|
|
@@ -92,6 +93,16 @@ module SwaggerAemClient
|
|
|
92
93
|
}
|
|
93
94
|
end
|
|
94
95
|
|
|
96
|
+
# Returns attribute mapping this model knows about
|
|
97
|
+
def self.acceptable_attribute_map
|
|
98
|
+
attribute_map
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Returns all the JSON keys this model knows about
|
|
102
|
+
def self.acceptable_attributes
|
|
103
|
+
acceptable_attribute_map.values
|
|
104
|
+
end
|
|
105
|
+
|
|
95
106
|
# Attribute type mapping.
|
|
96
107
|
def self.openapi_types
|
|
97
108
|
{
|
|
@@ -136,9 +147,10 @@ module SwaggerAemClient
|
|
|
136
147
|
end
|
|
137
148
|
|
|
138
149
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
139
151
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
140
|
-
if (!
|
|
141
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationProperties`. Please check the name to make sure it's valid. List of attributes: " +
|
|
152
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
153
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationProperties`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
142
154
|
end
|
|
143
155
|
h[k.to_sym] = v
|
|
144
156
|
}
|
|
@@ -243,6 +255,7 @@ module SwaggerAemClient
|
|
|
243
255
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
244
256
|
# @return Array for valid properties with the reasons
|
|
245
257
|
def list_invalid_properties
|
|
258
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
246
259
|
invalid_properties = Array.new
|
|
247
260
|
invalid_properties
|
|
248
261
|
end
|
|
@@ -250,6 +263,7 @@ module SwaggerAemClient
|
|
|
250
263
|
# Check to see if the all the properties in the model are valid
|
|
251
264
|
# @return true if the model is valid
|
|
252
265
|
def valid?
|
|
266
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
253
267
|
true
|
|
254
268
|
end
|
|
255
269
|
|
|
@@ -300,80 +314,23 @@ module SwaggerAemClient
|
|
|
300
314
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
301
315
|
# @return [Object] Returns the model itself
|
|
302
316
|
def self.build_from_hash(attributes)
|
|
303
|
-
new.build_from_hash(attributes)
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
# Builds the object from hash
|
|
307
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
308
|
-
# @return [Object] Returns the model itself
|
|
309
|
-
def build_from_hash(attributes)
|
|
310
317
|
return nil unless attributes.is_a?(Hash)
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
319
|
+
transformed_hash = {}
|
|
320
|
+
openapi_types.each_pair do |key, type|
|
|
321
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
322
|
+
transformed_hash["#{key}"] = nil
|
|
323
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
313
324
|
# check to ensure the input is an array given that the attribute
|
|
314
325
|
# is documented as an array but the input is not
|
|
315
|
-
if attributes[
|
|
316
|
-
|
|
326
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
327
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
317
328
|
end
|
|
318
|
-
elsif !attributes[
|
|
319
|
-
|
|
320
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
self
|
|
324
|
-
end
|
|
325
|
-
|
|
326
|
-
# Deserializes the data based on type
|
|
327
|
-
# @param string type Data type
|
|
328
|
-
# @param string value Value to be deserialized
|
|
329
|
-
# @return [Object] Deserialized data
|
|
330
|
-
def _deserialize(type, value)
|
|
331
|
-
case type.to_sym
|
|
332
|
-
when :DateTime
|
|
333
|
-
DateTime.parse(value)
|
|
334
|
-
when :Date
|
|
335
|
-
Date.parse(value)
|
|
336
|
-
when :String
|
|
337
|
-
value.to_s
|
|
338
|
-
when :Integer
|
|
339
|
-
value.to_i
|
|
340
|
-
when :Float
|
|
341
|
-
value.to_f
|
|
342
|
-
when :Boolean
|
|
343
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
344
|
-
true
|
|
345
|
-
else
|
|
346
|
-
false
|
|
329
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
330
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
347
331
|
end
|
|
348
|
-
when :Object
|
|
349
|
-
# generic object (usually a Hash), return directly
|
|
350
|
-
value
|
|
351
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
352
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
353
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
354
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
355
|
-
k_type = Regexp.last_match[:k_type]
|
|
356
|
-
v_type = Regexp.last_match[:v_type]
|
|
357
|
-
{}.tap do |hash|
|
|
358
|
-
value.each do |k, v|
|
|
359
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
else # model
|
|
363
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
364
332
|
end
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
# Returns the string representation of the object
|
|
368
|
-
# @return [String] String presentation of the object
|
|
369
|
-
def to_s
|
|
370
|
-
to_hash.to_s
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
374
|
-
# @return [Hash] Returns the object in the form of hash
|
|
375
|
-
def to_body
|
|
376
|
-
to_hash
|
|
333
|
+
new(transformed_hash)
|
|
377
334
|
end
|
|
378
335
|
|
|
379
336
|
# Returns the object in the form of hash
|
|
@@ -386,28 +343,12 @@ module SwaggerAemClient
|
|
|
386
343
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
387
344
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
388
345
|
end
|
|
389
|
-
|
|
346
|
+
|
|
390
347
|
hash[param] = _to_hash(value)
|
|
391
348
|
end
|
|
392
349
|
hash
|
|
393
350
|
end
|
|
394
351
|
|
|
395
|
-
# Outputs non-array value in the form of hash
|
|
396
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
397
|
-
# @param [Object] value Any valid value
|
|
398
|
-
# @return [Hash] Returns the value in the form of hash
|
|
399
|
-
def _to_hash(value)
|
|
400
|
-
if value.is_a?(Array)
|
|
401
|
-
value.compact.map { |v| _to_hash(v) }
|
|
402
|
-
elsif value.is_a?(Hash)
|
|
403
|
-
{}.tap do |hash|
|
|
404
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
405
|
-
end
|
|
406
|
-
elsif value.respond_to? :to_hash
|
|
407
|
-
value.to_hash
|
|
408
|
-
else
|
|
409
|
-
value
|
|
410
|
-
end
|
|
411
|
-
end
|
|
412
352
|
end
|
|
353
|
+
|
|
413
354
|
end
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
#Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
Contact: opensource@shinesolutions.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module SwaggerAemClient
|
|
16
|
-
class SamlConfigurationPropertyItemsArray
|
|
17
|
+
class SamlConfigurationPropertyItemsArray < ApiModelBase
|
|
17
18
|
# property name
|
|
18
19
|
attr_accessor :name
|
|
19
20
|
|
|
@@ -44,6 +45,16 @@ module SwaggerAemClient
|
|
|
44
45
|
}
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
47
58
|
# Attribute type mapping.
|
|
48
59
|
def self.openapi_types
|
|
49
60
|
{
|
|
@@ -70,9 +81,10 @@ module SwaggerAemClient
|
|
|
70
81
|
end
|
|
71
82
|
|
|
72
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
85
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
-
if (!
|
|
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: " +
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationPropertyItemsArray`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
88
|
end
|
|
77
89
|
h[k.to_sym] = v
|
|
78
90
|
}
|
|
@@ -107,6 +119,7 @@ module SwaggerAemClient
|
|
|
107
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
120
|
# @return Array for valid properties with the reasons
|
|
109
121
|
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
123
|
invalid_properties = Array.new
|
|
111
124
|
invalid_properties
|
|
112
125
|
end
|
|
@@ -114,6 +127,7 @@ module SwaggerAemClient
|
|
|
114
127
|
# Check to see if the all the properties in the model are valid
|
|
115
128
|
# @return true if the model is valid
|
|
116
129
|
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
131
|
true
|
|
118
132
|
end
|
|
119
133
|
|
|
@@ -146,80 +160,23 @@ module SwaggerAemClient
|
|
|
146
160
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
147
161
|
# @return [Object] Returns the model itself
|
|
148
162
|
def self.build_from_hash(attributes)
|
|
149
|
-
new.build_from_hash(attributes)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
# Builds the object from hash
|
|
153
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
-
# @return [Object] Returns the model itself
|
|
155
|
-
def build_from_hash(attributes)
|
|
156
163
|
return nil unless attributes.is_a?(Hash)
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
165
|
+
transformed_hash = {}
|
|
166
|
+
openapi_types.each_pair do |key, type|
|
|
167
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = nil
|
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
159
170
|
# check to ensure the input is an array given that the attribute
|
|
160
171
|
# is documented as an array but the input is not
|
|
161
|
-
if attributes[
|
|
162
|
-
|
|
172
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
173
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
163
174
|
end
|
|
164
|
-
elsif !attributes[
|
|
165
|
-
|
|
166
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
self
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Deserializes the data based on type
|
|
173
|
-
# @param string type Data type
|
|
174
|
-
# @param string value Value to be deserialized
|
|
175
|
-
# @return [Object] Deserialized data
|
|
176
|
-
def _deserialize(type, value)
|
|
177
|
-
case type.to_sym
|
|
178
|
-
when :DateTime
|
|
179
|
-
DateTime.parse(value)
|
|
180
|
-
when :Date
|
|
181
|
-
Date.parse(value)
|
|
182
|
-
when :String
|
|
183
|
-
value.to_s
|
|
184
|
-
when :Integer
|
|
185
|
-
value.to_i
|
|
186
|
-
when :Float
|
|
187
|
-
value.to_f
|
|
188
|
-
when :Boolean
|
|
189
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
190
|
-
true
|
|
191
|
-
else
|
|
192
|
-
false
|
|
175
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
193
177
|
end
|
|
194
|
-
when :Object
|
|
195
|
-
# generic object (usually a Hash), return directly
|
|
196
|
-
value
|
|
197
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
198
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
199
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
200
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
201
|
-
k_type = Regexp.last_match[:k_type]
|
|
202
|
-
v_type = Regexp.last_match[:v_type]
|
|
203
|
-
{}.tap do |hash|
|
|
204
|
-
value.each do |k, v|
|
|
205
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
else # model
|
|
209
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
210
178
|
end
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
# Returns the string representation of the object
|
|
214
|
-
# @return [String] String presentation of the object
|
|
215
|
-
def to_s
|
|
216
|
-
to_hash.to_s
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
220
|
-
# @return [Hash] Returns the object in the form of hash
|
|
221
|
-
def to_body
|
|
222
|
-
to_hash
|
|
179
|
+
new(transformed_hash)
|
|
223
180
|
end
|
|
224
181
|
|
|
225
182
|
# Returns the object in the form of hash
|
|
@@ -232,28 +189,12 @@ module SwaggerAemClient
|
|
|
232
189
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
233
190
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
234
191
|
end
|
|
235
|
-
|
|
192
|
+
|
|
236
193
|
hash[param] = _to_hash(value)
|
|
237
194
|
end
|
|
238
195
|
hash
|
|
239
196
|
end
|
|
240
197
|
|
|
241
|
-
# Outputs non-array value in the form of hash
|
|
242
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
243
|
-
# @param [Object] value Any valid value
|
|
244
|
-
# @return [Hash] Returns the value in the form of hash
|
|
245
|
-
def _to_hash(value)
|
|
246
|
-
if value.is_a?(Array)
|
|
247
|
-
value.compact.map { |v| _to_hash(v) }
|
|
248
|
-
elsif value.is_a?(Hash)
|
|
249
|
-
{}.tap do |hash|
|
|
250
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
251
|
-
end
|
|
252
|
-
elsif value.respond_to? :to_hash
|
|
253
|
-
value.to_hash
|
|
254
|
-
else
|
|
255
|
-
value
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
198
|
end
|
|
199
|
+
|
|
259
200
|
end
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
#Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
Contact: opensource@shinesolutions.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.24.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
|
+
require 'time'
|
|
14
15
|
|
|
15
16
|
module SwaggerAemClient
|
|
16
|
-
class SamlConfigurationPropertyItemsBoolean
|
|
17
|
+
class SamlConfigurationPropertyItemsBoolean < ApiModelBase
|
|
17
18
|
# property name
|
|
18
19
|
attr_accessor :name
|
|
19
20
|
|
|
@@ -44,6 +45,16 @@ module SwaggerAemClient
|
|
|
44
45
|
}
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
47
58
|
# Attribute type mapping.
|
|
48
59
|
def self.openapi_types
|
|
49
60
|
{
|
|
@@ -70,9 +81,10 @@ module SwaggerAemClient
|
|
|
70
81
|
end
|
|
71
82
|
|
|
72
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
85
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
-
if (!
|
|
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: " +
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationPropertyItemsBoolean`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
88
|
end
|
|
77
89
|
h[k.to_sym] = v
|
|
78
90
|
}
|
|
@@ -105,6 +117,7 @@ module SwaggerAemClient
|
|
|
105
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
118
|
# @return Array for valid properties with the reasons
|
|
107
119
|
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
121
|
invalid_properties = Array.new
|
|
109
122
|
invalid_properties
|
|
110
123
|
end
|
|
@@ -112,6 +125,7 @@ module SwaggerAemClient
|
|
|
112
125
|
# Check to see if the all the properties in the model are valid
|
|
113
126
|
# @return true if the model is valid
|
|
114
127
|
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
129
|
true
|
|
116
130
|
end
|
|
117
131
|
|
|
@@ -144,80 +158,23 @@ module SwaggerAemClient
|
|
|
144
158
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
159
|
# @return [Object] Returns the model itself
|
|
146
160
|
def self.build_from_hash(attributes)
|
|
147
|
-
new.build_from_hash(attributes)
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
# Builds the object from hash
|
|
151
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
-
# @return [Object] Returns the model itself
|
|
153
|
-
def build_from_hash(attributes)
|
|
154
161
|
return nil unless attributes.is_a?(Hash)
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
transformed_hash = {}
|
|
164
|
+
openapi_types.each_pair do |key, type|
|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = nil
|
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
157
168
|
# check to ensure the input is an array given that the attribute
|
|
158
169
|
# is documented as an array but the input is not
|
|
159
|
-
if attributes[
|
|
160
|
-
|
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
161
172
|
end
|
|
162
|
-
elsif !attributes[
|
|
163
|
-
|
|
164
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
self
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Deserializes the data based on type
|
|
171
|
-
# @param string type Data type
|
|
172
|
-
# @param string value Value to be deserialized
|
|
173
|
-
# @return [Object] Deserialized data
|
|
174
|
-
def _deserialize(type, value)
|
|
175
|
-
case type.to_sym
|
|
176
|
-
when :DateTime
|
|
177
|
-
DateTime.parse(value)
|
|
178
|
-
when :Date
|
|
179
|
-
Date.parse(value)
|
|
180
|
-
when :String
|
|
181
|
-
value.to_s
|
|
182
|
-
when :Integer
|
|
183
|
-
value.to_i
|
|
184
|
-
when :Float
|
|
185
|
-
value.to_f
|
|
186
|
-
when :Boolean
|
|
187
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
188
|
-
true
|
|
189
|
-
else
|
|
190
|
-
false
|
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
191
175
|
end
|
|
192
|
-
when :Object
|
|
193
|
-
# generic object (usually a Hash), return directly
|
|
194
|
-
value
|
|
195
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
196
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
197
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
198
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
199
|
-
k_type = Regexp.last_match[:k_type]
|
|
200
|
-
v_type = Regexp.last_match[:v_type]
|
|
201
|
-
{}.tap do |hash|
|
|
202
|
-
value.each do |k, v|
|
|
203
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
else # model
|
|
207
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
208
176
|
end
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
# Returns the string representation of the object
|
|
212
|
-
# @return [String] String presentation of the object
|
|
213
|
-
def to_s
|
|
214
|
-
to_hash.to_s
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
218
|
-
# @return [Hash] Returns the object in the form of hash
|
|
219
|
-
def to_body
|
|
220
|
-
to_hash
|
|
177
|
+
new(transformed_hash)
|
|
221
178
|
end
|
|
222
179
|
|
|
223
180
|
# Returns the object in the form of hash
|
|
@@ -230,28 +187,12 @@ module SwaggerAemClient
|
|
|
230
187
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
231
188
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
232
189
|
end
|
|
233
|
-
|
|
190
|
+
|
|
234
191
|
hash[param] = _to_hash(value)
|
|
235
192
|
end
|
|
236
193
|
hash
|
|
237
194
|
end
|
|
238
195
|
|
|
239
|
-
# Outputs non-array value in the form of hash
|
|
240
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
241
|
-
# @param [Object] value Any valid value
|
|
242
|
-
# @return [Hash] Returns the value in the form of hash
|
|
243
|
-
def _to_hash(value)
|
|
244
|
-
if value.is_a?(Array)
|
|
245
|
-
value.compact.map { |v| _to_hash(v) }
|
|
246
|
-
elsif value.is_a?(Hash)
|
|
247
|
-
{}.tap do |hash|
|
|
248
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
249
|
-
end
|
|
250
|
-
elsif value.respond_to? :to_hash
|
|
251
|
-
value.to_hash
|
|
252
|
-
else
|
|
253
|
-
value
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
196
|
end
|
|
197
|
+
|
|
257
198
|
end
|