pulp_certguard_client 3.69.1 → 3.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/CertguardRHSMCertGuard.md +12 -11
- data/docs/CertguardRHSMCertGuardResponse.md +20 -19
- data/docs/CertguardX509CertGuard.md +12 -11
- data/docs/CertguardX509CertGuardResponse.md +20 -19
- data/docs/ContentguardsRhsmApi.md +195 -94
- data/docs/ContentguardsX509Api.md +195 -94
- data/docs/PaginatedcertguardRHSMCertGuardResponseList.md +14 -13
- data/docs/PaginatedcertguardX509CertGuardResponseList.md +14 -13
- data/docs/PatchedcertguardRHSMCertGuard.md +12 -11
- data/docs/PatchedcertguardX509CertGuard.md +12 -11
- data/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb +42 -27
- data/lib/pulp_certguard_client/api/contentguards_x509_api.rb +42 -27
- data/lib/pulp_certguard_client/api_client.rb +137 -102
- data/lib/pulp_certguard_client/api_error.rb +2 -1
- data/lib/pulp_certguard_client/configuration.rb +162 -21
- data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard.rb +34 -22
- data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard_response.rb +36 -24
- data/lib/pulp_certguard_client/models/certguard_x509_cert_guard.rb +34 -22
- data/lib/pulp_certguard_client/models/certguard_x509_cert_guard_response.rb +36 -24
- data/lib/pulp_certguard_client/models/paginatedcertguard_rhsm_cert_guard_response_list.rb +34 -22
- data/lib/pulp_certguard_client/models/paginatedcertguard_x509_cert_guard_response_list.rb +34 -22
- data/lib/pulp_certguard_client/models/patchedcertguard_rhsm_cert_guard.rb +40 -24
- data/lib/pulp_certguard_client/models/patchedcertguard_x509_cert_guard.rb +40 -24
- data/lib/pulp_certguard_client/version.rb +2 -2
- data/lib/pulp_certguard_client.rb +1 -1
- data/pulp_certguard_client.gemspec +9 -6
- data/spec/api/contentguards_rhsm_api_spec.rb +7 -7
- data/spec/api/contentguards_x509_api_spec.rb +7 -7
- data/spec/models/certguard_rhsm_cert_guard_response_spec.rb +13 -18
- data/spec/models/certguard_rhsm_cert_guard_spec.rb +9 -14
- data/spec/models/certguard_x509_cert_guard_response_spec.rb +13 -18
- data/spec/models/certguard_x509_cert_guard_spec.rb +9 -14
- data/spec/models/paginatedcertguard_rhsm_cert_guard_response_list_spec.rb +10 -15
- data/spec/models/paginatedcertguard_x509_cert_guard_response_list_spec.rb +10 -15
- data/spec/models/patchedcertguard_rhsm_cert_guard_spec.rb +9 -14
- data/spec/models/patchedcertguard_x509_cert_guard_spec.rb +9 -14
- data/spec/spec_helper.rb +1 -1
- metadata +41 -17
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpCertguardClient
|
16
17
|
class PaginatedcertguardRHSMCertGuardResponseList
|
@@ -32,6 +33,11 @@ module PulpCertguardClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpCertguardClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpCertguardClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpCertguardClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpCertguardClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpCertguardClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpCertguardClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpCertguardClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpCertguardClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpCertguardClient
|
16
17
|
class PaginatedcertguardX509CertGuardResponseList
|
@@ -32,6 +33,11 @@ module PulpCertguardClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpCertguardClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpCertguardClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpCertguardClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpCertguardClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpCertguardClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpCertguardClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpCertguardClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpCertguardClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpCertguardClient
|
16
17
|
# RHSM Content Guard Serializer.
|
@@ -33,6 +34,11 @@ module PulpCertguardClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -80,6 +86,7 @@ module PulpCertguardClient
|
|
80
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
81
87
|
# @return Array for valid properties with the reasons
|
82
88
|
def list_invalid_properties
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
83
90
|
invalid_properties = Array.new
|
84
91
|
if !@name.nil? && @name.to_s.length < 1
|
85
92
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -99,6 +106,7 @@ module PulpCertguardClient
|
|
99
106
|
# Check to see if the all the properties in the model are valid
|
100
107
|
# @return true if the model is valid
|
101
108
|
def valid?
|
109
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
110
|
return false if !@name.nil? && @name.to_s.length < 1
|
103
111
|
return false if !@description.nil? && @description.to_s.length < 1
|
104
112
|
return false if !@ca_certificate.nil? && @ca_certificate.to_s.length < 1
|
@@ -108,7 +116,11 @@ module PulpCertguardClient
|
|
108
116
|
# Custom attribute writer method with validation
|
109
117
|
# @param [Object] name Value to be assigned
|
110
118
|
def name=(name)
|
111
|
-
if
|
119
|
+
if name.nil?
|
120
|
+
fail ArgumentError, 'name cannot be nil'
|
121
|
+
end
|
122
|
+
|
123
|
+
if name.to_s.length < 1
|
112
124
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
113
125
|
end
|
114
126
|
|
@@ -128,7 +140,11 @@ module PulpCertguardClient
|
|
128
140
|
# Custom attribute writer method with validation
|
129
141
|
# @param [Object] ca_certificate Value to be assigned
|
130
142
|
def ca_certificate=(ca_certificate)
|
131
|
-
if
|
143
|
+
if ca_certificate.nil?
|
144
|
+
fail ArgumentError, 'ca_certificate cannot be nil'
|
145
|
+
end
|
146
|
+
|
147
|
+
if ca_certificate.to_s.length < 1
|
132
148
|
fail ArgumentError, 'invalid value for "ca_certificate", the character length must be great than or equal to 1.'
|
133
149
|
end
|
134
150
|
|
@@ -161,37 +177,33 @@ module PulpCertguardClient
|
|
161
177
|
# @param [Hash] attributes Model attributes in the form of hash
|
162
178
|
# @return [Object] Returns the model itself
|
163
179
|
def self.build_from_hash(attributes)
|
164
|
-
new.build_from_hash(attributes)
|
165
|
-
end
|
166
|
-
|
167
|
-
# Builds the object from hash
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
-
# @return [Object] Returns the model itself
|
170
|
-
def build_from_hash(attributes)
|
171
180
|
return nil unless attributes.is_a?(Hash)
|
172
|
-
|
173
|
-
|
181
|
+
attributes = attributes.transform_keys(&:to_sym)
|
182
|
+
transformed_hash = {}
|
183
|
+
openapi_types.each_pair do |key, type|
|
184
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
185
|
+
transformed_hash["#{key}"] = nil
|
186
|
+
elsif type =~ /\AArray<(.*)>/i
|
174
187
|
# check to ensure the input is an array given that the attribute
|
175
188
|
# is documented as an array but the input is not
|
176
|
-
if attributes[
|
177
|
-
|
189
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
190
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
178
191
|
end
|
179
|
-
elsif !attributes[
|
180
|
-
|
181
|
-
end
|
192
|
+
elsif !attributes[attribute_map[key]].nil?
|
193
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
194
|
+
end
|
182
195
|
end
|
183
|
-
|
184
|
-
self
|
196
|
+
new(transformed_hash)
|
185
197
|
end
|
186
198
|
|
187
199
|
# Deserializes the data based on type
|
188
200
|
# @param string type Data type
|
189
201
|
# @param string value Value to be deserialized
|
190
202
|
# @return [Object] Deserialized data
|
191
|
-
def _deserialize(type, value)
|
203
|
+
def self._deserialize(type, value)
|
192
204
|
case type.to_sym
|
193
|
-
when :
|
194
|
-
|
205
|
+
when :Time
|
206
|
+
Time.parse(value)
|
195
207
|
when :Date
|
196
208
|
Date.parse(value)
|
197
209
|
when :String
|
@@ -221,7 +233,9 @@ module PulpCertguardClient
|
|
221
233
|
end
|
222
234
|
end
|
223
235
|
else # model
|
224
|
-
|
236
|
+
# models (e.g. Pet) or oneOf
|
237
|
+
klass = PulpCertguardClient.const_get(type)
|
238
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
239
|
end
|
226
240
|
end
|
227
241
|
|
@@ -247,7 +261,7 @@ module PulpCertguardClient
|
|
247
261
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
248
262
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
249
263
|
end
|
250
|
-
|
264
|
+
|
251
265
|
hash[param] = _to_hash(value)
|
252
266
|
end
|
253
267
|
hash
|
@@ -270,5 +284,7 @@ module PulpCertguardClient
|
|
270
284
|
value
|
271
285
|
end
|
272
286
|
end
|
287
|
+
|
273
288
|
end
|
289
|
+
|
274
290
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpCertguardClient
|
16
17
|
# X.509 Content Guard Serializer.
|
@@ -33,6 +34,11 @@ module PulpCertguardClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -80,6 +86,7 @@ module PulpCertguardClient
|
|
80
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
81
87
|
# @return Array for valid properties with the reasons
|
82
88
|
def list_invalid_properties
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
83
90
|
invalid_properties = Array.new
|
84
91
|
if !@name.nil? && @name.to_s.length < 1
|
85
92
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -99,6 +106,7 @@ module PulpCertguardClient
|
|
99
106
|
# Check to see if the all the properties in the model are valid
|
100
107
|
# @return true if the model is valid
|
101
108
|
def valid?
|
109
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
110
|
return false if !@name.nil? && @name.to_s.length < 1
|
103
111
|
return false if !@description.nil? && @description.to_s.length < 1
|
104
112
|
return false if !@ca_certificate.nil? && @ca_certificate.to_s.length < 1
|
@@ -108,7 +116,11 @@ module PulpCertguardClient
|
|
108
116
|
# Custom attribute writer method with validation
|
109
117
|
# @param [Object] name Value to be assigned
|
110
118
|
def name=(name)
|
111
|
-
if
|
119
|
+
if name.nil?
|
120
|
+
fail ArgumentError, 'name cannot be nil'
|
121
|
+
end
|
122
|
+
|
123
|
+
if name.to_s.length < 1
|
112
124
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
113
125
|
end
|
114
126
|
|
@@ -128,7 +140,11 @@ module PulpCertguardClient
|
|
128
140
|
# Custom attribute writer method with validation
|
129
141
|
# @param [Object] ca_certificate Value to be assigned
|
130
142
|
def ca_certificate=(ca_certificate)
|
131
|
-
if
|
143
|
+
if ca_certificate.nil?
|
144
|
+
fail ArgumentError, 'ca_certificate cannot be nil'
|
145
|
+
end
|
146
|
+
|
147
|
+
if ca_certificate.to_s.length < 1
|
132
148
|
fail ArgumentError, 'invalid value for "ca_certificate", the character length must be great than or equal to 1.'
|
133
149
|
end
|
134
150
|
|
@@ -161,37 +177,33 @@ module PulpCertguardClient
|
|
161
177
|
# @param [Hash] attributes Model attributes in the form of hash
|
162
178
|
# @return [Object] Returns the model itself
|
163
179
|
def self.build_from_hash(attributes)
|
164
|
-
new.build_from_hash(attributes)
|
165
|
-
end
|
166
|
-
|
167
|
-
# Builds the object from hash
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
-
# @return [Object] Returns the model itself
|
170
|
-
def build_from_hash(attributes)
|
171
180
|
return nil unless attributes.is_a?(Hash)
|
172
|
-
|
173
|
-
|
181
|
+
attributes = attributes.transform_keys(&:to_sym)
|
182
|
+
transformed_hash = {}
|
183
|
+
openapi_types.each_pair do |key, type|
|
184
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
185
|
+
transformed_hash["#{key}"] = nil
|
186
|
+
elsif type =~ /\AArray<(.*)>/i
|
174
187
|
# check to ensure the input is an array given that the attribute
|
175
188
|
# is documented as an array but the input is not
|
176
|
-
if attributes[
|
177
|
-
|
189
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
190
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
178
191
|
end
|
179
|
-
elsif !attributes[
|
180
|
-
|
181
|
-
end
|
192
|
+
elsif !attributes[attribute_map[key]].nil?
|
193
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
194
|
+
end
|
182
195
|
end
|
183
|
-
|
184
|
-
self
|
196
|
+
new(transformed_hash)
|
185
197
|
end
|
186
198
|
|
187
199
|
# Deserializes the data based on type
|
188
200
|
# @param string type Data type
|
189
201
|
# @param string value Value to be deserialized
|
190
202
|
# @return [Object] Deserialized data
|
191
|
-
def _deserialize(type, value)
|
203
|
+
def self._deserialize(type, value)
|
192
204
|
case type.to_sym
|
193
|
-
when :
|
194
|
-
|
205
|
+
when :Time
|
206
|
+
Time.parse(value)
|
195
207
|
when :Date
|
196
208
|
Date.parse(value)
|
197
209
|
when :String
|
@@ -221,7 +233,9 @@ module PulpCertguardClient
|
|
221
233
|
end
|
222
234
|
end
|
223
235
|
else # model
|
224
|
-
|
236
|
+
# models (e.g. Pet) or oneOf
|
237
|
+
klass = PulpCertguardClient.const_get(type)
|
238
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
239
|
end
|
226
240
|
end
|
227
241
|
|
@@ -247,7 +261,7 @@ module PulpCertguardClient
|
|
247
261
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
248
262
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
249
263
|
end
|
250
|
-
|
264
|
+
|
251
265
|
hash[param] = _to_hash(value)
|
252
266
|
end
|
253
267
|
hash
|
@@ -270,5 +284,7 @@ module PulpCertguardClient
|
|
270
284
|
value
|
271
285
|
end
|
272
286
|
end
|
287
|
+
|
273
288
|
end
|
289
|
+
|
274
290
|
end
|
@@ -6,10 +6,10 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module PulpCertguardClient
|
14
|
-
VERSION = '3.
|
14
|
+
VERSION = '3.70.0'
|
15
15
|
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
The version of the OpenAPI document: v3
|
9
9
|
Contact: pulp-list@redhat.com
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
|
11
|
+
Generator version: 7.10.0
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -24,11 +24,14 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = "https://github.com/pulp/pulp_certguard"
|
25
25
|
s.summary = "Pulp 3 API Ruby Gem"
|
26
26
|
s.description = "Fetch, Upload, Organize, and Distribute Software Packages"
|
27
|
-
s.license =
|
28
|
-
s.required_ruby_version = ">=
|
29
|
-
|
30
|
-
|
31
|
-
s.add_runtime_dependency '
|
27
|
+
s.license = "GPLv2+"
|
28
|
+
s.required_ruby_version = ">= 2.7"
|
29
|
+
s.metadata = {}
|
30
|
+
|
31
|
+
s.add_runtime_dependency 'faraday-net_http', '>= 2.0', '< 3.1'
|
32
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 2.9'
|
33
|
+
s.add_runtime_dependency 'faraday-multipart'
|
34
|
+
s.add_runtime_dependency 'marcel'
|
32
35
|
|
33
36
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
37
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -40,7 +40,7 @@ describe 'ContentguardsRhsmApi' do
|
|
40
40
|
# @return [CertguardRHSMCertGuardResponse]
|
41
41
|
describe 'create test' do
|
42
42
|
it 'should work' do
|
43
|
-
# assertion here. ref: https://
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -52,7 +52,7 @@ describe 'ContentguardsRhsmApi' do
|
|
52
52
|
# @return [nil]
|
53
53
|
describe 'delete test' do
|
54
54
|
it 'should work' do
|
55
|
-
# assertion here. ref: https://
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -81,7 +81,7 @@ describe 'ContentguardsRhsmApi' do
|
|
81
81
|
# @return [PaginatedcertguardRHSMCertGuardResponseList]
|
82
82
|
describe 'list test' do
|
83
83
|
it 'should work' do
|
84
|
-
# assertion here. ref: https://
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -94,7 +94,7 @@ describe 'ContentguardsRhsmApi' do
|
|
94
94
|
# @return [CertguardRHSMCertGuardResponse]
|
95
95
|
describe 'partial_update test' do
|
96
96
|
it 'should work' do
|
97
|
-
# assertion here. ref: https://
|
97
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
@@ -108,7 +108,7 @@ describe 'ContentguardsRhsmApi' do
|
|
108
108
|
# @return [CertguardRHSMCertGuardResponse]
|
109
109
|
describe 'read test' do
|
110
110
|
it 'should work' do
|
111
|
-
# assertion here. ref: https://
|
111
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
@@ -121,7 +121,7 @@ describe 'ContentguardsRhsmApi' do
|
|
121
121
|
# @return [CertguardRHSMCertGuardResponse]
|
122
122
|
describe 'update test' do
|
123
123
|
it 'should work' do
|
124
|
-
# assertion here. ref: https://
|
124
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|