pulp_rpm_client 3.17.3 → 3.17.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1aed626ab9f5f8cc5785630dccee7f15ee14dcf5dc87ae60e96e059289b652cd
4
- data.tar.gz: fcfa528c22d44165daff266a526a042701188c1b9ad20a43b3702c686b25abd1
3
+ metadata.gz: 0b1870836d638c7ccfff8cdd95f4c6670905c7f50cd871cd6facf3e3688c0a28
4
+ data.tar.gz: 64d1f1be7382c3a829152695e399140f291232b987207fb1f26ea7fe0c990e0f
5
5
  SHA512:
6
- metadata.gz: af5fce2d251cce53d09021ce5a020f7954d37b3b2fd1ef0685916a5b9aa52032803fbddaef26e4ae7f18d7cb10e3a7a86718bac10ddd1802d0d33e163f76356c
7
- data.tar.gz: ee287bc22dd6ab4765d06d989a2f369786ae8eaa0bc788ecf2d127a4bf7a262652ba52156afc94b224bb123f7cdc2eb40c719a5eb4d1460bf5dcd3ed3d8f551f
6
+ metadata.gz: bc17c750a7c9c7a9bca155230abfda3500774574305813017a3661204a81925475a52fda24db7ff8e450c848e3668f283530b2a9b9edf794f296835318b62bcc
7
+ data.tar.gz: b116da46ff329cbd25bdcfde24fa8380813dfb28fc52b9d29f132062e52a492d19117606579baf31341fe8dafcf288da8d5ea1f81d6f998db9a99d565e6d5e0b
data/README.md CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: v3
10
- - Package version: 3.17.3
10
+ - Package version: 3.17.6
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://pulpproject.org](https://pulpproject.org)
13
13
 
