pulp_deb_client 2.16.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -6
  3. data/docs/Copy.md +21 -0
  4. data/docs/DebAptRemote.md +1 -1
  5. data/docs/DebAptRemoteResponse.md +1 -1
  6. data/docs/DebCopyApi.md +62 -0
  7. data/docs/PatcheddebAptRemote.md +1 -1
  8. data/docs/Repair.md +17 -0
  9. data/docs/RepositoriesAptVersionsApi.md +4 -4
  10. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +4 -0
  11. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +4 -0
  12. data/lib/pulp_deb_client/api/content_packages_api.rb +4 -0
  13. data/lib/pulp_deb_client/api/deb_copy_api.rb +86 -0
  14. data/lib/pulp_deb_client/api/repositories_apt_versions_api.rb +9 -9
  15. data/lib/pulp_deb_client/api_client.rb +1 -4
  16. data/lib/pulp_deb_client/configuration.rb +1 -0
  17. data/lib/pulp_deb_client/models/{content_summary.rb → copy.rb} +33 -42
  18. data/lib/pulp_deb_client/models/deb_apt_distribution.rb +38 -0
  19. data/lib/pulp_deb_client/models/deb_apt_remote.rb +223 -1
  20. data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +1 -1
  21. data/lib/pulp_deb_client/models/deb_apt_repository.rb +34 -0
  22. data/lib/pulp_deb_client/models/deb_base_package.rb +15 -0
  23. data/lib/pulp_deb_client/models/deb_generic_content.rb +19 -0
  24. data/lib/pulp_deb_client/models/deb_installer_file_index.rb +53 -0
  25. data/lib/pulp_deb_client/models/deb_package_index.rb +45 -0
  26. data/lib/pulp_deb_client/models/deb_release.rb +57 -0
  27. data/lib/pulp_deb_client/models/deb_release_architecture.rb +19 -0
  28. data/lib/pulp_deb_client/models/deb_release_component.rb +19 -0
  29. data/lib/pulp_deb_client/models/deb_release_file.rb +64 -0
  30. data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +30 -0
  31. data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +211 -1
  32. data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +30 -0
  33. data/lib/pulp_deb_client/models/{repository_version.rb → repair.rb} +13 -12
  34. data/lib/pulp_deb_client/version.rb +1 -1
  35. data/lib/pulp_deb_client.rb +3 -2
  36. data/pulp_deb_client.gemspec +1 -1
  37. data/spec/api/deb_copy_api_spec.rb +47 -0
  38. data/spec/api/repositories_apt_versions_api_spec.rb +1 -1
  39. data/spec/models/{content_summary_spec.rb → copy_spec.rb} +9 -9
  40. data/spec/models/{repository_version_spec.rb → repair_spec.rb} +7 -7
  41. metadata +73 -63
  42. data/docs/ContentSummary.md +0 -21
  43. data/docs/RepositoryVersion.md +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf7b933afc2910552f7dca60035be103ff06a4edb95c20a37e9a696a3c866006
4
- data.tar.gz: 226b823a0245ed72d885bffe506f22b42fabf0c9d39398a992d53f510cae0d94
3
+ metadata.gz: 2f3e4fdde7d4fbd6da28e2c8e3d808328504f4a9619768e015769242ea45221b
4
+ data.tar.gz: d0521cce44076137f6a2ecdb1e4496486bedbd97347b81a9022ab885020c3df8
5
5
  SHA512:
