pulp_deb_client 3.6.0 → 3.8.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 +27 -16
- data/docs/AcsDebApi.md +886 -0
- data/docs/ContentInstallerPackagesApi.md +2 -2
- data/docs/ContentPackagesApi.md +2 -2
- data/docs/Copy.md +1 -1
- data/docs/DebAptAlternateContentSource.md +24 -0
- data/docs/DebAptAlternateContentSourceResponse.md +32 -0
- data/docs/DebAptRemoteResponse.md +1 -1
- data/docs/DebAptRepository.md +2 -0
- data/docs/DebAptRepositoryResponse.md +2 -0
- data/docs/DebGenericContentResponse.md +2 -0
- data/docs/DebInstallerFileIndexResponse.md +2 -0
- data/docs/DebInstallerPackageResponse.md +2 -0
- data/docs/DebPackageIndexResponse.md +2 -0
- data/docs/DebPackageReleaseComponentResponse.md +2 -0
- data/docs/DebPackageResponse.md +2 -0
- data/docs/DebReleaseArchitectureResponse.md +2 -0
- data/docs/DebReleaseComponentResponse.md +2 -0
- data/docs/DebReleaseFileResponse.md +2 -0
- data/docs/DebReleaseResponse.md +2 -0
- data/docs/DebSourceIndexResponse.md +2 -0
- data/docs/DebSourcePackageReleaseComponentResponse.md +2 -0
- data/docs/DebSourcePackageResponse.md +2 -0
- data/docs/DistributionsAptApi.md +10 -10
- data/docs/PaginateddebAptAlternateContentSourceResponseList.md +24 -0
- data/docs/PatcheddebAptAlternateContentSource.md +24 -0
- data/docs/PatcheddebAptRepository.md +2 -0
- data/docs/RemotesAptApi.md +10 -10
- data/docs/RepositoriesAptApi.md +10 -10
- data/docs/RepositoryVersionResponse.md +3 -1
- data/docs/TaskGroupOperationResponse.md +18 -0
- data/lib/pulp_deb_client/api/acs_deb_api.rb +865 -0
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +8 -0
- data/lib/pulp_deb_client/api/content_packages_api.rb +8 -0
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +10 -10
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +10 -10
- data/lib/pulp_deb_client/api/repositories_apt_api.rb +10 -10
- data/lib/pulp_deb_client/models/copy.rb +0 -1
- data/lib/pulp_deb_client/models/deb_apt_alternate_content_source.rb +282 -0
- data/lib/pulp_deb_client/models/deb_apt_alternate_content_source_response.rb +302 -0
- data/lib/pulp_deb_client/models/deb_apt_remote.rb +0 -15
- data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +0 -15
- data/lib/pulp_deb_client/models/deb_apt_repository.rb +13 -16
- data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +13 -16
- data/lib/pulp_deb_client/models/deb_generic_content_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_installer_package_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_package_index_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_package_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_release_component_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_release_file_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_release_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_source_index_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_source_package_release_component_response.rb +10 -1
- data/lib/pulp_deb_client/models/deb_source_package_response.rb +10 -1
- data/lib/pulp_deb_client/models/paginated_repository_version_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_apt_alternate_content_source_response_list.rb +257 -0
- data/lib/pulp_deb_client/models/paginateddeb_apt_distribution_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_apt_publication_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_apt_remote_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_apt_repository_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_generic_content_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_installer_file_index_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_installer_package_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_package_index_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_package_release_component_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_package_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_release_architecture_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_release_component_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_release_file_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_release_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_source_index_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_source_package_release_component_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_source_package_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/paginateddeb_verbatim_publication_response_list.rb +0 -2
- data/lib/pulp_deb_client/models/patcheddeb_apt_alternate_content_source.rb +268 -0
- data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +0 -15
- data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +13 -16
- data/lib/pulp_deb_client/models/repository_version_response.rb +13 -4
- data/lib/pulp_deb_client/models/task_group_operation_response.rb +223 -0
- data/lib/pulp_deb_client/version.rb +1 -1
- data/lib/pulp_deb_client.rb +6 -0
- data/spec/api/acs_deb_api_spec.rb +204 -0
- data/spec/api/distributions_apt_api_spec.rb +4 -4
- data/spec/api/remotes_apt_api_spec.rb +4 -4
- data/spec/api/repositories_apt_api_spec.rb +4 -4
- data/spec/models/deb_apt_alternate_content_source_response_spec.rb +78 -0
- data/spec/models/deb_apt_alternate_content_source_spec.rb +54 -0
- data/spec/models/deb_apt_repository_response_spec.rb +6 -0
- data/spec/models/deb_apt_repository_spec.rb +6 -0
- data/spec/models/deb_generic_content_response_spec.rb +6 -0
- data/spec/models/deb_installer_file_index_response_spec.rb +6 -0
- data/spec/models/deb_installer_package_response_spec.rb +6 -0
- data/spec/models/deb_package_index_response_spec.rb +6 -0
- data/spec/models/deb_package_release_component_response_spec.rb +6 -0
- data/spec/models/deb_package_response_spec.rb +6 -0
- data/spec/models/deb_release_architecture_response_spec.rb +6 -0
- data/spec/models/deb_release_component_response_spec.rb +6 -0
- data/spec/models/deb_release_file_response_spec.rb +6 -0
- data/spec/models/deb_release_response_spec.rb +6 -0
- data/spec/models/deb_source_index_response_spec.rb +6 -0
- data/spec/models/deb_source_package_release_component_response_spec.rb +6 -0
- data/spec/models/deb_source_package_response_spec.rb +6 -0
- data/spec/models/paginateddeb_apt_alternate_content_source_response_list_spec.rb +54 -0
- data/spec/models/patcheddeb_apt_alternate_content_source_spec.rb +54 -0
- data/spec/models/patcheddeb_apt_repository_spec.rb +6 -0
- data/spec/models/repository_version_response_spec.rb +6 -0
- data/spec/models/task_group_operation_response_spec.rb +36 -0
- metadata +99 -75
|
@@ -0,0 +1,268 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpDebClient
|
|
17
|
+
# Serializer for APT alternate content source.
|
|
18
|
+
class PatcheddebAptAlternateContentSource
|
|
19
|
+
# Name of Alternate Content Source.
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Date of last refresh of AlternateContentSource.
|
|
23
|
+
attr_accessor :last_refreshed
|
|
24
|
+
|
|
25
|
+
# List of paths that will be appended to the Remote url when searching for content.
|
|
26
|
+
attr_accessor :paths
|
|
27
|
+
|
|
28
|
+
# The remote to provide alternate content source.
|
|
29
|
+
attr_accessor :remote
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'name' => :'name',
|
|
35
|
+
:'last_refreshed' => :'last_refreshed',
|
|
36
|
+
:'paths' => :'paths',
|
|
37
|
+
:'remote' => :'remote'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'name' => :'String',
|
|
50
|
+
:'last_refreshed' => :'Time',
|
|
51
|
+
:'paths' => :'Array<String>',
|
|
52
|
+
:'remote' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
:'last_refreshed',
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::PatcheddebAptAlternateContentSource` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::PatcheddebAptAlternateContentSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'name')
|
|
79
|
+
self.name = attributes[:'name']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'last_refreshed')
|
|
83
|
+
self.last_refreshed = attributes[:'last_refreshed']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'paths')
|
|
87
|
+
if (value = attributes[:'paths']).is_a?(Array)
|
|
88
|
+
self.paths = value
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'remote')
|
|
93
|
+
self.remote = attributes[:'remote']
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
if !@name.nil? && @name.to_s.length < 1
|
|
103
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
|
114
|
+
true
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Custom attribute writer method with validation
|
|
118
|
+
# @param [Object] name Value to be assigned
|
|
119
|
+
def name=(name)
|
|
120
|
+
if name.nil?
|
|
121
|
+
fail ArgumentError, 'name cannot be nil'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if name.to_s.length < 1
|
|
125
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@name = name
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
name == o.name &&
|
|
137
|
+
last_refreshed == o.last_refreshed &&
|
|
138
|
+
paths == o.paths &&
|
|
139
|
+
remote == o.remote
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @see the `==` method
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def eql?(o)
|
|
145
|
+
self == o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Calculates hash code according to all attributes.
|
|
149
|
+
# @return [Integer] Hash code
|
|
150
|
+
def hash
|
|
151
|
+
[name, last_refreshed, paths, remote].hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Builds the object from hash
|
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
156
|
+
# @return [Object] Returns the model itself
|
|
157
|
+
def self.build_from_hash(attributes)
|
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Deserializes the data based on type
|
|
178
|
+
# @param string type Data type
|
|
179
|
+
# @param string value Value to be deserialized
|
|
180
|
+
# @return [Object] Deserialized data
|
|
181
|
+
def self._deserialize(type, value)
|
|
182
|
+
case type.to_sym
|
|
183
|
+
when :Time
|
|
184
|
+
Time.parse(value)
|
|
185
|
+
when :Date
|
|
186
|
+
Date.parse(value)
|
|
187
|
+
when :String
|
|
188
|
+
value.to_s
|
|
189
|
+
when :Integer
|
|
190
|
+
value.to_i
|
|
191
|
+
when :Float
|
|
192
|
+
value.to_f
|
|
193
|
+
when :Boolean
|
|
194
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
195
|
+
true
|
|
196
|
+
else
|
|
197
|
+
false
|
|
198
|
+
end
|
|
199
|
+
when :Object
|
|
200
|
+
# generic object (usually a Hash), return directly
|
|
201
|
+
value
|
|
202
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
203
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
204
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
205
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
206
|
+
k_type = Regexp.last_match[:k_type]
|
|
207
|
+
v_type = Regexp.last_match[:v_type]
|
|
208
|
+
{}.tap do |hash|
|
|
209
|
+
value.each do |k, v|
|
|
210
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
else # model
|
|
214
|
+
# models (e.g. Pet) or oneOf
|
|
215
|
+
klass = PulpDebClient.const_get(type)
|
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the string representation of the object
|
|
221
|
+
# @return [String] String presentation of the object
|
|
222
|
+
def to_s
|
|
223
|
+
to_hash.to_s
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_body
|
|
229
|
+
to_hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Returns the object in the form of hash
|
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
|
234
|
+
def to_hash
|
|
235
|
+
hash = {}
|
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
237
|
+
value = self.send(attr)
|
|
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
|
+
|
|
243
|
+
hash[param] = _to_hash(value)
|
|
244
|
+
end
|
|
245
|
+
hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Outputs non-array value in the form of hash
|
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
250
|
+
# @param [Object] value Any valid value
|
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
|
252
|
+
def _to_hash(value)
|
|
253
|
+
if value.is_a?(Array)
|
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
|
255
|
+
elsif value.is_a?(Hash)
|
|
256
|
+
{}.tap do |hash|
|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
258
|
+
end
|
|
259
|
+
elsif value.respond_to? :to_hash
|
|
260
|
+
value.to_hash
|
|
261
|
+
else
|
|
262
|
+
value
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
@@ -404,10 +404,6 @@ module PulpDebClient
|
|
|
404
404
|
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
|
|
405
405
|
end
|
|
406
406
|
|
|
407
|
-
if !@download_concurrency.nil? && @download_concurrency < 1
|
|
408
|
-
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
409
|
-
end
|
|
410
|
-
|
|
411
407
|
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
412
408
|
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
413
409
|
end
|
|
@@ -457,7 +453,6 @@ module PulpDebClient
|
|
|
457
453
|
return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
|
|
458
454
|
return false if !@username.nil? && @username.to_s.length < 1
|
|
459
455
|
return false if !@password.nil? && @password.to_s.length < 1
|
|
460
|
-
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
461
456
|
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
462
457
|
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
463
458
|
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
@@ -577,16 +572,6 @@ module PulpDebClient
|
|
|
577
572
|
@password = password
|
|
578
573
|
end
|
|
579
574
|
|
|
580
|
-
# Custom attribute writer method with validation
|
|
581
|
-
# @param [Object] download_concurrency Value to be assigned
|
|
582
|
-
def download_concurrency=(download_concurrency)
|
|
583
|
-
if !download_concurrency.nil? && download_concurrency < 1
|
|
584
|
-
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
|
585
|
-
end
|
|
586
|
-
|
|
587
|
-
@download_concurrency = download_concurrency
|
|
588
|
-
end
|
|
589
|
-
|
|
590
575
|
# Custom attribute writer method with validation
|
|
591
576
|
# @param [Object] total_timeout Value to be assigned
|
|
592
577
|
def total_timeout=(total_timeout)
|
|
@@ -30,6 +30,9 @@ module PulpDebClient
|
|
|
30
30
|
# An optional remote to use by default when syncing.
|
|
31
31
|
attr_accessor :remote
|
|
32
32
|
|
|
33
|
+
# Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. Will create a standard structured APT publication.
|
|
34
|
+
attr_accessor :autopublish
|
|
35
|
+
|
|
33
36
|
# Previously, pulp_deb only synced the Release file fields codename and suite, now version, origin, label, and description are also synced. Setting this setting to False will make Pulp revert to the old behaviour of using it's own internal values for the new fields during publish. This is primarily intended to avoid a sudden change in behaviour for existing Pulp repositories, since many Release file field changes need to be accepted by hosts consuming the published repository. The default for new repositories is True.
|
|
34
37
|
attr_accessor :publish_upstream_release_fields
|
|
35
38
|
|
|
@@ -47,6 +50,7 @@ module PulpDebClient
|
|
|
47
50
|
:'description' => :'description',
|
|
48
51
|
:'retain_repo_versions' => :'retain_repo_versions',
|
|
49
52
|
:'remote' => :'remote',
|
|
53
|
+
:'autopublish' => :'autopublish',
|
|
50
54
|
:'publish_upstream_release_fields' => :'publish_upstream_release_fields',
|
|
51
55
|
:'signing_service' => :'signing_service',
|
|
52
56
|
:'signing_service_release_overrides' => :'signing_service_release_overrides'
|
|
@@ -66,6 +70,7 @@ module PulpDebClient
|
|
|
66
70
|
:'description' => :'String',
|
|
67
71
|
:'retain_repo_versions' => :'Integer',
|
|
68
72
|
:'remote' => :'String',
|
|
73
|
+
:'autopublish' => :'Boolean',
|
|
69
74
|
:'publish_upstream_release_fields' => :'Boolean',
|
|
70
75
|
:'signing_service' => :'String',
|
|
71
76
|
:'signing_service_release_overrides' => :'Hash<String, String>'
|
|
@@ -119,6 +124,12 @@ module PulpDebClient
|
|
|
119
124
|
self.remote = attributes[:'remote']
|
|
120
125
|
end
|
|
121
126
|
|
|
127
|
+
if attributes.key?(:'autopublish')
|
|
128
|
+
self.autopublish = attributes[:'autopublish']
|
|
129
|
+
else
|
|
130
|
+
self.autopublish = false
|
|
131
|
+
end
|
|
132
|
+
|
|
122
133
|
if attributes.key?(:'publish_upstream_release_fields')
|
|
123
134
|
self.publish_upstream_release_fields = attributes[:'publish_upstream_release_fields']
|
|
124
135
|
end
|
|
@@ -147,10 +158,6 @@ module PulpDebClient
|
|
|
147
158
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
148
159
|
end
|
|
149
160
|
|
|
150
|
-
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
151
|
-
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
|
152
|
-
end
|
|
153
|
-
|
|
154
161
|
invalid_properties
|
|
155
162
|
end
|
|
156
163
|
|
|
@@ -160,7 +167,6 @@ module PulpDebClient
|
|
|
160
167
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
161
168
|
return false if !@name.nil? && @name.to_s.length < 1
|
|
162
169
|
return false if !@description.nil? && @description.to_s.length < 1
|
|
163
|
-
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
164
170
|
true
|
|
165
171
|
end
|
|
166
172
|
|
|
@@ -188,16 +194,6 @@ module PulpDebClient
|
|
|
188
194
|
@description = description
|
|
189
195
|
end
|
|
190
196
|
|
|
191
|
-
# Custom attribute writer method with validation
|
|
192
|
-
# @param [Object] retain_repo_versions Value to be assigned
|
|
193
|
-
def retain_repo_versions=(retain_repo_versions)
|
|
194
|
-
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
|
195
|
-
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
@retain_repo_versions = retain_repo_versions
|
|
199
|
-
end
|
|
200
|
-
|
|
201
197
|
# Checks equality by comparing each attribute.
|
|
202
198
|
# @param [Object] Object to be compared
|
|
203
199
|
def ==(o)
|
|
@@ -208,6 +204,7 @@ module PulpDebClient
|
|
|
208
204
|
description == o.description &&
|
|
209
205
|
retain_repo_versions == o.retain_repo_versions &&
|
|
210
206
|
remote == o.remote &&
|
|
207
|
+
autopublish == o.autopublish &&
|
|
211
208
|
publish_upstream_release_fields == o.publish_upstream_release_fields &&
|
|
212
209
|
signing_service == o.signing_service &&
|
|
213
210
|
signing_service_release_overrides == o.signing_service_release_overrides
|
|
@@ -222,7 +219,7 @@ module PulpDebClient
|
|
|
222
219
|
# Calculates hash code according to all attributes.
|
|
223
220
|
# @return [Integer] Hash code
|
|
224
221
|
def hash
|
|
225
|
-
[pulp_labels, name, description, retain_repo_versions, remote, publish_upstream_release_fields, signing_service, signing_service_release_overrides].hash
|
|
222
|
+
[pulp_labels, name, description, retain_repo_versions, remote, autopublish, publish_upstream_release_fields, signing_service, signing_service_release_overrides].hash
|
|
226
223
|
end
|
|
227
224
|
|
|
228
225
|
# Builds the object from hash
|
|
@@ -37,6 +37,8 @@ module PulpDebClient
|
|
|
37
37
|
# Various count summaries of the content in the version and the HREF to view them.
|
|
38
38
|
attr_accessor :content_summary
|
|
39
39
|
|
|
40
|
+
attr_accessor :vuln_report
|
|
41
|
+
|
|
40
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
43
|
def self.attribute_map
|
|
42
44
|
{
|
|
@@ -47,7 +49,8 @@ module PulpDebClient
|
|
|
47
49
|
:'number' => :'number',
|
|
48
50
|
:'repository' => :'repository',
|
|
49
51
|
:'base_version' => :'base_version',
|
|
50
|
-
:'content_summary' => :'content_summary'
|
|
52
|
+
:'content_summary' => :'content_summary',
|
|
53
|
+
:'vuln_report' => :'vuln_report'
|
|
51
54
|
}
|
|
52
55
|
end
|
|
53
56
|
|
|
@@ -66,7 +69,8 @@ module PulpDebClient
|
|
|
66
69
|
:'number' => :'Integer',
|
|
67
70
|
:'repository' => :'String',
|
|
68
71
|
:'base_version' => :'String',
|
|
69
|
-
:'content_summary' => :'ContentSummaryResponse'
|
|
72
|
+
:'content_summary' => :'ContentSummaryResponse',
|
|
73
|
+
:'vuln_report' => :'String'
|
|
70
74
|
}
|
|
71
75
|
end
|
|
72
76
|
|
|
@@ -122,6 +126,10 @@ module PulpDebClient
|
|
|
122
126
|
if attributes.key?(:'content_summary')
|
|
123
127
|
self.content_summary = attributes[:'content_summary']
|
|
124
128
|
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'vuln_report')
|
|
131
|
+
self.vuln_report = attributes[:'vuln_report']
|
|
132
|
+
end
|
|
125
133
|
end
|
|
126
134
|
|
|
127
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -151,7 +159,8 @@ module PulpDebClient
|
|
|
151
159
|
number == o.number &&
|
|
152
160
|
repository == o.repository &&
|
|
153
161
|
base_version == o.base_version &&
|
|
154
|
-
content_summary == o.content_summary
|
|
162
|
+
content_summary == o.content_summary &&
|
|
163
|
+
vuln_report == o.vuln_report
|
|
155
164
|
end
|
|
156
165
|
|
|
157
166
|
# @see the `==` method
|
|
@@ -163,7 +172,7 @@ module PulpDebClient
|
|
|
163
172
|
# Calculates hash code according to all attributes.
|
|
164
173
|
# @return [Integer] Hash code
|
|
165
174
|
def hash
|
|
166
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, number, repository, base_version, content_summary].hash
|
|
175
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, number, repository, base_version, content_summary, vuln_report].hash
|
|
167
176
|
end
|
|
168
177
|
|
|
169
178
|
# Builds the object from hash
|
|
@@ -0,0 +1,223 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpDebClient
|
|
17
|
+
# Serializer for asynchronous operations that return a task group.
|
|
18
|
+
class TaskGroupOperationResponse
|
|
19
|
+
# The href of the task group.
|
|
20
|
+
attr_accessor :task_group
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'task_group' => :'task_group'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
|
30
|
+
def self.acceptable_attributes
|
|
31
|
+
attribute_map.values
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attribute type mapping.
|
|
35
|
+
def self.openapi_types
|
|
36
|
+
{
|
|
37
|
+
:'task_group' => :'String'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# List of attributes with nullable: true
|
|
42
|
+
def self.openapi_nullable
|
|
43
|
+
Set.new([
|
|
44
|
+
])
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Initializes the object
|
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
49
|
+
def initialize(attributes = {})
|
|
50
|
+
if (!attributes.is_a?(Hash))
|
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::TaskGroupOperationResponse` initialize method"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::TaskGroupOperationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
58
|
+
end
|
|
59
|
+
h[k.to_sym] = v
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if attributes.key?(:'task_group')
|
|
63
|
+
self.task_group = attributes[:'task_group']
|
|
64
|
+
else
|
|
65
|
+
self.task_group = nil
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
|
+
# @return Array for valid properties with the reasons
|
|
71
|
+
def list_invalid_properties
|
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
73
|
+
invalid_properties = Array.new
|
|
74
|
+
if @task_group.nil?
|
|
75
|
+
invalid_properties.push('invalid value for "task_group", task_group cannot be nil.')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
return false if @task_group.nil?
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
task_group == o.task_group
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[task_group].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
new(transformed_hash)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Deserializes the data based on type
|
|
133
|
+
# @param string type Data type
|
|
134
|
+
# @param string value Value to be deserialized
|
|
135
|
+
# @return [Object] Deserialized data
|
|
136
|
+
def self._deserialize(type, value)
|
|
137
|
+
case type.to_sym
|
|
138
|
+
when :Time
|
|
139
|
+
Time.parse(value)
|
|
140
|
+
when :Date
|
|
141
|
+
Date.parse(value)
|
|
142
|
+
when :String
|
|
143
|
+
value.to_s
|
|
144
|
+
when :Integer
|
|
145
|
+
value.to_i
|
|
146
|
+
when :Float
|
|
147
|
+
value.to_f
|
|
148
|
+
when :Boolean
|
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
150
|
+
true
|
|
151
|
+
else
|
|
152
|
+
false
|
|
153
|
+
end
|
|
154
|
+
when :Object
|
|
155
|
+
# generic object (usually a Hash), return directly
|
|
156
|
+
value
|
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
|
163
|
+
{}.tap do |hash|
|
|
164
|
+
value.each do |k, v|
|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
else # model
|
|
169
|
+
# models (e.g. Pet) or oneOf
|
|
170
|
+
klass = PulpDebClient.const_get(type)
|
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the string representation of the object
|
|
176
|
+
# @return [String] String presentation of the object
|
|
177
|
+
def to_s
|
|
178
|
+
to_hash.to_s
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_body
|
|
184
|
+
to_hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the object in the form of hash
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_hash
|
|
190
|
+
hash = {}
|
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Outputs non-array value in the form of hash
|
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
205
|
+
# @param [Object] value Any valid value
|
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
|
207
|
+
def _to_hash(value)
|
|
208
|
+
if value.is_a?(Array)
|
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
|
210
|
+
elsif value.is_a?(Hash)
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
213
|
+
end
|
|
214
|
+
elsif value.respond_to? :to_hash
|
|
215
|
+
value.to_hash
|
|
216
|
+
else
|
|
217
|
+
value
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|