@@ -24,16 +24,16 @@ gem build pulp_rpm_client.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./pulp_rpm_client-3.17.3.gem
27
+ gem install ./pulp_rpm_client-3.17.6.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./pulp_rpm_client-3.17.3.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./pulp_rpm_client-3.17.6.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'pulp_rpm_client', '~> 3.17.3'
36
+ gem 'pulp_rpm_client', '~> 3.17.6'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -159,7 +159,6 @@ Class | Method | HTTP request | Description
159
159
  - [PulpRpmClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
160
160
  - [PulpRpmClient::ChecksumResponse](docs/ChecksumResponse.md)
161
161
  - [PulpRpmClient::CompsXml](docs/CompsXml.md)
162
- - [PulpRpmClient::ContentSummary](docs/ContentSummary.md)
163
162
  - [PulpRpmClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
164
163
  - [PulpRpmClient::Copy](docs/Copy.md)
165
164
  - [PulpRpmClient::ImageResponse](docs/ImageResponse.md)
@@ -188,8 +187,8 @@ Class | Method | HTTP request | Description
188
187
  - [PulpRpmClient::PatchedrpmRpmRepository](docs/PatchedrpmRpmRepository.md)
189
188
  - [PulpRpmClient::PatchedrpmUlnRemote](docs/PatchedrpmUlnRemote.md)
190
189
  - [PulpRpmClient::PolicyEnum](docs/PolicyEnum.md)
190
+ - [PulpRpmClient::Repair](docs/Repair.md)
191
191
  - [PulpRpmClient::RepositoryAddRemoveContent](docs/RepositoryAddRemoveContent.md)
192
- - [PulpRpmClient::RepositoryVersion](docs/RepositoryVersion.md)
193
192
  - [PulpRpmClient::RepositoryVersionResponse](docs/RepositoryVersionResponse.md)
194
193
  - [PulpRpmClient::RpmDistributionTreeResponse](docs/RpmDistributionTreeResponse.md)
195
194
  - [PulpRpmClient::RpmModulemd](docs/RpmModulemd.md)
data/docs/Repair.md ADDED
@@ -0,0 +1,17 @@
1
+ # PulpRpmClient::Repair
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **verify_checksums** | **Boolean** | Will verify that the checksum of all stored files matches what saved in the database. Otherwise only the existence of the files will be checked. Enabled by default | [optional] [default to true]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'PulpRpmClient'
13
+
14
+ instance = PulpRpmClient::Repair.new(verify_checksums: null)
15
+ ```
16
+
17
+
@@ -218,7 +218,7 @@ Name | Type | Description | Notes
218
218
 
219
219
  ## repair
220
220
 
221
- > AsyncOperationResponse repair(rpm_rpm_repository_version_href, repository_version)
221
+ > AsyncOperationResponse repair(rpm_rpm_repository_version_href, repair)
222
222
 
223
223
 
224
224
 
@@ -238,10 +238,10 @@ end
238
238
 
239
239
  api_instance = PulpRpmClient::RepositoriesRpmVersionsApi.new
240
240
  rpm_rpm_repository_version_href = 'rpm_rpm_repository_version_href_example' # String |
241
- repository_version = PulpRpmClient::RepositoryVersion.new # RepositoryVersion |
241
+ repair = PulpRpmClient::Repair.new # Repair |
242
242
 
243
243
  begin
244
- result = api_instance.repair(rpm_rpm_repository_version_href, repository_version)
244
+ result = api_instance.repair(rpm_rpm_repository_version_href, repair)
245
245
  p result
246
246
  rescue PulpRpmClient::ApiError => e
247
247
  puts "Exception when calling RepositoriesRpmVersionsApi->repair: #{e}"
@@ -254,7 +254,7 @@ end
254
254
  Name | Type | Description | Notes
255
255
  ------------- | ------------- | ------------- | -------------
256
256
  **rpm_rpm_repository_version_href** | **String**| |
257
- **repository_version** | [**RepositoryVersion**](RepositoryVersion.md)| |
257
+ **repair** | [**Repair**](Repair.md)| |
258
258
 
259
259
  ### Return type
260
260
 
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
8
8
  **repository** | **String** | A URI of the repository to be published. | [optional]
9
9
  **metadata_checksum_type** | [**MetadataChecksumTypeEnum**](MetadataChecksumTypeEnum.md) | The checksum type for metadata. | [optional]
10
10
  **package_checksum_type** | [**PackageChecksumTypeEnum**](PackageChecksumTypeEnum.md) | The checksum type for packages. | [optional]
11
- **gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on packages. | [optional] [default to 0]
12
- **repo_gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on the repodata. | [optional] [default to 0]
11
+ **gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on packages. | [optional]
12
+ **repo_gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on the repodata. | [optional]
13
13
  **sqlite_metadata** | **Boolean** | An option specifying whether Pulp should generate SQLite metadata. | [optional] [default to false]
14
14
 
15
15
  ## Code Sample
@@ -10,8 +10,8 @@ Name | Type | Description | Notes
10
10
  **repository** | **String** | A URI of the repository to be published. | [optional]
11
11
  **metadata_checksum_type** | [**MetadataChecksumTypeEnum**](MetadataChecksumTypeEnum.md) | The checksum type for metadata. | [optional]
12
12
  **package_checksum_type** | [**PackageChecksumTypeEnum**](PackageChecksumTypeEnum.md) | The checksum type for packages. | [optional]
13
- **gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on packages. | [optional] [default to 0]
14
- **repo_gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on the repodata. | [optional] [default to 0]
13
+ **gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on packages. | [optional]
14
+ **repo_gpgcheck** | **Integer** | An option specifying whether a client should perform a GPG signature check on the repodata. | [optional]
15
15
  **sqlite_metadata** | **Boolean** | An option specifying whether Pulp should generate SQLite metadata. | [optional] [default to false]
16
16
 
17
17
  ## Code Sample
@@ -12,8 +12,6 @@ Name | Type | Description | Notes
12
12
  **client_cert** | **String** | A PEM encoded client certificate used for authentication. | [optional]
13
13
  **tls_validation** | **Boolean** | If True, TLS peer validation must be performed. | [optional]
14
14
  **proxy_url** | **String** | The proxy URL. Format: scheme://host:port | [optional]
15
- **username** | **String** | Your ULN account username. |
16
- **password** | **String** | Your ULN account password. |
17
15
  **pulp_labels** | [**Object**](.md) | | [optional]
18
16
  **pulp_last_updated** | **DateTime** | Timestamp of the most recent update of the remote. | [optional] [readonly]
19
17
  **download_concurrency** | **Integer** | Total number of simultaneous connections. If not set then the default value will be used. | [optional]
@@ -40,8 +38,6 @@ instance = PulpRpmClient::RpmUlnRemoteResponse.new(pulp_href: null,
40
38
  client_cert: null,
41
39
  tls_validation: null,
42
40
  proxy_url: null,
43
- username: null,
44
- password: null,
45
41
  pulp_labels: null,
46
42
  pulp_last_updated: null,
47
43
  download_concurrency: null,
@@ -270,20 +270,20 @@ module PulpRpmClient
270
270
 
271
271
  # Trigger an asynchronous task to repair a repository version.
272
272
  # @param rpm_rpm_repository_version_href [String]
273
- # @param repository_version [RepositoryVersion]
273
+ # @param repair [Repair]
274
274
  # @param [Hash] opts the optional parameters
275
275
  # @return [AsyncOperationResponse]
276
- def repair(rpm_rpm_repository_version_href, repository_version, opts = {})
277
- data, _status_code, _headers = repair_with_http_info(rpm_rpm_repository_version_href, repository_version, opts)
276
+ def repair(rpm_rpm_repository_version_href, repair, opts = {})
277
+ data, _status_code, _headers = repair_with_http_info(rpm_rpm_repository_version_href, repair, opts)
278
278
  data
279
279
  end
280
280
 
281
281
  # Trigger an asynchronous task to repair a repository version.
282
282
  # @param rpm_rpm_repository_version_href [String]
283
- # @param repository_version [RepositoryVersion]
283
+ # @param repair [Repair]
284
284
  # @param [Hash] opts the optional parameters
285
285
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
286
- def repair_with_http_info(rpm_rpm_repository_version_href, repository_version, opts = {})
286
+ def repair_with_http_info(rpm_rpm_repository_version_href, repair, opts = {})
287
287
  if @api_client.config.debugging
288
288
  @api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.repair ...'
289
289
  end
@@ -291,9 +291,9 @@ module PulpRpmClient
291
291
  if @api_client.config.client_side_validation && rpm_rpm_repository_version_href.nil?
292
292
  fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_version_href' when calling RepositoriesRpmVersionsApi.repair"
293
293
  end
294
- # verify the required parameter 'repository_version' is set
295
- if @api_client.config.client_side_validation && repository_version.nil?
296
- fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesRpmVersionsApi.repair"
294
+ # verify the required parameter 'repair' is set
295
+ if @api_client.config.client_side_validation && repair.nil?
296
+ fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesRpmVersionsApi.repair"
297
297
  end
298
298
  # resource path
299
299
  local_var_path = '{rpm_rpm_repository_version_href}repair/'.sub('{' + 'rpm_rpm_repository_version_href' + '}', CGI.escape(rpm_rpm_repository_version_href.to_s).gsub('%2F', '/'))
@@ -312,7 +312,7 @@ module PulpRpmClient
312
312
  form_params = opts[:form_params] || {}
313
313
 
314
314
  # http body (model)
315
- post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
315
+ post_body = opts[:body] || @api_client.object_to_http_body(repair)
316
316
 
317
317
  # return_type
318
318
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -118,9 +118,6 @@ module PulpRpmClient
118
118
  update_params_for_auth! header_params, query_params, opts[:auth_names]
119
119
 
120
120
  req_opts = {
121
- :method => http_method,
122
- :headers => header_params,
123
- :params => query_params,
124
121
  :params_encoding => @config.params_encoding,
125
122
  :timeout => @config.timeout,
126
123
  :verbose => @config.debugging
@@ -128,13 +125,13 @@ module PulpRpmClient
128
125
 
129
126
  if [:post, :patch, :put, :delete].include?(http_method)
130
127
  req_body = build_request_body(header_params, form_params, opts[:body])
131
- req_opts.update :body => req_body
132
128
  if @config.debugging
133
129
  @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
134
130
  end
135
131
  end
136
132
  request.headers = header_params
137
133
  request.body = req_body
134
+ request.options = OpenStruct.new(req_opts)
138
135
  request.url url
139
136
  request.params = query_params
140
137
  download_file(request) if opts[:return_type] == 'File'
@@ -140,6 +140,7 @@ module PulpRpmClient
140
140
  @ssl_client_cert = nil
141
141
  @ssl_client_key = nil
142
142
  @params_encoder = nil
143
+ @timeout = 60
143
144
  @debugging = false
144
145
  @inject_format = false
145
146
  @force_ending_format = false
@@ -13,22 +13,21 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module PulpRpmClient
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.
17
- class RepositoryVersion
18
- # A repository version whose content was used as the initial set of content for this repository version
19
- attr_accessor :base_version
16
+ class Repair
17
+ # Will verify that the checksum of all stored files matches what saved in the database. Otherwise only the existence of the files will be checked. Enabled by default
18
+ attr_accessor :verify_checksums
20
19
 
21
20
  # Attribute mapping from ruby-style variable name to JSON key.
22
21
  def self.attribute_map
23
22
  {
24
- :'base_version' => :'base_version'
23
+ :'verify_checksums' => :'verify_checksums'
25
24
  }
26
25
  end
27
26
 
28
27
  # Attribute type mapping.
29
28
  def self.openapi_types
30
29
  {
31
- :'base_version' => :'String'
30
+ :'verify_checksums' => :'Boolean'
32
31
  }
33
32
  end
34
33
 
@@ -42,19 +41,21 @@ module PulpRpmClient
42
41
  # @param [Hash] attributes Model attributes in the form of hash
43
42
  def initialize(attributes = {})
44
43
  if (!attributes.is_a?(Hash))
45
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RepositoryVersion` initialize method"
44
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::Repair` initialize method"
46
45
  end
47
46
 
48
47
  # check to see if the attribute exists and convert string to symbol for hash key
49
48
  attributes = attributes.each_with_object({}) { |(k, v), h|
50
49
  if (!self.class.attribute_map.key?(k.to_sym))
51
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RepositoryVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::Repair`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
51
  end
53
52
  h[k.to_sym] = v
54
53
  }
55
54
 
56
- if attributes.key?(:'base_version')
57
- self.base_version = attributes[:'base_version']
55
+ if attributes.key?(:'verify_checksums')
56
+ self.verify_checksums = attributes[:'verify_checksums']
57
+ else
58
+ self.verify_checksums = true
58
59
  end
59
60
  end
60
61
 
@@ -76,7 +77,7 @@ module PulpRpmClient
76
77
  def ==(o)
77
78
  return true if self.equal?(o)
78
79
  self.class == o.class &&
79
- base_version == o.base_version
80
+ verify_checksums == o.verify_checksums
80
81
  end
81
82
 
82
83
  # @see the `==` method
@@ -88,7 +89,7 @@ module PulpRpmClient
88
89
  # Calculates hash code according to all attributes.
89
90
  # @return [Integer] Hash code
90
91
  def hash
91
- [base_version].hash
92
+ [verify_checksums].hash
92
93
  end
93
94
 
94
95
  # Builds the object from hash
@@ -100,14 +100,10 @@ module PulpRpmClient
100
100
 
101
101
  if attributes.key?(:'gpgcheck')
102
102
  self.gpgcheck = attributes[:'gpgcheck']
103
- else
104
- self.gpgcheck = 0
105
103
  end
106
104
 
107
105
  if attributes.key?(:'repo_gpgcheck')
108
106
  self.repo_gpgcheck = attributes[:'repo_gpgcheck']
109
- else
110
- self.repo_gpgcheck = 0
111
107
  end
112
108
 
113
109
  if attributes.key?(:'sqlite_metadata')
@@ -117,14 +117,10 @@ module PulpRpmClient
117
117
 
118
118
  if attributes.key?(:'gpgcheck')
119
119
  self.gpgcheck = attributes[:'gpgcheck']
120
- else
121
- self.gpgcheck = 0
122
120
  end
123
121
 
124
122
  if attributes.key?(:'repo_gpgcheck')
125
123
  self.repo_gpgcheck = attributes[:'repo_gpgcheck']
126
- else
127
- self.repo_gpgcheck = 0
128
124
  end
129
125
 
130
126
  if attributes.key?(:'sqlite_metadata')
@@ -38,12 +38,6 @@ module PulpRpmClient
38
38
  # The proxy URL. Format: scheme://host:port
39
39
  attr_accessor :proxy_url
40
40
 
41
- # Your ULN account username.
42
- attr_accessor :username
43
-
44
- # Your ULN account password.
45
- attr_accessor :password
46
-
47
41
  attr_accessor :pulp_labels
48
42
 
49
43
  # Timestamp of the most recent update of the remote.
@@ -90,8 +84,6 @@ module PulpRpmClient
90
84
  :'client_cert' => :'client_cert',
91
85
  :'tls_validation' => :'tls_validation',
92
86
  :'proxy_url' => :'proxy_url',
93
- :'username' => :'username',
94
- :'password' => :'password',
95
87
  :'pulp_labels' => :'pulp_labels',
96
88
  :'pulp_last_updated' => :'pulp_last_updated',
97
89
  :'download_concurrency' => :'download_concurrency',
@@ -118,8 +110,6 @@ module PulpRpmClient
118
110
  :'client_cert' => :'String',
119
111
  :'tls_validation' => :'Boolean',
120
112
  :'proxy_url' => :'String',
121
- :'username' => :'String',
122
- :'password' => :'String',
123
113
  :'pulp_labels' => :'Object',
124
114
  :'pulp_last_updated' => :'DateTime',
125
115
  :'download_concurrency' => :'Integer',
@@ -199,14 +189,6 @@ module PulpRpmClient
199
189
  self.proxy_url = attributes[:'proxy_url']
200
190
  end
201
191
 
202
- if attributes.key?(:'username')
203
- self.username = attributes[:'username']
204
- end
205
-
206
- if attributes.key?(:'password')
207
- self.password = attributes[:'password']
208
- end
209
-
210
192
  if attributes.key?(:'pulp_labels')
211
193
  self.pulp_labels = attributes[:'pulp_labels']
212
194
  end
@@ -270,14 +252,6 @@ module PulpRpmClient
270
252
  invalid_properties.push('invalid value for "url", url cannot be nil.')
271
253
  end
272
254
 
273
- if @username.nil?
274
- invalid_properties.push('invalid value for "username", username cannot be nil.')
275
- end
276
-
277
- if @password.nil?
278
- invalid_properties.push('invalid value for "password", password cannot be nil.')
279
- end
280
-
281
255
  if !@download_concurrency.nil? && @download_concurrency < 1
282
256
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
283
257
  end
@@ -306,8 +280,6 @@ module PulpRpmClient
306
280
  def valid?
307
281
  return false if @name.nil?
308
282
  return false if @url.nil?
309
- return false if @username.nil?
310
- return false if @password.nil?
311
283
  return false if !@download_concurrency.nil? && @download_concurrency < 1
312
284
  return false if !@total_timeout.nil? && @total_timeout < 0.0
313
285
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
@@ -379,8 +351,6 @@ module PulpRpmClient
379
351
  client_cert == o.client_cert &&
380
352
  tls_validation == o.tls_validation &&
381
353
  proxy_url == o.proxy_url &&
382
- username == o.username &&
383
- password == o.password &&
384
354
  pulp_labels == o.pulp_labels &&
385
355
  pulp_last_updated == o.pulp_last_updated &&
386
356
  download_concurrency == o.download_concurrency &&
@@ -404,7 +374,7 @@ module PulpRpmClient
404
374
  # Calculates hash code according to all attributes.
405
375
  # @return [Integer] Hash code
406
376
  def hash
407
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, username, password, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, uln_server_base_url].hash
377
+ [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, uln_server_base_url].hash
408
378
  end
