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,239 @@
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 SamlConfigurationPropertyItemsLong
18
+ # property name
19
+ attr_accessor :name
20
+
21
+ # True if optional
22
+ attr_accessor :optional
23
+
24
+ # True if property is set
25
+ attr_accessor :is_set
26
+
27
+ # Property type, 1=String, 3=long, 11=boolean, 12=Password
28
+ attr_accessor :type
29
+
30
+ # Property value
31
+ attr_accessor :values
32
+
33
+ # Property description
34
+ attr_accessor :description
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'name' => :'name',
41
+ :'optional' => :'optional',
42
+ :'is_set' => :'is_set',
43
+ :'type' => :'type',
44
+ :'values' => :'values',
45
+ :'description' => :'description'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'name' => :'String',
53
+ :'optional' => :'BOOLEAN',
54
+ :'is_set' => :'BOOLEAN',
55
+ :'type' => :'Integer',
56
+ :'values' => :'Integer',
57
+ :'description' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+
69
+ if attributes.has_key?(:'name')
70
+ self.name = attributes[:'name']
71
+ end
72
+
73
+ if attributes.has_key?(:'optional')
74
+ self.optional = attributes[:'optional']
75
+ end
76
+
77
+ if attributes.has_key?(:'is_set')
78
+ self.is_set = attributes[:'is_set']
79
+ end
80
+
81
+ if attributes.has_key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+
85
+ if attributes.has_key?(:'values')
86
+ self.values = attributes[:'values']
87
+ end
88
+
89
+ if attributes.has_key?(:'description')
90
+ self.description = attributes[:'description']
91
+ end
92
+
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ return invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ name == o.name &&
114
+ optional == o.optional &&
115
+ is_set == o.is_set &&
116
+ type == o.type &&
117
+ values == o.values &&
118
+ description == o.description
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [name, optional, is_set, type, values, description].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.swagger_types.each_pair do |key, type|
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :DateTime
160
+ DateTime.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :BOOLEAN
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ temp_model = SwaggerAemClient.const_get(type).new
191
+ temp_model.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ next if value.nil?
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map{ |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -0,0 +1,239 @@
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 SamlConfigurationPropertyItemsString
18
+ # property name
19
+ attr_accessor :name
20
+
21
+ # True if optional
22
+ attr_accessor :optional
23
+
24
+ # True if property is set
25
+ attr_accessor :is_set
26
+
27
+ # Property type, 1=String, 3=long, 11=boolean, 12=Password
28
+ attr_accessor :type
29
+
30
+ # Property value
31
+ attr_accessor :values
32
+
33
+ # Property description
34
+ attr_accessor :description
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'name' => :'name',
41
+ :'optional' => :'optional',
42
+ :'is_set' => :'is_set',
43
+ :'type' => :'type',
44
+ :'values' => :'values',
45
+ :'description' => :'description'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'name' => :'String',
53
+ :'optional' => :'BOOLEAN',
54
+ :'is_set' => :'BOOLEAN',
55
+ :'type' => :'Integer',
56
+ :'values' => :'String',
57
+ :'description' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+
69
+ if attributes.has_key?(:'name')
70
+ self.name = attributes[:'name']
71
+ end
72
+
73
+ if attributes.has_key?(:'optional')
74
+ self.optional = attributes[:'optional']
75
+ end
76
+
77
+ if attributes.has_key?(:'is_set')
78
+ self.is_set = attributes[:'is_set']
79
+ end
80
+
81
+ if attributes.has_key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+
85
+ if attributes.has_key?(:'values')
86
+ self.values = attributes[:'values']
87
+ end
88
+
89
+ if attributes.has_key?(:'description')
90
+ self.description = attributes[:'description']
91
+ end
92
+
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ return invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ return true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ name == o.name &&
114
+ optional == o.optional &&
115
+ is_set == o.is_set &&
116
+ type == o.type &&
117
+ values == o.values &&
118
+ description == o.description
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [name, optional, is_set, type, values, description].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.swagger_types.each_pair do |key, type|
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :DateTime
160
+ DateTime.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :BOOLEAN
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ temp_model = SwaggerAemClient.const_get(type).new
191
+ temp_model.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ next if value.nil?
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map{ |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end