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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +47 -46
  4. data/README.md +20 -9
  5. data/Rakefile +2 -0
  6. data/docs/ConsoleApi.md +107 -58
  7. data/docs/CqApi.md +14 -13
  8. data/docs/CrxApi.md +60 -60
  9. data/docs/CustomApi.md +27 -24
  10. data/docs/GraniteApi.md +75 -0
  11. data/docs/InlineObject.md +17 -0
  12. data/docs/InlineObject1.md +17 -0
  13. data/docs/InlineObject2.md +17 -0
  14. data/docs/InlineObject3.md +17 -0
  15. data/docs/InlineObject4.md +21 -0
  16. data/docs/InlineObject5.md +19 -0
  17. data/docs/InstallStatus.md +9 -0
  18. data/docs/InstallStatusStatus.md +11 -1
  19. data/docs/KeystoreChainItems.md +13 -0
  20. data/docs/KeystoreInfo.md +11 -1
  21. data/docs/KeystoreItems.md +13 -0
  22. data/docs/SamlConfigurationInfo.md +15 -1
  23. data/docs/SamlConfigurationProperties.md +56 -24
  24. data/docs/SamlConfigurationPropertyItemsArray.md +16 -2
  25. data/docs/SamlConfigurationPropertyItemsBoolean.md +17 -3
  26. data/docs/SamlConfigurationPropertyItemsLong.md +17 -3
  27. data/docs/SamlConfigurationPropertyItemsString.md +17 -3
  28. data/docs/SlingApi.md +482 -445
  29. data/docs/TruststoreInfo.md +11 -1
  30. data/docs/TruststoreItems.md +15 -0
  31. data/git_push.sh +11 -8
  32. data/lib/swagger_aem.rb +10 -3
  33. data/lib/swagger_aem/api/console_api.rb +160 -91
  34. data/lib/swagger_aem/api/cq_api.rb +49 -41
  35. data/lib/swagger_aem/api/crx_api.rb +170 -135
  36. data/lib/swagger_aem/api/custom_api.rb +68 -56
  37. data/lib/swagger_aem/api/granite_api.rb +124 -0
  38. data/lib/swagger_aem/api/sling_api.rb +900 -720
  39. data/lib/swagger_aem/api_client.rb +53 -54
  40. data/lib/swagger_aem/api_error.rb +22 -3
  41. data/lib/swagger_aem/configuration.rb +49 -10
  42. data/lib/swagger_aem/models/inline_object.rb +206 -0
  43. data/lib/swagger_aem/models/inline_object1.rb +206 -0
  44. data/lib/swagger_aem/models/inline_object2.rb +206 -0
  45. data/lib/swagger_aem/models/inline_object3.rb +206 -0
  46. data/lib/swagger_aem/models/inline_object4.rb +224 -0
  47. data/lib/swagger_aem/models/inline_object5.rb +215 -0
  48. data/lib/swagger_aem/models/install_status.rb +43 -25
  49. data/lib/swagger_aem/models/install_status_status.rb +46 -28
  50. data/lib/swagger_aem/models/keystore_chain_items.rb +50 -32
  51. data/lib/swagger_aem/models/keystore_info.rb +45 -27
  52. data/lib/swagger_aem/models/keystore_items.rb +49 -31
  53. data/lib/swagger_aem/models/saml_configuration_info.rb +49 -31
  54. data/lib/swagger_aem/models/saml_configuration_properties.rb +114 -168
  55. data/lib/swagger_aem/models/saml_configuration_property_items_array.rb +50 -32
  56. data/lib/swagger_aem/models/saml_configuration_property_items_boolean.rb +56 -38
  57. data/lib/swagger_aem/models/saml_configuration_property_items_long.rb +56 -38
  58. data/lib/swagger_aem/models/saml_configuration_property_items_string.rb +56 -38
  59. data/lib/swagger_aem/models/truststore_info.rb +45 -27
  60. data/lib/swagger_aem/models/truststore_items.rb +54 -36
  61. data/lib/swagger_aem/version.rb +4 -4
  62. data/spec/api/console_api_spec.rb +17 -16
  63. data/spec/api/cq_api_spec.rb +6 -10
  64. data/spec/api/crx_api_spec.rb +11 -25
  65. data/spec/api/custom_api_spec.rb +7 -13
  66. data/spec/api/granite_api_spec.rb +52 -0
  67. data/spec/api/sling_api_spec.rb +32 -88
  68. data/spec/api_client_spec.rb +37 -37
  69. data/spec/configuration_spec.rb +11 -11
  70. data/spec/models/inline_object1_spec.rb +41 -0
  71. data/spec/models/inline_object2_spec.rb +41 -0
  72. data/spec/models/inline_object3_spec.rb +41 -0
  73. data/spec/models/inline_object4_spec.rb +53 -0
  74. data/spec/models/inline_object5_spec.rb +47 -0
  75. data/spec/models/inline_object_spec.rb +41 -0
  76. data/spec/models/install_status_spec.rb +5 -6
  77. data/spec/models/install_status_status_spec.rb +6 -7
  78. data/spec/models/keystore_chain_items_spec.rb +9 -10
  79. data/spec/models/keystore_info_spec.rb +6 -7
  80. data/spec/models/keystore_items_spec.rb +9 -10
  81. data/spec/models/saml_configuration_info_spec.rb +10 -11
  82. data/spec/models/saml_configuration_properties_spec.rb +28 -29
  83. data/spec/models/saml_configuration_property_items_array_spec.rb +10 -11
  84. data/spec/models/saml_configuration_property_items_boolean_spec.rb +11 -12
  85. data/spec/models/saml_configuration_property_items_long_spec.rb +11 -12
  86. data/spec/models/saml_configuration_property_items_string_spec.rb +11 -12
  87. data/spec/models/truststore_info_spec.rb +6 -7
  88. data/spec/models/truststore_items_spec.rb +11 -12
  89. data/spec/spec_helper.rb +3 -3
  90. data/swagger_aem.gemspec +8 -14
  91. metadata +36 -128
