pulp_container_client 2.15.5 → 2.16.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 +27 -36
- data/docs/ContainerContainerDistribution.md +4 -4
- data/docs/ContainerContainerDistributionResponse.md +9 -9
- data/docs/ContainerContainerPushRepository.md +3 -3
- data/docs/ContainerContainerPushRepositoryResponse.md +7 -7
- data/docs/ContentBlobsApi.md +1 -3
- data/docs/ContentManifestsApi.md +1 -3
- data/docs/ContentSignaturesApi.md +1 -11
- data/docs/ContentTagsApi.md +1 -3
- data/docs/DistributionsContainerApi.md +10 -136
- data/docs/IndexDynamicApi.md +50 -0
- data/docs/IndexStaticApi.md +50 -0
- data/docs/PatchedcontainerContainerDistribution.md +4 -4
- data/docs/PatchedcontainerContainerPushRepository.md +3 -3
- data/docs/PulpContainerNamespacesApi.md +9 -23
- data/docs/RemotesContainerApi.md +9 -135
- data/docs/RepositoriesContainerApi.md +11 -137
- data/docs/RepositoriesContainerPushApi.md +10 -24
- data/docs/RepositoriesContainerPushVersionsApi.md +1 -3
- data/docs/RepositoriesContainerVersionsApi.md +1 -3
- data/docs/TokenApi.md +1 -1
- data/lib/pulp_container_client/api/content_blobs_api.rb +0 -3
- data/lib/pulp_container_client/api/content_manifests_api.rb +0 -3
- data/lib/pulp_container_client/api/content_signatures_api.rb +0 -15
- data/lib/pulp_container_client/api/content_tags_api.rb +0 -3
- data/lib/pulp_container_client/api/distributions_container_api.rb +0 -163
- data/lib/pulp_container_client/api/index_dynamic_api.rb +74 -0
- data/lib/pulp_container_client/api/index_static_api.rb +74 -0
- data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +0 -23
- data/lib/pulp_container_client/api/remotes_container_api.rb +0 -163
- data/lib/pulp_container_client/api/repositories_container_api.rb +2 -165
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +0 -23
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +0 -3
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +0 -3
- data/lib/pulp_container_client/configuration.rb +2 -2
- data/lib/pulp_container_client/models/container_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +36 -36
- data/lib/pulp_container_client/models/container_container_push_repository.rb +12 -12
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +30 -30
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +12 -12
- data/lib/pulp_container_client/version.rb +1 -1
- data/lib/pulp_container_client.rb +2 -4
- data/spec/api/content_blobs_api_spec.rb +0 -1
- data/spec/api/content_manifests_api_spec.rb +0 -1
- data/spec/api/content_signatures_api_spec.rb +0 -5
- data/spec/api/content_tags_api_spec.rb +0 -1
- data/spec/api/distributions_container_api_spec.rb +0 -35
- data/spec/{models/set_label_spec.rb → api/index_dynamic_api_spec.rb} +11 -13
- data/spec/{models/unset_label_spec.rb → api/index_static_api_spec.rb} +12 -8
- data/spec/api/pulp_container_namespaces_api_spec.rb +0 -9
- data/spec/api/remotes_container_api_spec.rb +0 -35
- data/spec/api/repositories_container_api_spec.rb +1 -36
- data/spec/api/repositories_container_push_api_spec.rb +0 -9
- data/spec/api/repositories_container_push_versions_api_spec.rb +0 -1
- data/spec/api/repositories_container_versions_api_spec.rb +0 -1
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/container_container_distribution_response_spec.rb +7 -7
- data/spec/models/container_container_distribution_spec.rb +4 -4
- data/spec/models/container_container_push_repository_response_spec.rb +6 -6
- data/spec/models/container_container_push_repository_spec.rb +3 -3
- data/spec/models/patchedcontainer_container_distribution_spec.rb +4 -4
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +3 -3
- metadata +57 -65
- data/docs/SetLabel.md +0 -19
- data/docs/SetLabelResponse.md +0 -19
- data/docs/UnsetLabel.md +0 -17
- data/docs/UnsetLabelResponse.md +0 -19
- data/lib/pulp_container_client/models/set_label.rb +0 -252
- data/lib/pulp_container_client/models/set_label_response.rb +0 -243
- data/lib/pulp_container_client/models/unset_label.rb +0 -242
- data/lib/pulp_container_client/models/unset_label_response.rb +0 -242
- data/spec/models/set_label_response_spec.rb +0 -47
- data/spec/models/unset_label_response_spec.rb +0 -47
@@ -38,25 +38,25 @@ describe 'PatchedcontainerContainerDistribution' do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "pulp_labels"' do
|
42
42
|
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe 'test attribute "
|
47
|
+
describe 'test attribute "repository"' do
|
48
48
|
it 'should work' do
|
49
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
describe 'test attribute "
|
53
|
+
describe 'test attribute "content_guard"' do
|
54
54
|
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
describe 'test attribute "
|
59
|
+
describe 'test attribute "base_path"' do
|
60
60
|
it 'should work' do
|
61
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
62
|
end
|
@@ -32,19 +32,19 @@ describe 'PatchedcontainerContainerPushRepository' do
|
|
32
32
|
expect(@instance).to be_instance_of(PulpContainerClient::PatchedcontainerContainerPushRepository)
|
33
33
|
end
|
34
34
|
end
|
35
|
-
describe 'test attribute "
|
35
|
+
describe 'test attribute "manifest_signing_service"' 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
|
39
39
|
end
|
40
40
|
|
41
|
-
describe 'test attribute "
|
41
|
+
describe 'test attribute "pulp_labels"' do
|
42
42
|
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe 'test attribute "
|
47
|
+
describe 'test attribute "retain_repo_versions"' do
|
48
48
|
it 'should work' do
|
49
49
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulp_container_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.16.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:
|
11
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -103,6 +103,8 @@ files:
|
|
103
103
|
- docs/ContentSummaryResponse.md
|
104
104
|
- docs/ContentTagsApi.md
|
105
105
|
- docs/DistributionsContainerApi.md
|
106
|
+
- docs/IndexDynamicApi.md
|
107
|
+
- docs/IndexStaticApi.md
|
106
108
|
- docs/ManifestCopy.md
|
107
109
|
- docs/MediaTypesEnum.md
|
108
110
|
- docs/MyPermissionsResponse.md
|
@@ -138,20 +140,18 @@ files:
|
|
138
140
|
- docs/RepositoriesContainerVersionsApi.md
|
139
141
|
- docs/RepositorySign.md
|
140
142
|
- docs/RepositoryVersionResponse.md
|
141
|
-
- docs/SetLabel.md
|
142
|
-
- docs/SetLabelResponse.md
|
143
143
|
- docs/TagCopy.md
|
144
144
|
- docs/TagImage.md
|
145
145
|
- docs/TokenApi.md
|
146
146
|
- docs/UnTagImage.md
|
147
|
-
- docs/UnsetLabel.md
|
148
|
-
- docs/UnsetLabelResponse.md
|
149
147
|
- lib/pulp_container_client.rb
|
150
148
|
- lib/pulp_container_client/api/content_blobs_api.rb
|
151
149
|
- lib/pulp_container_client/api/content_manifests_api.rb
|
152
150
|
- lib/pulp_container_client/api/content_signatures_api.rb
|
153
151
|
- lib/pulp_container_client/api/content_tags_api.rb
|
154
152
|
- lib/pulp_container_client/api/distributions_container_api.rb
|
153
|
+
- lib/pulp_container_client/api/index_dynamic_api.rb
|
154
|
+
- lib/pulp_container_client/api/index_static_api.rb
|
155
155
|
- lib/pulp_container_client/api/pulp_container_namespaces_api.rb
|
156
156
|
- lib/pulp_container_client/api/remotes_container_api.rb
|
157
157
|
- lib/pulp_container_client/api/repositories_container_api.rb
|
@@ -209,13 +209,9 @@ files:
|
|
209
209
|
- lib/pulp_container_client/models/repair.rb
|
210
210
|
- lib/pulp_container_client/models/repository_sign.rb
|
211
211
|
- lib/pulp_container_client/models/repository_version_response.rb
|
212
|
-
- lib/pulp_container_client/models/set_label.rb
|
213
|
-
- lib/pulp_container_client/models/set_label_response.rb
|
214
212
|
- lib/pulp_container_client/models/tag_copy.rb
|
215
213
|
- lib/pulp_container_client/models/tag_image.rb
|
216
214
|
- lib/pulp_container_client/models/un_tag_image.rb
|
217
|
-
- lib/pulp_container_client/models/unset_label.rb
|
218
|
-
- lib/pulp_container_client/models/unset_label_response.rb
|
219
215
|
- lib/pulp_container_client/version.rb
|
220
216
|
- pulp_container_client.gemspec
|
221
217
|
- spec/api/content_blobs_api_spec.rb
|
@@ -223,6 +219,8 @@ files:
|
|
223
219
|
- spec/api/content_signatures_api_spec.rb
|
224
220
|
- spec/api/content_tags_api_spec.rb
|
225
221
|
- spec/api/distributions_container_api_spec.rb
|
222
|
+
- spec/api/index_dynamic_api_spec.rb
|
223
|
+
- spec/api/index_static_api_spec.rb
|
226
224
|
- spec/api/pulp_container_namespaces_api_spec.rb
|
227
225
|
- spec/api/remotes_container_api_spec.rb
|
228
226
|
- spec/api/repositories_container_api_spec.rb
|
@@ -279,13 +277,9 @@ files:
|
|
279
277
|
- spec/models/repair_spec.rb
|
280
278
|
- spec/models/repository_sign_spec.rb
|
281
279
|
- spec/models/repository_version_response_spec.rb
|
282
|
-
- spec/models/set_label_response_spec.rb
|
283
|
-
- spec/models/set_label_spec.rb
|
284
280
|
- spec/models/tag_copy_spec.rb
|
285
281
|
- spec/models/tag_image_spec.rb
|
286
282
|
- spec/models/un_tag_image_spec.rb
|
287
|
-
- spec/models/unset_label_response_spec.rb
|
288
|
-
- spec/models/unset_label_spec.rb
|
289
283
|
- spec/spec_helper.rb
|
290
284
|
homepage: https://github.com/pulp/pulp_container
|
291
285
|
licenses:
|
@@ -311,72 +305,70 @@ signing_key:
|
|
311
305
|
specification_version: 4
|
312
306
|
summary: Pulp 3 API Ruby Gem
|
313
307
|
test_files:
|
314
|
-
- spec/api/
|
315
|
-
- spec/api/repositories_container_versions_api_spec.rb
|
316
|
-
- spec/api/remotes_container_api_spec.rb
|
317
|
-
- spec/api/token_api_spec.rb
|
318
|
-
- spec/api/content_tags_api_spec.rb
|
319
|
-
- spec/api/content_blobs_api_spec.rb
|
308
|
+
- spec/api/index_static_api_spec.rb
|
320
309
|
- spec/api/content_signatures_api_spec.rb
|
321
|
-
- spec/api/repositories_container_push_api_spec.rb
|
322
|
-
- spec/api/content_manifests_api_spec.rb
|
323
310
|
- spec/api/pulp_container_namespaces_api_spec.rb
|
311
|
+
- spec/api/repositories_container_push_api_spec.rb
|
312
|
+
- spec/api/index_dynamic_api_spec.rb
|
324
313
|
- spec/api/repositories_container_push_versions_api_spec.rb
|
314
|
+
- spec/api/remotes_container_api_spec.rb
|
315
|
+
- spec/api/distributions_container_api_spec.rb
|
316
|
+
- spec/api/content_tags_api_spec.rb
|
317
|
+
- spec/api/token_api_spec.rb
|
318
|
+
- spec/api/content_blobs_api_spec.rb
|
319
|
+
- spec/api/repositories_container_versions_api_spec.rb
|
325
320
|
- spec/api/repositories_container_api_spec.rb
|
321
|
+
- spec/api/content_manifests_api_spec.rb
|
326
322
|
- spec/api_client_spec.rb
|
327
323
|
- spec/configuration_spec.rb
|
328
|
-
- spec/models/
|
329
|
-
- spec/models/
|
330
|
-
- spec/models/container_manifest_signature_response_spec.rb
|
331
|
-
- spec/models/manifest_copy_spec.rb
|
332
|
-
- spec/models/unset_label_response_spec.rb
|
333
|
-
- spec/models/container_blob_response_spec.rb
|
334
|
-
- spec/models/set_label_spec.rb
|
335
|
-
- spec/models/repository_sign_spec.rb
|
336
|
-
- spec/models/remove_image_spec.rb
|
337
|
-
- spec/models/nested_role_spec.rb
|
324
|
+
- spec/models/container_container_namespace_spec.rb
|
325
|
+
- spec/models/repair_spec.rb
|
338
326
|
- spec/models/un_tag_image_spec.rb
|
339
|
-
- spec/models/
|
340
|
-
- spec/models/
|
341
|
-
- spec/models/
|
342
|
-
- spec/models/
|
343
|
-
- spec/models/
|
327
|
+
- spec/models/nested_role_response_spec.rb
|
328
|
+
- spec/models/remove_image_spec.rb
|
329
|
+
- spec/models/tag_copy_spec.rb
|
330
|
+
- spec/models/recursive_manage_spec.rb
|
331
|
+
- spec/models/paginatedcontainer_container_distribution_response_list_spec.rb
|
332
|
+
- spec/models/manifest_copy_spec.rb
|
344
333
|
- spec/models/paginatedcontainer_container_remote_response_list_spec.rb
|
345
|
-
- spec/models/
|
346
|
-
- spec/models/
|
347
|
-
- spec/models/paginatedcontainer_container_namespace_response_list_spec.rb
|
348
|
-
- spec/models/repair_spec.rb
|
334
|
+
- spec/models/paginatedcontainer_tag_response_list_spec.rb
|
335
|
+
- spec/models/container_container_push_repository_spec.rb
|
349
336
|
- spec/models/paginatedcontainer_manifest_response_list_spec.rb
|
350
|
-
- spec/models/
|
351
|
-
- spec/models/
|
352
|
-
- spec/models/
|
337
|
+
- spec/models/patchedcontainer_container_distribution_spec.rb
|
338
|
+
- spec/models/container_container_distribution_response_spec.rb
|
339
|
+
- spec/models/container_manifest_response_spec.rb
|
353
340
|
- spec/models/oci_build_image_spec.rb
|
354
|
-
- spec/models/
|
341
|
+
- spec/models/container_tag_response_spec.rb
|
342
|
+
- spec/models/paginatedcontainer_blob_response_list_spec.rb
|
355
343
|
- spec/models/tag_image_spec.rb
|
356
|
-
- spec/models/
|
357
|
-
- spec/models/
|
344
|
+
- spec/models/container_container_repository_spec.rb
|
345
|
+
- spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb
|
346
|
+
- spec/models/remove_signatures_response_spec.rb
|
358
347
|
- spec/models/container_container_distribution_spec.rb
|
348
|
+
- spec/models/async_operation_response_spec.rb
|
349
|
+
- spec/models/patchedcontainer_container_repository_spec.rb
|
350
|
+
- spec/models/nested_role_spec.rb
|
351
|
+
- spec/models/object_roles_response_spec.rb
|
352
|
+
- spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb
|
353
|
+
- spec/models/container_blob_response_spec.rb
|
359
354
|
- spec/models/container_container_push_repository_response_spec.rb
|
360
|
-
- spec/models/
|
355
|
+
- spec/models/container_container_namespace_response_spec.rb
|
356
|
+
- spec/models/paginatedcontainer_container_repository_response_list_spec.rb
|
357
|
+
- spec/models/my_permissions_response_spec.rb
|
358
|
+
- spec/models/repository_version_response_spec.rb
|
359
|
+
- spec/models/media_types_enum_spec.rb
|
360
|
+
- spec/models/policy_enum_spec.rb
|
361
|
+
- spec/models/container_manifest_signature_response_spec.rb
|
362
|
+
- spec/models/repository_sign_spec.rb
|
361
363
|
- spec/models/container_container_remote_response_spec.rb
|
362
|
-
- spec/models/
|
364
|
+
- spec/models/patchedcontainer_container_push_repository_spec.rb
|
365
|
+
- spec/models/paginatedcontainer_container_namespace_response_list_spec.rb
|
366
|
+
- spec/models/remove_signatures_spec.rb
|
367
|
+
- spec/models/patchedcontainer_container_remote_spec.rb
|
368
|
+
- spec/models/container_container_remote_spec.rb
|
363
369
|
- spec/models/container_container_remote_response_hidden_fields_spec.rb
|
364
|
-
- spec/models/tag_copy_spec.rb
|
365
|
-
- spec/models/unset_label_spec.rb
|
366
|
-
- spec/models/patchedcontainer_container_distribution_spec.rb
|
367
|
-
- spec/models/container_container_namespace_response_spec.rb
|
368
|
-
- spec/models/patchedcontainer_container_repository_spec.rb
|
369
370
|
- spec/models/container_repository_sync_url_spec.rb
|
370
|
-
- spec/models/
|
371
|
-
- spec/models/recursive_manage_spec.rb
|
372
|
-
- spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb
|
373
|
-
- spec/models/media_types_enum_spec.rb
|
374
|
-
- spec/models/paginatedcontainer_blob_response_list_spec.rb
|
375
|
-
- spec/models/async_operation_response_spec.rb
|
371
|
+
- spec/models/container_container_repository_response_spec.rb
|
376
372
|
- spec/models/paginated_repository_version_response_list_spec.rb
|
377
|
-
- spec/models/
|
378
|
-
- spec/models/nested_role_response_spec.rb
|
379
|
-
- spec/models/container_manifest_response_spec.rb
|
380
|
-
- spec/models/paginatedcontainer_tag_response_list_spec.rb
|
381
|
-
- spec/models/container_tag_response_spec.rb
|
373
|
+
- spec/models/content_summary_response_spec.rb
|
382
374
|
- spec/spec_helper.rb
|
data/docs/SetLabel.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# PulpContainerClient::SetLabel
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**key** | **String** | |
|
8
|
-
**value** | **String** | |
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'PulpContainerClient'
|
14
|
-
|
15
|
-
instance = PulpContainerClient::SetLabel.new(key: null,
|
16
|
-
value: null)
|
17
|
-
```
|
18
|
-
|
19
|
-
|
data/docs/SetLabelResponse.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# PulpContainerClient::SetLabelResponse
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**key** | **String** | |
|
8
|
-
**value** | **String** | |
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'PulpContainerClient'
|
14
|
-
|
15
|
-
instance = PulpContainerClient::SetLabelResponse.new(key: null,
|
16
|
-
value: null)
|
17
|
-
```
|
18
|
-
|
19
|
-
|
data/docs/UnsetLabel.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# PulpContainerClient::UnsetLabel
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**key** | **String** | |
|
8
|
-
|
9
|
-
## Code Sample
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'PulpContainerClient'
|
13
|
-
|
14
|
-
instance = PulpContainerClient::UnsetLabel.new(key: null)
|
15
|
-
```
|
16
|
-
|
17
|
-
|
data/docs/UnsetLabelResponse.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# PulpContainerClient::UnsetLabelResponse
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**key** | **String** | |
|
8
|
-
**value** | **String** | | [optional] [readonly]
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'PulpContainerClient'
|
14
|
-
|
15
|
-
instance = PulpContainerClient::UnsetLabelResponse.new(key: null,
|
16
|
-
value: null)
|
17
|
-
```
|
18
|
-
|
19
|
-
|
@@ -1,252 +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 PulpContainerClient
|
16
|
-
# Serializer for synchronously setting a label.
|
17
|
-
class SetLabel
|
18
|
-
attr_accessor :key
|
19
|
-
|
20
|
-
attr_accessor :value
|
21
|
-
|
22
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
-
def self.attribute_map
|
24
|
-
{
|
25
|
-
:'key' => :'key',
|
26
|
-
:'value' => :'value'
|
27
|
-
}
|
28
|
-
end
|
29
|
-
|
30
|
-
# Attribute type mapping.
|
31
|
-
def self.openapi_types
|
32
|
-
{
|
33
|
-
:'key' => :'String',
|
34
|
-
:'value' => :'String'
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
# List of attributes with nullable: true
|
39
|
-
def self.openapi_nullable
|
40
|
-
Set.new([
|
41
|
-
:'value'
|
42
|
-
])
|
43
|
-
end
|
44
|
-
|
45
|
-
# Initializes the object
|
46
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
-
def initialize(attributes = {})
|
48
|
-
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::SetLabel` initialize method"
|
50
|
-
end
|
51
|
-
|
52
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::SetLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
-
end
|
57
|
-
h[k.to_sym] = v
|
58
|
-
}
|
59
|
-
|
60
|
-
if attributes.key?(:'key')
|
61
|
-
self.key = attributes[:'key']
|
62
|
-
end
|
63
|
-
|
64
|
-
if attributes.key?(:'value')
|
65
|
-
self.value = attributes[:'value']
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
-
# @return Array for valid properties with the reasons
|
71
|
-
def list_invalid_properties
|
72
|
-
invalid_properties = Array.new
|
73
|
-
if @key.nil?
|
74
|
-
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
75
|
-
end
|
76
|
-
|
77
|
-
if @key.to_s.length < 1
|
78
|
-
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
|
79
|
-
end
|
80
|
-
|
81
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
82
|
-
if @key !~ pattern
|
83
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
84
|
-
end
|
85
|
-
|
86
|
-
invalid_properties
|
87
|
-
end
|
88
|
-
|
89
|
-
# Check to see if the all the properties in the model are valid
|
90
|
-
# @return true if the model is valid
|
91
|
-
def valid?
|
92
|
-
return false if @key.nil?
|
93
|
-
return false if @key.to_s.length < 1
|
94
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
95
|
-
true
|
96
|
-
end
|
97
|
-
|
98
|
-
# Custom attribute writer method with validation
|
99
|
-
# @param [Object] key Value to be assigned
|
100
|
-
def key=(key)
|
101
|
-
if key.nil?
|
102
|
-
fail ArgumentError, 'key cannot be nil'
|
103
|
-
end
|
104
|
-
|
105
|
-
if key.to_s.length < 1
|
106
|
-
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
|
107
|
-
end
|
108
|
-
|
109
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
110
|
-
if key !~ pattern
|
111
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
112
|
-
end
|
113
|
-
|
114
|
-
@key = key
|
115
|
-
end
|
116
|
-
|
117
|
-
# Checks equality by comparing each attribute.
|
118
|
-
# @param [Object] Object to be compared
|
119
|
-
def ==(o)
|
120
|
-
return true if self.equal?(o)
|
121
|
-
self.class == o.class &&
|
122
|
-
key == o.key &&
|
123
|
-
value == o.value
|
124
|
-
end
|
125
|
-
|
126
|
-
# @see the `==` method
|
127
|
-
# @param [Object] Object to be compared
|
128
|
-
def eql?(o)
|
129
|
-
self == o
|
130
|
-
end
|
131
|
-
|
132
|
-
# Calculates hash code according to all attributes.
|
133
|
-
# @return [Integer] Hash code
|
134
|
-
def hash
|
135
|
-
[key, value].hash
|
136
|
-
end
|
137
|
-
|
138
|
-
# Builds the object from hash
|
139
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
-
# @return [Object] Returns the model itself
|
141
|
-
def self.build_from_hash(attributes)
|
142
|
-
new.build_from_hash(attributes)
|
143
|
-
end
|
144
|
-
|
145
|
-
# Builds the object from hash
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
-
# @return [Object] Returns the model itself
|
148
|
-
def build_from_hash(attributes)
|
149
|
-
return nil unless attributes.is_a?(Hash)
|
150
|
-
self.class.openapi_types.each_pair do |key, type|
|
151
|
-
if type =~ /\AArray<(.*)>/i
|
152
|
-
# check to ensure the input is an array given that the attribute
|
153
|
-
# is documented as an array but the input is not
|
154
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
-
end
|
157
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
160
|
-
end
|
161
|
-
|
162
|
-
self
|
163
|
-
end
|
164
|
-
|
165
|
-
# Deserializes the data based on type
|
166
|
-
# @param string type Data type
|
167
|
-
# @param string value Value to be deserialized
|
168
|
-
# @return [Object] Deserialized data
|
169
|
-
def _deserialize(type, value)
|
170
|
-
case type.to_sym
|
171
|
-
when :DateTime
|
172
|
-
DateTime.parse(value)
|
173
|
-
when :Date
|
174
|
-
Date.parse(value)
|
175
|
-
when :String
|
176
|
-
value.to_s
|
177
|
-
when :Integer
|
178
|
-
value.to_i
|
179
|
-
when :Float
|
180
|
-
value.to_f
|
181
|
-
when :Boolean
|
182
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
-
true
|
184
|
-
else
|
185
|
-
false
|
186
|
-
end
|
187
|
-
when :Object
|
188
|
-
# generic object (usually a Hash), return directly
|
189
|
-
value
|
190
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
-
inner_type = Regexp.last_match[:inner_type]
|
192
|
-
value.map { |v| _deserialize(inner_type, v) }
|
193
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
-
k_type = Regexp.last_match[:k_type]
|
195
|
-
v_type = Regexp.last_match[:v_type]
|
196
|
-
{}.tap do |hash|
|
197
|
-
value.each do |k, v|
|
198
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
-
end
|
200
|
-
end
|
201
|
-
else # model
|
202
|
-
PulpContainerClient.const_get(type).build_from_hash(value)
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
|
-
# Returns the string representation of the object
|
207
|
-
# @return [String] String presentation of the object
|
208
|
-
def to_s
|
209
|
-
to_hash.to_s
|
210
|
-
end
|
211
|
-
|
212
|
-
# to_body is an alias to to_hash (backward compatibility)
|
213
|
-
# @return [Hash] Returns the object in the form of hash
|
214
|
-
def to_body
|
215
|
-
to_hash
|
216
|
-
end
|
217
|
-
|
218
|
-
# Returns the object in the form of hash
|
219
|
-
# @return [Hash] Returns the object in the form of hash
|
220
|
-
def to_hash
|
221
|
-
hash = {}
|
222
|
-
self.class.attribute_map.each_pair do |attr, param|
|
223
|
-
value = self.send(attr)
|
224
|
-
if value.nil?
|
225
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
226
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
227
|
-
end
|
228
|
-
|
229
|
-
hash[param] = _to_hash(value)
|
230
|
-
end
|
231
|
-
hash
|
232
|
-
end
|
233
|
-
|
234
|
-
# Outputs non-array value in the form of hash
|
235
|
-
# For object, use to_hash. Otherwise, just return the value
|
236
|
-
# @param [Object] value Any valid value
|
237
|
-
# @return [Hash] Returns the value in the form of hash
|
238
|
-
def _to_hash(value)
|
239
|
-
if value.is_a?(Array)
|
240
|
-
value.compact.map { |v| _to_hash(v) }
|
241
|
-
elsif value.is_a?(Hash)
|
242
|
-
{}.tap do |hash|
|
243
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
244
|
-
end
|
245
|
-
elsif value.respond_to? :to_hash
|
246
|
-
value.to_hash
|
247
|
-
else
|
248
|
-
value
|
249
|
-
end
|
250
|
-
end
|
251
|
-
end
|
252
|
-
end
|