pulp_container_client 2.10.13 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -17
- data/docs/ContainerBlobResponse.md +1 -3
- data/docs/ContainerContainerDistribution.md +5 -5
- data/docs/ContainerContainerDistributionResponse.md +9 -9
- data/docs/ContainerContainerPushRepository.md +7 -5
- data/docs/ContainerContainerPushRepositoryResponse.md +14 -12
- data/docs/ContainerContainerRemote.md +3 -1
- data/docs/ContainerContainerRemoteResponse.md +3 -1
- data/docs/ContainerContainerRepository.md +3 -1
- data/docs/ContainerContainerRepositoryResponse.md +3 -1
- data/docs/ContainerManifestSignatureResponse.md +33 -0
- data/docs/{RepositorySyncURL.md → ContainerRepositorySyncURL.md} +5 -3
- data/docs/ContentBlobsApi.md +0 -2
- data/docs/ContentSignaturesApi.md +158 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/DistributionsContainerApi.md +228 -0
- data/docs/MyPermissionsResponse.md +17 -0
- data/docs/NestedRole.md +21 -0
- data/docs/NestedRoleResponse.md +21 -0
- data/docs/ObjectRolesResponse.md +17 -0
- data/docs/{PaginatedcontainerContentRedirectContentGuardResponseList.md → PaginatedcontainerManifestSignatureResponseList.md} +3 -3
- data/docs/PatchedcontainerContainerDistribution.md +5 -5
- data/docs/PatchedcontainerContainerPushRepository.md +7 -5
- data/docs/PatchedcontainerContainerRemote.md +3 -1
- data/docs/PatchedcontainerContainerRepository.md +3 -1
- data/docs/PulpContainerNamespacesApi.md +228 -0
- data/docs/RemotesContainerApi.md +228 -0
- data/docs/RemoveSignatures.md +17 -0
- data/docs/RemoveSignaturesResponse.md +17 -0
- data/docs/RepositoriesContainerApi.md +288 -4
- data/docs/RepositoriesContainerPushApi.md +339 -0
- data/docs/RepositoriesContainerPushVersionsApi.md +4 -4
- data/docs/RepositoriesContainerVersionsApi.md +4 -4
- data/docs/RepositorySign.md +21 -0
- data/docs/RepositoryVersion.md +17 -0
- data/git_push.sh +58 -0
- data/lib/pulp_container_client/api/content_blobs_api.rb +0 -7
- data/lib/pulp_container_client/api/content_signatures_api.rb +200 -0
- data/lib/pulp_container_client/api/distributions_container_api.rb +268 -0
- data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +268 -0
- data/lib/pulp_container_client/api/remotes_container_api.rb +268 -0
- data/lib/pulp_container_client/api/repositories_container_api.rb +347 -9
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +406 -0
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +9 -9
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +9 -9
- data/lib/pulp_container_client/api_client.rb +5 -2
- data/lib/pulp_container_client/configuration.rb +0 -1
- data/lib/pulp_container_client/models/container_blob_response.rb +4 -19
- data/lib/pulp_container_client/models/container_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +34 -34
- data/lib/pulp_container_client/models/container_container_push_repository.rb +44 -33
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +55 -44
- data/lib/pulp_container_client/models/container_container_remote.rb +30 -5
- data/lib/pulp_container_client/models/container_container_remote_response.rb +15 -5
- data/lib/pulp_container_client/models/container_container_repository.rb +16 -5
- data/lib/pulp_container_client/models/container_container_repository_response.rb +16 -5
- data/lib/pulp_container_client/models/{container_content_redirect_content_guard.rb → container_manifest_signature_response.rb} +108 -44
- data/lib/pulp_container_client/models/{repository_sync_url.rb → container_repository_sync_url.rb} +20 -8
- data/lib/pulp_container_client/models/content_summary.rb +246 -0
- data/lib/pulp_container_client/models/my_permissions_response.rb +213 -0
- data/lib/pulp_container_client/models/{container_content_redirect_content_guard_response.rb → nested_role.rb} +30 -39
- data/lib/pulp_container_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_container_client/models/{repair.rb → object_roles_response.rb} +17 -13
- data/lib/pulp_container_client/models/{paginatedcontainer_content_redirect_content_guard_response_list.rb → paginatedcontainer_manifest_signature_response_list.rb} +4 -4
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +21 -21
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +44 -33
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +30 -5
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +16 -5
- data/lib/pulp_container_client/models/remove_signatures.rb +232 -0
- data/lib/pulp_container_client/models/remove_signatures_response.rb +213 -0
- data/lib/pulp_container_client/models/{patchedcontainer_content_redirect_content_guard.rb → repository_sign.rb} +40 -43
- data/lib/pulp_container_client/models/repository_version.rb +208 -0
- data/lib/pulp_container_client/version.rb +1 -1
- data/lib/pulp_container_client.rb +13 -7
- data/pulp_container_client.gemspec +3 -3
- data/spec/api/content_blobs_api_spec.rb +0 -1
- data/spec/api/content_signatures_api_spec.rb +78 -0
- data/spec/api/distributions_container_api_spec.rb +50 -0
- data/spec/api/pulp_container_namespaces_api_spec.rb +50 -0
- data/spec/api/remotes_container_api_spec.rb +50 -0
- data/spec/api/repositories_container_api_spec.rb +64 -1
- data/spec/api/repositories_container_push_api_spec.rb +75 -0
- data/spec/api/repositories_container_push_versions_api_spec.rb +1 -1
- data/spec/api/repositories_container_versions_api_spec.rb +1 -1
- data/spec/models/container_blob_response_spec.rb +0 -6
- data/spec/models/container_container_distribution_response_spec.rb +7 -7
- data/spec/models/container_container_distribution_spec.rb +5 -5
- data/spec/models/container_container_push_repository_response_spec.rb +13 -7
- data/spec/models/container_container_push_repository_spec.rb +9 -3
- data/spec/models/container_container_remote_response_spec.rb +6 -0
- data/spec/models/container_container_remote_spec.rb +6 -0
- data/spec/models/container_container_repository_response_spec.rb +6 -0
- data/spec/models/container_container_repository_spec.rb +6 -0
- data/spec/models/container_manifest_signature_response_spec.rb +89 -0
- data/spec/models/{container_content_redirect_content_guard_response_spec.rb → container_repository_sync_url_spec.rb} +9 -15
- data/spec/models/{container_content_redirect_content_guard_spec.rb → content_summary_spec.rb} +14 -8
- data/spec/models/my_permissions_response_spec.rb +41 -0
- data/spec/models/nested_role_response_spec.rb +53 -0
- data/spec/models/{patchedcontainer_content_redirect_content_guard_spec.rb → nested_role_spec.rb} +14 -8
- data/spec/models/object_roles_response_spec.rb +41 -0
- data/spec/models/{paginatedcontainer_content_redirect_content_guard_response_list_spec.rb → paginatedcontainer_manifest_signature_response_list_spec.rb} +6 -6
- data/spec/models/patchedcontainer_container_distribution_spec.rb +5 -5
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +9 -3
- data/spec/models/patchedcontainer_container_remote_spec.rb +6 -0
- data/spec/models/patchedcontainer_container_repository_spec.rb +6 -0
- data/spec/models/remove_signatures_response_spec.rb +41 -0
- data/spec/models/{repair_spec.rb → remove_signatures_spec.rb} +7 -7
- data/spec/models/{repository_sync_url_spec.rb → repository_sign_spec.rb} +14 -8
- data/spec/models/repository_version_spec.rb +41 -0
- metadata +99 -74
- data/docs/ContainerContentRedirectContentGuard.md +0 -19
- data/docs/ContainerContentRedirectContentGuardResponse.md +0 -23
- data/docs/ContentguardsContentRedirectApi.md +0 -361
- data/docs/PatchedcontainerContentRedirectContentGuard.md +0 -19
- data/docs/Repair.md +0 -17
- data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +0 -440
- data/spec/api/contentguards_content_redirect_api_spec.rb +0 -120
|
@@ -86,6 +86,9 @@ module PulpContainerClient
|
|
|
86
86
|
# A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'.
|
|
87
87
|
attr_accessor :exclude_tags
|
|
88
88
|
|
|
89
|
+
# A URL to a sigstore to download image signatures from
|
|
90
|
+
attr_accessor :sigstore
|
|
91
|
+
|
|
89
92
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
90
93
|
def self.attribute_map
|
|
91
94
|
{
|
|
@@ -112,7 +115,8 @@ module PulpContainerClient
|
|
|
112
115
|
:'rate_limit' => :'rate_limit',
|
|
113
116
|
:'upstream_name' => :'upstream_name',
|
|
114
117
|
:'include_tags' => :'include_tags',
|
|
115
|
-
:'exclude_tags' => :'exclude_tags'
|
|
118
|
+
:'exclude_tags' => :'exclude_tags',
|
|
119
|
+
:'sigstore' => :'sigstore'
|
|
116
120
|
}
|
|
117
121
|
end
|
|
118
122
|
|
|
@@ -142,7 +146,8 @@ module PulpContainerClient
|
|
|
142
146
|
:'rate_limit' => :'Integer',
|
|
143
147
|
:'upstream_name' => :'String',
|
|
144
148
|
:'include_tags' => :'Array<String>',
|
|
145
|
-
:'exclude_tags' => :'Array<String>'
|
|
149
|
+
:'exclude_tags' => :'Array<String>',
|
|
150
|
+
:'sigstore' => :'String'
|
|
146
151
|
}
|
|
147
152
|
end
|
|
148
153
|
|
|
@@ -165,7 +170,7 @@ module PulpContainerClient
|
|
|
165
170
|
:'sock_read_timeout',
|
|
166
171
|
:'rate_limit',
|
|
167
172
|
:'include_tags',
|
|
168
|
-
:'exclude_tags'
|
|
173
|
+
:'exclude_tags',
|
|
169
174
|
])
|
|
170
175
|
end
|
|
171
176
|
|
|
@@ -285,6 +290,10 @@ module PulpContainerClient
|
|
|
285
290
|
self.exclude_tags = value
|
|
286
291
|
end
|
|
287
292
|
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'sigstore')
|
|
295
|
+
self.sigstore = attributes[:'sigstore']
|
|
296
|
+
end
|
|
288
297
|
end
|
|
289
298
|
|
|
290
299
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -355,6 +364,10 @@ module PulpContainerClient
|
|
|
355
364
|
invalid_properties.push('invalid value for "upstream_name", the character length must be great than or equal to 1.')
|
|
356
365
|
end
|
|
357
366
|
|
|
367
|
+
if !@sigstore.nil? && @sigstore.to_s.length < 1
|
|
368
|
+
invalid_properties.push('invalid value for "sigstore", the character length must be great than or equal to 1.')
|
|
369
|
+
end
|
|
370
|
+
|
|
358
371
|
invalid_properties
|
|
359
372
|
end
|
|
360
373
|
|
|
@@ -377,6 +390,7 @@ module PulpContainerClient
|
|
|
377
390
|
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
378
391
|
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
379
392
|
return false if !@upstream_name.nil? && @upstream_name.to_s.length < 1
|
|
393
|
+
return false if !@sigstore.nil? && @sigstore.to_s.length < 1
|
|
380
394
|
true
|
|
381
395
|
end
|
|
382
396
|
|
|
@@ -540,6 +554,16 @@ module PulpContainerClient
|
|
|
540
554
|
@upstream_name = upstream_name
|
|
541
555
|
end
|
|
542
556
|
|
|
557
|
+
# Custom attribute writer method with validation
|
|
558
|
+
# @param [Object] sigstore Value to be assigned
|
|
559
|
+
def sigstore=(sigstore)
|
|
560
|
+
if !sigstore.nil? && sigstore.to_s.length < 1
|
|
561
|
+
fail ArgumentError, 'invalid value for "sigstore", the character length must be great than or equal to 1.'
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
@sigstore = sigstore
|
|
565
|
+
end
|
|
566
|
+
|
|
543
567
|
# Checks equality by comparing each attribute.
|
|
544
568
|
# @param [Object] Object to be compared
|
|
545
569
|
def ==(o)
|
|
@@ -568,7 +592,8 @@ module PulpContainerClient
|
|
|
568
592
|
rate_limit == o.rate_limit &&
|
|
569
593
|
upstream_name == o.upstream_name &&
|
|
570
594
|
include_tags == o.include_tags &&
|
|
571
|
-
exclude_tags == o.exclude_tags
|
|
595
|
+
exclude_tags == o.exclude_tags &&
|
|
596
|
+
sigstore == o.sigstore
|
|
572
597
|
end
|
|
573
598
|
|
|
574
599
|
# @see the `==` method
|
|
@@ -580,7 +605,7 @@ module PulpContainerClient
|
|
|
580
605
|
# Calculates hash code according to all attributes.
|
|
581
606
|
# @return [Integer] Hash code
|
|
582
607
|
def hash
|
|
583
|
-
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, upstream_name, include_tags, exclude_tags].hash
|
|
608
|
+
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, upstream_name, include_tags, exclude_tags, sigstore].hash
|
|
584
609
|
end
|
|
585
610
|
|
|
586
611
|
# Builds the object from hash
|
|
@@ -29,6 +29,9 @@ module PulpContainerClient
|
|
|
29
29
|
# An optional remote to use by default when syncing.
|
|
30
30
|
attr_accessor :remote
|
|
31
31
|
|
|
32
|
+
# A reference to an associated signing service.
|
|
33
|
+
attr_accessor :manifest_signing_service
|
|
34
|
+
|
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
36
|
def self.attribute_map
|
|
34
37
|
{
|
|
@@ -36,7 +39,8 @@ module PulpContainerClient
|
|
|
36
39
|
:'name' => :'name',
|
|
37
40
|
:'description' => :'description',
|
|
38
41
|
:'retain_repo_versions' => :'retain_repo_versions',
|
|
39
|
-
:'remote' => :'remote'
|
|
42
|
+
:'remote' => :'remote',
|
|
43
|
+
:'manifest_signing_service' => :'manifest_signing_service'
|
|
40
44
|
}
|
|
41
45
|
end
|
|
42
46
|
|
|
@@ -47,7 +51,8 @@ module PulpContainerClient
|
|
|
47
51
|
:'name' => :'String',
|
|
48
52
|
:'description' => :'String',
|
|
49
53
|
:'retain_repo_versions' => :'Integer',
|
|
50
|
-
:'remote' => :'String'
|
|
54
|
+
:'remote' => :'String',
|
|
55
|
+
:'manifest_signing_service' => :'String'
|
|
51
56
|
}
|
|
52
57
|
end
|
|
53
58
|
|
|
@@ -56,7 +61,8 @@ module PulpContainerClient
|
|
|
56
61
|
Set.new([
|
|
57
62
|
:'description',
|
|
58
63
|
:'retain_repo_versions',
|
|
59
|
-
:'remote'
|
|
64
|
+
:'remote',
|
|
65
|
+
:'manifest_signing_service'
|
|
60
66
|
])
|
|
61
67
|
end
|
|
62
68
|
|
|
@@ -94,6 +100,10 @@ module PulpContainerClient
|
|
|
94
100
|
if attributes.key?(:'remote')
|
|
95
101
|
self.remote = attributes[:'remote']
|
|
96
102
|
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'manifest_signing_service')
|
|
105
|
+
self.manifest_signing_service = attributes[:'manifest_signing_service']
|
|
106
|
+
end
|
|
97
107
|
end
|
|
98
108
|
|
|
99
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -163,7 +173,8 @@ module PulpContainerClient
|
|
|
163
173
|
name == o.name &&
|
|
164
174
|
description == o.description &&
|
|
165
175
|
retain_repo_versions == o.retain_repo_versions &&
|
|
166
|
-
remote == o.remote
|
|
176
|
+
remote == o.remote &&
|
|
177
|
+
manifest_signing_service == o.manifest_signing_service
|
|
167
178
|
end
|
|
168
179
|
|
|
169
180
|
# @see the `==` method
|
|
@@ -175,7 +186,7 @@ module PulpContainerClient
|
|
|
175
186
|
# Calculates hash code according to all attributes.
|
|
176
187
|
# @return [Integer] Hash code
|
|
177
188
|
def hash
|
|
178
|
-
[pulp_labels, name, description, retain_repo_versions, remote].hash
|
|
189
|
+
[pulp_labels, name, description, retain_repo_versions, remote, manifest_signing_service].hash
|
|
179
190
|
end
|
|
180
191
|
|
|
181
192
|
# Builds the object from hash
|
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
# A serializer for parsing and validating data associated with the signatures removal.
|
|
17
|
+
class RemoveSignatures
|
|
18
|
+
# key_id of the key the signatures were produced with
|
|
19
|
+
attr_accessor :signed_with_key_id
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'signed_with_key_id' => :'signed_with_key_id'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Attribute type mapping.
|
|
29
|
+
def self.openapi_types
|
|
30
|
+
{
|
|
31
|
+
:'signed_with_key_id' => :'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 `PulpContainerClient::RemoveSignatures` 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 `PulpContainerClient::RemoveSignatures`. 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?(:'signed_with_key_id')
|
|
57
|
+
self.signed_with_key_id = attributes[:'signed_with_key_id']
|
|
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 @signed_with_key_id.nil?
|
|
66
|
+
invalid_properties.push('invalid value for "signed_with_key_id", signed_with_key_id cannot be nil.')
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if @signed_with_key_id.to_s.length < 1
|
|
70
|
+
invalid_properties.push('invalid value for "signed_with_key_id", the character length must be great than or equal to 1.')
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
invalid_properties
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Check to see if the all the properties in the model are valid
|
|
77
|
+
# @return true if the model is valid
|
|
78
|
+
def valid?
|
|
79
|
+
return false if @signed_with_key_id.nil?
|
|
80
|
+
return false if @signed_with_key_id.to_s.length < 1
|
|
81
|
+
true
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Custom attribute writer method with validation
|
|
85
|
+
# @param [Object] signed_with_key_id Value to be assigned
|
|
86
|
+
def signed_with_key_id=(signed_with_key_id)
|
|
87
|
+
if signed_with_key_id.nil?
|
|
88
|
+
fail ArgumentError, 'signed_with_key_id cannot be nil'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if signed_with_key_id.to_s.length < 1
|
|
92
|
+
fail ArgumentError, 'invalid value for "signed_with_key_id", the character length must be great than or equal to 1.'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
@signed_with_key_id = signed_with_key_id
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Checks equality by comparing each attribute.
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
signed_with_key_id == o.signed_with_key_id
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[signed_with_key_id].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
new.build_from_hash(attributes)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
131
|
+
if type =~ /\AArray<(.*)>/i
|
|
132
|
+
# check to ensure the input is an array given that the attribute
|
|
133
|
+
# is documented as an array but the input is not
|
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
136
|
+
end
|
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
139
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
self
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Deserializes the data based on type
|
|
146
|
+
# @param string type Data type
|
|
147
|
+
# @param string value Value to be deserialized
|
|
148
|
+
# @return [Object] Deserialized data
|
|
149
|
+
def _deserialize(type, value)
|
|
150
|
+
case type.to_sym
|
|
151
|
+
when :DateTime
|
|
152
|
+
DateTime.parse(value)
|
|
153
|
+
when :Date
|
|
154
|
+
Date.parse(value)
|
|
155
|
+
when :String
|
|
156
|
+
value.to_s
|
|
157
|
+
when :Integer
|
|
158
|
+
value.to_i
|
|
159
|
+
when :Float
|
|
160
|
+
value.to_f
|
|
161
|
+
when :Boolean
|
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
163
|
+
true
|
|
164
|
+
else
|
|
165
|
+
false
|
|
166
|
+
end
|
|
167
|
+
when :Object
|
|
168
|
+
# generic object (usually a Hash), return directly
|
|
169
|
+
value
|
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
|
176
|
+
{}.tap do |hash|
|
|
177
|
+
value.each do |k, v|
|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
else # model
|
|
182
|
+
PulpContainerClient.const_get(type).build_from_hash(value)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the string representation of the object
|
|
187
|
+
# @return [String] String presentation of the object
|
|
188
|
+
def to_s
|
|
189
|
+
to_hash.to_s
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_body
|
|
195
|
+
to_hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the object in the form of hash
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_hash
|
|
201
|
+
hash = {}
|
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
203
|
+
value = self.send(attr)
|
|
204
|
+
if value.nil?
|
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Outputs non-array value in the form of hash
|
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
216
|
+
# @param [Object] value Any valid value
|
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
|
218
|
+
def _to_hash(value)
|
|
219
|
+
if value.is_a?(Array)
|
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
|
221
|
+
elsif value.is_a?(Hash)
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
224
|
+
end
|
|
225
|
+
elsif value.respond_to? :to_hash
|
|
226
|
+
value.to_hash
|
|
227
|
+
else
|
|
228
|
+
value
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
@@ -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 PulpContainerClient
|
|
16
|
+
# A serializer for parsing and validating data associated with the signatures removal.
|
|
17
|
+
class RemoveSignaturesResponse
|
|
18
|
+
# key_id of the key the signatures were produced with
|
|
19
|
+
attr_accessor :signed_with_key_id
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'signed_with_key_id' => :'signed_with_key_id'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Attribute type mapping.
|
|
29
|
+
def self.openapi_types
|
|
30
|
+
{
|
|
31
|
+
:'signed_with_key_id' => :'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 `PulpContainerClient::RemoveSignaturesResponse` 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 `PulpContainerClient::RemoveSignaturesResponse`. 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?(:'signed_with_key_id')
|
|
57
|
+
self.signed_with_key_id = attributes[:'signed_with_key_id']
|
|
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 @signed_with_key_id.nil?
|
|
66
|
+
invalid_properties.push('invalid value for "signed_with_key_id", signed_with_key_id 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 @signed_with_key_id.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
|
+
signed_with_key_id == o.signed_with_key_id
|
|
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
|
+
[signed_with_key_id].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
|
+
PulpContainerClient.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
|