@@ -3,17 +3,16 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
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 KeystoreItems
18
17
  # Keystore alias name
19
18
  attr_accessor :_alias
@@ -29,7 +28,6 @@ module SwaggerAemClient
29
28
 
30
29
  attr_accessor :chain
31
30
 
32
-
33
31
  # Attribute mapping from ruby-style variable name to JSON key.
34
32
  def self.attribute_map
35
33
  {
@@ -42,7 +40,7 @@ module SwaggerAemClient
42
40
  end
43
41
 
44
42
  # Attribute type mapping.
45
- def self.swagger_types
43
+ def self.openapi_types
46
44
  {
47
45
  :'_alias' => :'String',
48
46
  :'entry_type' => :'String',
@@ -52,49 +50,61 @@ module SwaggerAemClient
52
50
  }
53
51
  end
54
52
 
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
55
59
  # Initializes the object
56
60
  # @param [Hash] attributes Model attributes in the form of hash
57
61
  def initialize(attributes = {})
58
- return unless attributes.is_a?(Hash)
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::KeystoreItems` initialize method"
64
+ end
59
65
 
60
- # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
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: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
62
73
 
63
- if attributes.has_key?(:'alias')
64
- self._alias = attributes[:'alias']
74
+ if attributes.key?(:'_alias')
75
+ self._alias = attributes[:'_alias']
65
76
  end
66
77
 
67
- if attributes.has_key?(:'entryType')
68
- self.entry_type = attributes[:'entryType']
78
+ if attributes.key?(:'entry_type')
79
+ self.entry_type = attributes[:'entry_type']
69
80
  end
70
81
 
71
- if attributes.has_key?(:'algorithm')
82
+ if attributes.key?(:'algorithm')
72
83
  self.algorithm = attributes[:'algorithm']
73
84
  end
74
85
 
75
- if attributes.has_key?(:'format')
86
+ if attributes.key?(:'format')
76
87
  self.format = attributes[:'format']
77
88
  end
78
89
 
79
- if attributes.has_key?(:'chain')
90
+ if attributes.key?(:'chain')
80
91
  if (value = attributes[:'chain']).is_a?(Array)
81
92
  self.chain = value
82
93
  end
83
94
  end
84
-
85
95
  end
86
96
 
87
97
  # Show invalid properties with the reasons. Usually used together with valid?
88
- # @return Array for valid properies with the reasons
98
+ # @return Array for valid properties with the reasons
89
99
  def list_invalid_properties
90
100
  invalid_properties = Array.new
91
- return invalid_properties
101
+ invalid_properties
92
102
  end
93
103
 
94
104
  # Check to see if the all the properties in the model are valid
95
105
  # @return true if the model is valid
96
106
  def valid?
97
- return true
107
+ true
98
108
  end
99
109
 
100
110
  # Checks equality by comparing each attribute.
@@ -116,22 +126,29 @@ module SwaggerAemClient
116
126
  end
117
127
 
118
128
  # Calculates hash code according to all attributes.
119
- # @return [Fixnum] Hash code
129
+ # @return [Integer] Hash code
120
130
  def hash
121
131
  [_alias, entry_type, algorithm, format, chain].hash
122
132
  end
123
133
 
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ new.build_from_hash(attributes)
139
+ end
140
+
124
141
  # Builds the object from hash
125
142
  # @param [Hash] attributes Model attributes in the form of hash
126
143
  # @return [Object] Returns the model itself
127
144
  def build_from_hash(attributes)
128
145
  return nil unless attributes.is_a?(Hash)
129
- self.class.swagger_types.each_pair do |key, type|
146
+ self.class.openapi_types.each_pair do |key, type|
130
147
  if type =~ /\AArray<(.*)>/i
131
- # check to ensure the input is an array given that the the attribute
148
+ # check to ensure the input is an array given that the attribute
132
149
  # is documented as an array but the input is not
133
150
  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) } )
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
152
  end
136
153
  elsif !attributes[self.class.attribute_map[key]].nil?
137
154
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -157,7 +174,7 @@ module SwaggerAemClient
157
174
  value.to_i
158
175
  when :Float
159
176
  value.to_f
160
- when :BOOLEAN
177
+ when :Boolean
161
178
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
179
  true
163
180
  else
@@ -178,8 +195,7 @@ module SwaggerAemClient
178
195
  end
179
196
  end
180
197
  else # model
181
- temp_model = SwaggerAemClient.const_get(type).new
182
- temp_model.build_from_hash(value)
198
+ SwaggerAemClient.const_get(type).build_from_hash(value)
183
199
  end
184
200
  end
185
201
 
@@ -201,7 +217,11 @@ module SwaggerAemClient
201
217
  hash = {}
202
218
  self.class.attribute_map.each_pair do |attr, param|
203
219
  value = self.send(attr)
204
- next if value.nil?
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
205
225
  hash[param] = _to_hash(value)
206
226
  end
207
227
  hash
@@ -213,7 +233,7 @@ module SwaggerAemClient
213
233
  # @return [Hash] Returns the value in the form of hash
214
234
  def _to_hash(value)
215
235
  if value.is_a?(Array)
216
- value.compact.map{ |v| _to_hash(v) }
236
+ value.compact.map { |v| _to_hash(v) }
217
237
  elsif value.is_a?(Hash)
218
238
  {}.tap do |hash|
219
239
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -224,7 +244,5 @@ module SwaggerAemClient
224
244
  value
225
245
  end
226
246
  end
227
-
228
247
  end
229
-
230
248
  end
@@ -3,17 +3,16 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
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 SamlConfigurationInfo
18
17
  # Persistent Identity (PID)
19
18
  attr_accessor :pid
@@ -32,7 +31,6 @@ module SwaggerAemClient
32
31
 
33
32
  attr_accessor :properties
34
33
 
35
-
36
34
  # Attribute mapping from ruby-style variable name to JSON key.
37
35
  def self.attribute_map
38
36
  {
@@ -46,62 +44,74 @@ module SwaggerAemClient
46
44
  end
47
45
 
48
46
  # Attribute type mapping.
49
- def self.swagger_types
47
+ def self.openapi_types
50
48
  {
51
49
  :'pid' => :'String',
52
50
  :'title' => :'String',
53
51
  :'description' => :'String',
54
52
  :'bundle_location' => :'String',
55
53
  :'service_location' => :'String',
56
- :'properties' => :'Object'
54
+ :'properties' => :'SamlConfigurationProperties'
57
55
  }
58
56
  end
59
57
 
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
60
64
  # Initializes the object
61
65
  # @param [Hash] attributes Model attributes in the form of hash
62
66
  def initialize(attributes = {})
63
- return unless attributes.is_a?(Hash)
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::SamlConfigurationInfo` initialize method"
69
+ end
64
70
 
65
- # convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
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: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
67
78
 
68
- if attributes.has_key?(:'pid')
79
+ if attributes.key?(:'pid')
69
80
  self.pid = attributes[:'pid']
70
81
  end
71
82
 
72
- if attributes.has_key?(:'title')
83
+ if attributes.key?(:'title')
73
84
  self.title = attributes[:'title']
74
85
  end
75
86
 
76
- if attributes.has_key?(:'description')
87
+ if attributes.key?(:'description')
77
88
  self.description = attributes[:'description']
78
89
  end
79
90
 
80
- if attributes.has_key?(:'bundle_location')
91
+ if attributes.key?(:'bundle_location')
81
92
  self.bundle_location = attributes[:'bundle_location']
82
93
  end
83
94
 
84
- if attributes.has_key?(:'service_location')
95
+ if attributes.key?(:'service_location')
85
96
  self.service_location = attributes[:'service_location']
86
97
  end
87
98
 
88
- if attributes.has_key?(:'properties')
99
+ if attributes.key?(:'properties')
89
100
  self.properties = attributes[:'properties']
90
101
  end
91
-
92
102
  end
93
103
 
94
104
  # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properies with the reasons
105
+ # @return Array for valid properties with the reasons
96
106
  def list_invalid_properties
97
107
  invalid_properties = Array.new
98
- return invalid_properties
108
+ invalid_properties
99
109
  end
100
110
 
101
111
  # Check to see if the all the properties in the model are valid
102
112
  # @return true if the model is valid
103
113
  def valid?
104
- return true
114
+ true
105
115
  end
106
116
 
107
117
  # Checks equality by comparing each attribute.
@@ -124,22 +134,29 @@ module SwaggerAemClient
124
134
  end
125
135
 
126
136
  # Calculates hash code according to all attributes.
127
- # @return [Fixnum] Hash code
137
+ # @return [Integer] Hash code
128
138
  def hash
129
139
  [pid, title, description, bundle_location, service_location, properties].hash
130
140
  end
131
141
 
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ new.build_from_hash(attributes)
147
+ end
148
+
132
149
  # Builds the object from hash
133
150
  # @param [Hash] attributes Model attributes in the form of hash
134
151
  # @return [Object] Returns the model itself
135
152
  def build_from_hash(attributes)
136
153
  return nil unless attributes.is_a?(Hash)
137
- self.class.swagger_types.each_pair do |key, type|
154
+ self.class.openapi_types.each_pair do |key, type|
138
155
  if type =~ /\AArray<(.*)>/i
139
- # check to ensure the input is an array given that the the attribute
156
+ # check to ensure the input is an array given that the attribute
140
157
  # is documented as an array but the input is not
141
158
  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) } )
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
160
  end
