pulp_file_client 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +51 -37
  3. data/docs/ContentFilesApi.md +24 -24
  4. data/docs/ContentSummary.md +3 -3
  5. data/docs/ContentSummaryResponse.md +21 -0
  6. data/docs/DistributionsFileApi.md +108 -60
  7. data/docs/{Export.md → ExportResponse.md} +2 -2
  8. data/docs/ExportersFileExportsApi.md +34 -34
  9. data/docs/ExportersFilesystemApi.md +61 -61
  10. data/docs/FileFileContent.md +5 -17
  11. data/docs/FileFileContentResponse.md +35 -0
  12. data/docs/FileFileDistribution.md +1 -7
  13. data/docs/FileFileDistributionResponse.md +29 -0
  14. data/docs/FileFileFilesystemExporter.md +1 -5
  15. data/docs/FileFileFilesystemExporterResponse.md +23 -0
  16. data/docs/FileFilePublication.md +1 -7
  17. data/docs/FileFilePublicationResponse.md +27 -0
  18. data/docs/FileFileRemote.md +4 -10
  19. data/docs/FileFileRemoteResponse.md +43 -0
  20. data/docs/FileFileRepository.md +4 -10
  21. data/docs/FileFileRepositoryResponse.md +29 -0
  22. data/docs/InlineResponse200.md +3 -3
  23. data/docs/InlineResponse2001.md +3 -3
  24. data/docs/InlineResponse2002.md +3 -3
  25. data/docs/InlineResponse2003.md +3 -3
  26. data/docs/InlineResponse2004.md +3 -3
  27. data/docs/InlineResponse2005.md +3 -3
  28. data/docs/InlineResponse2006.md +3 -3
  29. data/docs/InlineResponse2007.md +3 -3
  30. data/docs/PatchedfileFileDistribution.md +23 -0
  31. data/docs/PatchedfileFileFilesystemExporter.md +19 -0
  32. data/docs/PatchedfileFileRemote.md +37 -0
  33. data/docs/PatchedfileFileRepository.md +21 -0
  34. data/docs/PolicyEnum.md +16 -0
  35. data/docs/PublicationsFileApi.md +40 -40
  36. data/docs/RemotesFileApi.md +125 -65
  37. data/docs/RepositoriesFileApi.md +97 -73
  38. data/docs/RepositoriesFileVersionsApi.md +94 -62
  39. data/docs/RepositoryAddRemoveContent.md +2 -2
  40. data/docs/RepositorySyncURL.md +1 -1
  41. data/docs/RepositoryVersion.md +1 -9
  42. data/docs/RepositoryVersionResponse.md +25 -0
  43. data/lib/pulp_file_client/api/content_files_api.rb +32 -36
  44. data/lib/pulp_file_client/api/distributions_file_api.rb +153 -90
  45. data/lib/pulp_file_client/api/exporters_file_exports_api.rb +55 -55
  46. data/lib/pulp_file_client/api/exporters_filesystem_api.rb +102 -102
  47. data/lib/pulp_file_client/api/publications_file_api.rb +59 -59
  48. data/lib/pulp_file_client/api/remotes_file_api.rb +181 -100
  49. data/lib/pulp_file_client/api/repositories_file_api.rb +145 -118
  50. data/lib/pulp_file_client/api/repositories_file_versions_api.rb +137 -92
  51. data/lib/pulp_file_client/api_client.rb +2 -2
  52. data/lib/pulp_file_client/api_error.rb +2 -2
  53. data/lib/pulp_file_client/configuration.rb +3 -3
  54. data/lib/pulp_file_client/models/async_operation_response.rb +3 -2
  55. data/lib/pulp_file_client/models/content_summary.rb +9 -15
  56. data/lib/pulp_file_client/models/content_summary_response.rb +240 -0
  57. data/lib/pulp_file_client/models/{export.rb → export_response.rb} +6 -5
  58. data/lib/pulp_file_client/models/file_file_content.rb +18 -185
  59. data/lib/pulp_file_client/models/file_file_content_response.rb +302 -0
  60. data/lib/pulp_file_client/models/file_file_distribution.rb +4 -85
  61. data/lib/pulp_file_client/models/file_file_distribution_response.rb +279 -0
  62. data/lib/pulp_file_client/models/file_file_filesystem_exporter.rb +4 -60
  63. data/lib/pulp_file_client/models/file_file_filesystem_exporter_response.rb +247 -0
  64. data/lib/pulp_file_client/models/file_file_publication.rb +4 -49
  65. data/lib/pulp_file_client/models/file_file_publication_response.rb +260 -0
  66. data/lib/pulp_file_client/models/file_file_remote.rb +7 -199
  67. data/lib/pulp_file_client/models/file_file_remote_response.rb +368 -0
  68. data/lib/pulp_file_client/models/file_file_repository.rb +18 -78
  69. data/lib/pulp_file_client/models/file_file_repository_response.rb +271 -0
  70. data/lib/pulp_file_client/models/inline_response200.rb +3 -13
  71. data/lib/pulp_file_client/models/inline_response2001.rb +3 -13
  72. data/lib/pulp_file_client/models/inline_response2002.rb +3 -13
  73. data/lib/pulp_file_client/models/inline_response2003.rb +3 -13
  74. data/lib/pulp_file_client/models/inline_response2004.rb +3 -13
  75. data/lib/pulp_file_client/models/inline_response2005.rb +3 -13
  76. data/lib/pulp_file_client/models/inline_response2006.rb +3 -13
  77. data/lib/pulp_file_client/models/inline_response2007.rb +3 -13
  78. data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +240 -0
  79. data/lib/pulp_file_client/models/patchedfile_file_filesystem_exporter.rb +218 -0
  80. data/lib/pulp_file_client/models/patchedfile_file_remote.rb +329 -0
  81. data/lib/pulp_file_client/models/patchedfile_file_repository.rb +229 -0
  82. data/lib/pulp_file_client/models/policy_enum.rb +37 -0
  83. data/lib/pulp_file_client/models/publication_export.rb +3 -2
  84. data/lib/pulp_file_client/models/repository_add_remove_content.rb +5 -4
  85. data/lib/pulp_file_client/models/repository_sync_url.rb +3 -8
  86. data/lib/pulp_file_client/models/repository_version.rb +7 -43
  87. data/lib/pulp_file_client/models/repository_version_response.rb +246 -0
  88. data/lib/pulp_file_client/version.rb +3 -3
  89. data/lib/pulp_file_client.rb +16 -3
  90. data/pulp_file_client.gemspec +4 -4
  91. data/spec/api/content_files_api_spec.rb +10 -10
  92. data/spec/api/distributions_file_api_spec.rb +39 -18
  93. data/spec/api/exporters_file_exports_api_spec.rb +9 -9
  94. data/spec/api/exporters_filesystem_api_spec.rb +23 -23
  95. data/spec/api/publications_file_api_spec.rb +14 -14
  96. data/spec/api/remotes_file_api_spec.rb +48 -21
  97. data/spec/api/repositories_file_api_spec.rb +28 -19
  98. data/spec/api/repositories_file_versions_api_spec.rb +38 -23
  99. data/spec/api_client_spec.rb +2 -2
  100. data/spec/configuration_spec.rb +2 -2
  101. data/spec/models/async_operation_response_spec.rb +2 -2
  102. data/spec/models/content_summary_response_spec.rb +53 -0
  103. data/spec/models/content_summary_spec.rb +2 -2
  104. data/spec/models/{export_spec.rb → export_response_spec.rb} +8 -8
  105. data/spec/models/file_file_content_response_spec.rb +95 -0
  106. data/spec/models/file_file_content_spec.rb +4 -40
  107. data/spec/models/file_file_distribution_response_spec.rb +77 -0
  108. data/spec/models/file_file_distribution_spec.rb +2 -20
  109. data/spec/models/file_file_filesystem_exporter_response_spec.rb +59 -0
  110. data/spec/models/file_file_filesystem_exporter_spec.rb +2 -14
  111. data/spec/models/file_file_publication_response_spec.rb +71 -0
  112. data/spec/models/file_file_publication_spec.rb +2 -20
  113. data/spec/models/file_file_remote_response_spec.rb +119 -0
  114. data/spec/models/file_file_remote_spec.rb +2 -24
  115. data/spec/models/file_file_repository_response_spec.rb +77 -0
  116. data/spec/models/file_file_repository_spec.rb +5 -23
  117. data/spec/models/inline_response2001_spec.rb +2 -2
  118. data/spec/models/inline_response2002_spec.rb +2 -2
  119. data/spec/models/inline_response2003_spec.rb +2 -2
  120. data/spec/models/inline_response2004_spec.rb +2 -2
  121. data/spec/models/inline_response2005_spec.rb +2 -2
  122. data/spec/models/inline_response2006_spec.rb +2 -2
  123. data/spec/models/inline_response2007_spec.rb +2 -2
  124. data/spec/models/inline_response200_spec.rb +2 -2
  125. data/spec/models/patchedfile_file_distribution_spec.rb +59 -0
  126. data/spec/models/patchedfile_file_filesystem_exporter_spec.rb +47 -0
  127. data/spec/models/patchedfile_file_remote_spec.rb +101 -0
  128. data/spec/models/patchedfile_file_repository_spec.rb +53 -0
  129. data/spec/models/policy_enum_spec.rb +35 -0
  130. data/spec/models/publication_export_spec.rb +2 -2
  131. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  132. data/spec/models/repository_sync_url_spec.rb +2 -2
  133. data/spec/models/repository_version_response_spec.rb +65 -0
  134. data/spec/models/repository_version_spec.rb +2 -26
  135. data/spec/spec_helper.rb +2 -2
  136. metadata +76 -24