409
379
 
410
380
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module PulpRpmClient
14
- VERSION = '3.17.3'
14
+ VERSION = '3.17.6'
15
15
  end
@@ -22,7 +22,6 @@ require 'pulp_rpm_client/models/artifact_response'
22
22
  require 'pulp_rpm_client/models/async_operation_response'
23
23
  require 'pulp_rpm_client/models/checksum_response'
24
24
  require 'pulp_rpm_client/models/comps_xml'
25
- require 'pulp_rpm_client/models/content_summary'
26
25
  require 'pulp_rpm_client/models/content_summary_response'
27
26
  require 'pulp_rpm_client/models/copy'
28
27
  require 'pulp_rpm_client/models/image_response'
@@ -51,8 +50,8 @@ require 'pulp_rpm_client/models/patchedrpm_rpm_remote'
51
50
  require 'pulp_rpm_client/models/patchedrpm_rpm_repository'
52
51
  require 'pulp_rpm_client/models/patchedrpm_uln_remote'
53
52
  require 'pulp_rpm_client/models/policy_enum'
53
+ require 'pulp_rpm_client/models/repair'
54
54
  require 'pulp_rpm_client/models/repository_add_remove_content'
55
- require 'pulp_rpm_client/models/repository_version'
56
55
  require 'pulp_rpm_client/models/repository_version_response'