6
- metadata.gz: 6997921cb4d30fb93d183b0bfe59bae9fbd09d96c3e56abeda9416ebdb337807e9d2e1505f9ce7407a64306c2e8c13663f7928c754c0a946e6eccd5085c9c2a7
7
- data.tar.gz: 5b3b5f1fa7b49458cd30ec132b7c0011e5065c93845dba21a687c027a91341a8548a713c9b3244924a030e30b856586be86d871e4387f1c26cc60a4ae3dff9b0
6
+ metadata.gz: 5fcebc5c35fb4e62d25d02931535ac2da55fc5a173d7783161c0d5c2ec0192b7304943879bc9adf6d4c25c2017468eaba2a3a674c7b5dd4257ae945dd4aef4d8
7
+ data.tar.gz: 7ab44397906cff2eaf0687a4ed5b0225808d0e69ed707305f7fd0902b46699fd31fd86d78f13ae24acba684b77c1e04a271816ad0293372783d7202cfbf85c75
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: 2.16.0
10
+ - Package version: 2.18.0
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_deb_client.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./pulp_deb_client-2.16.0.gem
27
+ gem install ./pulp_deb_client-2.18.0.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./pulp_deb_client-2.16.0.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./pulp_deb_client-2.18.0.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_deb_client', '~> 2.16.0'
36
+ gem 'pulp_deb_client', '~> 2.18.0'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -118,6 +118,7 @@ Class | Method | HTTP request | Description
118
118
  *PulpDebClient::ContentReleasesApi* | [**create**](docs/ContentReleasesApi.md#create) | **POST** /pulp/api/v3/content/deb/releases/ | Create a release
119
119
  *PulpDebClient::ContentReleasesApi* | [**list**](docs/ContentReleasesApi.md#list) | **GET** /pulp/api/v3/content/deb/releases/ | List releases
120
120
  *PulpDebClient::ContentReleasesApi* | [**read**](docs/ContentReleasesApi.md#read) | **GET** {deb_release_href} | Inspect a release
121
+ *PulpDebClient::DebCopyApi* | [**copy_content**](docs/DebCopyApi.md#copy_content) | **POST** /pulp/api/v3/deb/copy/ | Copy content
121
122
  *PulpDebClient::DistributionsAptApi* | [**create**](docs/DistributionsAptApi.md#create) | **POST** /pulp/api/v3/distributions/deb/apt/ | Create an apt distribution
122
123
  *PulpDebClient::DistributionsAptApi* | [**delete**](docs/DistributionsAptApi.md#delete) | **DELETE** {deb_apt_distribution_href} | Delete an apt distribution
123
124
  *PulpDebClient::DistributionsAptApi* | [**list**](docs/DistributionsAptApi.md#list) | **GET** /pulp/api/v3/distributions/deb/apt/ | List apt distributions
@@ -155,8 +156,8 @@ Class | Method | HTTP request | Description
155
156
  ## Documentation for Models
156
157
 
157
158
  - [PulpDebClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
158
- - [PulpDebClient::ContentSummary](docs/ContentSummary.md)
159
159
  - [PulpDebClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
160
+ - [PulpDebClient::Copy](docs/Copy.md)
160
161
  - [PulpDebClient::DebAptDistribution](docs/DebAptDistribution.md)
161
162
  - [PulpDebClient::DebAptDistributionResponse](docs/DebAptDistributionResponse.md)
162
163
  - [PulpDebClient::DebAptPublication](docs/DebAptPublication.md)
@@ -204,9 +205,9 @@ Class | Method | HTTP request | Description
204
205
  - [PulpDebClient::PatcheddebAptRemote](docs/PatcheddebAptRemote.md)
205
206
  - [PulpDebClient::PatcheddebAptRepository](docs/PatcheddebAptRepository.md)
206
207
  - [PulpDebClient::PolicyEnum](docs/PolicyEnum.md)
208
+ - [PulpDebClient::Repair](docs/Repair.md)
207
209
  - [PulpDebClient::RepositoryAddRemoveContent](docs/RepositoryAddRemoveContent.md)
208
210
  - [PulpDebClient::RepositorySyncURL](docs/RepositorySyncURL.md)
209
- - [PulpDebClient::RepositoryVersion](docs/RepositoryVersion.md)
210
211
  - [PulpDebClient::RepositoryVersionResponse](docs/RepositoryVersionResponse.md)
211
212
 
212
213
 
data/docs/Copy.md ADDED
@@ -0,0 +1,21 @@
1
+ # PulpDebClient::Copy
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **config** | [**Object**](.md) | A JSON document describing sources, destinations, and content to be copied |
8
+ **structured** | **Boolean** | Also copy any distributions, components, and releases as needed for any packages being copied. This will allow for structured publications of the target repository.Default is set to True | [optional] [default to true]
9
+ **dependency_solving** | **Boolean** | Also copy dependencies of any packages being copied. NOT YETIMPLEMENTED! You must keep this at \"False\"! | [optional] [default to false]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'PulpDebClient'
15
+
16
+ instance = PulpDebClient::Copy.new(config: null,
17
+ structured: null,
18
+ dependency_solving: null)
19
+ ```
20
+
21
+
data/docs/DebAptRemote.md CHANGED
@@ -24,7 +24,7 @@ Name | Type | Description | Notes
24
24
  **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
25
25
  **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
26
26
  **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
27
- **rate_limit** | **Integer** | Limits total download rate in requests per second | [optional]
27
+ **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
28
28
  **distributions** | **String** | Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. |
29
29
  **components** | **String** | Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". | [optional]
30
30
  **architectures** | **String** | Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. | [optional]
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
22
22
  **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
23
23
  **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
24
24
  **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
25
- **rate_limit** | **Integer** | Limits total download rate in requests per second | [optional]
25
+ **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
26
26
  **distributions** | **String** | Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. |
27
27
  **components** | **String** | Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". | [optional]
28
28
  **architectures** | **String** | Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. | [optional]
@@ -0,0 +1,62 @@
1
+ # PulpDebClient::DebCopyApi
2
+
3
+ All URIs are relative to *https://pulp*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**copy_content**](DebCopyApi.md#copy_content) | **POST** /pulp/api/v3/deb/copy/ | Copy content
8
+
9
+
10
+
11
+ ## copy_content
12
+
13
+ > AsyncOperationResponse copy_content(copy)
14
+
15
+ Copy content
16
+
17
+ Trigger an asynchronous task to copy APT contentfrom one repository into another, creating a newrepository version.
18
+
19
+ ### Example
20
+
21
+ ```ruby
22
+ # load the gem
23
+ require 'pulp_deb_client'
24
+ # setup authorization
25
+ PulpDebClient.configure do |config|
26
+ # Configure HTTP basic authorization: basicAuth
27
+ config.username = 'YOUR USERNAME'
28
+ config.password = 'YOUR PASSWORD'
29
+ end
30
+
31
+ api_instance = PulpDebClient::DebCopyApi.new
32
+ copy = PulpDebClient::Copy.new # Copy |
33
+
34
+ begin
35
+ #Copy content
36
+ result = api_instance.copy_content(copy)
37
+ p result
38
+ rescue PulpDebClient::ApiError => e
39
+ puts "Exception when calling DebCopyApi->copy_content: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **copy** | [**Copy**](Copy.md)| |
49
+
50
+ ### Return type
51
+
52
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
53
+
54
+ ### Authorization
55
+
56
+ [basicAuth](../README.md#basicAuth)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
61
+ - **Accept**: application/json
62
+
@@ -24,7 +24,7 @@ Name | Type | Description | Notes
24
24
  **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
25
25
  **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
26
26
  **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
27
- **rate_limit** | **Integer** | Limits total download rate in requests per second | [optional]
27
+ **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
28
28
  **distributions** | **String** | Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. | [optional]
29
29
  **components** | **String** | Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". | [optional]
30
30
  **architectures** | **String** | Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. | [optional]
data/docs/Repair.md ADDED
@@ -0,0 +1,17 @@
1
+ # PulpDebClient::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 'PulpDebClient'
13
+
14
+ instance = PulpDebClient::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(deb_apt_repository_version_href, repository_version)
221
+ > AsyncOperationResponse repair(deb_apt_repository_version_href, repair)
222
222
 
223
223
 
224
224
 
@@ -238,10 +238,10 @@ end
238
238
 
239
239
  api_instance = PulpDebClient::RepositoriesAptVersionsApi.new
240
240
  deb_apt_repository_version_href = 'deb_apt_repository_version_href_example' # String |
241
- repository_version = PulpDebClient::RepositoryVersion.new # RepositoryVersion |
241
+ repair = PulpDebClient::Repair.new # Repair |
242
242
 
243
243
  begin
244
- result = api_instance.repair(deb_apt_repository_version_href, repository_version)
244
+ result = api_instance.repair(deb_apt_repository_version_href, repair)
245
245
  p result
246
246
  rescue PulpDebClient::ApiError => e
247
247
  puts "Exception when calling RepositoriesAptVersionsApi->repair: #{e}"
@@ -254,7 +254,7 @@ end
254
254
  Name | Type | Description | Notes
255
255
  ------------- | ------------- | ------------- | -------------
256
256
  **deb_apt_repository_version_href** | **String**| |
257
- **repository_version** | [**RepositoryVersion**](RepositoryVersion.md)| |
257
+ **repair** | [**Repair**](Repair.md)| |
258
258
 
259
259
  ### Return type
260
260
 
@@ -48,6 +48,10 @@ module PulpDebClient
48
48
  if @api_client.config.client_side_validation && relative_path.nil?
49
49
  fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentGenericContentsApi.create"
50
50
  end
51
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
52
+ fail ArgumentError, 'invalid value for "relative_path" when calling ContentGenericContentsApi.create, the character length must be great than or equal to 1.'
53
+ end
54
+
51
55
  # resource path
52
56
  local_var_path = '/pulp/api/v3/content/deb/generic_contents/'
53
57
 
@@ -44,6 +44,10 @@ module PulpDebClient
44
44
  if @api_client.config.debugging
45
45
  @api_client.config.logger.debug 'Calling API: ContentInstallerPackagesApi.create ...'
46
46
  end
47
+ if @api_client.config.client_side_validation && !opts[:'relative_path'].nil? && opts[:'relative_path'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"relative_path"]" when calling ContentInstallerPackagesApi.create, the character length must be great than or equal to 1.'
49
+ end
50
+
47
51
  # resource path
48
52
  local_var_path = '/pulp/api/v3/content/deb/installer_packages/'
49
53
 
@@ -44,6 +44,10 @@ module PulpDebClient
44
44
  if @api_client.config.debugging
45
45
  @api_client.config.logger.debug 'Calling API: ContentPackagesApi.create ...'
46
46
  end
47
+ if @api_client.config.client_side_validation && !opts[:'relative_path'].nil? && opts[:'relative_path'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"relative_path"]" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
49
+ end
50
+
47
51
  # resource path
48
52
  local_var_path = '/pulp/api/v3/content/deb/packages/'
49
53
 
@@ -0,0 +1,86 @@
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 'cgi'
14
+
15
+ module PulpDebClient
16
+ class DebCopyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Copy content
23
+ # Trigger an asynchronous task to copy APT contentfrom one repository into another, creating a newrepository version.
24
+ # @param copy [Copy]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def copy_content(copy, opts = {})
28
+ data, _status_code, _headers = copy_content_with_http_info(copy, opts)
29
+ data
30
+ end
31
+
32
+ # Copy content
33
+ # Trigger an asynchronous task to copy APT contentfrom one repository into another, creating a newrepository version.
34
+ # @param copy [Copy]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
+ def copy_content_with_http_info(copy, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DebCopyApi.copy_content ...'
40
+ end
41
+ # verify the required parameter 'copy' is set
42
+ if @api_client.config.client_side_validation && copy.nil?
43
+ fail ArgumentError, "Missing the required parameter 'copy' when calling DebCopyApi.copy_content"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/deb/copy/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(copy)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: DebCopyApi#copy_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ end
86
+ end
@@ -270,20 +270,20 @@ module PulpDebClient
270
270
 
271
271
  # Trigger an asynchronous task to repair a repository version.
272
272
  # @param deb_apt_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(deb_apt_repository_version_href, repository_version, opts = {})
277
- data, _status_code, _headers = repair_with_http_info(deb_apt_repository_version_href, repository_version, opts)
276
+ def repair(deb_apt_repository_version_href, repair, opts = {})
277
+ data, _status_code, _headers = repair_with_http_info(deb_apt_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 deb_apt_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(deb_apt_repository_version_href, repository_version, opts = {})
286
+ def repair_with_http_info(deb_apt_repository_version_href, repair, opts = {})
287
287
  if @api_client.config.debugging
288
288
  @api_client.config.logger.debug 'Calling API: RepositoriesAptVersionsApi.repair ...'
289
289
  end
@@ -291,9 +291,9 @@ module PulpDebClient
291
291
  if @api_client.config.client_side_validation && deb_apt_repository_version_href.nil?
292
292
  fail ArgumentError, "Missing the required parameter 'deb_apt_repository_version_href' when calling RepositoriesAptVersionsApi.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 RepositoriesAptVersionsApi.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 RepositoriesAptVersionsApi.repair"
297
297
  end
298
298
  # resource path
299
299
  local_var_path = '{deb_apt_repository_version_href}repair/'.sub('{' + 'deb_apt_repository_version_href' + '}', CGI.escape(deb_apt_repository_version_href.to_s).gsub('%2F', '/'))
@@ -312,7 +312,7 @@ module PulpDebClient
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 PulpDebClient
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 PulpDebClient
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 PulpDebClient
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,29 +13,32 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- # Serializer for the RepositoryVersion content summary
17
- class ContentSummary
18
- attr_accessor :added
16
+ # A serializer for Content Copy API.
17
+ class Copy
18
+ # A JSON document describing sources, destinations, and content to be copied
19
+ attr_accessor :config
19
20
 
20
- attr_accessor :removed
21
+ # Also copy any distributions, components, and releases as needed for any packages being copied. This will allow for structured publications of the target repository.Default is set to True
22
+ attr_accessor :structured
21
23
 
22
- attr_accessor :present
24
+ # Also copy dependencies of any packages being copied. NOT YETIMPLEMENTED! You must keep this at \"False\"!
25
+ attr_accessor :dependency_solving
23
26
 
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
- :'added' => :'added',
28
- :'removed' => :'removed',
29
- :'present' => :'present'
30
+ :'config' => :'config',
31
+ :'structured' => :'structured',
32
+ :'dependency_solving' => :'dependency_solving'
30
33
  }
31
34
  end
32
35
 
33
36
  # Attribute type mapping.
34
37
  def self.openapi_types
35
38
  {
36
- :'added' => :'Hash<String, Object>',
37
- :'removed' => :'Hash<String, Object>',
38
- :'present' => :'Hash<String, Object>'
39
+ :'config' => :'Object',
40
+ :'structured' => :'Boolean',
41
+ :'dependency_solving' => :'Boolean'
39
42
  }
40
43
  end
41
44
 
@@ -49,33 +52,31 @@ module PulpDebClient
49
52
  # @param [Hash] attributes Model attributes in the form of hash
50
53
  def initialize(attributes = {})
51
54
  if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::ContentSummary` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::Copy` initialize method"
53
56
  end
54
57
 
55
58
  # check to see if the attribute exists and convert string to symbol for hash key
56
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
57
60
  if (!self.class.attribute_map.key?(k.to_sym))
58
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::ContentSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::Copy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
62
  end
60
63
  h[k.to_sym] = v
61
64
  }
62
65
 
63
- if attributes.key?(:'added')
64
- if (value = attributes[:'added']).is_a?(Hash)
65
- self.added = value
66
- end
66
+ if attributes.key?(:'config')
67
+ self.config = attributes[:'config']
67
68
  end
68
69
 
69
- if attributes.key?(:'removed')
70
- if (value = attributes[:'removed']).is_a?(Hash)
71
- self.removed = value
72
- end
70
+ if attributes.key?(:'structured')
71
+ self.structured = attributes[:'structured']
72
+ else
73
+ self.structured = true
73
74
  end
74
75
 
75
- if attributes.key?(:'present')
76
- if (value = attributes[:'present']).is_a?(Hash)
77
- self.present = value
78
- end
76
+ if attributes.key?(:'dependency_solving')
77
+ self.dependency_solving = attributes[:'dependency_solving']
78
+ else
79
+ self.dependency_solving = false
79
80
  end
80
81
  end
81
82
 
@@ -83,16 +84,8 @@ module PulpDebClient
83
84
  # @return Array for valid properties with the reasons
84
85
  def list_invalid_properties
85
86
  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.')
87
+ if @config.nil?
88
+ invalid_properties.push('invalid value for "config", config cannot be nil.')
96
89
  end
97
90
 
98
91
  invalid_properties
@@ -101,9 +94,7 @@ module PulpDebClient
101
94
  # Check to see if the all the properties in the model are valid
102
95
  # @return true if the model is valid
103
96
  def valid?
104
- return false if @added.nil?
105
- return false if @removed.nil?
106
- return false if @present.nil?
97
+ return false if @config.nil?
107
98
  true
108
99
  end
109
100
 
@@ -112,9 +103,9 @@ module PulpDebClient
112
103
  def ==(o)
113
104
  return true if self.equal?(o)
114
105
  self.class == o.class &&
115
- added == o.added &&
116
- removed == o.removed &&
117
- present == o.present
106
+ config == o.config &&
107
+ structured == o.structured &&
108
+ dependency_solving == o.dependency_solving
118
109
  end
119
110
 
120
111
  # @see the `==` method
@@ -126,7 +117,7 @@ module PulpDebClient
126
117
  # Calculates hash code according to all attributes.
127
118
  # @return [Integer] Hash code
128
119
  def hash
129
- [added, removed, present].hash
120
+ [config, structured, dependency_solving].hash
130
121
  end
131
122
 
132
123
  # Builds the object from hash
@@ -113,10 +113,18 @@ module PulpDebClient
113
113
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
114
114
  end
115
115
 
116
+ if @base_path.to_s.length < 1
117
+ invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
118
+ end
119
+
116
120
  if @name.nil?
117
121
  invalid_properties.push('invalid value for "name", name cannot be nil.')
118
122
  end
119
123
 
124
+ if @name.to_s.length < 1
125
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
126
+ end
127
+
120
128
  invalid_properties
121
129
  end
122
130
 
@@ -124,10 +132,40 @@ module PulpDebClient
124
132
  # @return true if the model is valid
125
133
  def valid?
126
134
  return false if @base_path.nil?
135
+ return false if @base_path.to_s.length < 1
127
136
  return false if @name.nil?
137
+ return false if @name.to_s.length < 1
128
138
  true
129
139
  end
130
140
 
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] base_path Value to be assigned
143
+ def base_path=(base_path)
144
+ if base_path.nil?
145
+ fail ArgumentError, 'base_path cannot be nil'
146
+ end
147
+
148
+ if base_path.to_s.length < 1
149
+ fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
150
+ end
151
+
152
+ @base_path = base_path
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] name Value to be assigned
157
+ def name=(name)
158
+ if name.nil?
159
+ fail ArgumentError, 'name cannot be nil'
160
+ end
161
+
162
+ if name.to_s.length < 1
163
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
164
+ end
165
+
166
+ @name = name
167
+ end
168
+
131
169
  # Checks equality by comparing each attribute.
132
170
  # @param [Object] Object to be compared
133
171
  def ==(o)