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 SamlConfigurationPropertyItemsLong
|
|
17
|
+
class SamlConfigurationPropertyItemsLong < 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::SamlConfigurationPropertyItemsLong`. 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::SamlConfigurationPropertyItemsLong`. 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
|
|
@@ -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 SamlConfigurationPropertyItemsString
|
|
17
|
+
class SamlConfigurationPropertyItemsString < 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::SamlConfigurationPropertyItemsString`. 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::SamlConfigurationPropertyItemsString`. 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
|
|
@@ -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 TruststoreInfo
|
|
17
|
+
class TruststoreInfo < ApiModelBase
|
|
17
18
|
attr_accessor :aliases
|
|
18
19
|
|
|
19
20
|
# False if truststore don't exist
|
|
@@ -27,6 +28,16 @@ module SwaggerAemClient
|
|
|
27
28
|
}
|
|
28
29
|
end
|
|
29
30
|
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
30
41
|
# Attribute type mapping.
|
|
31
42
|
def self.openapi_types
|
|
32
43
|
{
|
|
@@ -49,9 +60,10 @@ module SwaggerAemClient
|
|
|
49
60
|
end
|
|
50
61
|
|
|
51
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
52
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
53
|
-
if (!
|
|
54
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::TruststoreInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::TruststoreInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
55
67
|
end
|
|
56
68
|
h[k.to_sym] = v
|
|
57
69
|
}
|
|
@@ -70,6 +82,7 @@ module SwaggerAemClient
|
|
|
70
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
83
|
# @return Array for valid properties with the reasons
|
|
72
84
|
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
73
86
|
invalid_properties = Array.new
|
|
74
87
|
invalid_properties
|
|
75
88
|
end
|
|
@@ -77,6 +90,7 @@ module SwaggerAemClient
|
|
|
77
90
|
# Check to see if the all the properties in the model are valid
|
|
78
91
|
# @return true if the model is valid
|
|
79
92
|
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
80
94
|
true
|
|
81
95
|
end
|
|
82
96
|
|
|
@@ -105,80 +119,23 @@ module SwaggerAemClient
|
|
|
105
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
120
|
# @return [Object] Returns the model itself
|
|
107
121
|
def self.build_from_hash(attributes)
|
|
108
|
-
new.build_from_hash(attributes)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# Builds the object from hash
|
|
112
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
-
# @return [Object] Returns the model itself
|
|
114
|
-
def build_from_hash(attributes)
|
|
115
122
|
return nil unless attributes.is_a?(Hash)
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
129
|
# check to ensure the input is an array given that the attribute
|
|
119
130
|
# is documented as an array but the input is not
|
|
120
|
-
if attributes[
|
|
121
|
-
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
133
|
end
|
|
123
|
-
elsif !attributes[
|
|
124
|
-
|
|
125
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
self
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
# Deserializes the data based on type
|
|
132
|
-
# @param string type Data type
|
|
133
|
-
# @param string value Value to be deserialized
|
|
134
|
-
# @return [Object] Deserialized data
|
|
135
|
-
def _deserialize(type, value)
|
|
136
|
-
case type.to_sym
|
|
137
|
-
when :DateTime
|
|
138
|
-
DateTime.parse(value)
|
|
139
|
-
when :Date
|
|
140
|
-
Date.parse(value)
|
|
141
|
-
when :String
|
|
142
|
-
value.to_s
|
|
143
|
-
when :Integer
|
|
144
|
-
value.to_i
|
|
145
|
-
when :Float
|
|
146
|
-
value.to_f
|
|
147
|
-
when :Boolean
|
|
148
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
-
true
|
|
150
|
-
else
|
|
151
|
-
false
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
136
|
end
|
|
153
|
-
when :Object
|
|
154
|
-
# generic object (usually a Hash), return directly
|
|
155
|
-
value
|
|
156
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
-
k_type = Regexp.last_match[:k_type]
|
|
161
|
-
v_type = Regexp.last_match[:v_type]
|
|
162
|
-
{}.tap do |hash|
|
|
163
|
-
value.each do |k, v|
|
|
164
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
else # model
|
|
168
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
169
137
|
end
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
# Returns the string representation of the object
|
|
173
|
-
# @return [String] String presentation of the object
|
|
174
|
-
def to_s
|
|
175
|
-
to_hash.to_s
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
179
|
-
# @return [Hash] Returns the object in the form of hash
|
|
180
|
-
def to_body
|
|
181
|
-
to_hash
|
|
138
|
+
new(transformed_hash)
|
|
182
139
|
end
|
|
183
140
|
|
|
184
141
|
# Returns the object in the form of hash
|
|
@@ -191,28 +148,12 @@ module SwaggerAemClient
|
|
|
191
148
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
149
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
150
|
end
|
|
194
|
-
|
|
151
|
+
|
|
195
152
|
hash[param] = _to_hash(value)
|
|
196
153
|
end
|
|
197
154
|
hash
|
|
198
155
|
end
|
|
199
156
|
|
|
200
|
-
# Outputs non-array value in the form of hash
|
|
201
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
-
# @param [Object] value Any valid value
|
|
203
|
-
# @return [Hash] Returns the value in the form of hash
|
|
204
|
-
def _to_hash(value)
|
|
205
|
-
if value.is_a?(Array)
|
|
206
|
-
value.compact.map { |v| _to_hash(v) }
|
|
207
|
-
elsif value.is_a?(Hash)
|
|
208
|
-
{}.tap do |hash|
|
|
209
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
-
end
|
|
211
|
-
elsif value.respond_to? :to_hash
|
|
212
|
-
value.to_hash
|
|
213
|
-
else
|
|
214
|
-
value
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
157
|
end
|
|
158
|
+
|
|
218
159
|
end
|