swagger_aem 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +17 -17
  3. data/README.md +25 -5
  4. data/docs/ConsoleApi.md +110 -0
  5. data/docs/CustomApi.md +4 -10
  6. data/docs/KeystoreChainItems.md +12 -0
  7. data/docs/KeystoreInfo.md +9 -0
  8. data/docs/KeystoreItems.md +12 -0
  9. data/docs/SamlConfigurationInfo.md +13 -0
  10. data/docs/SamlConfigurationProperties.md +31 -0
  11. data/docs/SamlConfigurationPropertyItemsArray.md +13 -0
  12. data/docs/SamlConfigurationPropertyItemsBoolean.md +13 -0
  13. data/docs/SamlConfigurationPropertyItemsLong.md +13 -0
  14. data/docs/SamlConfigurationPropertyItemsString.md +13 -0
  15. data/docs/SlingApi.md +550 -21
  16. data/docs/TruststoreInfo.md +9 -0
  17. data/docs/TruststoreItems.md +14 -0
  18. data/lib/swagger_aem.rb +12 -1
  19. data/lib/swagger_aem/api/console_api.rb +138 -1
  20. data/lib/swagger_aem/api/cq_api.rb +1 -1
  21. data/lib/swagger_aem/api/crx_api.rb +1 -1
  22. data/lib/swagger_aem/api/custom_api.rb +9 -21
  23. data/lib/swagger_aem/api/sling_api.rb +641 -41
  24. data/lib/swagger_aem/api_client.rb +1 -1
  25. data/lib/swagger_aem/api_error.rb +1 -1
  26. data/lib/swagger_aem/configuration.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 +229 -0
  30. data/lib/swagger_aem/models/keystore_info.rb +200 -0
  31. data/lib/swagger_aem/models/keystore_items.rb +230 -0
  32. data/lib/swagger_aem/models/saml_configuration_info.rb +238 -0
  33. data/lib/swagger_aem/models/saml_configuration_properties.rb +467 -0
  34. data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +241 -0
  35. data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +239 -0
  36. data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +239 -0
  37. data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +239 -0
  38. data/lib/swagger_aem/models/truststore_info.rb +200 -0
  39. data/lib/swagger_aem/models/truststore_items.rb +248 -0
  40. data/lib/swagger_aem/version.rb +2 -2
  41. data/spec/api/console_api_spec.rb +42 -1
  42. data/spec/api/cq_api_spec.rb +1 -1
  43. data/spec/api/crx_api_spec.rb +1 -1
  44. data/spec/api/custom_api_spec.rb +1 -3
  45. data/spec/api/sling_api_spec.rb +164 -5
  46. data/spec/api_client_spec.rb +1 -1
  47. data/spec/configuration_spec.rb +1 -1
  48. data/spec/models/install_status_spec.rb +1 -1
  49. data/spec/models/install_status_status_spec.rb +1 -1
  50. data/spec/models/keystore_chain_items_spec.rb +66 -0
  51. data/spec/models/keystore_info_spec.rb +48 -0
  52. data/spec/models/keystore_items_spec.rb +66 -0
  53. data/spec/models/saml_configuration_info_spec.rb +72 -0
  54. data/spec/models/saml_configuration_properties_spec.rb +180 -0
  55. data/spec/models/saml_configuration_property_items_array_spec.rb +72 -0
  56. data/spec/models/saml_configuration_property_items_boolean_spec.rb +72 -0
  57. data/spec/models/saml_configuration_property_items_long_spec.rb +72 -0
  58. data/spec/models/saml_configuration_property_items_string_spec.rb +72 -0
  59. data/spec/models/truststore_info_spec.rb +48 -0
  60. data/spec/models/truststore_items_spec.rb +78 -0
  61. data/spec/spec_helper.rb +1 -1
  62. data/swagger_aem.gemspec +2 -2
  63. metadata +47 -3
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #Adobe Experience Manager (AEM) API
3
+
4
+ #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
+
6
+ OpenAPI spec version: 2.1.0
7
+ Contact: opensource@shinesolutions.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SwaggerAemClient
16
+
17
+ class KeystoreItems
18
+ # Keystore alias name
19
+ attr_accessor :_alias
20
+
21
+ # e.g. \"privateKey\"
22
+ attr_accessor :entry_type
23
+
24
+ # e.g. \"RSA\"
25
+ attr_accessor :algorithm
26
+
27
+ # e.g. \"PKCS#8\"
28
+ attr_accessor :format
29
+
30
+ attr_accessor :chain
31
+
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'_alias' => :'alias',
37
+ :'entry_type' => :'entryType',
38
+ :'algorithm' => :'algorithm',
39
+ :'format' => :'format',
40
+ :'chain' => :'chain'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'_alias' => :'String',
48
+ :'entry_type' => :'String',
49
+ :'algorithm' => :'String',
50
+ :'format' => :'String',
51
+ :'chain' => :'Array<KeystoreChainItems>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'alias')
64
+ self._alias = attributes[:'alias']
65
+ end
66
+
67
+ if attributes.has_key?(:'entryType')
68
+ self.entry_type = attributes[:'entryType']
69
+ end
70
+
71
+ if attributes.has_key?(:'algorithm')
72
+ self.algorithm = attributes[:'algorithm']
73
+ end
74
+
75
+ if attributes.has_key?(:'format')
76
+ self.format = attributes[:'format']
77
+ end
78
+
79
+ if attributes.has_key?(:'chain')
80
+ if (value = attributes[:'chain']).is_a?(Array)
81
+ self.chain = value
82
+ end
83
+ end
84
+
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ return invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ _alias == o._alias &&
106
+ entry_type == o.entry_type &&
107
+ algorithm == o.algorithm &&
108
+ format == o.format &&
109
+ chain == o.chain
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Fixnum] Hash code
120
+ def hash
121
+ [_alias, entry_type, algorithm, format, chain].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ if type =~ /\AArray<(.*)>/i
131
+ # check to ensure the input is an array given that the the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
135
+ end
136
+ elsif !attributes[self.class.attribute_map[key]].nil?
137
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :BOOLEAN
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ temp_model = SwaggerAemClient.const_get(type).new
182
+ temp_model.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ next if value.nil?
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map{ |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Adobe Experience Manager (AEM) API
3
+
4
+ #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
+
6
+ OpenAPI spec version: 2.1.0
7
+ Contact: opensource@shinesolutions.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SwaggerAemClient
16
+
17
+ class SamlConfigurationInfo
18
+ # Persistent Identity (PID)
19
+ attr_accessor :pid
20
+
21
+ # Title
22
+ attr_accessor :title
23
+
24
+ # Title
25
+ attr_accessor :description
26
+
27
+ # needed for configuration binding
28
+ attr_accessor :bundle_location
29
+
30
+ # needed for configuraiton binding
31
+ attr_accessor :service_location
32
+
33
+ attr_accessor :properties
34
+
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'pid' => :'pid',
40
+ :'title' => :'title',
41
+ :'description' => :'description',
42
+ :'bundle_location' => :'bundle_location',
43
+ :'service_location' => :'service_location',
44
+ :'properties' => :'properties'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'pid' => :'String',
52
+ :'title' => :'String',
53
+ :'description' => :'String',
54
+ :'bundle_location' => :'String',
55
+ :'service_location' => :'String',
56
+ :'properties' => :'Object'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ return unless attributes.is_a?(Hash)
64
+
65
+ # convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
67
+
68
+ if attributes.has_key?(:'pid')
69
+ self.pid = attributes[:'pid']
70
+ end
71
+
72
+ if attributes.has_key?(:'title')
73
+ self.title = attributes[:'title']
74
+ end
75
+
76
+ if attributes.has_key?(:'description')
77
+ self.description = attributes[:'description']
78
+ end
79
+
80
+ if attributes.has_key?(:'bundle_location')
81
+ self.bundle_location = attributes[:'bundle_location']
82
+ end
83
+
84
+ if attributes.has_key?(:'service_location')
85
+ self.service_location = attributes[:'service_location']
86
+ end
87
+
88
+ if attributes.has_key?(:'properties')
89
+ self.properties = attributes[:'properties']
90
+ end
91
+
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ invalid_properties = Array.new
98
+ return invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ return true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ pid == o.pid &&
113
+ title == o.title &&
114
+ description == o.description &&
115
+ bundle_location == o.bundle_location &&
116
+ service_location == o.service_location &&
117
+ properties == o.properties
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Fixnum] Hash code
128
+ def hash
129
+ [pid, title, description, bundle_location, service_location, properties].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ self.class.swagger_types.each_pair do |key, type|
138
+ if type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
142
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
147
+ end
148
+
149
+ self
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def _deserialize(type, value)
157
+ case type.to_sym
158
+ when :DateTime
159
+ DateTime.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :BOOLEAN
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ temp_model = SwaggerAemClient.const_get(type).new
190
+ temp_model.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ next if value.nil?
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map{ |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end