swagger_aem 3.4.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +33 -30
  4. data/README.md +9 -5
  5. data/docs/BundleData.md +33 -0
  6. data/docs/BundleDataProp.md +19 -0
  7. data/docs/BundleInfo.md +21 -0
  8. data/docs/ConsoleApi.md +51 -0
  9. data/lib/swagger_aem/api/console_api.rb +59 -1
  10. data/lib/swagger_aem/api/cq_api.rb +1 -1
  11. data/lib/swagger_aem/api/crx_api.rb +3 -3
  12. data/lib/swagger_aem/api/custom_api.rb +1 -1
  13. data/lib/swagger_aem/api/granite_api.rb +1 -1
  14. data/lib/swagger_aem/api/sling_api.rb +1 -1
  15. data/lib/swagger_aem/api_client.rb +1 -1
  16. data/lib/swagger_aem/api_error.rb +1 -1
  17. data/lib/swagger_aem/configuration.rb +1 -1
  18. data/lib/swagger_aem/models/bundle_data.rb +288 -0
  19. data/lib/swagger_aem/models/bundle_data_prop.rb +217 -0
  20. data/lib/swagger_aem/models/bundle_info.rb +229 -0
  21. data/lib/swagger_aem/models/inline_object.rb +1 -1
  22. data/lib/swagger_aem/models/inline_object1.rb +1 -1
  23. data/lib/swagger_aem/models/inline_object2.rb +1 -1
  24. data/lib/swagger_aem/models/inline_object3.rb +1 -1
  25. data/lib/swagger_aem/models/inline_object4.rb +1 -1
  26. data/lib/swagger_aem/models/inline_object5.rb +1 -1
  27. data/lib/swagger_aem/models/install_status.rb +1 -1
  28. data/lib/swagger_aem/models/install_status_status.rb +1 -1
  29. data/lib/swagger_aem/models/keystore_chain_items.rb +1 -1
  30. data/lib/swagger_aem/models/keystore_info.rb +1 -1
  31. data/lib/swagger_aem/models/keystore_items.rb +1 -1
  32. data/lib/swagger_aem/models/saml_configuration_info.rb +1 -1
  33. data/lib/swagger_aem/models/saml_configuration_properties.rb +1 -1
  34. data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +1 -1
  35. data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +1 -1
  36. data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +1 -1
  37. data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +1 -1
  38. data/lib/swagger_aem/models/truststore_info.rb +1 -1
  39. data/lib/swagger_aem/models/truststore_items.rb +1 -1
  40. data/lib/swagger_aem/version.rb +2 -2
  41. data/lib/swagger_aem.rb +4 -1
  42. data/spec/api/console_api_spec.rb +22 -12
  43. data/spec/api/cq_api_spec.rb +4 -4
  44. data/spec/api/crx_api_spec.rb +6 -6
  45. data/spec/api/custom_api_spec.rb +5 -5
  46. data/spec/api/granite_api_spec.rb +2 -2
  47. data/spec/api/sling_api_spec.rb +76 -66
  48. data/spec/api_client_spec.rb +3 -3
  49. data/spec/configuration_spec.rb +2 -2
  50. data/spec/models/bundle_data_prop_spec.rb +40 -0
  51. data/spec/models/bundle_data_spec.rb +82 -0
  52. data/spec/models/bundle_info_spec.rb +46 -0
  53. data/spec/models/inline_object1_spec.rb +2 -2
  54. data/spec/models/inline_object2_spec.rb +2 -2
  55. data/spec/models/inline_object3_spec.rb +2 -2
  56. data/spec/models/inline_object4_spec.rb +2 -2
  57. data/spec/models/inline_object5_spec.rb +2 -2
  58. data/spec/models/inline_object_spec.rb +2 -2
  59. data/spec/models/install_status_spec.rb +5 -12
  60. data/spec/models/install_status_status_spec.rb +5 -12
  61. data/spec/models/keystore_chain_items_spec.rb +5 -12
  62. data/spec/models/keystore_info_spec.rb +5 -12
  63. data/spec/models/keystore_items_spec.rb +5 -12
  64. data/spec/models/saml_configuration_info_spec.rb +5 -12
  65. data/spec/models/saml_configuration_properties_spec.rb +5 -12
  66. data/spec/models/saml_configuration_property_items_array_spec.rb +5 -12
  67. data/spec/models/saml_configuration_property_items_boolean_spec.rb +5 -12
  68. data/spec/models/saml_configuration_property_items_long_spec.rb +5 -12
  69. data/spec/models/saml_configuration_property_items_string_spec.rb +5 -12
  70. data/spec/models/truststore_info_spec.rb +5 -12
  71. data/spec/models/truststore_items_spec.rb +5 -12
  72. data/spec/spec_helper.rb +2 -2
  73. data/swagger_aem.gemspec +1 -1
  74. metadata +18 -6