57
56
  require 'pulp_rpm_client/models/rpm_distribution_tree_response'
58
57
  require 'pulp_rpm_client/models/rpm_modulemd'
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.license = 'GPL-2.0+'
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
30
- s.add_runtime_dependency 'faraday', '~> 1.0', '< 1.9.0'
30
+ s.add_runtime_dependency 'faraday', '~> 0.17', '< 1.9.0'
31
31
  s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
32
 
33
33
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
@@ -92,7 +92,7 @@ describe 'RepositoriesRpmVersionsApi' do
92
92
  # unit tests for repair
93
93
  # Trigger an asynchronous task to repair a repository version.
94
94
  # @param rpm_rpm_repository_version_href
95
- # @param repository_version
95
+ # @param repair
96
96
  # @param [Hash] opts the optional parameters
97
97
  # @return [AsyncOperationResponse]
98
98
  describe 'repair test' do
@@ -14,25 +14,25 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for PulpRpmClient::RepositoryVersion
17
+ # Unit tests for PulpRpmClient::Repair
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe 'RepositoryVersion' do
20
+ describe 'Repair' do
21
21
  before do
22
22
  # run before each test
23
- @instance = PulpRpmClient::RepositoryVersion.new
23
+ @instance = PulpRpmClient::Repair.new
24
24
  end
25
25
 
26
26
  after do
27
27
  # run after each test
28
28
  end
29
29
 
30
- describe 'test an instance of RepositoryVersion' do
31
- it 'should create an instance of RepositoryVersion' do
32
- expect(@instance).to be_instance_of(PulpRpmClient::RepositoryVersion)
30
+ describe 'test an instance of Repair' do
31
+ it 'should create an instance of Repair' do
32
+ expect(@instance).to be_instance_of(PulpRpmClient::Repair)
33
33
  end
