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