144
161
  elsif !attributes[self.class.attribute_map[key]].nil?
145
162
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -165,7 +182,7 @@ module SwaggerAemClient
165
182
  value.to_i
166
183
  when :Float
167
184
  value.to_f
168
- when :BOOLEAN
185
+ when :Boolean
169
186
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
187
  true
171
188
  else
@@ -186,8 +203,7 @@ module SwaggerAemClient
186
203
  end
187
204
  end
188
205
  else # model
189
- temp_model = SwaggerAemClient.const_get(type).new
190
- temp_model.build_from_hash(value)
206
+ SwaggerAemClient.const_get(type).build_from_hash(value)
191
207
  end
192
208
  end
193
209
 
@@ -209,7 +225,11 @@ module SwaggerAemClient
209
225
  hash = {}
210
226
  self.class.attribute_map.each_pair do |attr, param|
211
227
  value = self.send(attr)
212
- next if value.nil?
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
213
233
  hash[param] = _to_hash(value)
214
234
  end
215
235
  hash
@@ -221,7 +241,7 @@ module SwaggerAemClient
221
241
  # @return [Hash] Returns the value in the form of hash
222
242
  def _to_hash(value)
223
243
  if value.is_a?(Array)
224
- value.compact.map{ |v| _to_hash(v) }
244
+ value.compact.map { |v| _to_hash(v) }
225
245
  elsif value.is_a?(Hash)
