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