34
34
  end
35
- describe 'test attribute "base_version"' do
35
+ describe 'test attribute "verify_checksums"' do
36
36
  it 'should work' do
37
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
38
  end
@@ -80,18 +80,6 @@ describe 'RpmUlnRemoteResponse' do
80
80
  end
81
81
  end
82
82
 
83
- describe 'test attribute "username"' do
84
- it 'should work' do
85
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
- end
87
- end
88
-
89
- describe 'test attribute "password"' do
90
- it 'should work' do
91
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
- end
93
- end
94
-
95
83
  describe 'test attribute "pulp_labels"' do
96
84
  it 'should work' do
97
85
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulp_rpm_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.3
4
+ version: 3.17.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-29 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '0.17'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.9.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '1.0'
29
+ version: '0.17'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.9.0
@@ -96,7 +96,6 @@ files:
96
96
  - docs/ContentPackagelangpacksApi.md
97
97
  - docs/ContentPackagesApi.md
98
98
  - docs/ContentRepoMetadataFilesApi.md
99
- - docs/ContentSummary.md
100
99
  - docs/ContentSummaryResponse.md
101
100
  - docs/Copy.md
102
101
  - docs/DistributionsRpmApi.md
@@ -129,10 +128,10 @@ files:
129
128
  - docs/PublicationsRpmApi.md
130
129
  - docs/RemotesRpmApi.md
131
130
  - docs/RemotesUlnApi.md
131
+ - docs/Repair.md
132
132
  - docs/RepositoriesRpmApi.md
133
133
  - docs/RepositoriesRpmVersionsApi.md
134
134
  - docs/RepositoryAddRemoveContent.md
135
- - docs/RepositoryVersion.md
136
135
  - docs/RepositoryVersionResponse.md
137
136
  - docs/RpmCompsApi.md
138
137
  - docs/RpmCopyApi.md
@@ -198,7 +197,6 @@ files:
198
197
  - lib/pulp_rpm_client/models/async_operation_response.rb
199
198
  - lib/pulp_rpm_client/models/checksum_response.rb
200
199
  - lib/pulp_rpm_client/models/comps_xml.rb
201
- - lib/pulp_rpm_client/models/content_summary.rb
202
200
  - lib/pulp_rpm_client/models/content_summary_response.rb
203
201
  - lib/pulp_rpm_client/models/copy.rb
204
202
  - lib/pulp_rpm_client/models/image_response.rb
@@ -227,8 +225,8 @@ files:
227
225
  - lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb
228
226
  - lib/pulp_rpm_client/models/patchedrpm_uln_remote.rb
229
227
  - lib/pulp_rpm_client/models/policy_enum.rb
228
+ - lib/pulp_rpm_client/models/repair.rb
230
229
  - lib/pulp_rpm_client/models/repository_add_remove_content.rb
231
- - lib/pulp_rpm_client/models/repository_version.rb
232
230
  - lib/pulp_rpm_client/models/repository_version_response.rb
233
231
  - lib/pulp_rpm_client/models/rpm_distribution_tree_response.rb
234
232
  - lib/pulp_rpm_client/models/rpm_modulemd.rb
@@ -292,7 +290,6 @@ files:
292
290
  - spec/models/checksum_response_spec.rb
293
291
  - spec/models/comps_xml_spec.rb
294
292
  - spec/models/content_summary_response_spec.rb
295
- - spec/models/content_summary_spec.rb
296
293
  - spec/models/copy_spec.rb
297
294
  - spec/models/image_response_spec.rb
298
295
  - spec/models/metadata_checksum_type_enum_spec.rb
@@ -320,9 +317,9 @@ files:
320
317
  - spec/models/patchedrpm_rpm_repository_spec.rb
321
318
  - spec/models/patchedrpm_uln_remote_spec.rb
322
319
  - spec/models/policy_enum_spec.rb
320
+ - spec/models/repair_spec.rb
323
321
  - spec/models/repository_add_remove_content_spec.rb
324
322
  - spec/models/repository_version_response_spec.rb
325
- - spec/models/repository_version_spec.rb
326
323
  - spec/models/rpm_distribution_tree_response_spec.rb
327
324
  - spec/models/rpm_modulemd_defaults_response_spec.rb
328
325
  - spec/models/rpm_modulemd_defaults_spec.rb
@@ -381,95 +378,94 @@ signing_key:
381
378
  specification_version: 4
382
379
  summary: Pulp 3 API Ruby Gem
383
380
  test_files:
384
- - spec/api/content_packagecategories_api_spec.rb
381
+ - spec/api/content_distribution_trees_api_spec.rb
382
+ - spec/api/content_modulemds_api_spec.rb
383
+ - spec/api/publications_rpm_api_spec.rb
385
384
  - spec/api/rpm_comps_api_spec.rb
385
+ - spec/api/content_repo_metadata_files_api_spec.rb
386
+ - spec/api/content_packagelangpacks_api_spec.rb
387
+ - spec/api/repositories_rpm_api_spec.rb
386
388
  - spec/api/content_packagegroups_api_spec.rb
387
- - spec/api/content_distribution_trees_api_spec.rb
388
- - spec/api/content_packages_api_spec.rb
389
- - spec/api/rpm_copy_api_spec.rb
390
- - spec/api/content_advisories_api_spec.rb
391
- - spec/api/repositories_rpm_versions_api_spec.rb
389
+ - spec/api/content_packagecategories_api_spec.rb
392
390
  - spec/api/acs_rpm_api_spec.rb
393
- - spec/api/content_packagelangpacks_api_spec.rb
394
- - spec/api/remotes_uln_api_spec.rb
395
391
  - spec/api/remotes_rpm_api_spec.rb
392
+ - spec/api/remotes_uln_api_spec.rb
396
393
  - spec/api/distributions_rpm_api_spec.rb