226
246
  {}.tap do |hash|
227
247
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -232,7 +252,5 @@ module SwaggerAemClient
232
252
  value
233
253
  end
234
254
  end
235
-
236
255
  end
237
-
238
256
  end
@@ -3,91 +3,65 @@
3
3
 
4
4
  #Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
5
5
 
6
- OpenAPI spec version: 2.4.0
6
+ The version of the OpenAPI document: 3.4.0
7
7
  Contact: opensource@shinesolutions.com
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0-SNAPSHOT
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 SamlConfigurationProperties
18
- # Repository path for which this authentication handler should be used by Sling. If this is empty, the authentication handler will be disabled.
19
17
  attr_accessor :path
20
18
 
21
- # OSGi Framework Service Ranking value to indicate the order in which to call this service. This is an int value where higher values designate higher precedence. Default value is 0.
22
19
  attr_accessor :service_ranking
23
20
 
24
- # URL of the IDP where the SAML Authentication Request should be sent to. If this property is empty the authentication handler is disabled. (idpUrl)
25
21
  attr_accessor :idp_url
26
22
 
27
- # The alias of the IdP's certificate in the global truststore. If this property is empty the authentication handler is disabled.
28
23
  attr_accessor :idp_cert_alias
29
24
 
30
- # Use an HTTP Redirect to the IDP URL instead of sending an AuthnRequest-message to request credentials. Use this for IDP initiated authentication.
31
25
  attr_accessor :idp_http_redirect
32
26
 
33
- # ID which uniquely identifies this service provider with the identity provider. If this property is empty the authentication handler is disabled.
34
27
  attr_accessor :service_provider_entity_id
35
28
 
36
- # The (optional) AssertionConsumerServiceURL attribute of an Authn request specifies the location to which a <Response> message MUST be sent to the requester.
37
29
  attr_accessor :assertion_consumer_service_url
38
30
 
39
- # The alias of the SP's private key in the key-store of the 'authentication-service' system user. If this property is empty the handler will not be able to sign or decrypt messages.
40
31
  attr_accessor :sp_private_key_alias
41
32
 
42
- # The password of the key-store of the 'authentication-service' system user.
43
33
  attr_accessor :key_store_password
44
34
 
45
- # The default location to redirect to after successful authentication.
46
35
  attr_accessor :default_redirect_url
47
36
 
48
- # The name of the attribute containing the user ID used to authenticate and create the user in the CRX repository. Leave empty to use the Subject:NameId.
49
37
  attr_accessor :user_id_attribute
50
38
 
51
- # Whether or not this authentication handler expects encrypted SAML assertions. If this is enabled the SP's private key must be provided in the key-store of the 'authentication-service' system user (see SP Private Key Alias above).
52
39
  attr_accessor :use_encryption
53
40
 
