pulp_file_client 1.9.1 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/docs/AcsFileApi.md +15 -14
- data/docs/TaskGroupOperationResponse.md +17 -0
- data/lib/pulp_file_client/api/acs_file_api.rb +24 -22
- data/lib/pulp_file_client/models/task_group_operation_response.rb +213 -0
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +1 -0
- data/spec/api/acs_file_api_spec.rb +8 -8
- data/spec/models/task_group_operation_response_spec.rb +41 -0
- metadata +31 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30e94f95bb6a95bec8613984e96a2beab521df43341efedcdc2b61e6a6cdb4fd
|
4
|
+
data.tar.gz: 52ef7ffc7ab38facfe243aa978a4113849909c1f32c147d2a4dae3adf5030ea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b194c1e79a26c72a6fb308a8fdc05f53a73ac533ca0eff51619b723e0628e1daf5c6098c40546533b64b1cb0ca5cf504b9a2177ea2da3c6af11ca7abe839f70d
|
7
|
+
data.tar.gz: a97d00da9d8e9fce77bb06fc42064f3351612063c50bf6055d27ba14c388bae2f006fd8b97f08bef69bd04c9c6f203d8a7e76553c4510a375e2eae1bfd2da569
|
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: 1.
|
10
|
+
- Package version: 1.10.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_file_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulp_file_client-1.
|
27
|
+
gem install ./pulp_file_client-1.10.0.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulp_file_client-1.
|
30
|
+
(for development, run `gem install --dev ./pulp_file_client-1.10.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_file_client', '~> 1.
|
36
|
+
gem 'pulp_file_client', '~> 1.10.0'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -156,6 +156,7 @@ Class | Method | HTTP request | Description
|
|
156
156
|
- [PulpFileClient::RepositorySyncURL](docs/RepositorySyncURL.md)
|
157
157
|
- [PulpFileClient::RepositoryVersion](docs/RepositoryVersion.md)
|
158
158
|
- [PulpFileClient::RepositoryVersionResponse](docs/RepositoryVersionResponse.md)
|
159
|
+
- [PulpFileClient::TaskGroupOperationResponse](docs/TaskGroupOperationResponse.md)
|
159
160
|
|
160
161
|
|
161
162
|
## Documentation for Authorization
|
data/docs/AcsFileApi.md
CHANGED
@@ -69,11 +69,11 @@ Name | Type | Description | Notes
|
|
69
69
|
|
70
70
|
## delete
|
71
71
|
|
72
|
-
> delete(file_file_alternate_content_source_href)
|
72
|
+
> AsyncOperationResponse delete(file_file_alternate_content_source_href)
|
73
73
|
|
74
74
|
Delete a file alternate content source
|
75
75
|
|
76
|
-
|
76
|
+
Trigger an asynchronous delete ACS task
|
77
77
|
|
78
78
|
### Example
|
79
79
|
|
@@ -92,7 +92,8 @@ file_file_alternate_content_source_href = 'file_file_alternate_content_source_hr
|
|
92
92
|
|
93
93
|
begin
|
94
94
|
#Delete a file alternate content source
|
95
|
-
api_instance.delete(file_file_alternate_content_source_href)
|
95
|
+
result = api_instance.delete(file_file_alternate_content_source_href)
|
96
|
+
p result
|
96
97
|
rescue PulpFileClient::ApiError => e
|
97
98
|
puts "Exception when calling AcsFileApi->delete: #{e}"
|
98
99
|
end
|
@@ -107,7 +108,7 @@ Name | Type | Description | Notes
|
|
107
108
|
|
108
109
|
### Return type
|
109
110
|
|
110
|
-
|
111
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
111
112
|
|
112
113
|
### Authorization
|
113
114
|
|
@@ -116,7 +117,7 @@ nil (empty response body)
|
|
116
117
|
### HTTP request headers
|
117
118
|
|
118
119
|
- **Content-Type**: Not defined
|
119
|
-
- **Accept**:
|
120
|
+
- **Accept**: application/json
|
120
121
|
|
121
122
|
|
122
123
|
## list
|
@@ -194,11 +195,11 @@ Name | Type | Description | Notes
|
|
194
195
|
|
195
196
|
## partial_update
|
196
197
|
|
197
|
-
>
|
198
|
+
> AsyncOperationResponse partial_update(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source)
|
198
199
|
|
199
200
|
Update a file alternate content source
|
200
201
|
|
201
|
-
|
202
|
+
Trigger an asynchronous partial update task
|
202
203
|
|
203
204
|
### Example
|
204
205
|
|
@@ -235,7 +236,7 @@ Name | Type | Description | Notes
|
|
235
236
|
|
236
237
|
### Return type
|
237
238
|
|
238
|
-
[**
|
239
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
239
240
|
|
240
241
|
### Authorization
|
241
242
|
|
@@ -308,11 +309,11 @@ Name | Type | Description | Notes
|
|
308
309
|
|
309
310
|
## refresh
|
310
311
|
|
311
|
-
>
|
312
|
+
> TaskGroupOperationResponse refresh(file_file_alternate_content_source_href, file_file_alternate_content_source)
|
312
313
|
|
313
314
|
|
314
315
|
|
315
|
-
|
316
|
+
Trigger an asynchronous task to create Alternate Content Source content.
|
316
317
|
|
317
318
|
### Example
|
318
319
|
|
@@ -348,7 +349,7 @@ Name | Type | Description | Notes
|
|
348
349
|
|
349
350
|
### Return type
|
350
351
|
|
351
|
-
[**
|
352
|
+
[**TaskGroupOperationResponse**](TaskGroupOperationResponse.md)
|
352
353
|
|
353
354
|
### Authorization
|
354
355
|
|
@@ -362,11 +363,11 @@ Name | Type | Description | Notes
|
|
362
363
|
|
363
364
|
## update
|
364
365
|
|
365
|
-
>
|
366
|
+
> AsyncOperationResponse update(file_file_alternate_content_source_href, file_file_alternate_content_source)
|
366
367
|
|
367
368
|
Update a file alternate content source
|
368
369
|
|
369
|
-
|
370
|
+
Trigger an asynchronous update task
|
370
371
|
|
371
372
|
### Example
|
372
373
|
|
@@ -403,7 +404,7 @@ Name | Type | Description | Notes
|
|
403
404
|
|
404
405
|
### Return type
|
405
406
|
|
406
|
-
[**
|
407
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
407
408
|
|
408
409
|
### Authorization
|
409
410
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# PulpFileClient::TaskGroupOperationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**task_group** | **String** | The href of the task group. |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'PulpFileClient'
|
13
|
+
|
14
|
+
instance = PulpFileClient::TaskGroupOperationResponse.new(task_group: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -84,20 +84,20 @@ module PulpFileClient
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# Delete a file alternate content source
|
87
|
-
#
|
87
|
+
# Trigger an asynchronous delete ACS task
|
88
88
|
# @param file_file_alternate_content_source_href [String]
|
89
89
|
# @param [Hash] opts the optional parameters
|
90
|
-
# @return [
|
90
|
+
# @return [AsyncOperationResponse]
|
91
91
|
def delete(file_file_alternate_content_source_href, opts = {})
|
92
|
-
delete_with_http_info(file_file_alternate_content_source_href, opts)
|
93
|
-
|
92
|
+
data, _status_code, _headers = delete_with_http_info(file_file_alternate_content_source_href, opts)
|
93
|
+
data
|
94
94
|
end
|
95
95
|
|
96
96
|
# Delete a file alternate content source
|
97
|
-
#
|
97
|
+
# Trigger an asynchronous delete ACS task
|
98
98
|
# @param file_file_alternate_content_source_href [String]
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
|
-
# @return [Array<(
|
100
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
101
101
|
def delete_with_http_info(file_file_alternate_content_source_href, opts = {})
|
102
102
|
if @api_client.config.debugging
|
103
103
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.delete ...'
|
@@ -114,6 +114,8 @@ module PulpFileClient
|
|
114
114
|
|
115
115
|
# header parameters
|
116
116
|
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
119
|
|
118
120
|
# form parameters
|
119
121
|
form_params = opts[:form_params] || {}
|
@@ -122,7 +124,7 @@ module PulpFileClient
|
|
122
124
|
post_body = opts[:body]
|
123
125
|
|
124
126
|
# return_type
|
125
|
-
return_type = opts[:return_type]
|
127
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
126
128
|
|
127
129
|
# auth_names
|
128
130
|
auth_names = opts[:auth_names] || ['basicAuth']
|
@@ -230,22 +232,22 @@ module PulpFileClient
|
|
230
232
|
end
|
231
233
|
|
232
234
|
# Update a file alternate content source
|
233
|
-
#
|
235
|
+
# Trigger an asynchronous partial update task
|
234
236
|
# @param file_file_alternate_content_source_href [String]
|
235
237
|
# @param patchedfile_file_alternate_content_source [PatchedfileFileAlternateContentSource]
|
236
238
|
# @param [Hash] opts the optional parameters
|
237
|
-
# @return [
|
239
|
+
# @return [AsyncOperationResponse]
|
238
240
|
def partial_update(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts = {})
|
239
241
|
data, _status_code, _headers = partial_update_with_http_info(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts)
|
240
242
|
data
|
241
243
|
end
|
242
244
|
|
243
245
|
# Update a file alternate content source
|
244
|
-
#
|
246
|
+
# Trigger an asynchronous partial update task
|
245
247
|
# @param file_file_alternate_content_source_href [String]
|
246
248
|
# @param patchedfile_file_alternate_content_source [PatchedfileFileAlternateContentSource]
|
247
249
|
# @param [Hash] opts the optional parameters
|
248
|
-
# @return [Array<(
|
250
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
249
251
|
def partial_update_with_http_info(file_file_alternate_content_source_href, patchedfile_file_alternate_content_source, opts = {})
|
250
252
|
if @api_client.config.debugging
|
251
253
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.partial_update ...'
|
@@ -278,7 +280,7 @@ module PulpFileClient
|
|
278
280
|
post_body = opts[:body] || @api_client.object_to_http_body(patchedfile_file_alternate_content_source)
|
279
281
|
|
280
282
|
# return_type
|
281
|
-
return_type = opts[:return_type] || '
|
283
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
282
284
|
|
283
285
|
# auth_names
|
284
286
|
auth_names = opts[:auth_names] || ['basicAuth']
|
@@ -367,21 +369,21 @@ module PulpFileClient
|
|
367
369
|
return data, status_code, headers
|
368
370
|
end
|
369
371
|
|
370
|
-
#
|
372
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
371
373
|
# @param file_file_alternate_content_source_href [String]
|
372
374
|
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
373
375
|
# @param [Hash] opts the optional parameters
|
374
|
-
# @return [
|
376
|
+
# @return [TaskGroupOperationResponse]
|
375
377
|
def refresh(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
376
378
|
data, _status_code, _headers = refresh_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts)
|
377
379
|
data
|
378
380
|
end
|
379
381
|
|
380
|
-
#
|
382
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
381
383
|
# @param file_file_alternate_content_source_href [String]
|
382
384
|
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
383
385
|
# @param [Hash] opts the optional parameters
|
384
|
-
# @return [Array<(
|
386
|
+
# @return [Array<(TaskGroupOperationResponse, Integer, Hash)>] TaskGroupOperationResponse data, response status code and response headers
|
385
387
|
def refresh_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
386
388
|
if @api_client.config.debugging
|
387
389
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.refresh ...'
|
@@ -414,7 +416,7 @@ module PulpFileClient
|
|
414
416
|
post_body = opts[:body] || @api_client.object_to_http_body(file_file_alternate_content_source)
|
415
417
|
|
416
418
|
# return_type
|
417
|
-
return_type = opts[:return_type] || '
|
419
|
+
return_type = opts[:return_type] || 'TaskGroupOperationResponse'
|
418
420
|
|
419
421
|
# auth_names
|
420
422
|
auth_names = opts[:auth_names] || ['basicAuth']
|
@@ -436,22 +438,22 @@ module PulpFileClient
|
|
436
438
|
end
|
437
439
|
|
438
440
|
# Update a file alternate content source
|
439
|
-
#
|
441
|
+
# Trigger an asynchronous update task
|
440
442
|
# @param file_file_alternate_content_source_href [String]
|
441
443
|
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
442
444
|
# @param [Hash] opts the optional parameters
|
443
|
-
# @return [
|
445
|
+
# @return [AsyncOperationResponse]
|
444
446
|
def update(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
445
447
|
data, _status_code, _headers = update_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts)
|
446
448
|
data
|
447
449
|
end
|
448
450
|
|
449
451
|
# Update a file alternate content source
|
450
|
-
#
|
452
|
+
# Trigger an asynchronous update task
|
451
453
|
# @param file_file_alternate_content_source_href [String]
|
452
454
|
# @param file_file_alternate_content_source [FileFileAlternateContentSource]
|
453
455
|
# @param [Hash] opts the optional parameters
|
454
|
-
# @return [Array<(
|
456
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
455
457
|
def update_with_http_info(file_file_alternate_content_source_href, file_file_alternate_content_source, opts = {})
|
456
458
|
if @api_client.config.debugging
|
457
459
|
@api_client.config.logger.debug 'Calling API: AcsFileApi.update ...'
|
@@ -484,7 +486,7 @@ module PulpFileClient
|
|
484
486
|
post_body = opts[:body] || @api_client.object_to_http_body(file_file_alternate_content_source)
|
485
487
|
|
486
488
|
# return_type
|
487
|
-
return_type = opts[:return_type] || '
|
489
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
488
490
|
|
489
491
|
# auth_names
|
490
492
|
auth_names = opts[:auth_names] || ['basicAuth']
|
@@ -0,0 +1,213 @@
|
|
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 PulpFileClient
|
16
|
+
# Serializer for asynchronous operations that return a task group.
|
17
|
+
class TaskGroupOperationResponse
|
18
|
+
# The href of the task group.
|
19
|
+
attr_accessor :task_group
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'task_group' => :'task_group'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'task_group' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
if (!attributes.is_a?(Hash))
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::TaskGroupOperationResponse` initialize method"
|
46
|
+
end
|
47
|
+
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::TaskGroupOperationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'task_group')
|
57
|
+
self.task_group = attributes[:'task_group']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
if @task_group.nil?
|
66
|
+
invalid_properties.push('invalid value for "task_group", task_group cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @task_group.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
task_group == o.task_group
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[task_group].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
117
|
+
end
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
PulpFileClient.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
data/lib/pulp_file_client.rb
CHANGED
@@ -48,6 +48,7 @@ require 'pulp_file_client/models/repository_add_remove_content'
|
|
48
48
|
require 'pulp_file_client/models/repository_sync_url'
|
49
49
|
require 'pulp_file_client/models/repository_version'
|
50
50
|
require 'pulp_file_client/models/repository_version_response'
|
51
|
+
require 'pulp_file_client/models/task_group_operation_response'
|
51
52
|
|
52
53
|
# APIs
|
53
54
|
require 'pulp_file_client/api/acs_file_api'
|
@@ -46,10 +46,10 @@ describe 'AcsFileApi' do
|
|
46
46
|
|
47
47
|
# unit tests for delete
|
48
48
|
# Delete a file alternate content source
|
49
|
-
#
|
49
|
+
# Trigger an asynchronous delete ACS task
|
50
50
|
# @param file_file_alternate_content_source_href
|
51
51
|
# @param [Hash] opts the optional parameters
|
52
|
-
# @return [
|
52
|
+
# @return [AsyncOperationResponse]
|
53
53
|
describe 'delete test' do
|
54
54
|
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -79,11 +79,11 @@ describe 'AcsFileApi' do
|
|
79
79
|
|
80
80
|
# unit tests for partial_update
|
81
81
|
# Update a file alternate content source
|
82
|
-
#
|
82
|
+
# Trigger an asynchronous partial update task
|
83
83
|
# @param file_file_alternate_content_source_href
|
84
84
|
# @param patchedfile_file_alternate_content_source
|
85
85
|
# @param [Hash] opts the optional parameters
|
86
|
-
# @return [
|
86
|
+
# @return [AsyncOperationResponse]
|
87
87
|
describe 'partial_update test' do
|
88
88
|
it 'should work' do
|
89
89
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -105,11 +105,11 @@ describe 'AcsFileApi' do
|
|
105
105
|
end
|
106
106
|
|
107
107
|
# unit tests for refresh
|
108
|
-
#
|
108
|
+
# Trigger an asynchronous task to create Alternate Content Source content.
|
109
109
|
# @param file_file_alternate_content_source_href
|
110
110
|
# @param file_file_alternate_content_source
|
111
111
|
# @param [Hash] opts the optional parameters
|
112
|
-
# @return [
|
112
|
+
# @return [TaskGroupOperationResponse]
|
113
113
|
describe 'refresh test' do
|
114
114
|
it 'should work' do
|
115
115
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -118,11 +118,11 @@ describe 'AcsFileApi' do
|
|
118
118
|
|
119
119
|
# unit tests for update
|
120
120
|
# Update a file alternate content source
|
121
|
-
#
|
121
|
+
# Trigger an asynchronous update task
|
122
122
|
# @param file_file_alternate_content_source_href
|
123
123
|
# @param file_file_alternate_content_source
|
124
124
|
# @param [Hash] opts the optional parameters
|
125
|
-
# @return [
|
125
|
+
# @return [AsyncOperationResponse]
|
126
126
|
describe 'update test' do
|
127
127
|
it 'should work' do
|
128
128
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -0,0 +1,41 @@
|
|
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 PulpFileClient::TaskGroupOperationResponse
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'TaskGroupOperationResponse' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = PulpFileClient::TaskGroupOperationResponse.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of TaskGroupOperationResponse' do
|
31
|
+
it 'should create an instance of TaskGroupOperationResponse' do
|
32
|
+
expect(@instance).to be_instance_of(PulpFileClient::TaskGroupOperationResponse)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "task_group"' 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
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulp_file_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- docs/RepositorySyncURL.md
|
113
113
|
- docs/RepositoryVersion.md
|
114
114
|
- docs/RepositoryVersionResponse.md
|
115
|
+
- docs/TaskGroupOperationResponse.md
|
115
116
|
- git_push.sh
|
116
117
|
- lib/pulp_file_client.rb
|
117
118
|
- lib/pulp_file_client/api/acs_file_api.rb
|
@@ -155,6 +156,7 @@ files:
|
|
155
156
|
- lib/pulp_file_client/models/repository_sync_url.rb
|
156
157
|
- lib/pulp_file_client/models/repository_version.rb
|
157
158
|
- lib/pulp_file_client/models/repository_version_response.rb
|
159
|
+
- lib/pulp_file_client/models/task_group_operation_response.rb
|
158
160
|
- lib/pulp_file_client/version.rb
|
159
161
|
- pulp_file_client.gemspec
|
160
162
|
- spec/api/acs_file_api_spec.rb
|
@@ -197,6 +199,7 @@ files:
|
|
197
199
|
- spec/models/repository_sync_url_spec.rb
|
198
200
|
- spec/models/repository_version_response_spec.rb
|
199
201
|
- spec/models/repository_version_spec.rb
|
202
|
+
- spec/models/task_group_operation_response_spec.rb
|
200
203
|
- spec/spec_helper.rb
|
201
204
|
homepage: https://openapi-generator.tech
|
202
205
|
licenses:
|
@@ -222,44 +225,45 @@ signing_key:
|
|
222
225
|
specification_version: 4
|
223
226
|
summary: Pulp 3 API Ruby Gem
|
224
227
|
test_files:
|
225
|
-
- spec/api/content_files_api_spec.rb
|
226
228
|
- spec/api/repositories_file_versions_api_spec.rb
|
227
229
|
- spec/api/remotes_file_api_spec.rb
|
230
|
+
- spec/api/content_files_api_spec.rb
|
231
|
+
- spec/api/distributions_file_api_spec.rb
|
228
232
|
- spec/api/publications_file_api_spec.rb
|
229
|
-
- spec/api/repositories_file_api_spec.rb
|
230
233
|
- spec/api/acs_file_api_spec.rb
|
231
|
-
- spec/api/
|
234
|
+
- spec/api/repositories_file_api_spec.rb
|
232
235
|
- spec/api_client_spec.rb
|
233
236
|
- spec/configuration_spec.rb
|
234
|
-
- spec/models/patchedfile_file_remote_spec.rb
|
235
|
-
- spec/models/paginatedfile_file_content_response_list_spec.rb
|
236
|
-
- spec/models/patchedfile_file_alternate_content_source_spec.rb
|
237
237
|
- spec/models/file_file_distribution_response_spec.rb
|
238
|
-
- spec/models/
|
239
|
-
- spec/models/file_file_publication_response_spec.rb
|
240
|
-
- spec/models/repository_version_spec.rb
|
238
|
+
- spec/models/file_file_publication_spec.rb
|
241
239
|
- spec/models/file_file_content_spec.rb
|
242
|
-
- spec/models/
|
243
|
-
- spec/models/
|
244
|
-
- spec/models/
|
245
|
-
- spec/models/
|
240
|
+
- spec/models/paginatedfile_file_repository_response_list_spec.rb
|
241
|
+
- spec/models/patchedfile_file_remote_spec.rb
|
242
|
+
- spec/models/file_file_alternate_content_source_response_spec.rb
|
243
|
+
- spec/models/paginatedfile_file_distribution_response_list_spec.rb
|
246
244
|
- spec/models/async_operation_response_spec.rb
|
245
|
+
- spec/models/repository_version_response_spec.rb
|
247
246
|
- spec/models/paginated_repository_version_response_list_spec.rb
|
248
|
-
- spec/models/paginatedfile_file_repository_response_list_spec.rb
|
249
|
-
- spec/models/paginatedfile_file_remote_response_list_spec.rb
|
250
247
|
- spec/models/content_summary_spec.rb
|
251
|
-
- spec/models/
|
252
|
-
- spec/models/
|
253
|
-
- spec/models/
|
254
|
-
- spec/models/
|
248
|
+
- spec/models/paginatedfile_file_alternate_content_source_response_list_spec.rb
|
249
|
+
- spec/models/content_summary_response_spec.rb
|
250
|
+
- spec/models/file_file_remote_response_spec.rb
|
251
|
+
- spec/models/file_file_publication_response_spec.rb
|
252
|
+
- spec/models/paginatedfile_file_remote_response_list_spec.rb
|
253
|
+
- spec/models/paginatedfile_file_content_response_list_spec.rb
|
255
254
|
- spec/models/file_file_remote_spec.rb
|
255
|
+
- spec/models/file_file_repository_response_spec.rb
|
256
|
+
- spec/models/repository_sync_url_spec.rb
|
257
|
+
- spec/models/paginatedfile_file_publication_response_list_spec.rb
|
256
258
|
- spec/models/file_file_alternate_content_source_spec.rb
|
257
|
-
- spec/models/
|
258
|
-
- spec/models/file_file_publication_spec.rb
|
259
|
-
- spec/models/paginatedfile_file_alternate_content_source_response_list_spec.rb
|
260
|
-
- spec/models/paginatedfile_file_distribution_response_list_spec.rb
|
259
|
+
- spec/models/repository_version_spec.rb
|
261
260
|
- spec/models/patchedfile_file_distribution_spec.rb
|
262
|
-
- spec/models/
|
263
|
-
- spec/models/
|
261
|
+
- spec/models/file_file_distribution_spec.rb
|
262
|
+
- spec/models/patchedfile_file_alternate_content_source_spec.rb
|
264
263
|
- spec/models/file_file_content_response_spec.rb
|
264
|
+
- spec/models/policy_enum_spec.rb
|
265
|
+
- spec/models/file_file_repository_spec.rb
|
266
|
+
- spec/models/task_group_operation_response_spec.rb
|
267
|
+
- spec/models/repository_add_remove_content_spec.rb
|
268
|
+
- spec/models/patchedfile_file_repository_spec.rb
|
265
269
|
- spec/spec_helper.rb
|