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 KeystoreInfo
|
|
17
|
+
class KeystoreInfo < 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::KeystoreInfo`. 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::KeystoreInfo`. 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
|
|
@@ -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 KeystoreItems
|
|
17
|
+
class KeystoreItems < ApiModelBase
|
|
17
18
|
# Keystore alias name
|
|
18
19
|
attr_accessor :_alias
|
|
19
20
|
|
|
@@ -39,6 +40,16 @@ module SwaggerAemClient
|
|
|
39
40
|
}
|
|
40
41
|
end
|
|
41
42
|
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
acceptable_attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
42
53
|
# Attribute type mapping.
|
|
43
54
|
def self.openapi_types
|
|
44
55
|
{
|
|
@@ -64,9 +75,10 @@ module SwaggerAemClient
|
|
|
64
75
|
end
|
|
65
76
|
|
|
66
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
-
if (!
|
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::KeystoreItems`. Please check the name to make sure it's valid. List of attributes: " +
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::KeystoreItems`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
82
|
end
|
|
71
83
|
h[k.to_sym] = v
|
|
72
84
|
}
|
|
@@ -97,6 +109,7 @@ module SwaggerAemClient
|
|
|
97
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
110
|
# @return Array for valid properties with the reasons
|
|
99
111
|
def list_invalid_properties
|
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
113
|
invalid_properties = Array.new
|
|
101
114
|
invalid_properties
|
|
102
115
|
end
|
|
@@ -104,6 +117,7 @@ module SwaggerAemClient
|
|
|
104
117
|
# Check to see if the all the properties in the model are valid
|
|
105
118
|
# @return true if the model is valid
|
|
106
119
|
def valid?
|
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
121
|
true
|
|
108
122
|
end
|
|
109
123
|
|
|
@@ -135,80 +149,23 @@ module SwaggerAemClient
|
|
|
135
149
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
150
|
# @return [Object] Returns the model itself
|
|
137
151
|
def self.build_from_hash(attributes)
|
|
138
|
-
new.build_from_hash(attributes)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Builds the object from hash
|
|
142
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
143
|
-
# @return [Object] Returns the model itself
|
|
144
|
-
def build_from_hash(attributes)
|
|
145
152
|
return nil unless attributes.is_a?(Hash)
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
154
|
+
transformed_hash = {}
|
|
155
|
+
openapi_types.each_pair do |key, type|
|
|
156
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
157
|
+
transformed_hash["#{key}"] = nil
|
|
158
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
159
|
# check to ensure the input is an array given that the attribute
|
|
149
160
|
# is documented as an array but the input is not
|
|
150
|
-
if attributes[
|
|
151
|
-
|
|
161
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
162
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
152
163
|
end
|
|
153
|
-
elsif !attributes[
|
|
154
|
-
|
|
155
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
self
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
# Deserializes the data based on type
|
|
162
|
-
# @param string type Data type
|
|
163
|
-
# @param string value Value to be deserialized
|
|
164
|
-
# @return [Object] Deserialized data
|
|
165
|
-
def _deserialize(type, value)
|
|
166
|
-
case type.to_sym
|
|
167
|
-
when :DateTime
|
|
168
|
-
DateTime.parse(value)
|
|
169
|
-
when :Date
|
|
170
|
-
Date.parse(value)
|
|
171
|
-
when :String
|
|
172
|
-
value.to_s
|
|
173
|
-
when :Integer
|
|
174
|
-
value.to_i
|
|
175
|
-
when :Float
|
|
176
|
-
value.to_f
|
|
177
|
-
when :Boolean
|
|
178
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
179
|
-
true
|
|
180
|
-
else
|
|
181
|
-
false
|
|
164
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
182
166
|
end
|
|
183
|
-
when :Object
|
|
184
|
-
# generic object (usually a Hash), return directly
|
|
185
|
-
value
|
|
186
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
187
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
188
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
189
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
190
|
-
k_type = Regexp.last_match[:k_type]
|
|
191
|
-
v_type = Regexp.last_match[:v_type]
|
|
192
|
-
{}.tap do |hash|
|
|
193
|
-
value.each do |k, v|
|
|
194
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
else # model
|
|
198
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
199
167
|
end
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
# Returns the string representation of the object
|
|
203
|
-
# @return [String] String presentation of the object
|
|
204
|
-
def to_s
|
|
205
|
-
to_hash.to_s
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
209
|
-
# @return [Hash] Returns the object in the form of hash
|
|
210
|
-
def to_body
|
|
211
|
-
to_hash
|
|
168
|
+
new(transformed_hash)
|
|
212
169
|
end
|
|
213
170
|
|
|
214
171
|
# Returns the object in the form of hash
|
|
@@ -221,28 +178,12 @@ module SwaggerAemClient
|
|
|
221
178
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
222
179
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
223
180
|
end
|
|
224
|
-
|
|
181
|
+
|
|
225
182
|
hash[param] = _to_hash(value)
|
|
226
183
|
end
|
|
227
184
|
hash
|
|
228
185
|
end
|
|
229
186
|
|
|
230
|
-
# Outputs non-array value in the form of hash
|
|
231
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
232
|
-
# @param [Object] value Any valid value
|
|
233
|
-
# @return [Hash] Returns the value in the form of hash
|
|
234
|
-
def _to_hash(value)
|
|
235
|
-
if value.is_a?(Array)
|
|
236
|
-
value.compact.map { |v| _to_hash(v) }
|
|
237
|
-
elsif value.is_a?(Hash)
|
|
238
|
-
{}.tap do |hash|
|
|
239
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
240
|
-
end
|
|
241
|
-
elsif value.respond_to? :to_hash
|
|
242
|
-
value.to_hash
|
|
243
|
-
else
|
|
244
|
-
value
|
|
245
|
-
end
|
|
246
|
-
end
|
|
247
187
|
end
|
|
188
|
+
|
|
248
189
|
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 SamlConfigurationInfo
|
|
17
|
+
class SamlConfigurationInfo < ApiModelBase
|
|
17
18
|
# Persistent Identity (PID)
|
|
18
19
|
attr_accessor :pid
|
|
19
20
|
|
|
@@ -43,6 +44,16 @@ module SwaggerAemClient
|
|
|
43
44
|
}
|
|
44
45
|
end
|
|
45
46
|
|
|
47
|
+
# Returns attribute mapping this model knows about
|
|
48
|
+
def self.acceptable_attribute_map
|
|
49
|
+
attribute_map
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
acceptable_attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
46
57
|
# Attribute type mapping.
|
|
47
58
|
def self.openapi_types
|
|
48
59
|
{
|
|
@@ -69,9 +80,10 @@ module SwaggerAemClient
|
|
|
69
80
|
end
|
|
70
81
|
|
|
71
82
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
84
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
-
if (!
|
|
74
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationInfo`. Please check the name to make sure it's valid. List of attributes: " +
|
|
85
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
87
|
end
|
|
76
88
|
h[k.to_sym] = v
|
|
77
89
|
}
|
|
@@ -104,6 +116,7 @@ module SwaggerAemClient
|
|
|
104
116
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
117
|
# @return Array for valid properties with the reasons
|
|
106
118
|
def list_invalid_properties
|
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
120
|
invalid_properties = Array.new
|
|
108
121
|
invalid_properties
|
|
109
122
|
end
|
|
@@ -111,6 +124,7 @@ module SwaggerAemClient
|
|
|
111
124
|
# Check to see if the all the properties in the model are valid
|
|
112
125
|
# @return true if the model is valid
|
|
113
126
|
def valid?
|
|
127
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
128
|
true
|
|
115
129
|
end
|
|
116
130
|
|
|
@@ -143,80 +157,23 @@ module SwaggerAemClient
|
|
|
143
157
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
158
|
# @return [Object] Returns the model itself
|
|
145
159
|
def self.build_from_hash(attributes)
|
|
146
|
-
new.build_from_hash(attributes)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Builds the object from hash
|
|
150
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
-
# @return [Object] Returns the model itself
|
|
152
|
-
def build_from_hash(attributes)
|
|
153
160
|
return nil unless attributes.is_a?(Hash)
|
|
154
|
-
|
|
155
|
-
|
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
+
transformed_hash = {}
|
|
163
|
+
openapi_types.each_pair do |key, type|
|
|
164
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = nil
|
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
156
167
|
# check to ensure the input is an array given that the attribute
|
|
157
168
|
# is documented as an array but the input is not
|
|
158
|
-
if attributes[
|
|
159
|
-
|
|
169
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
170
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
160
171
|
end
|
|
161
|
-
elsif !attributes[
|
|
162
|
-
|
|
163
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
self
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
# Deserializes the data based on type
|
|
170
|
-
# @param string type Data type
|
|
171
|
-
# @param string value Value to be deserialized
|
|
172
|
-
# @return [Object] Deserialized data
|
|
173
|
-
def _deserialize(type, value)
|
|
174
|
-
case type.to_sym
|
|
175
|
-
when :DateTime
|
|
176
|
-
DateTime.parse(value)
|
|
177
|
-
when :Date
|
|
178
|
-
Date.parse(value)
|
|
179
|
-
when :String
|
|
180
|
-
value.to_s
|
|
181
|
-
when :Integer
|
|
182
|
-
value.to_i
|
|
183
|
-
when :Float
|
|
184
|
-
value.to_f
|
|
185
|
-
when :Boolean
|
|
186
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
187
|
-
true
|
|
188
|
-
else
|
|
189
|
-
false
|
|
172
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
190
174
|
end
|
|
191
|
-
when :Object
|
|
192
|
-
# generic object (usually a Hash), return directly
|
|
193
|
-
value
|
|
194
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
195
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
196
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
197
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
198
|
-
k_type = Regexp.last_match[:k_type]
|
|
199
|
-
v_type = Regexp.last_match[:v_type]
|
|
200
|
-
{}.tap do |hash|
|
|
201
|
-
value.each do |k, v|
|
|
202
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
else # model
|
|
206
|
-
SwaggerAemClient.const_get(type).build_from_hash(value)
|
|
207
175
|
end
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
# Returns the string representation of the object
|
|
211
|
-
# @return [String] String presentation of the object
|
|
212
|
-
def to_s
|
|
213
|
-
to_hash.to_s
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
217
|
-
# @return [Hash] Returns the object in the form of hash
|
|
218
|
-
def to_body
|
|
219
|
-
to_hash
|
|
176
|
+
new(transformed_hash)
|
|
220
177
|
end
|
|
221
178
|
|
|
222
179
|
# Returns the object in the form of hash
|
|
@@ -229,28 +186,12 @@ module SwaggerAemClient
|
|
|
229
186
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
230
187
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
231
188
|
end
|
|
232
|
-
|
|
189
|
+
|
|
233
190
|
hash[param] = _to_hash(value)
|
|
234
191
|
end
|
|
235
192
|
hash
|
|
236
193
|
end
|
|
237
194
|
|
|
238
|
-
# Outputs non-array value in the form of hash
|
|
239
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
-
# @param [Object] value Any valid value
|
|
241
|
-
# @return [Hash] Returns the value in the form of hash
|
|
242
|
-
def _to_hash(value)
|
|
243
|
-
if value.is_a?(Array)
|
|
244
|
-
value.compact.map { |v| _to_hash(v) }
|
|
245
|
-
elsif value.is_a?(Hash)
|
|
246
|
-
{}.tap do |hash|
|
|
247
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
-
end
|
|
249
|
-
elsif value.respond_to? :to_hash
|
|
250
|
-
value.to_hash
|
|
251
|
-
else
|
|
252
|
-
value
|
|
253
|
-
end
|
|
254
|
-
end
|
|
255
195
|
end
|
|
196
|
+
|
|
256
197
|
end
|