54
- # Whether or not to autocreate nonexisting users in the repository.
55
41
  attr_accessor :create_user
56
42
 
57
- # Whether or not a user should be automatically added to CRX groups after successful authentication.
58
43
  attr_accessor :add_group_memberships
59
44
 
60
- # The name of the attribute containing a list of CRX groups this user should be added to.
61
45
  attr_accessor :group_membership_attribute
62
46
 
63
- # A list of default CRX groups users are added to after successful authentication.
64
47
  attr_accessor :default_groups
65
48
 
66
- # The value of the NameIDPolicy format parameter to send in the AuthnRequest message.
67
49
  attr_accessor :name_id_format
68
50
 
69
- # A list of attribute mappings (in the format \\attributename=path/relative/to/user/node\\) which should be stored in the repository on user-synchronization.
70
51
  attr_accessor :synchronize_attributes
71
52
 
72
- # Whether or not logout (dropCredentials) requests will be processed by this handler.
73
53
  attr_accessor :handle_logout
74
54
 
75
- # URL of the IDP where the SAML Logout Request should be sent to. If this property is empty the authentication handler won't handle logouts.
76
55
  attr_accessor :logout_url
77
56
 
78
- # Time tolerance in seconds to compensate clock skew between IDP and SP when validating Assertions.
79
57
  attr_accessor :clock_tolerance
80
58
 
81
- # The digest algorithm to use when signing a SAML message.
82
59
  attr_accessor :digest_method
83
60
 
84
- # The signature algorithm to use when signing a SAML message.
85
61
  attr_accessor :signature_method
86
62
 
87
- # User intermediate path to store created users.
88
63
  attr_accessor :user_intermediate_path
89
64
 
90
-
91
65
  # Attribute mapping from ruby-style variable name to JSON key.
92
66
  def self.attribute_map
