pulpcore_client 3.21.35 → 3.22.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 +12 -6
- data/docs/AccessPoliciesApi.md +3 -3
- data/docs/ArtifactDistributionResponse.md +29 -0
- data/docs/ArtifactsApi.md +1 -1
- data/docs/ContentApi.md +1 -1
- data/docs/ContentSettingsResponse.md +19 -0
- data/docs/ContentguardsApi.md +3 -3
- data/docs/ContentguardsContentRedirectApi.md +3 -3
- data/docs/ContentguardsRbacApi.md +3 -3
- data/docs/DistributionResponse.md +1 -1
- data/docs/DistributionsApi.md +6 -6
- data/docs/DistributionsArtifactsApi.md +154 -0
- data/docs/ExportersFilesystemApi.md +3 -3
- data/docs/ExportersFilesystemExportsApi.md +1 -1
- data/docs/ExportersPulpApi.md +3 -3
- data/docs/ExportersPulpExportsApi.md +1 -1
- data/docs/FilesystemExport.md +1 -3
- data/docs/GroupsApi.md +1 -1
- data/docs/GroupsRolesApi.md +1 -1
- data/docs/GroupsUsersApi.md +1 -1
- data/docs/ImportersPulpApi.md +3 -3
- data/docs/ImportersPulpImportCheckApi.md +1 -1
- data/docs/ImportersPulpImportsApi.md +1 -1
- data/docs/OrphansApi.md +1 -1
- data/docs/OrphansCleanupApi.md +1 -1
- data/docs/PaginatedArtifactDistributionResponseList.md +23 -0
- data/docs/PublicationsApi.md +3 -3
- data/docs/RemoteResponse.md +4 -2
- data/docs/RemoteResponseHiddenFields.md +19 -0
- data/docs/RemotesApi.md +5 -5
- data/docs/RepairApi.md +1 -1
- data/docs/RepositoriesApi.md +4 -4
- data/docs/RepositoriesReclaimSpaceApi.md +1 -1
- data/docs/RepositoryResponse.md +1 -1
- data/docs/RepositoryVersionsApi.md +5 -5
- data/docs/RolesApi.md +1 -1
- data/docs/SigningServicesApi.md +5 -3
- data/docs/StatusApi.md +1 -1
- data/docs/StatusResponse.md +3 -1
- data/docs/TaskGroupsApi.md +1 -3
- data/docs/TaskSchedulesApi.md +5 -5
- data/docs/TasksApi.md +33 -19
- data/docs/UploadsApi.md +11 -1
- data/docs/UserResponse.md +3 -1
- data/docs/UsersApi.md +1 -1
- data/docs/UsersRolesApi.md +1 -1
- data/docs/WorkersApi.md +5 -5
- data/lib/pulpcore_client/api/access_policies_api.rb +3 -3
- data/lib/pulpcore_client/api/artifacts_api.rb +1 -1
- data/lib/pulpcore_client/api/contentguards_api.rb +3 -3
- data/lib/pulpcore_client/api/contentguards_content_redirect_api.rb +3 -3
- data/lib/pulpcore_client/api/contentguards_rbac_api.rb +3 -3
- data/lib/pulpcore_client/api/distributions_api.rb +7 -7
- data/lib/pulpcore_client/api/distributions_artifacts_api.rb +198 -0
- data/lib/pulpcore_client/api/exporters_filesystem_api.rb +3 -3
- data/lib/pulpcore_client/api/exporters_pulp_api.rb +3 -3
- data/lib/pulpcore_client/api/groups_api.rb +1 -1
- data/lib/pulpcore_client/api/importers_pulp_api.rb +3 -3
- data/lib/pulpcore_client/api/publications_api.rb +3 -3
- data/lib/pulpcore_client/api/remotes_api.rb +5 -5
- data/lib/pulpcore_client/api/repositories_api.rb +3 -3
- data/lib/pulpcore_client/api/repository_versions_api.rb +5 -5
- data/lib/pulpcore_client/api/roles_api.rb +1 -1
- data/lib/pulpcore_client/api/signing_services_api.rb +9 -2
- data/lib/pulpcore_client/api/task_groups_api.rb +0 -7
- data/lib/pulpcore_client/api/task_schedules_api.rb +5 -5
- data/lib/pulpcore_client/api/tasks_api.rb +40 -19
- data/lib/pulpcore_client/api/uploads_api.rb +19 -0
- data/lib/pulpcore_client/api/users_api.rb +1 -1
- data/lib/pulpcore_client/api/workers_api.rb +5 -5
- data/lib/pulpcore_client/configuration.rb +3 -3
- data/lib/pulpcore_client/models/artifact_distribution_response.rb +279 -0
- data/lib/pulpcore_client/models/content_settings_response.rb +228 -0
- data/lib/pulpcore_client/models/distribution_response.rb +4 -2
- data/lib/pulpcore_client/models/filesystem_export.rb +4 -14
- data/lib/pulpcore_client/models/group_role.rb +19 -0
- data/lib/pulpcore_client/models/paginated_artifact_distribution_response_list.rb +237 -0
- data/lib/pulpcore_client/models/remote_response.rb +41 -27
- data/lib/pulpcore_client/models/remote_response_hidden_fields.rb +215 -0
- data/lib/pulpcore_client/models/repository_response.rb +4 -2
- data/lib/pulpcore_client/models/status_response.rb +19 -4
- data/lib/pulpcore_client/models/user_response.rb +16 -4
- data/lib/pulpcore_client/models/user_role.rb +19 -0
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +5 -0
- data/spec/api/access_policies_api_spec.rb +1 -1
- data/spec/api/contentguards_api_spec.rb +1 -1
- data/spec/api/contentguards_content_redirect_api_spec.rb +1 -1
- data/spec/api/contentguards_rbac_api_spec.rb +1 -1
- data/spec/api/distributions_api_spec.rb +3 -3
- data/spec/api/distributions_artifacts_api_spec.rb +76 -0
- data/spec/api/exporters_filesystem_api_spec.rb +1 -1
- data/spec/api/exporters_pulp_api_spec.rb +1 -1
- data/spec/api/importers_pulp_api_spec.rb +1 -1
- data/spec/api/publications_api_spec.rb +1 -1
- data/spec/api/remotes_api_spec.rb +2 -2
- data/spec/api/repositories_api_spec.rb +1 -1
- data/spec/api/repository_versions_api_spec.rb +2 -2
- data/spec/api/signing_services_api_spec.rb +2 -1
- data/spec/api/task_groups_api_spec.rb +0 -1
- data/spec/api/task_schedules_api_spec.rb +2 -2
- data/spec/api/tasks_api_spec.rb +16 -9
- data/spec/api/uploads_api_spec.rb +5 -0
- data/spec/api/workers_api_spec.rb +2 -2
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/artifact_distribution_response_spec.rb +77 -0
- data/spec/models/content_settings_response_spec.rb +47 -0
- data/spec/models/filesystem_export_spec.rb +0 -6
- data/spec/models/paginated_artifact_distribution_response_list_spec.rb +59 -0
- data/spec/models/remote_response_hidden_fields_spec.rb +47 -0
- data/spec/models/remote_response_spec.rb +6 -0
- data/spec/models/status_response_spec.rb +6 -0
- data/spec/models/user_response_spec.rb +6 -0
- metadata +159 -139
|
@@ -0,0 +1,237 @@
|
|
|
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
|
+
class PaginatedArtifactDistributionResponseList
|
|
17
|
+
attr_accessor :count
|
|
18
|
+
|
|
19
|
+
attr_accessor :_next
|
|
20
|
+
|
|
21
|
+
attr_accessor :previous
|
|
22
|
+
|
|
23
|
+
attr_accessor :results
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'count' => :'count',
|
|
29
|
+
:'_next' => :'next',
|
|
30
|
+
:'previous' => :'previous',
|
|
31
|
+
:'results' => :'results'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.openapi_types
|
|
37
|
+
{
|
|
38
|
+
:'count' => :'Integer',
|
|
39
|
+
:'_next' => :'String',
|
|
40
|
+
:'previous' => :'String',
|
|
41
|
+
:'results' => :'Array<ArtifactDistributionResponse>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
:'_next',
|
|
49
|
+
:'previous',
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PaginatedArtifactDistributionResponseList` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PaginatedArtifactDistributionResponseList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'count')
|
|
69
|
+
self.count = attributes[:'count']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'_next')
|
|
73
|
+
self._next = attributes[:'_next']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'previous')
|
|
77
|
+
self.previous = attributes[:'previous']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'results')
|
|
81
|
+
if (value = attributes[:'results']).is_a?(Array)
|
|
82
|
+
self.results = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
invalid_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
def valid?
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Checks equality by comparing each attribute.
|
|
101
|
+
# @param [Object] Object to be compared
|
|
102
|
+
def ==(o)
|
|
103
|
+
return true if self.equal?(o)
|
|
104
|
+
self.class == o.class &&
|
|
105
|
+
count == o.count &&
|
|
106
|
+
_next == o._next &&
|
|
107
|
+
previous == o.previous &&
|
|
108
|
+
results == o.results
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[count, _next, previous, results].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
new.build_from_hash(attributes)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Builds the object from hash
|
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
132
|
+
# @return [Object] Returns the model itself
|
|
133
|
+
def build_from_hash(attributes)
|
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
|
135
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
136
|
+
if type =~ /\AArray<(.*)>/i
|
|
137
|
+
# check to ensure the input is an array given that the attribute
|
|
138
|
+
# is documented as an array but the input is not
|
|
139
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
140
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
141
|
+
end
|
|
142
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
143
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
144
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
self
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Deserializes the data based on type
|
|
151
|
+
# @param string type Data type
|
|
152
|
+
# @param string value Value to be deserialized
|
|
153
|
+
# @return [Object] Deserialized data
|
|
154
|
+
def _deserialize(type, value)
|
|
155
|
+
case type.to_sym
|
|
156
|
+
when :DateTime
|
|
157
|
+
DateTime.parse(value)
|
|
158
|
+
when :Date
|
|
159
|
+
Date.parse(value)
|
|
160
|
+
when :String
|
|
161
|
+
value.to_s
|
|
162
|
+
when :Integer
|
|
163
|
+
value.to_i
|
|
164
|
+
when :Float
|
|
165
|
+
value.to_f
|
|
166
|
+
when :Boolean
|
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
168
|
+
true
|
|
169
|
+
else
|
|
170
|
+
false
|
|
171
|
+
end
|
|
172
|
+
when :Object
|
|
173
|
+
# generic object (usually a Hash), return directly
|
|
174
|
+
value
|
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
|
181
|
+
{}.tap do |hash|
|
|
182
|
+
value.each do |k, v|
|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
else # model
|
|
187
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Returns the string representation of the object
|
|
192
|
+
# @return [String] String presentation of the object
|
|
193
|
+
def to_s
|
|
194
|
+
to_hash.to_s
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_body
|
|
200
|
+
to_hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Outputs non-array value in the form of hash
|
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
221
|
+
# @param [Object] value Any valid value
|
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
|
223
|
+
def _to_hash(value)
|
|
224
|
+
if value.is_a?(Array)
|
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
|
226
|
+
elsif value.is_a?(Hash)
|
|
227
|
+
{}.tap do |hash|
|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
229
|
+
end
|
|
230
|
+
elsif value.respond_to? :to_hash
|
|
231
|
+
value.to_hash
|
|
232
|
+
else
|
|
233
|
+
value
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
@@ -70,6 +70,9 @@ module PulpcoreClient
|
|
|
70
70
|
# Limits requests per second for each concurrent downloader
|
|
71
71
|
attr_accessor :rate_limit
|
|
72
72
|
|
|
73
|
+
# List of hidden (write only) fields
|
|
74
|
+
attr_accessor :hidden_fields
|
|
75
|
+
|
|
73
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
77
|
def self.attribute_map
|
|
75
78
|
{
|
|
@@ -91,7 +94,8 @@ module PulpcoreClient
|
|
|
91
94
|
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
92
95
|
:'sock_read_timeout' => :'sock_read_timeout',
|
|
93
96
|
:'headers' => :'headers',
|
|
94
|
-
:'rate_limit' => :'rate_limit'
|
|
97
|
+
:'rate_limit' => :'rate_limit',
|
|
98
|
+
:'hidden_fields' => :'hidden_fields'
|
|
95
99
|
}
|
|
96
100
|
end
|
|
97
101
|
|
|
@@ -106,7 +110,7 @@ module PulpcoreClient
|
|
|
106
110
|
:'client_cert' => :'String',
|
|
107
111
|
:'tls_validation' => :'Boolean',
|
|
108
112
|
:'proxy_url' => :'String',
|
|
109
|
-
:'pulp_labels' => :'
|
|
113
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
110
114
|
:'pulp_last_updated' => :'DateTime',
|
|
111
115
|
:'download_concurrency' => :'Integer',
|
|
112
116
|
:'max_retries' => :'Integer',
|
|
@@ -116,7 +120,8 @@ module PulpcoreClient
|
|
|
116
120
|
:'sock_connect_timeout' => :'Float',
|
|
117
121
|
:'sock_read_timeout' => :'Float',
|
|
118
122
|
:'headers' => :'Array<Object>',
|
|
119
|
-
:'rate_limit' => :'Integer'
|
|
123
|
+
:'rate_limit' => :'Integer',
|
|
124
|
+
:'hidden_fields' => :'Array<RemoteResponseHiddenFields>'
|
|
120
125
|
}
|
|
121
126
|
end
|
|
122
127
|
|
|
@@ -132,7 +137,7 @@ module PulpcoreClient
|
|
|
132
137
|
:'connect_timeout',
|
|
133
138
|
:'sock_connect_timeout',
|
|
134
139
|
:'sock_read_timeout',
|
|
135
|
-
:'rate_limit'
|
|
140
|
+
:'rate_limit',
|
|
136
141
|
])
|
|
137
142
|
end
|
|
138
143
|
|
|
@@ -184,7 +189,9 @@ module PulpcoreClient
|
|
|
184
189
|
end
|
|
185
190
|
|
|
186
191
|
if attributes.key?(:'pulp_labels')
|
|
187
|
-
|
|
192
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
193
|
+
self.pulp_labels = value
|
|
194
|
+
end
|
|
188
195
|
end
|
|
189
196
|
|
|
190
197
|
if attributes.key?(:'pulp_last_updated')
|
|
@@ -228,6 +235,12 @@ module PulpcoreClient
|
|
|
228
235
|
if attributes.key?(:'rate_limit')
|
|
229
236
|
self.rate_limit = attributes[:'rate_limit']
|
|
230
237
|
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'hidden_fields')
|
|
240
|
+
if (value = attributes[:'hidden_fields']).is_a?(Array)
|
|
241
|
+
self.hidden_fields = value
|
|
242
|
+
end
|
|
243
|
+
end
|
|
231
244
|
end
|
|
232
245
|
|
|
233
246
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -246,20 +259,20 @@ module PulpcoreClient
|
|
|
246
259
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
247
260
|
end
|
|
248
261
|
|
|
249
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
|
250
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
|
262
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
263
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
251
264
|
end
|
|
252
265
|
|
|
253
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
|
254
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
|
266
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
267
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
|
255
268
|
end
|
|
256
269
|
|
|
257
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
258
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
|
270
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
271
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
|
259
272
|
end
|
|
260
273
|
|
|
261
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
262
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
|
274
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
275
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
263
276
|
end
|
|
264
277
|
|
|
265
278
|
invalid_properties
|
|
@@ -271,10 +284,10 @@ module PulpcoreClient
|
|
|
271
284
|
return false if @name.nil?
|
|
272
285
|
return false if @url.nil?
|
|
273
286
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
274
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
|
275
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
|
276
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
277
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
287
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
288
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
289
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
290
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
278
291
|
true
|
|
279
292
|
end
|
|
280
293
|
|
|
@@ -291,8 +304,8 @@ module PulpcoreClient
|
|
|
291
304
|
# Custom attribute writer method with validation
|
|
292
305
|
# @param [Object] total_timeout Value to be assigned
|
|
293
306
|
def total_timeout=(total_timeout)
|
|
294
|
-
if !total_timeout.nil? && total_timeout < 0
|
|
295
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
|
307
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
|
308
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
|
296
309
|
end
|
|
297
310
|
|
|
298
311
|
@total_timeout = total_timeout
|
|
@@ -301,8 +314,8 @@ module PulpcoreClient
|
|
|
301
314
|
# Custom attribute writer method with validation
|
|
302
315
|
# @param [Object] connect_timeout Value to be assigned
|
|
303
316
|
def connect_timeout=(connect_timeout)
|
|
304
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
|
305
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
|
317
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
|
318
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
|
306
319
|
end
|
|
307
320
|
|
|
308
321
|
@connect_timeout = connect_timeout
|
|
@@ -311,8 +324,8 @@ module PulpcoreClient
|
|
|
311
324
|
# Custom attribute writer method with validation
|
|
312
325
|
# @param [Object] sock_connect_timeout Value to be assigned
|
|
313
326
|
def sock_connect_timeout=(sock_connect_timeout)
|
|
314
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
|
315
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
|
327
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
|
328
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
|
316
329
|
end
|
|
317
330
|
|
|
318
331
|
@sock_connect_timeout = sock_connect_timeout
|
|
@@ -321,8 +334,8 @@ module PulpcoreClient
|
|
|
321
334
|
# Custom attribute writer method with validation
|
|
322
335
|
# @param [Object] sock_read_timeout Value to be assigned
|
|
323
336
|
def sock_read_timeout=(sock_read_timeout)
|
|
324
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
|
325
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
|
337
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
|
338
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
|
326
339
|
end
|
|
327
340
|
|
|
328
341
|
@sock_read_timeout = sock_read_timeout
|
|
@@ -351,7 +364,8 @@ module PulpcoreClient
|
|
|
351
364
|
sock_connect_timeout == o.sock_connect_timeout &&
|
|
352
365
|
sock_read_timeout == o.sock_read_timeout &&
|
|
353
366
|
headers == o.headers &&
|
|
354
|
-
rate_limit == o.rate_limit
|
|
367
|
+
rate_limit == o.rate_limit &&
|
|
368
|
+
hidden_fields == o.hidden_fields
|
|
355
369
|
end
|
|
356
370
|
|
|
357
371
|
# @see the `==` method
|
|
@@ -363,7 +377,7 @@ module PulpcoreClient
|
|
|
363
377
|
# Calculates hash code according to all attributes.
|
|
364
378
|
# @return [Integer] Hash code
|
|
365
379
|
def hash
|
|
366
|
-
[pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit].hash
|
|
380
|
+
[pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, hidden_fields].hash
|
|
367
381
|
end
|
|
368
382
|
|
|
369
383
|
# Builds the object from hash
|
|
@@ -0,0 +1,215 @@
|
|
|
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
|
+
class RemoteResponseHiddenFields
|
|
17
|
+
attr_accessor :name
|
|
18
|
+
|
|
19
|
+
attr_accessor :is_set
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'name' => :'name',
|
|
25
|
+
:'is_set' => :'is_set'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.openapi_types
|
|
31
|
+
{
|
|
32
|
+
:'name' => :'String',
|
|
33
|
+
:'is_set' => :'Boolean'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# List of attributes with nullable: true
|
|
38
|
+
def self.openapi_nullable
|
|
39
|
+
Set.new([
|
|
40
|
+
])
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Initializes the object
|
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
45
|
+
def initialize(attributes = {})
|
|
46
|
+
if (!attributes.is_a?(Hash))
|
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::RemoteResponseHiddenFields` initialize method"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::RemoteResponseHiddenFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
54
|
+
end
|
|
55
|
+
h[k.to_sym] = v
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if attributes.key?(:'name')
|
|
59
|
+
self.name = attributes[:'name']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes.key?(:'is_set')
|
|
63
|
+
self.is_set = attributes[:'is_set']
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
|
+
# @return Array for valid properties with the reasons
|
|
69
|
+
def list_invalid_properties
|
|
70
|
+
invalid_properties = Array.new
|
|
71
|
+
invalid_properties
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Check to see if the all the properties in the model are valid
|
|
75
|
+
# @return true if the model is valid
|
|
76
|
+
def valid?
|
|
77
|
+
true
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Checks equality by comparing each attribute.
|
|
81
|
+
# @param [Object] Object to be compared
|
|
82
|
+
def ==(o)
|
|
83
|
+
return true if self.equal?(o)
|
|
84
|
+
self.class == o.class &&
|
|
85
|
+
name == o.name &&
|
|
86
|
+
is_set == o.is_set
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @see the `==` method
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def eql?(o)
|
|
92
|
+
self == o
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Calculates hash code according to all attributes.
|
|
96
|
+
# @return [Integer] Hash code
|
|
97
|
+
def hash
|
|
98
|
+
[name, is_set].hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Builds the object from hash
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
# @return [Object] Returns the model itself
|
|
104
|
+
def self.build_from_hash(attributes)
|
|
105
|
+
new.build_from_hash(attributes)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
|
115
|
+
# check to ensure the input is an array given that the attribute
|
|
116
|
+
# is documented as an array but the input is not
|
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
119
|
+
end
|
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
122
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
self
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Deserializes the data based on type
|
|
129
|
+
# @param string type Data type
|
|
130
|
+
# @param string value Value to be deserialized
|
|
131
|
+
# @return [Object] Deserialized data
|
|
132
|
+
def _deserialize(type, value)
|
|
133
|
+
case type.to_sym
|
|
134
|
+
when :DateTime
|
|
135
|
+
DateTime.parse(value)
|
|
136
|
+
when :Date
|
|
137
|
+
Date.parse(value)
|
|
138
|
+
when :String
|
|
139
|
+
value.to_s
|
|
140
|
+
when :Integer
|
|
141
|
+
value.to_i
|
|
142
|
+
when :Float
|
|
143
|
+
value.to_f
|
|
144
|
+
when :Boolean
|
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
146
|
+
true
|
|
147
|
+
else
|
|
148
|
+
false
|
|
149
|
+
end
|
|
150
|
+
when :Object
|
|
151
|
+
# generic object (usually a Hash), return directly
|
|
152
|
+
value
|
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
|
159
|
+
{}.tap do |hash|
|
|
160
|
+
value.each do |k, v|
|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
else # model
|
|
165
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns the string representation of the object
|
|
170
|
+
# @return [String] String presentation of the object
|
|
171
|
+
def to_s
|
|
172
|
+
to_hash.to_s
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_body
|
|
178
|
+
to_hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
186
|
+
value = self.send(attr)
|
|
187
|
+
if value.nil?
|
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
hash[param] = _to_hash(value)
|
|
193
|
+
end
|
|
194
|
+
hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Outputs non-array value in the form of hash
|
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
199
|
+
# @param [Object] value Any valid value
|
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
|
201
|
+
def _to_hash(value)
|
|
202
|
+
if value.is_a?(Array)
|
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
|
204
|
+
elsif value.is_a?(Hash)
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
207
|
+
end
|
|
208
|
+
elsif value.respond_to? :to_hash
|
|
209
|
+
value.to_hash
|
|
210
|
+
else
|
|
211
|
+
value
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
@@ -59,7 +59,7 @@ module PulpcoreClient
|
|
|
59
59
|
:'pulp_href' => :'String',
|
|
60
60
|
:'pulp_created' => :'DateTime',
|
|
61
61
|
:'versions_href' => :'String',
|
|
62
|
-
:'pulp_labels' => :'
|
|
62
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
63
63
|
:'latest_version_href' => :'String',
|
|
64
64
|
:'name' => :'String',
|
|
65
65
|
:'description' => :'String',
|
|
@@ -105,7 +105,9 @@ module PulpcoreClient
|
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
if attributes.key?(:'pulp_labels')
|
|
108
|
-
|
|
108
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
109
|
+
self.pulp_labels = value
|
|
110
|
+
end
|
|
109
111
|
end
|
|
110
112
|
|
|
111
113
|
if attributes.key?(:'latest_version_href')
|