397
- - spec/api/publications_rpm_api_spec.rb
398
- - spec/api/repositories_rpm_api_spec.rb
399
- - spec/api/content_packageenvironments_api_spec.rb
400
- - spec/api/content_repo_metadata_files_api_spec.rb
401
- - spec/api/content_modulemds_api_spec.rb
394
+ - spec/api/rpm_copy_api_spec.rb
395
+ - spec/api/repositories_rpm_versions_api_spec.rb
402
396
  - spec/api/content_modulemd_defaults_api_spec.rb
397
+ - spec/api/content_packages_api_spec.rb
398
+ - spec/api/content_packageenvironments_api_spec.rb
399
+ - spec/api/content_advisories_api_spec.rb
403
400
  - spec/api_client_spec.rb
404
401
  - spec/configuration_spec.rb
405
- - spec/models/rpm_repository_sync_url_spec.rb
406
- - spec/models/package_checksum_type_enum_spec.rb
407
- - spec/models/paginatedrpm_package_group_response_list_spec.rb
408
- - spec/models/patchedrpm_uln_remote_spec.rb
409
- - spec/models/rpm_modulemd_defaults_response_spec.rb
410
- - spec/models/artifact_response_spec.rb
411
- - spec/models/paginatedrpm_uln_remote_response_list_spec.rb
412
- - spec/models/policy_enum_spec.rb
413
- - spec/models/rpm_package_spec.rb
414
- - spec/models/rpm_modulemd_response_spec.rb
415
- - spec/models/rpm_rpm_distribution_response_spec.rb
416
- - spec/models/addon_response_spec.rb
417
- - spec/models/sync_policy_enum_spec.rb
418
- - spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb
419
- - spec/models/checksum_response_spec.rb
420
- - spec/models/image_response_spec.rb
421
- - spec/models/paginatedrpm_package_response_list_spec.rb
422
- - spec/models/rpm_update_collection_response_spec.rb
423
- - spec/models/rpm_distribution_tree_response_spec.rb
402
+ - spec/models/variant_response_spec.rb
403
+ - spec/models/rpm_update_collection_spec.rb
404
+ - spec/models/paginatedrpm_update_record_response_list_spec.rb
405
+ - spec/models/comps_xml_spec.rb
424
406
  - spec/models/paginatedrpm_modulemd_defaults_response_list_spec.rb
425
- - spec/models/paginatedrpm_rpm_remote_response_list_spec.rb
426
- - spec/models/rpm_rpm_remote_response_spec.rb
427
- - spec/models/rpm_rpm_alternate_content_source_spec.rb
428
- - spec/models/paginatedrpm_package_langpacks_response_list_spec.rb
429
- - spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb
430
- - spec/models/paginatedrpm_package_environment_response_list_spec.rb
431
- - spec/models/rpm_rpm_repository_response_spec.rb
407
+ - spec/models/rpm_rpm_alternate_content_source_response_spec.rb
408
+ - spec/models/paginatedrpm_modulemd_response_list_spec.rb
409
+ - spec/models/policy_enum_spec.rb
410
+ - spec/models/paginatedrpm_rpm_repository_response_list_spec.rb
411
+ - spec/models/rpm_uln_remote_spec.rb
412
+ - spec/models/patchedrpm_rpm_remote_spec.rb
413
+ - spec/models/patchedrpm_rpm_repository_spec.rb
414
+ - spec/models/repository_version_response_spec.rb
415
+ - spec/models/paginatedrpm_rpm_publication_response_list_spec.rb
416
+ - spec/models/patchedrpm_rpm_alternate_content_source_spec.rb
432
417
  - spec/models/rpm_modulemd_spec.rb
418
+ - spec/models/image_response_spec.rb
433
419
  - spec/models/paginatedrpm_package_category_response_list_spec.rb
434
- - spec/models/repository_add_remove_content_spec.rb
435
- - spec/models/rpm_rpm_distribution_spec.rb
420
+ - spec/models/rpm_package_category_response_spec.rb
436
421
  - spec/models/rpm_package_langpacks_response_spec.rb
437
- - spec/models/paginated_repository_version_response_list_spec.rb
438
- - spec/models/rpm_uln_remote_spec.rb
439
- - spec/models/paginatedrpm_modulemd_response_list_spec.rb
440
- - spec/models/rpm_rpm_remote_spec.rb
441
- - spec/models/async_operation_response_spec.rb
442
- - spec/models/rpm_update_collection_spec.rb
422
+ - spec/models/sync_policy_enum_spec.rb
443
423
  - spec/models/rpm_update_record_response_spec.rb
444
- - spec/models/metadata_checksum_type_enum_spec.rb
445
- - spec/models/patchedrpm_rpm_remote_spec.rb
446
- - spec/models/content_summary_spec.rb
447
- - spec/models/rpm_rpm_publication_response_spec.rb
448
- - spec/models/patchedrpm_rpm_distribution_spec.rb
449
- - spec/models/paginatedrpm_rpm_repository_response_list_spec.rb
450
- - spec/models/repository_version_spec.rb
451
- - spec/models/rpm_repo_metadata_file_response_spec.rb
452
- - spec/models/rpm_update_record_spec.rb
453
- - spec/models/paginatedrpm_distribution_tree_response_list_spec.rb
454
- - spec/models/rpm_package_environment_response_spec.rb
455
- - spec/models/comps_xml_spec.rb
424
+ - spec/models/paginatedrpm_package_environment_response_list_spec.rb
425
+ - spec/models/rpm_distribution_tree_response_spec.rb
426
+ - spec/models/async_operation_response_spec.rb
427
+ - spec/models/checksum_response_spec.rb
428
+ - spec/models/patchedrpm_uln_remote_spec.rb
429
+ - spec/models/paginatedrpm_package_langpacks_response_list_spec.rb
430
+ - spec/models/artifact_response_spec.rb
456
431
  - spec/models/rpm_rpm_publication_spec.rb
