pulpcore_client 3.22.28 → 3.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -4
- data/docs/ArtifactDistributionResponse.md +5 -5
- data/docs/DistributionsApi.md +4 -0
- data/docs/DistributionsArtifactsApi.md +4 -0
- data/docs/Domain.md +27 -0
- data/docs/DomainResponse.md +31 -0
- data/docs/DomainsApi.md +362 -0
- data/docs/ExportersFilesystemApi.md +3 -3
- data/docs/ExportersFilesystemExportsApi.md +3 -3
- data/docs/GroupRole.md +3 -1
- data/docs/GroupRoleResponse.md +3 -1
- data/docs/GroupsApi.md +6 -6
- data/docs/GroupsRolesApi.md +6 -4
- data/docs/PaginatedDomainResponseList.md +23 -0
- data/docs/PaginatedUpstreamPulpResponseList.md +23 -0
- data/docs/PatchedDomain.md +27 -0
- data/docs/PatchedUpstreamPulp.md +37 -0
- data/docs/RepositoriesApi.md +16 -0
- data/docs/RepositoryResponse.md +1 -1
- data/docs/RolesApi.md +6 -6
- data/docs/StatusResponse.md +3 -1
- data/docs/StorageClassEnum.md +16 -0
- data/docs/TaskSchedulesApi.md +2 -2
- data/docs/TasksApi.md +1 -1
- data/docs/UpstreamPulp.md +37 -0
- data/docs/UpstreamPulpResponse.md +39 -0
- data/docs/UpstreamPulpsApi.md +405 -0
- data/docs/UserRole.md +4 -2
- data/docs/UserRoleResponse.md +4 -2
- data/docs/UsersApi.md +6 -6
- data/docs/UsersRolesApi.md +6 -4
- data/docs/VersionResponse.md +3 -1
- data/lib/pulpcore_client/api/distributions_api.rb +6 -0
- data/lib/pulpcore_client/api/distributions_artifacts_api.rb +6 -0
- data/lib/pulpcore_client/api/domains_api.rb +446 -0
- data/lib/pulpcore_client/api/exporters_filesystem_api.rb +6 -6
- data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +6 -6
- data/lib/pulpcore_client/api/groups_api.rb +12 -12
- data/lib/pulpcore_client/api/groups_roles_api.rb +11 -8
- data/lib/pulpcore_client/api/repositories_api.rb +24 -0
- data/lib/pulpcore_client/api/roles_api.rb +12 -12
- data/lib/pulpcore_client/api/task_schedules_api.rb +4 -4
- data/lib/pulpcore_client/api/tasks_api.rb +2 -2
- data/lib/pulpcore_client/api/upstream_pulps_api.rb +492 -0
- data/lib/pulpcore_client/api/users_api.rb +12 -12
- data/lib/pulpcore_client/api/users_roles_api.rb +11 -8
- data/lib/pulpcore_client/api/workers_api.rb +1 -1
- data/lib/pulpcore_client/models/artifact_distribution_response.rb +25 -25
- data/lib/pulpcore_client/models/domain.rb +323 -0
- data/lib/pulpcore_client/models/domain_response.rb +318 -0
- data/lib/pulpcore_client/models/group_role.rb +16 -5
- data/lib/pulpcore_client/models/group_role_response.rb +15 -4
- data/lib/pulpcore_client/models/nested_role.rb +19 -0
- data/lib/pulpcore_client/models/paginated_domain_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_upstream_pulp_response_list.rb +237 -0
- data/lib/pulpcore_client/models/patched_domain.rb +304 -0
- data/lib/pulpcore_client/models/patched_upstream_pulp.rb +450 -0
- data/lib/pulpcore_client/models/repository_response.rb +1 -1
- data/lib/pulpcore_client/models/status_response.rb +19 -4
- data/lib/pulpcore_client/models/storage_class_enum.rb +37 -0
- data/lib/pulpcore_client/models/upstream_pulp.rb +477 -0
- data/lib/pulpcore_client/models/upstream_pulp_response.rb +338 -0
- data/lib/pulpcore_client/models/user_role.rb +17 -6
- data/lib/pulpcore_client/models/user_role_response.rb +16 -5
- data/lib/pulpcore_client/models/version_response.rb +19 -4
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +11 -0
- data/spec/api/distributions_api_spec.rb +2 -0
- data/spec/api/distributions_artifacts_api_spec.rb +2 -0
- data/spec/api/domains_api_spec.rb +120 -0
- data/spec/api/exporters_filesystem_api_spec.rb +3 -3
- data/spec/api/exporters_filesystem_exports_api_spec.rb +3 -3
- data/spec/api/groups_api_spec.rb +6 -6
- data/spec/api/groups_roles_api_spec.rb +5 -4
- data/spec/api/repositories_api_spec.rb +8 -0
- data/spec/api/roles_api_spec.rb +6 -6
- data/spec/api/task_schedules_api_spec.rb +2 -2
- data/spec/api/tasks_api_spec.rb +1 -1
- data/spec/api/upstream_pulps_api_spec.rb +127 -0
- data/spec/api/users_api_spec.rb +6 -6
- data/spec/api/users_roles_api_spec.rb +5 -4
- data/spec/models/artifact_distribution_response_spec.rb +6 -6
- data/spec/models/domain_response_spec.rb +83 -0
- data/spec/models/domain_spec.rb +71 -0
- data/spec/models/group_role_response_spec.rb +6 -0
- data/spec/models/group_role_spec.rb +6 -0
- data/spec/models/paginated_domain_response_list_spec.rb +59 -0
- data/spec/models/paginated_upstream_pulp_response_list_spec.rb +59 -0
- data/spec/models/patched_domain_spec.rb +71 -0
- data/spec/models/patched_upstream_pulp_spec.rb +101 -0
- data/spec/models/status_response_spec.rb +6 -0
- data/spec/models/storage_class_enum_spec.rb +35 -0
- data/spec/models/upstream_pulp_response_spec.rb +107 -0
- data/spec/models/upstream_pulp_spec.rb +101 -0
- data/spec/models/user_role_response_spec.rb +6 -0
- data/spec/models/user_role_spec.rb +6 -0
- data/spec/models/version_response_spec.rb +6 -0
- metadata +173 -129
@@ -0,0 +1,304 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
# Serializer for Domain.
|
17
|
+
class PatchedDomain
|
18
|
+
# A name for this domain.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# An optional description.
|
22
|
+
attr_accessor :description
|
23
|
+
|
24
|
+
# Backend storage class for domain.
|
25
|
+
attr_accessor :storage_class
|
26
|
+
|
27
|
+
# Settings for storage class.
|
28
|
+
attr_accessor :storage_settings
|
29
|
+
|
30
|
+
# Boolean to have the content app redirect to object storage.
|
31
|
+
attr_accessor :redirect_to_object_storage
|
32
|
+
|
33
|
+
# Boolean to hide distributions with a content guard in the content app.
|
34
|
+
attr_accessor :hide_guarded_distributions
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'name' => :'name',
|
40
|
+
:'description' => :'description',
|
41
|
+
:'storage_class' => :'storage_class',
|
42
|
+
:'storage_settings' => :'storage_settings',
|
43
|
+
:'redirect_to_object_storage' => :'redirect_to_object_storage',
|
44
|
+
:'hide_guarded_distributions' => :'hide_guarded_distributions'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'name' => :'String',
|
52
|
+
:'description' => :'String',
|
53
|
+
:'storage_class' => :'StorageClassEnum',
|
54
|
+
:'storage_settings' => :'Object',
|
55
|
+
:'redirect_to_object_storage' => :'Boolean',
|
56
|
+
:'hide_guarded_distributions' => :'Boolean'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# List of attributes with nullable: true
|
61
|
+
def self.openapi_nullable
|
62
|
+
Set.new([
|
63
|
+
:'description',
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PatchedDomain` initialize method"
|
72
|
+
end
|
73
|
+
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PatchedDomain`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
|
+
end
|
79
|
+
h[k.to_sym] = v
|
80
|
+
}
|
81
|
+
|
82
|
+
if attributes.key?(:'name')
|
83
|
+
self.name = attributes[:'name']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'description')
|
87
|
+
self.description = attributes[:'description']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'storage_class')
|
91
|
+
self.storage_class = attributes[:'storage_class']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'storage_settings')
|
95
|
+
self.storage_settings = attributes[:'storage_settings']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'redirect_to_object_storage')
|
99
|
+
self.redirect_to_object_storage = attributes[:'redirect_to_object_storage']
|
100
|
+
else
|
101
|
+
self.redirect_to_object_storage = true
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'hide_guarded_distributions')
|
105
|
+
self.hide_guarded_distributions = attributes[:'hide_guarded_distributions']
|
106
|
+
else
|
107
|
+
self.hide_guarded_distributions = false
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properties with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
invalid_properties = Array.new
|
115
|
+
if !@name.nil? && @name.to_s.length < 1
|
116
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
117
|
+
end
|
118
|
+
|
119
|
+
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
120
|
+
if !@name.nil? && @name !~ pattern
|
121
|
+
invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
|
122
|
+
end
|
123
|
+
|
124
|
+
if !@description.nil? && @description.to_s.length < 1
|
125
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
126
|
+
end
|
127
|
+
|
128
|
+
invalid_properties
|
129
|
+
end
|
130
|
+
|
131
|
+
# Check to see if the all the properties in the model are valid
|
132
|
+
# @return true if the model is valid
|
133
|
+
def valid?
|
134
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
135
|
+
return false if !@name.nil? && @name !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
136
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method with validation
|
141
|
+
# @param [Object] name Value to be assigned
|
142
|
+
def name=(name)
|
143
|
+
if !name.nil? && name.to_s.length < 1
|
144
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
145
|
+
end
|
146
|
+
|
147
|
+
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
148
|
+
if !name.nil? && name !~ pattern
|
149
|
+
fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
|
150
|
+
end
|
151
|
+
|
152
|
+
@name = name
|
153
|
+
end
|
154
|
+
|
155
|
+
# Custom attribute writer method with validation
|
156
|
+
# @param [Object] description Value to be assigned
|
157
|
+
def description=(description)
|
158
|
+
if !description.nil? && description.to_s.length < 1
|
159
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
160
|
+
end
|
161
|
+
|
162
|
+
@description = description
|
163
|
+
end
|
164
|
+
|
165
|
+
# Checks equality by comparing each attribute.
|
166
|
+
# @param [Object] Object to be compared
|
167
|
+
def ==(o)
|
168
|
+
return true if self.equal?(o)
|
169
|
+
self.class == o.class &&
|
170
|
+
name == o.name &&
|
171
|
+
description == o.description &&
|
172
|
+
storage_class == o.storage_class &&
|
173
|
+
storage_settings == o.storage_settings &&
|
174
|
+
redirect_to_object_storage == o.redirect_to_object_storage &&
|
175
|
+
hide_guarded_distributions == o.hide_guarded_distributions
|
176
|
+
end
|
177
|
+
|
178
|
+
# @see the `==` method
|
179
|
+
# @param [Object] Object to be compared
|
180
|
+
def eql?(o)
|
181
|
+
self == o
|
182
|
+
end
|
183
|
+
|
184
|
+
# Calculates hash code according to all attributes.
|
185
|
+
# @return [Integer] Hash code
|
186
|
+
def hash
|
187
|
+
[name, description, storage_class, storage_settings, redirect_to_object_storage, hide_guarded_distributions].hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Builds the object from hash
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
192
|
+
# @return [Object] Returns the model itself
|
193
|
+
def self.build_from_hash(attributes)
|
194
|
+
new.build_from_hash(attributes)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Builds the object from hash
|
198
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
199
|
+
# @return [Object] Returns the model itself
|
200
|
+
def build_from_hash(attributes)
|
201
|
+
return nil unless attributes.is_a?(Hash)
|
202
|
+
self.class.openapi_types.each_pair do |key, type|
|
203
|
+
if type =~ /\AArray<(.*)>/i
|
204
|
+
# check to ensure the input is an array given that the attribute
|
205
|
+
# is documented as an array but the input is not
|
206
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
207
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
208
|
+
end
|
209
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
210
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
211
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
212
|
+
end
|
213
|
+
|
214
|
+
self
|
215
|
+
end
|
216
|
+
|
217
|
+
# Deserializes the data based on type
|
218
|
+
# @param string type Data type
|
219
|
+
# @param string value Value to be deserialized
|
220
|
+
# @return [Object] Deserialized data
|
221
|
+
def _deserialize(type, value)
|
222
|
+
case type.to_sym
|
223
|
+
when :DateTime
|
224
|
+
DateTime.parse(value)
|
225
|
+
when :Date
|
226
|
+
Date.parse(value)
|
227
|
+
when :String
|
228
|
+
value.to_s
|
229
|
+
when :Integer
|
230
|
+
value.to_i
|
231
|
+
when :Float
|
232
|
+
value.to_f
|
233
|
+
when :Boolean
|
234
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
235
|
+
true
|
236
|
+
else
|
237
|
+
false
|
238
|
+
end
|
239
|
+
when :Object
|
240
|
+
# generic object (usually a Hash), return directly
|
241
|
+
value
|
242
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
243
|
+
inner_type = Regexp.last_match[:inner_type]
|
244
|
+
value.map { |v| _deserialize(inner_type, v) }
|
245
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
246
|
+
k_type = Regexp.last_match[:k_type]
|
247
|
+
v_type = Regexp.last_match[:v_type]
|
248
|
+
{}.tap do |hash|
|
249
|
+
value.each do |k, v|
|
250
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
else # model
|
254
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Returns the string representation of the object
|
259
|
+
# @return [String] String presentation of the object
|
260
|
+
def to_s
|
261
|
+
to_hash.to_s
|
262
|
+
end
|
263
|
+
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
266
|
+
def to_body
|
267
|
+
to_hash
|
268
|
+
end
|
269
|
+
|
270
|
+
# Returns the object in the form of hash
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
272
|
+
def to_hash
|
273
|
+
hash = {}
|
274
|
+
self.class.attribute_map.each_pair do |attr, param|
|
275
|
+
value = self.send(attr)
|
276
|
+
if value.nil?
|
277
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
278
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
279
|
+
end
|
280
|
+
|
281
|
+
hash[param] = _to_hash(value)
|
282
|
+
end
|
283
|
+
hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Outputs non-array value in the form of hash
|
287
|
+
# For object, use to_hash. Otherwise, just return the value
|
288
|
+
# @param [Object] value Any valid value
|
289
|
+
# @return [Hash] Returns the value in the form of hash
|
290
|
+
def _to_hash(value)
|
291
|
+
if value.is_a?(Array)
|
292
|
+
value.compact.map { |v| _to_hash(v) }
|
293
|
+
elsif value.is_a?(Hash)
|
294
|
+
{}.tap do |hash|
|
295
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
296
|
+
end
|
297
|
+
elsif value.respond_to? :to_hash
|
298
|
+
value.to_hash
|
299
|
+
else
|
300
|
+
value
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|