@@ -0,0 +1,288 @@
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.5.0-pre.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 BundleData
17
+ # Bundle ID
18
+ attr_accessor :id
19
+
20
+ # Bundle name
21
+ attr_accessor :name
22
+
23
+ # Is bundle a fragment
24
+ attr_accessor :fragment
25
+
26
+ # Numeric raw bundle state value
27
+ attr_accessor :state_raw
28
+
29
+ # Bundle state value
30
+ attr_accessor :state
31
+
32
+ # Bundle version
33
+ attr_accessor :version
34
+
35
+ # Bundle symbolic name
36
+ attr_accessor :symbolic_name
37
+
38
+ # Bundle category
39
+ attr_accessor :category
40
+
41
+ attr_accessor :props
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'id' => :'id',
47
+ :'name' => :'name',
48
+ :'fragment' => :'fragment',
49
+ :'state_raw' => :'stateRaw',
50
+ :'state' => :'state',
51
+ :'version' => :'version',
52
+ :'symbolic_name' => :'symbolicName',
53
+ :'category' => :'category',
54
+ :'props' => :'props'
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'id' => :'Integer',
62
+ :'name' => :'String',
63
+ :'fragment' => :'Boolean',
64
+ :'state_raw' => :'Integer',
65
+ :'state' => :'String',
66
+ :'version' => :'String',
67
+ :'symbolic_name' => :'String',
68
+ :'category' => :'String',
69
+ :'props' => :'Array<BundleDataProp>'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::BundleData` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::BundleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'id')
95
+ self.id = attributes[:'id']
96
+ end
97
+
98
+ if attributes.key?(:'name')
99
+ self.name = attributes[:'name']
100
+ end
101
+
102
+ if attributes.key?(:'fragment')
103
+ self.fragment = attributes[:'fragment']
104
+ end
105
+
106
+ if attributes.key?(:'state_raw')
107
+ self.state_raw = attributes[:'state_raw']
108
+ end
109
+
110
+ if attributes.key?(:'state')
111
+ self.state = attributes[:'state']
112
+ end
113
+
114
+ if attributes.key?(:'version')
115
+ self.version = attributes[:'version']
116
+ end
117
+
118
+ if attributes.key?(:'symbolic_name')
119
+ self.symbolic_name = attributes[:'symbolic_name']
120
+ end
121
+
122
+ if attributes.key?(:'category')
123
+ self.category = attributes[:'category']
124
+ end
125
+
126
+ if attributes.key?(:'props')
127
+ if (value = attributes[:'props']).is_a?(Array)
128
+ self.props = value
129
+ end
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ invalid_properties = Array.new
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ true
144
+ end
145
+
146
+ # Checks equality by comparing each attribute.
147
+ # @param [Object] Object to be compared
148
+ def ==(o)
149
+ return true if self.equal?(o)
150
+ self.class == o.class &&
151
+ id == o.id &&
152
+ name == o.name &&
153
+ fragment == o.fragment &&
154
+ state_raw == o.state_raw &&
155
+ state == o.state &&
156
+ version == o.version &&
157
+ symbolic_name == o.symbolic_name &&
158
+ category == o.category &&
159
+ props == o.props
160
+ end
161
+
162
+ # @see the `==` method
163
+ # @param [Object] Object to be compared
164
+ def eql?(o)
165
+ self == o
166
+ end
167
+
168
+ # Calculates hash code according to all attributes.
169
+ # @return [Integer] Hash code
170
+ def hash
171
+ [id, name, fragment, state_raw, state, version, symbolic_name, category, props].hash
172
+ end
173
+
174
+ # Builds the object from hash
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ # @return [Object] Returns the model itself
177
+ def self.build_from_hash(attributes)
178
+ new.build_from_hash(attributes)
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def build_from_hash(attributes)
185
+ return nil unless attributes.is_a?(Hash)
186
+ self.class.openapi_types.each_pair do |key, type|
187
+ if type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
191
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
192
+ end
193
+ elsif !attributes[self.class.attribute_map[key]].nil?
194
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :DateTime
208
+ DateTime.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :Boolean
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ SwaggerAemClient.const_get(type).build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end
287
+ end
288
+ end
@@ -0,0 +1,217 @@
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.5.0-pre.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 BundleDataProp
17
+ # Bundle data key
18
+ attr_accessor :key
19
+
20
+ # Bundle data value
21
+ attr_accessor :value
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'key' => :'key',
27
+ :'value' => :'value'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'key' => :'String',
35
+ :'value' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::BundleDataProp` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::BundleDataProp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'key')
61
+ self.key = attributes[:'key']
62
+ end
63
+
64
+ if attributes.key?(:'value')
65
+ self.value = attributes[:'value']
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ key == o.key &&
88
+ value == o.value
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ def hash
100
+ [key, value].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def self.build_from_hash(attributes)
107
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.openapi_types.each_pair do |key, type|
116
+ if type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ SwaggerAemClient.const_get(type).build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+ end
217
+ end