457
- - spec/models/rpm_uln_remote_response_spec.rb
458
432
  - spec/models/content_summary_response_spec.rb
459
- - spec/models/patchedrpm_rpm_alternate_content_source_spec.rb
460
- - spec/models/variant_response_spec.rb
433
+ - spec/models/skip_types_enum_spec.rb
434
+ - spec/models/rpm_modulemd_response_spec.rb
435
+ - spec/models/rpm_uln_remote_response_spec.rb
436
+ - spec/models/rpm_package_spec.rb
461
437
  - spec/models/paginatedrpm_rpm_distribution_response_list_spec.rb
462
- - spec/models/paginatedrpm_rpm_publication_response_list_spec.rb
463
- - spec/models/rpm_package_category_response_spec.rb
464
- - spec/models/copy_spec.rb
465
- - spec/models/patchedrpm_rpm_repository_spec.rb
438
+ - spec/models/rpm_rpm_publication_response_spec.rb
439
+ - spec/models/paginated_repository_version_response_list_spec.rb
440
+ - spec/models/rpm_rpm_remote_spec.rb
441
+ - spec/models/rpm_modulemd_defaults_spec.rb
442
+ - spec/models/paginatedrpm_rpm_remote_response_list_spec.rb
466
443
  - spec/models/rpm_package_response_spec.rb
467
- - spec/models/rpm_rpm_repository_spec.rb
468
- - spec/models/rpm_rpm_alternate_content_source_response_spec.rb
469
- - spec/models/paginatedrpm_update_record_response_list_spec.rb
444
+ - spec/models/paginatedrpm_package_group_response_list_spec.rb
470
445
  - spec/models/rpm_package_group_response_spec.rb
471
- - spec/models/repository_version_response_spec.rb
472
446
  - spec/models/task_group_operation_response_spec.rb
473
- - spec/models/skip_types_enum_spec.rb
474
- - spec/models/rpm_modulemd_defaults_spec.rb
447
+ - spec/models/paginatedrpm_distribution_tree_response_list_spec.rb
448
+ - spec/models/rpm_repo_metadata_file_response_spec.rb
449
+ - spec/models/rpm_repository_sync_url_spec.rb
450
+ - spec/models/rpm_rpm_alternate_content_source_spec.rb
451
+ - spec/models/paginatedrpm_package_response_list_spec.rb
452
+ - spec/models/package_checksum_type_enum_spec.rb
453
+ - spec/models/repair_spec.rb
454
+ - spec/models/rpm_package_environment_response_spec.rb
455
+ - spec/models/rpm_rpm_repository_response_spec.rb
456
+ - spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb
457
+ - spec/models/paginatedrpm_uln_remote_response_list_spec.rb
458
+ - spec/models/rpm_update_record_spec.rb
459
+ - spec/models/repository_add_remove_content_spec.rb
460
+ - spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb
461
+ - spec/models/rpm_update_collection_response_spec.rb
462
+ - spec/models/rpm_rpm_distribution_spec.rb
463
+ - spec/models/rpm_rpm_distribution_response_spec.rb
464
+ - spec/models/addon_response_spec.rb
465
+ - spec/models/copy_spec.rb
466
+ - spec/models/patchedrpm_rpm_distribution_spec.rb
467
+ - spec/models/rpm_rpm_remote_response_spec.rb
468
+ - spec/models/rpm_rpm_repository_spec.rb
469
+ - spec/models/metadata_checksum_type_enum_spec.rb
470
+ - spec/models/rpm_modulemd_defaults_response_spec.rb
475
471
  - spec/spec_helper.rb