93
67
  {
@@ -119,200 +93,164 @@ module SwaggerAemClient
119
93
  end
120
94
 
121
95
  # Attribute type mapping.
122
- def self.swagger_types
96
+ def self.openapi_types
123
97
  {
124
- :'path' => :'Array<SamlConfigurationPropertyItemsArray>',
125
- :'service_ranking' => :'Array<SamlConfigurationPropertyItemsLong>',
126
- :'idp_url' => :'Array<SamlConfigurationPropertyItemsString>',
127
- :'idp_cert_alias' => :'Array<SamlConfigurationPropertyItemsString>',
128
- :'idp_http_redirect' => :'Array<SamlConfigurationPropertyItemsBoolean>',
129
- :'service_provider_entity_id' => :'Array<SamlConfigurationPropertyItemsString>',
130
- :'assertion_consumer_service_url' => :'Array<SamlConfigurationPropertyItemsString>',
131
- :'sp_private_key_alias' => :'Array<SamlConfigurationPropertyItemsString>',
132
- :'key_store_password' => :'Array<SamlConfigurationPropertyItemsString>',
133
- :'default_redirect_url' => :'Array<SamlConfigurationPropertyItemsString>',
134
- :'user_id_attribute' => :'Array<SamlConfigurationPropertyItemsString>',
135
- :'use_encryption' => :'Array<SamlConfigurationPropertyItemsBoolean>',
136
- :'create_user' => :'Array<SamlConfigurationPropertyItemsBoolean>',
137
- :'add_group_memberships' => :'Array<SamlConfigurationPropertyItemsBoolean>',
138
- :'group_membership_attribute' => :'Array<SamlConfigurationPropertyItemsString>',
139
- :'default_groups' => :'Array<SamlConfigurationPropertyItemsArray>',
140
- :'name_id_format' => :'Array<SamlConfigurationPropertyItemsString>',
141
- :'synchronize_attributes' => :'Array<SamlConfigurationPropertyItemsArray>',
142
- :'handle_logout' => :'Array<SamlConfigurationPropertyItemsBoolean>',
143
- :'logout_url' => :'Array<SamlConfigurationPropertyItemsString>',
144
- :'clock_tolerance' => :'Array<SamlConfigurationPropertyItemsLong>',
145
- :'digest_method' => :'Array<SamlConfigurationPropertyItemsString>',
146
- :'signature_method' => :'Array<SamlConfigurationPropertyItemsString>',
147
- :'user_intermediate_path' => :'Array<SamlConfigurationPropertyItemsString>'
98
+ :'path' => :'SamlConfigurationPropertyItemsArray',
99
+ :'service_ranking' => :'SamlConfigurationPropertyItemsLong',
100
+ :'idp_url' => :'SamlConfigurationPropertyItemsString',
101
+ :'idp_cert_alias' => :'SamlConfigurationPropertyItemsString',
102
+ :'idp_http_redirect' => :'SamlConfigurationPropertyItemsBoolean',
103
+ :'service_provider_entity_id' => :'SamlConfigurationPropertyItemsString',
104
+ :'assertion_consumer_service_url' => :'SamlConfigurationPropertyItemsString',
105
+ :'sp_private_key_alias' => :'SamlConfigurationPropertyItemsString',
106
+ :'key_store_password' => :'SamlConfigurationPropertyItemsString',
107
+ :'default_redirect_url' => :'SamlConfigurationPropertyItemsString',
108
+ :'user_id_attribute' => :'SamlConfigurationPropertyItemsString',
109
+ :'use_encryption' => :'SamlConfigurationPropertyItemsBoolean',
110
+ :'create_user' => :'SamlConfigurationPropertyItemsBoolean',
111
+ :'add_group_memberships' => :'SamlConfigurationPropertyItemsBoolean',
112
+ :'group_membership_attribute' => :'SamlConfigurationPropertyItemsString',
113
+ :'default_groups' => :'SamlConfigurationPropertyItemsArray',
114
+ :'name_id_format' => :'SamlConfigurationPropertyItemsString',
115
+ :'synchronize_attributes' => :'SamlConfigurationPropertyItemsArray',
116
+ :'handle_logout' => :'SamlConfigurationPropertyItemsBoolean',
117
+ :'logout_url' => :'SamlConfigurationPropertyItemsString',
118
+ :'clock_tolerance' => :'SamlConfigurationPropertyItemsLong',
119
+ :'digest_method' => :'SamlConfigurationPropertyItemsString',
120
+ :'signature_method' => :'SamlConfigurationPropertyItemsString',
121
+ :'user_intermediate_path' => :'SamlConfigurationPropertyItemsString'
148
122
  }
149
123
  end
150
124
 
125
+ # List of attributes with nullable: true
126
+ def self.openapi_nullable
127
+ Set.new([
128
+ ])
129
+ end
130
+
151
131
  # Initializes the object
152
132
  # @param [Hash] attributes Model attributes in the form of hash
153
133
  def initialize(attributes = {})
154
- return unless attributes.is_a?(Hash)
155
-
156
- # convert string to symbol for hash key
157
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
158
-
159
- if attributes.has_key?(:'path')
160
- if (value = attributes[:'path']).is_a?(Array)
161
- self.path = value
162
- end
134
+ if (!attributes.is_a?(Hash))
135
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerAemClient::SamlConfigurationProperties` initialize method"
163
136
  end
164
137
 
165
- if attributes.has_key?(:'service.ranking')
166
- if (value = attributes[:'service.ranking']).is_a?(Array)
167
- self.service_ranking = value
138
+ # check to see if the attribute exists and convert string to symbol for hash key
139
+ attributes = attributes.each_with_object({}) { |(k, v), h|
140
+ if (!self.class.attribute_map.key?(k.to_sym))
141
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerAemClient::SamlConfigurationProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
168
142
  end
143
+ h[k.to_sym] = v
144
+ }
145
+
146
+ if attributes.key?(:'path')
147
+ self.path = attributes[:'path']
169
148
  end
170
149
 
171
- if attributes.has_key?(:'idpUrl')
172
- if (value = attributes[:'idpUrl']).is_a?(Array)
173
- self.idp_url = value
174
- end
150
+ if attributes.key?(:'service_ranking')
151
+ self.service_ranking = attributes[:'service_ranking']
175
152
  end
176
153
 
177
- if attributes.has_key?(:'idpCertAlias')
178
- if (value = attributes[:'idpCertAlias']).is_a?(Array)
179
- self.idp_cert_alias = value
180
- end
154
+ if attributes.key?(:'idp_url')
155
+ self.idp_url = attributes[:'idp_url']
181
156
  end
182
157
 
183
- if attributes.has_key?(:'idpHttpRedirect')
184
- if (value = attributes[:'idpHttpRedirect']).is_a?(Array)
185
- self.idp_http_redirect = value
186
- end
158
+ if attributes.key?(:'idp_cert_alias')
159
+ self.idp_cert_alias = attributes[:'idp_cert_alias']
187
160
  end
188
161
 
189
- if attributes.has_key?(:'serviceProviderEntityId')
190
- if (value = attributes[:'serviceProviderEntityId']).is_a?(Array)
191
- self.service_provider_entity_id = value
192
- end
162
+ if attributes.key?(:'idp_http_redirect')
163
+ self.idp_http_redirect = attributes[:'idp_http_redirect']
193
164
  end
194
165
 
195
- if attributes.has_key?(:'assertionConsumerServiceURL')
196
- if (value = attributes[:'assertionConsumerServiceURL']).is_a?(Array)
197
- self.assertion_consumer_service_url = value
198
- end
166
+ if attributes.key?(:'service_provider_entity_id')
167
+ self.service_provider_entity_id = attributes[:'service_provider_entity_id']
199
168
  end
200
169
 
201
- if attributes.has_key?(:'spPrivateKeyAlias')
202
- if (value = attributes[:'spPrivateKeyAlias']).is_a?(Array)
203
- self.sp_private_key_alias = value
204
- end
170
+ if attributes.key?(:'assertion_consumer_service_url')
171
+ self.assertion_consumer_service_url = attributes[:'assertion_consumer_service_url']
205
172
  end
206
173
 
207
- if attributes.has_key?(:'keyStorePassword')
208
- if (value = attributes[:'keyStorePassword']).is_a?(Array)
209
- self.key_store_password = value
210
- end
174
+ if attributes.key?(:'sp_private_key_alias')
175
+ self.sp_private_key_alias = attributes[:'sp_private_key_alias']
211
176
  end
212
177
 
213
- if attributes.has_key?(:'defaultRedirectUrl')
214
- if (value = attributes[:'defaultRedirectUrl']).is_a?(Array)
215
- self.default_redirect_url = value
216
- end
178
+ if attributes.key?(:'key_store_password')
179
+ self.key_store_password = attributes[:'key_store_password']
217
180
  end
218
181
 
219
- if attributes.has_key?(:'userIDAttribute')
220
- if (value = attributes[:'userIDAttribute']).is_a?(Array)
221
- self.user_id_attribute = value
222
- end
182
+ if attributes.key?(:'default_redirect_url')
183
+ self.default_redirect_url = attributes[:'default_redirect_url']
223
184
  end
224
185
 
225
- if attributes.has_key?(:'useEncryption')
226
- if (value = attributes[:'useEncryption']).is_a?(Array)
227
- self.use_encryption = value
228
- end
186
+ if attributes.key?(:'user_id_attribute')
187
+ self.user_id_attribute = attributes[:'user_id_attribute']
229
188
  end
230
189
 
231
- if attributes.has_key?(:'createUser')
232
- if (value = attributes[:'createUser']).is_a?(Array)
233
- self.create_user = value
234
- end
190
+ if attributes.key?(:'use_encryption')
191
+ self.use_encryption = attributes[:'use_encryption']
235
192
  end
236
193
 
237
- if attributes.has_key?(:'addGroupMemberships')
238
- if (value = attributes[:'addGroupMemberships']).is_a?(Array)
239
- self.add_group_memberships = value
240
- end
194
+ if attributes.key?(:'create_user')
195
+ self.create_user = attributes[:'create_user']
241
196
  end
242
197
 
243
- if attributes.has_key?(:'groupMembershipAttribute')
244
- if (value = attributes[:'groupMembershipAttribute']).is_a?(Array)
245
- self.group_membership_attribute = value
246
- end
198
+ if attributes.key?(:'add_group_memberships')
199
+ self.add_group_memberships = attributes[:'add_group_memberships']
247
200
  end
248
201
 
249
- if attributes.has_key?(:'defaultGroups')
250
- if (value = attributes[:'defaultGroups']).is_a?(Array)
251
- self.default_groups = value
252
- end
202
+ if attributes.key?(:'group_membership_attribute')
203
+ self.group_membership_attribute = attributes[:'group_membership_attribute']
253
204
  end
254
205
 
255
- if attributes.has_key?(:'nameIdFormat')
256
- if (value = attributes[:'nameIdFormat']).is_a?(Array)
257
- self.name_id_format = value
258
- end
206
+ if attributes.key?(:'default_groups')
207
+ self.default_groups = attributes[:'default_groups']
259
208
  end
260
209
 
261
- if attributes.has_key?(:'synchronizeAttributes')
262
- if (value = attributes[:'synchronizeAttributes']).is_a?(Array)
263
- self.synchronize_attributes = value
264
- end
210
+ if attributes.key?(:'name_id_format')
211
+ self.name_id_format = attributes[:'name_id_format']
265
212
  end
266
213
 
267
- if attributes.has_key?(:'handleLogout')
268
- if (value = attributes[:'handleLogout']).is_a?(Array)
269
- self.handle_logout = value
270
- end
214
+ if attributes.key?(:'synchronize_attributes')
215
+ self.synchronize_attributes = attributes[:'synchronize_attributes']
271
216
  end
272
217
 
273
- if attributes.has_key?(:'logoutUrl')
274
- if (value = attributes[:'logoutUrl']).is_a?(Array)
275
- self.logout_url = value
276
- end
218
+ if attributes.key?(:'handle_logout')
219
+ self.handle_logout = attributes[:'handle_logout']
277
220
  end
278
221
 
279
- if attributes.has_key?(:'clockTolerance')
280
- if (value = attributes[:'clockTolerance']).is_a?(Array)
281
- self.clock_tolerance = value
282
- end
222
+ if attributes.key?(:'logout_url')
223
+ self.logout_url = attributes[:'logout_url']
283
224
  end
284
225
 
285
- if attributes.has_key?(:'digestMethod')
286
- if (value = attributes[:'digestMethod']).is_a?(Array)
287
- self.digest_method = value
288
- end
226
+ if attributes.key?(:'clock_tolerance')
227
+ self.clock_tolerance = attributes[:'clock_tolerance']
289
228
  end
290
229
 
291
- if attributes.has_key?(:'signatureMethod')
292
- if (value = attributes[:'signatureMethod']).is_a?(Array)
293
- self.signature_method = value
294
- end
230
+ if attributes.key?(:'digest_method')
231
+ self.digest_method = attributes[:'digest_method']
295
232
  end
296
233
 
297
- if attributes.has_key?(:'userIntermediatePath')
298
- if (value = attributes[:'userIntermediatePath']).is_a?(Array)
299
- self.user_intermediate_path = value
300
- end
234
+ if attributes.key?(:'signature_method')
235
+ self.signature_method = attributes[:'signature_method']
301
236
  end
302
237
 
238
+ if attributes.key?(:'user_intermediate_path')
239
+ self.user_intermediate_path = attributes[:'user_intermediate_path']
240
+ end
303
241
  end
304
242
 
305
243
  # Show invalid properties with the reasons. Usually used together with valid?
306
- # @return Array for valid properies with the reasons
244
+ # @return Array for valid properties with the reasons
307
245
  def list_invalid_properties
308
246
  invalid_properties = Array.new
309
- return invalid_properties
247
+ invalid_properties
310
248
  end
311
249
 
312
250
  # Check to see if the all the properties in the model are valid
313
251
  # @return true if the model is valid
314
252
  def valid?
315
- return true
253
+ true
316
254
  end
317
255
 
318
256
  # Checks equality by comparing each attribute.
@@ -353,22 +291,29 @@ module SwaggerAemClient
353
291
  end
354
292
 
355
293
  # Calculates hash code according to all attributes.
356
- # @return [Fixnum] Hash code
294
+ # @return [Integer] Hash code
357
295
  def hash
358
296
  [path, service_ranking, idp_url, idp_cert_alias, idp_http_redirect, service_provider_entity_id, assertion_consumer_service_url, sp_private_key_alias, key_store_password, default_redirect_url, user_id_attribute, use_encryption, create_user, add_group_memberships, group_membership_attribute, default_groups, name_id_format, synchronize_attributes, handle_logout, logout_url, clock_tolerance, digest_method, signature_method, user_intermediate_path].hash
359
297
  end
360
298
 
299
+ # Builds the object from hash
300
+ # @param [Hash] attributes Model attributes in the form of hash
301
+ # @return [Object] Returns the model itself
302
+ def self.build_from_hash(attributes)
303
+ new.build_from_hash(attributes)
304
+ end
305
+
361
306
  # Builds the object from hash
362
307
  # @param [Hash] attributes Model attributes in the form of hash
363
308
  # @return [Object] Returns the model itself
364
309
  def build_from_hash(attributes)
365
310
  return nil unless attributes.is_a?(Hash)
366
- self.class.swagger_types.each_pair do |key, type|
311
+ self.class.openapi_types.each_pair do |key, type|
367
312
  if type =~ /\AArray<(.*)>/i
368
- # check to ensure the input is an array given that the the attribute
313
+ # check to ensure the input is an array given that the attribute
369
314
  # is documented as an array but the input is not
370
315
  if attributes[self.class.attribute_map[key]].is_a?(Array)
371
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
316
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
372
317
  end
373
318
  elsif !attributes[self.class.attribute_map[key]].nil?
374
319
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -394,7 +339,7 @@ module SwaggerAemClient
394
339
  value.to_i
395
340
  when :Float
396
341
  value.to_f
397
- when :BOOLEAN
342
+ when :Boolean
398
343
  if value.to_s =~ /\A(true|t|yes|y|1)\z/i
399
344
  true
400
345
  else
@@ -415,8 +360,7 @@ module SwaggerAemClient
415
360
  end
416
361
  end
417
362
  else # model
418
- temp_model = SwaggerAemClient.const_get(type).new
419
- temp_model.build_from_hash(value)
363
+ SwaggerAemClient.const_get(type).build_from_hash(value)
420
364
  end
421
365
  end
422
366
 
@@ -438,7 +382,11 @@ module SwaggerAemClient
438
382
  hash = {}
439
383
  self.class.attribute_map.each_pair do |attr, param|
440
384
  value = self.send(attr)
441
- next if value.nil?
385
+ if value.nil?
386
+ is_nullable = self.class.openapi_nullable.include?(attr)
387
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
388
+ end
389
+
442
390
  hash[param] = _to_hash(value)
443
391
  end
444
392
  hash
@@ -450,7 +398,7 @@ module SwaggerAemClient
450
398
  # @return [Hash] Returns the value in the form of hash
451
399
  def _to_hash(value)
452
400
  if value.is_a?(Array)
453
- value.compact.map{ |v| _to_hash(v) }
401
+ value.compact.map { |v| _to_hash(v) }
454
402
  elsif value.is_a?(Hash)
455
403
  {}.tap do |hash|
456
404
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -461,7 +409,5 @@ module SwaggerAemClient
461
409
  value
462
410
  end
463
411
  end
464
-
465
412
  end
466
-
467
413
  end