@@ -0,0 +1,329 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpFileClient
16
+ # Serializer for File Remotes.
17
+ class PatchedfileFileRemote
18
+ # A unique name for this remote.
19
+ attr_accessor :name
20
+
21
+ # The URL of an external content source.
22
+ attr_accessor :url
23
+
24
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
25
+ attr_accessor :ca_cert
26
+
27
+ # A PEM encoded client certificate used for authentication.
28
+ attr_accessor :client_cert
29
+
30
+ # A PEM encoded private key used for authentication.
31
+ attr_accessor :client_key
32
+
33
+ # If True, TLS peer validation must be performed.
34
+ attr_accessor :tls_validation
35
+
36
+ # The proxy URL. Format: scheme://user:password@host:port
37
+ attr_accessor :proxy_url
38
+
39
+ # The username to be used for authentication when syncing.
40
+ attr_accessor :username
41
+
42
+ # The password to be used for authentication when syncing.
43
+ attr_accessor :password
44
+
45
+ # Total number of simultaneous connections.
46
+ attr_accessor :download_concurrency
47
+
48
+ # The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default.
49
+ attr_accessor :policy
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'name' => :'name',
55
+ :'url' => :'url',
56
+ :'ca_cert' => :'ca_cert',
57
+ :'client_cert' => :'client_cert',
58
+ :'client_key' => :'client_key',
59
+ :'tls_validation' => :'tls_validation',
60
+ :'proxy_url' => :'proxy_url',
61
+ :'username' => :'username',
62
+ :'password' => :'password',
63
+ :'download_concurrency' => :'download_concurrency',
64
+ :'policy' => :'policy'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'name' => :'String',
72
+ :'url' => :'String',
73
+ :'ca_cert' => :'String',
74
+ :'client_cert' => :'String',
75
+ :'client_key' => :'String',
76
+ :'tls_validation' => :'Boolean',
77
+ :'proxy_url' => :'String',
78
+ :'username' => :'String',
79
+ :'password' => :'String',
80
+ :'download_concurrency' => :'Integer',
81
+ :'policy' => :'PolicyEnum'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ :'ca_cert',
89
+ :'client_cert',
90
+ :'client_key',
91
+ :'proxy_url',
92
+ :'username',
93
+ :'password',
94
+ ])
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ if (!attributes.is_a?(Hash))
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::PatchedfileFileRemote` initialize method"
102
+ end
103
+
104
+ # check to see if the attribute exists and convert string to symbol for hash key
105
+ attributes = attributes.each_with_object({}) { |(k, v), h|
106
+ if (!self.class.attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::PatchedfileFileRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
108
+ end
109
+ h[k.to_sym] = v
110
+ }
111
+
112
+ if attributes.key?(:'name')
113
+ self.name = attributes[:'name']
114
+ end
115
+
116
+ if attributes.key?(:'url')
117
+ self.url = attributes[:'url']
118
+ end
119
+
120
+ if attributes.key?(:'ca_cert')
121
+ self.ca_cert = attributes[:'ca_cert']
122
+ end
123
+
124
+ if attributes.key?(:'client_cert')
125
+ self.client_cert = attributes[:'client_cert']
126
+ end
127
+
128
+ if attributes.key?(:'client_key')
129
+ self.client_key = attributes[:'client_key']
130
+ end
131
+
132
+ if attributes.key?(:'tls_validation')
133
+ self.tls_validation = attributes[:'tls_validation']
134
+ end
135
+
136
+ if attributes.key?(:'proxy_url')
137
+ self.proxy_url = attributes[:'proxy_url']
138
+ end
139
+
140
+ if attributes.key?(:'username')
141
+ self.username = attributes[:'username']
142
+ end
143
+
144
+ if attributes.key?(:'password')
145
+ self.password = attributes[:'password']
146
+ end
147
+
148
+ if attributes.key?(:'download_concurrency')
149
+ self.download_concurrency = attributes[:'download_concurrency']
150
+ end
151
+
152
+ if attributes.key?(:'policy')
153
+ self.policy = attributes[:'policy']
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ invalid_properties = Array.new
161
+ if !@download_concurrency.nil? && @download_concurrency < 1
162
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
163
+ end
164
+
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
172
+ true
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] download_concurrency Value to be assigned
177
+ def download_concurrency=(download_concurrency)
178
+ if !download_concurrency.nil? && download_concurrency < 1
179
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
180
+ end
181
+
182
+ @download_concurrency = download_concurrency
183
+ end
184
+
185
+ # Checks equality by comparing each attribute.
186
+ # @param [Object] Object to be compared
187
+ def ==(o)
188
+ return true if self.equal?(o)
189
+ self.class == o.class &&
190
+ name == o.name &&
191
+ url == o.url &&
192
+ ca_cert == o.ca_cert &&
193
+ client_cert == o.client_cert &&
194
+ client_key == o.client_key &&
195
+ tls_validation == o.tls_validation &&
196
+ proxy_url == o.proxy_url &&
197
+ username == o.username &&
198
+ password == o.password &&
199
+ download_concurrency == o.download_concurrency &&
200
+ policy == o.policy
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ new.build_from_hash(attributes)
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ self.class.openapi_types.each_pair do |key, type|
228
+ if type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
232
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
233
+ end
234
+ elsif !attributes[self.class.attribute_map[key]].nil?
235
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
236
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
237
+ end
238
+
239
+ self
240
+ end
241
+
242
+ # Deserializes the data based on type
243
+ # @param string type Data type
244
+ # @param string value Value to be deserialized
245
+ # @return [Object] Deserialized data
246
+ def _deserialize(type, value)
247
+ case type.to_sym
248
+ when :DateTime
249
+ DateTime.parse(value)
250
+ when :Date
251
+ Date.parse(value)
252
+ when :String
253
+ value.to_s
254
+ when :Integer
255
+ value.to_i
256
+ when :Float
257
+ value.to_f
258
+ when :Boolean
259
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
260
+ true
261
+ else
262
+ false
263
+ end
264
+ when :Object
265
+ # generic object (usually a Hash), return directly
266
+ value
267
+ when /\AArray<(?<inner_type>.+)>\z/
268
+ inner_type = Regexp.last_match[:inner_type]
269
+ value.map { |v| _deserialize(inner_type, v) }
270
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
271
+ k_type = Regexp.last_match[:k_type]
272
+ v_type = Regexp.last_match[:v_type]
273
+ {}.tap do |hash|
274
+ value.each do |k, v|
275
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
276
+ end
277
+ end
278
+ else # model
279
+ PulpFileClient.const_get(type).build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+ end
329
+ end
@@ -0,0 +1,229 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpFileClient
16
+ # Serializer for File Repositories.
17
+ class PatchedfileFileRepository
18
+ # A unique name for this repository.
19
+ attr_accessor :name
20
+
21
+ # An optional description.
22
+ attr_accessor :description
23
+
24
+ attr_accessor :remote
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'description' => :'description',
31
+ :'remote' => :'remote'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'name' => :'String',
39
+ :'description' => :'String',
40
+ :'remote' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ :'description',
48
+ :'remote'
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::PatchedfileFileRepository` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::PatchedfileFileRepository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+
71
+ if attributes.key?(:'description')
72
+ self.description = attributes[:'description']
73
+ end
74
+
75
+ if attributes.key?(:'remote')
76
+ self.remote = attributes[:'remote']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ name == o.name &&
99
+ description == o.description &&
100
+ remote == o.remote
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [name, description, remote].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ PulpFileClient.const_get(type).build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+ end
229
+ end
@@ -0,0 +1,37 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpFileClient
16
+ class PolicyEnum
17
+ IMMEDIATE = "immediate".freeze
18
+ ON_DEMAND = "on_demand".freeze
19
+ STREAMED = "streamed".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = PolicyEnum.constants.select { |c| PolicyEnum::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #PolicyEnum" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
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
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpFileClient
16
+ # Serializer for exporting publications.
16
17
  class PublicationExport
17
18
  # A URI of the publication to be exported.
18
19
  attr_accessor :publication
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
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
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpFileClient
16
+ # Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
16
17
  class RepositoryAddRemoveContent
17
18
  # A list of content units to add to a new repository version. This content is added after remove_content_units are removed.
18
19
  attr_accessor :add_content_units
@@ -35,8 +36,8 @@ module PulpFileClient
35
36
  # Attribute type mapping.
36
37
  def self.openapi_types
37
38
  {
38
- :'add_content_units' => :'Array<String>',
39
- :'remove_content_units' => :'Array<String>',
39
+ :'add_content_units' => :'Array<Object>',
40
+ :'remove_content_units' => :'Array<Object>',
40
41
  :'base_version' => :'String'
41
42
  }
42
43
  end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
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
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module PulpFileClient
16
16
  class RepositorySyncURL
17
- # A URI of the repository to be synchronized.
17
+ # A remote to sync from. This will override a remote set on repository.
18
18
  attr_accessor :remote
19
19
 
20
20
  # If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only.
@@ -72,17 +72,12 @@ module PulpFileClient
72
72
  # @return Array for valid properties with the reasons
73
73
  def list_invalid_properties
74
74
  invalid_properties = Array.new
75
- if @remote.nil?
76
- invalid_properties.push('invalid value for "remote", remote cannot be nil.')
77
- end
78
-
79
75
  invalid_properties
80
76
  end
81
77
 
82
78
  # Check to see if the all the properties in the model are valid
83
79
  # @return true if the model is valid
84
80
  def valid?
85
- return false if @remote.nil?
86
81
  true
87
82
  end
88
83