@@ -1,21 +0,0 @@
1
- # PulpRpmClient::ContentSummary
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **added** | **Hash&lt;String, Object&gt;** | |
8
- **removed** | **Hash&lt;String, Object&gt;** | |
9
- **present** | **Hash&lt;String, Object&gt;** | |
10
-
11
- ## Code Sample
12
-
13
- ```ruby
14
- require 'PulpRpmClient'
15
-
16
- instance = PulpRpmClient::ContentSummary.new(added: null,
17
- removed: null,
18
- present: null)
19
- ```
20
-
21
-
@@ -1,17 +0,0 @@
1
- # PulpRpmClient::RepositoryVersion
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
8
-
9
- ## Code Sample
10
-
11
- ```ruby
12
- require 'PulpRpmClient'
13
-
14
- instance = PulpRpmClient::RepositoryVersion.new(base_version: null)
15
- ```
16
-
17
-
@@ -1,246 +0,0 @@
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 PulpRpmClient
16
- # Serializer for the RepositoryVersion content summary
17
- class ContentSummary
18
- attr_accessor :added
19
-
20
- attr_accessor :removed
21
-
22
- attr_accessor :present
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'added' => :'added',
28
- :'removed' => :'removed',
29
- :'present' => :'present'
30
- }
31
- end
32
-
33
- # Attribute type mapping.
34
- def self.openapi_types
35
- {
36
- :'added' => :'Hash<String, Object>',
37
- :'removed' => :'Hash<String, Object>',
38
- :'present' => :'Hash<String, Object>'
39
- }
40
- end
41
-
42
- # List of attributes with nullable: true
43
- def self.openapi_nullable
44
- Set.new([
45
- ])
46
- end
47
-
48
- # Initializes the object
49
- # @param [Hash] attributes Model attributes in the form of hash
50
- def initialize(attributes = {})
51
- if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::ContentSummary` initialize method"
53
- end
54
-
55
- # check to see if the attribute exists and convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}) { |(k, v), h|
57
- if (!self.class.attribute_map.key?(k.to_sym))
58
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::ContentSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
- end
60
- h[k.to_sym] = v
61
- }
62
-
63
- if attributes.key?(:'added')
64
- if (value = attributes[:'added']).is_a?(Hash)
65
- self.added = value
66
- end
67
- end
68
-
69
- if attributes.key?(:'removed')
70
- if (value = attributes[:'removed']).is_a?(Hash)
71
- self.removed = value
72
- end
73
- end
74
-
75
- if attributes.key?(:'present')
76
- if (value = attributes[:'present']).is_a?(Hash)
77
- self.present = value
78
- end
79
- end
80
- end
81
-
82
- # Show invalid properties with the reasons. Usually used together with valid?
83
- # @return Array for valid properties with the reasons
84
- def list_invalid_properties
85
- invalid_properties = Array.new
86
- if @added.nil?
87
- invalid_properties.push('invalid value for "added", added cannot be nil.')
88
- end
89
-
90
- if @removed.nil?
91
- invalid_properties.push('invalid value for "removed", removed cannot be nil.')
92
- end
93
-
94
- if @present.nil?
95
- invalid_properties.push('invalid value for "present", present cannot be nil.')
96
- end
97
-
98
- invalid_properties
99
- end
100
-
101
- # Check to see if the all the properties in the model are valid
102
- # @return true if the model is valid
103
- def valid?
104
- return false if @added.nil?
105
- return false if @removed.nil?
106
- return false if @present.nil?
107
- true
108
- end
109
-
110
- # Checks equality by comparing each attribute.
111
- # @param [Object] Object to be compared
112
- def ==(o)
113
- return true if self.equal?(o)
114
- self.class == o.class &&
115
- added == o.added &&
116
- removed == o.removed &&
117
- present == o.present
118
- end
119
-
120
- # @see the `==` method
121
- # @param [Object] Object to be compared
122
- def eql?(o)
123
- self == o
124
- end
125
-
126
- # Calculates hash code according to all attributes.
127
- # @return [Integer] Hash code
128
- def hash
129
- [added, removed, present].hash
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def self.build_from_hash(attributes)
136
- new.build_from_hash(attributes)
137
- end
138
-
139
- # Builds the object from hash
140
- # @param [Hash] attributes Model attributes in the form of hash
141
- # @return [Object] Returns the model itself
142
- def build_from_hash(attributes)
143
- return nil unless attributes.is_a?(Hash)
144
- self.class.openapi_types.each_pair do |key, type|
145
- if type =~ /\AArray<(.*)>/i
146
- # check to ensure the input is an array given that the attribute
147
- # is documented as an array but the input is not
148
- if attributes[self.class.attribute_map[key]].is_a?(Array)
149
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
- end
151
- elsif !attributes[self.class.attribute_map[key]].nil?
152
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
- end # or else data not found in attributes(hash), not an issue as the data can be optional
154
- end
155
-
156
- self
157
- end
158
-
159
- # Deserializes the data based on type
160
- # @param string type Data type
161
- # @param string value Value to be deserialized
162
- # @return [Object] Deserialized data
163
- def _deserialize(type, value)
164
- case type.to_sym
165
- when :DateTime
166
- DateTime.parse(value)
167
- when :Date
168
- Date.parse(value)
169
- when :String
170
- value.to_s
171
- when :Integer
172
- value.to_i
173
- when :Float
174
- value.to_f
175
- when :Boolean
176
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
- true
178
- else
179
- false
180
- end
181
- when :Object
182
- # generic object (usually a Hash), return directly
183
- value
184
- when /\AArray<(?<inner_type>.+)>\z/
185
- inner_type = Regexp.last_match[:inner_type]
186
- value.map { |v| _deserialize(inner_type, v) }
187
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
- k_type = Regexp.last_match[:k_type]
189
- v_type = Regexp.last_match[:v_type]
190
- {}.tap do |hash|
191
- value.each do |k, v|
192
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
- end
194
- end
195
- else # model
196
- PulpRpmClient.const_get(type).build_from_hash(value)
197
- end
198
- end
199
-
200
- # Returns the string representation of the object
201
- # @return [String] String presentation of the object
202
- def to_s
203
- to_hash.to_s
204
- end
205
-
206
- # to_body is an alias to to_hash (backward compatibility)
207
- # @return [Hash] Returns the object in the form of hash
208
- def to_body
209
- to_hash
210
- end
211
-
212
- # Returns the object in the form of hash
213
- # @return [Hash] Returns the object in the form of hash
214
- def to_hash
215
- hash = {}
216
- self.class.attribute_map.each_pair do |attr, param|
217
- value = self.send(attr)
218
- if value.nil?
219
- is_nullable = self.class.openapi_nullable.include?(attr)
220
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
- end
222
-
223
- hash[param] = _to_hash(value)
224
- end
225
- hash
226
- end
227
-
228
- # Outputs non-array value in the form of hash
229
- # For object, use to_hash. Otherwise, just return the value
230
- # @param [Object] value Any valid value
231
- # @return [Hash] Returns the value in the form of hash
232
- def _to_hash(value)
233
- if value.is_a?(Array)
234
- value.compact.map { |v| _to_hash(v) }
235
- elsif value.is_a?(Hash)
236
- {}.tap do |hash|
237
- value.each { |k, v| hash[k] = _to_hash(v) }
238
- end
239
- elsif value.respond_to? :to_hash
240
- value.to_hash
241
- else
242
- value
243
- end
244
- end
245
- end
246
- end
@@ -1,53 +0,0 @@
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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpRpmClient::ContentSummary
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'ContentSummary' do
21
- before do
22
- # run before each test
23
- @instance = PulpRpmClient::ContentSummary.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of ContentSummary' do
31
- it 'should create an instance of ContentSummary' do
32
- expect(@instance).to be_instance_of(PulpRpmClient::ContentSummary)
33
- end
34
- end
35
- describe 'test attribute "added"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "removed"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "present"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- end