pulp_container_client 2.0.0b3 → 2.0.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 +69 -57
- data/docs/{ContainerBlob.md → ContainerBlobResponse.md} +2 -2
- data/docs/ContainerContainerDistribution.md +6 -12
- data/docs/ContainerContainerDistributionResponse.md +31 -0
- data/docs/ContainerContainerPushRepository.md +4 -10
- data/docs/ContainerContainerPushRepositoryResponse.md +29 -0
- data/docs/ContainerContainerRemote.md +8 -12
- data/docs/ContainerContainerRemoteResponse.md +49 -0
- data/docs/ContainerContainerRepository.md +4 -10
- data/docs/ContainerContainerRepositoryResponse.md +29 -0
- data/docs/ContainerContentRedirectContentGuard.md +1 -5
- data/docs/ContainerContentRedirectContentGuardResponse.md +23 -0
- data/docs/{ContainerManifest.md → ContainerManifestResponse.md} +2 -2
- data/docs/{ContainerTag.md → ContainerTagResponse.md} +2 -4
- data/docs/ContentBlobsApi.md +24 -24
- data/docs/ContentManifestsApi.md +24 -24
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/ContentTagsApi.md +26 -26
- data/docs/ContentguardsContentRedirectApi.md +55 -55
- data/docs/DistributionsContainerApi.md +108 -60
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse2003.md +3 -3
- data/docs/InlineResponse2004.md +3 -3
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/InlineResponse2008.md +3 -3
- data/docs/ManifestCopy.md +1 -1
- data/docs/OCIBuildImage.md +23 -0
- data/docs/PatchedcontainerContainerDistribution.md +25 -0
- data/docs/PatchedcontainerContainerRemote.md +43 -0
- data/docs/PatchedcontainerContainerRepository.md +21 -0
- data/docs/PatchedcontainerContentRedirectContentGuard.md +19 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/RecursiveManage.md +1 -1
- data/docs/RemotesContainerApi.md +125 -65
- data/docs/RepositoriesContainerApi.md +158 -134
- data/docs/RepositoriesContainerPushApi.md +44 -148
- data/docs/RepositoriesContainerVersionsApi.md +190 -126
- data/docs/RepositorySyncURL.md +1 -1
- data/docs/RepositoryVersion.md +1 -9
- data/docs/RepositoryVersionResponse.md +25 -0
- data/docs/TagCopy.md +1 -1
- data/docs/TokenApi.md +8 -16
- data/lib/pulp_container_client/api/content_blobs_api.rb +38 -34
- data/lib/pulp_container_client/api/content_manifests_api.rb +38 -34
- data/lib/pulp_container_client/api/content_tags_api.rb +41 -37
- data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +90 -90
- data/lib/pulp_container_client/api/distributions_container_api.rb +153 -90
- data/lib/pulp_container_client/api/remotes_container_api.rb +181 -100
- data/lib/pulp_container_client/api/repositories_container_api.rb +245 -222
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +66 -197
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +278 -188
- data/lib/pulp_container_client/api/token_api.rb +8 -14
- data/lib/pulp_container_client/api_client.rb +2 -2
- data/lib/pulp_container_client/api_error.rb +2 -2
- data/lib/pulp_container_client/configuration.rb +3 -3
- data/lib/pulp_container_client/models/async_operation_response.rb +3 -2
- data/lib/pulp_container_client/models/{container_blob.rb → container_blob_response.rb} +6 -43
- data/lib/pulp_container_client/models/container_container_distribution.rb +29 -110
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +289 -0
- data/lib/pulp_container_client/models/container_container_push_repository.rb +18 -78
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +271 -0
- data/lib/pulp_container_client/models/container_container_remote.rb +29 -227
- data/lib/pulp_container_client/models/container_container_remote_response.rb +409 -0
- data/lib/pulp_container_client/models/container_container_repository.rb +18 -78
- data/lib/pulp_container_client/models/container_container_repository_response.rb +271 -0
- data/lib/pulp_container_client/models/container_content_redirect_content_guard.rb +4 -56
- data/lib/pulp_container_client/models/container_content_redirect_content_guard_response.rb +243 -0
- data/lib/pulp_container_client/models/{container_manifest.rb → container_manifest_response.rb} +6 -43
- data/lib/pulp_container_client/models/{container_tag.rb → container_tag_response.rb} +7 -40
- data/lib/pulp_container_client/models/content_summary.rb +9 -15
- data/lib/pulp_container_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_container_client/models/inline_response200.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2001.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2002.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2003.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2004.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2005.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2006.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2007.rb +3 -13
- data/lib/pulp_container_client/models/inline_response2008.rb +3 -13
- data/lib/pulp_container_client/models/manifest_copy.rb +4 -3
- data/lib/pulp_container_client/models/oci_build_image.rb +240 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +250 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +365 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +229 -0
- data/lib/pulp_container_client/models/patchedcontainer_content_redirect_content_guard.rb +219 -0
- data/lib/pulp_container_client/models/policy_enum.rb +37 -0
- data/lib/pulp_container_client/models/recursive_manage.rb +4 -3
- data/lib/pulp_container_client/models/repository_sync_url.rb +3 -8
- data/lib/pulp_container_client/models/repository_version.rb +7 -43
- data/lib/pulp_container_client/models/repository_version_response.rb +246 -0
- data/lib/pulp_container_client/models/tag_copy.rb +4 -3
- data/lib/pulp_container_client/models/tag_image.rb +3 -40
- data/lib/pulp_container_client/models/un_tag_image.rb +3 -21
- data/lib/pulp_container_client/version.rb +3 -3
- data/lib/pulp_container_client.rb +18 -5
- data/pulp_container_client.gemspec +4 -4
- data/spec/api/content_blobs_api_spec.rb +11 -11
- data/spec/api/content_manifests_api_spec.rb +11 -11
- data/spec/api/content_tags_api_spec.rb +12 -12
- data/spec/api/contentguards_content_redirect_api_spec.rb +17 -17
- data/spec/api/distributions_container_api_spec.rb +39 -18
- data/spec/api/remotes_container_api_spec.rb +48 -21
- data/spec/api/repositories_container_api_spec.rb +41 -32
- data/spec/api/repositories_container_push_api_spec.rb +17 -40
- data/spec/api/repositories_container_versions_api_spec.rb +76 -46
- data/spec/api/token_api_spec.rb +4 -6
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/async_operation_response_spec.rb +2 -2
- data/spec/models/{container_blob_spec.rb → container_blob_response_spec.rb} +8 -8
- data/spec/models/container_container_distribution_response_spec.rb +83 -0
- data/spec/models/container_container_distribution_spec.rb +5 -23
- data/spec/models/container_container_push_repository_response_spec.rb +77 -0
- data/spec/models/container_container_push_repository_spec.rb +5 -23
- data/spec/models/container_container_remote_response_spec.rb +137 -0
- data/spec/models/container_container_remote_spec.rb +7 -23
- data/spec/models/container_container_repository_response_spec.rb +77 -0
- data/spec/models/container_container_repository_spec.rb +5 -23
- data/spec/models/container_content_redirect_content_guard_response_spec.rb +59 -0
- data/spec/models/container_content_redirect_content_guard_spec.rb +2 -14
- data/spec/models/{container_manifest_spec.rb → container_manifest_response_spec.rb} +8 -8
- data/spec/models/{container_tag_spec.rb → container_tag_response_spec.rb} +8 -14
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/content_summary_spec.rb +2 -2
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2003_spec.rb +2 -2
- data/spec/models/inline_response2004_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +2 -2
- data/spec/models/inline_response2006_spec.rb +2 -2
- data/spec/models/inline_response2007_spec.rb +2 -2
- data/spec/models/inline_response2008_spec.rb +2 -2
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/manifest_copy_spec.rb +2 -2
- data/spec/models/oci_build_image_spec.rb +59 -0
- data/spec/models/patchedcontainer_container_distribution_spec.rb +65 -0
- data/spec/models/patchedcontainer_container_remote_spec.rb +119 -0
- data/spec/models/patchedcontainer_container_repository_spec.rb +53 -0
- data/spec/models/patchedcontainer_content_redirect_content_guard_spec.rb +47 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/recursive_manage_spec.rb +2 -2
- data/spec/models/repository_sync_url_spec.rb +2 -2
- data/spec/models/repository_version_response_spec.rb +65 -0
- data/spec/models/repository_version_spec.rb +2 -26
- data/spec/models/tag_copy_spec.rb +2 -2
- data/spec/models/tag_image_spec.rb +2 -2
- data/spec/models/un_tag_image_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +93 -41
|
@@ -0,0 +1,289 @@
|
|
|
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.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpContainerClient
|
|
16
|
+
# A serializer for ContainerDistribution.
|
|
17
|
+
class ContainerContainerDistributionResponse
|
|
18
|
+
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
|
19
|
+
attr_accessor :base_path
|
|
20
|
+
|
|
21
|
+
# RepositoryVersion to be served
|
|
22
|
+
attr_accessor :repository_version
|
|
23
|
+
|
|
24
|
+
# Timestamp of creation.
|
|
25
|
+
attr_accessor :pulp_created
|
|
26
|
+
|
|
27
|
+
attr_accessor :pulp_href
|
|
28
|
+
|
|
29
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
|
30
|
+
attr_accessor :content_guard
|
|
31
|
+
|
|
32
|
+
# The latest RepositoryVersion for this Repository will be served.
|
|
33
|
+
attr_accessor :repository
|
|
34
|
+
|
|
35
|
+
# A unique name. Ex, `rawhide` and `stable`.
|
|
36
|
+
attr_accessor :name
|
|
37
|
+
|
|
38
|
+
# The Registry hostame/name/ to use with docker pull command defined by this distribution.
|
|
39
|
+
attr_accessor :registry_path
|
|
40
|
+
|
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'base_path' => :'base_path',
|
|
45
|
+
:'repository_version' => :'repository_version',
|
|
46
|
+
:'pulp_created' => :'pulp_created',
|
|
47
|
+
:'pulp_href' => :'pulp_href',
|
|
48
|
+
:'content_guard' => :'content_guard',
|
|
49
|
+
:'repository' => :'repository',
|
|
50
|
+
:'name' => :'name',
|
|
51
|
+
:'registry_path' => :'registry_path'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'base_path' => :'String',
|
|
59
|
+
:'repository_version' => :'String',
|
|
60
|
+
:'pulp_created' => :'DateTime',
|
|
61
|
+
:'pulp_href' => :'String',
|
|
62
|
+
:'content_guard' => :'String',
|
|
63
|
+
:'repository' => :'String',
|
|
64
|
+
:'name' => :'String',
|
|
65
|
+
:'registry_path' => :'String'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# List of attributes with nullable: true
|
|
70
|
+
def self.openapi_nullable
|
|
71
|
+
Set.new([
|
|
72
|
+
:'repository_version',
|
|
73
|
+
:'repository',
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerDistributionResponse` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerDistributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'base_path')
|
|
93
|
+
self.base_path = attributes[:'base_path']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'repository_version')
|
|
97
|
+
self.repository_version = attributes[:'repository_version']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'pulp_created')
|
|
101
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'pulp_href')
|
|
105
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'content_guard')
|
|
109
|
+
self.content_guard = attributes[:'content_guard']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'repository')
|
|
113
|
+
self.repository = attributes[:'repository']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'name')
|
|
117
|
+
self.name = attributes[:'name']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'registry_path')
|
|
121
|
+
self.registry_path = attributes[:'registry_path']
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
invalid_properties = Array.new
|
|
129
|
+
if @base_path.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @name.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
invalid_properties
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Check to see if the all the properties in the model are valid
|
|
141
|
+
# @return true if the model is valid
|
|
142
|
+
def valid?
|
|
143
|
+
return false if @base_path.nil?
|
|
144
|
+
return false if @name.nil?
|
|
145
|
+
true
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def ==(o)
|
|
151
|
+
return true if self.equal?(o)
|
|
152
|
+
self.class == o.class &&
|
|
153
|
+
base_path == o.base_path &&
|
|
154
|
+
repository_version == o.repository_version &&
|
|
155
|
+
pulp_created == o.pulp_created &&
|
|
156
|
+
pulp_href == o.pulp_href &&
|
|
157
|
+
content_guard == o.content_guard &&
|
|
158
|
+
repository == o.repository &&
|
|
159
|
+
name == o.name &&
|
|
160
|
+
registry_path == o.registry_path
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# @see the `==` method
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def eql?(o)
|
|
166
|
+
self == o
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Calculates hash code according to all attributes.
|
|
170
|
+
# @return [Integer] Hash code
|
|
171
|
+
def hash
|
|
172
|
+
[base_path, repository_version, pulp_created, pulp_href, content_guard, repository, name, registry_path].hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Builds the object from hash
|
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
177
|
+
# @return [Object] Returns the model itself
|
|
178
|
+
def self.build_from_hash(attributes)
|
|
179
|
+
new.build_from_hash(attributes)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Builds the object from hash
|
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
184
|
+
# @return [Object] Returns the model itself
|
|
185
|
+
def build_from_hash(attributes)
|
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
|
187
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
188
|
+
if type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
192
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
195
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
196
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
self
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Deserializes the data based on type
|
|
203
|
+
# @param string type Data type
|
|
204
|
+
# @param string value Value to be deserialized
|
|
205
|
+
# @return [Object] Deserialized data
|
|
206
|
+
def _deserialize(type, value)
|
|
207
|
+
case type.to_sym
|
|
208
|
+
when :DateTime
|
|
209
|
+
DateTime.parse(value)
|
|
210
|
+
when :Date
|
|
211
|
+
Date.parse(value)
|
|
212
|
+
when :String
|
|
213
|
+
value.to_s
|
|
214
|
+
when :Integer
|
|
215
|
+
value.to_i
|
|
216
|
+
when :Float
|
|
217
|
+
value.to_f
|
|
218
|
+
when :Boolean
|
|
219
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
220
|
+
true
|
|
221
|
+
else
|
|
222
|
+
false
|
|
223
|
+
end
|
|
224
|
+
when :Object
|
|
225
|
+
# generic object (usually a Hash), return directly
|
|
226
|
+
value
|
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
230
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each do |k, v|
|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
else # model
|
|
239
|
+
PulpContainerClient.const_get(type).build_from_hash(value)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Returns the string representation of the object
|
|
244
|
+
# @return [String] String presentation of the object
|
|
245
|
+
def to_s
|
|
246
|
+
to_hash.to_s
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
250
|
+
# @return [Hash] Returns the object in the form of hash
|
|
251
|
+
def to_body
|
|
252
|
+
to_hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Returns the object in the form of hash
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_hash
|
|
258
|
+
hash = {}
|
|
259
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
260
|
+
value = self.send(attr)
|
|
261
|
+
if value.nil?
|
|
262
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
263
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
hash[param] = _to_hash(value)
|
|
267
|
+
end
|
|
268
|
+
hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Outputs non-array value in the form of hash
|
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
273
|
+
# @param [Object] value Any valid value
|
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
|
275
|
+
def _to_hash(value)
|
|
276
|
+
if value.is_a?(Array)
|
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
|
278
|
+
elsif value.is_a?(Hash)
|
|
279
|
+
{}.tap do |hash|
|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
281
|
+
end
|
|
282
|
+
elsif value.respond_to? :to_hash
|
|
283
|
+
value.to_hash
|
|
284
|
+
else
|
|
285
|
+
value
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Pulp 3 API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
|
-
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 4.2.3
|
|
10
10
|
|
|
@@ -13,50 +13,39 @@ OpenAPI Generator version: 4.2.3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module PulpContainerClient
|
|
16
|
+
# Serializer for Container Push Repositories.
|
|
16
17
|
class ContainerContainerPushRepository
|
|
17
|
-
attr_accessor :pulp_href
|
|
18
|
-
|
|
19
|
-
# Timestamp of creation.
|
|
20
|
-
attr_accessor :pulp_created
|
|
21
|
-
|
|
22
|
-
attr_accessor :versions_href
|
|
23
|
-
|
|
24
|
-
attr_accessor :latest_version_href
|
|
25
|
-
|
|
26
18
|
# A unique name for this repository.
|
|
27
19
|
attr_accessor :name
|
|
28
20
|
|
|
29
21
|
# An optional description.
|
|
30
22
|
attr_accessor :description
|
|
31
23
|
|
|
24
|
+
attr_accessor :remote
|
|
25
|
+
|
|
32
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
27
|
def self.attribute_map
|
|
34
28
|
{
|
|
35
|
-
:'pulp_href' => :'pulp_href',
|
|
36
|
-
:'pulp_created' => :'pulp_created',
|
|
37
|
-
:'versions_href' => :'versions_href',
|
|
38
|
-
:'latest_version_href' => :'latest_version_href',
|
|
39
29
|
:'name' => :'name',
|
|
40
|
-
:'description' => :'description'
|
|
30
|
+
:'description' => :'description',
|
|
31
|
+
:'remote' => :'remote'
|
|
41
32
|
}
|
|
42
33
|
end
|
|
43
34
|
|
|
44
35
|
# Attribute type mapping.
|
|
45
36
|
def self.openapi_types
|
|
46
37
|
{
|
|
47
|
-
:'pulp_href' => :'String',
|
|
48
|
-
:'pulp_created' => :'DateTime',
|
|
49
|
-
:'versions_href' => :'String',
|
|
50
|
-
:'latest_version_href' => :'String',
|
|
51
38
|
:'name' => :'String',
|
|
52
|
-
:'description' => :'String'
|
|
39
|
+
:'description' => :'String',
|
|
40
|
+
:'remote' => :'String'
|
|
53
41
|
}
|
|
54
42
|
end
|
|
55
43
|
|
|
56
44
|
# List of attributes with nullable: true
|
|
57
45
|
def self.openapi_nullable
|
|
58
46
|
Set.new([
|
|
59
|
-
:'description'
|
|
47
|
+
:'description',
|
|
48
|
+
:'remote'
|
|
60
49
|
])
|
|
61
50
|
end
|
|
62
51
|
|
|
@@ -75,22 +64,6 @@ module PulpContainerClient
|
|
|
75
64
|
h[k.to_sym] = v
|
|
76
65
|
}
|
|
77
66
|
|
|
78
|
-
if attributes.key?(:'pulp_href')
|
|
79
|
-
self.pulp_href = attributes[:'pulp_href']
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
if attributes.key?(:'pulp_created')
|
|
83
|
-
self.pulp_created = attributes[:'pulp_created']
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if attributes.key?(:'versions_href')
|
|
87
|
-
self.versions_href = attributes[:'versions_href']
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
if attributes.key?(:'latest_version_href')
|
|
91
|
-
self.latest_version_href = attributes[:'latest_version_href']
|
|
92
|
-
end
|
|
93
|
-
|
|
94
67
|
if attributes.key?(:'name')
|
|
95
68
|
self.name = attributes[:'name']
|
|
96
69
|
end
|
|
@@ -98,6 +71,10 @@ module PulpContainerClient
|
|
|
98
71
|
if attributes.key?(:'description')
|
|
99
72
|
self.description = attributes[:'description']
|
|
100
73
|
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'remote')
|
|
76
|
+
self.remote = attributes[:'remote']
|
|
77
|
+
end
|
|
101
78
|
end
|
|
102
79
|
|
|
103
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -108,14 +85,6 @@ module PulpContainerClient
|
|
|
108
85
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
109
86
|
end
|
|
110
87
|
|
|
111
|
-
if @name.to_s.length < 1
|
|
112
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
if !@description.nil? && @description.to_s.length < 1
|
|
116
|
-
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
117
|
-
end
|
|
118
|
-
|
|
119
88
|
invalid_properties
|
|
120
89
|
end
|
|
121
90
|
|
|
@@ -123,46 +92,17 @@ module PulpContainerClient
|
|
|
123
92
|
# @return true if the model is valid
|
|
124
93
|
def valid?
|
|
125
94
|
return false if @name.nil?
|
|
126
|
-
return false if @name.to_s.length < 1
|
|
127
|
-
return false if !@description.nil? && @description.to_s.length < 1
|
|
128
95
|
true
|
|
129
96
|
end
|
|
130
97
|
|
|
131
|
-
# Custom attribute writer method with validation
|
|
132
|
-
# @param [Object] name Value to be assigned
|
|
133
|
-
def name=(name)
|
|
134
|
-
if name.nil?
|
|
135
|
-
fail ArgumentError, 'name cannot be nil'
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
if name.to_s.length < 1
|
|
139
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
@name = name
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
# Custom attribute writer method with validation
|
|
146
|
-
# @param [Object] description Value to be assigned
|
|
147
|
-
def description=(description)
|
|
148
|
-
if !description.nil? && description.to_s.length < 1
|
|
149
|
-
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
@description = description
|
|
153
|
-
end
|
|
154
|
-
|
|
155
98
|
# Checks equality by comparing each attribute.
|
|
156
99
|
# @param [Object] Object to be compared
|
|
157
100
|
def ==(o)
|
|
158
101
|
return true if self.equal?(o)
|
|
159
102
|
self.class == o.class &&
|
|
160
|
-
pulp_href == o.pulp_href &&
|
|
161
|
-
pulp_created == o.pulp_created &&
|
|
162
|
-
versions_href == o.versions_href &&
|
|
163
|
-
latest_version_href == o.latest_version_href &&
|
|
164
103
|
name == o.name &&
|
|
165
|
-
description == o.description
|
|
104
|
+
description == o.description &&
|
|
105
|
+
remote == o.remote
|
|
166
106
|
end
|
|
167
107
|
|
|
168
108
|
# @see the `==` method
|
|
@@ -174,7 +114,7 @@ module PulpContainerClient
|
|
|
174
114
|
# Calculates hash code according to all attributes.
|
|
175
115
|
# @return [Integer] Hash code
|
|
176
116
|
def hash
|
|
177
|
-
[
|
|
117
|
+
[name, description, remote].hash
|
|
178
118
|
end
|
|
179
119
|
|
|
180
120
|
# Builds the object from hash
|