pulp_container_client 2.17.0 → 2.18.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 +40 -6
- data/docs/ContainerContainerDistribution.md +6 -6
- data/docs/ContainerContainerDistributionResponse.md +12 -10
- data/docs/ContainerContainerPullThroughDistribution.md +35 -0
- data/docs/ContainerContainerPullThroughDistributionResponse.md +41 -0
- data/docs/ContainerContainerPullThroughRemote.md +57 -0
- data/docs/ContainerContainerPullThroughRemoteResponse.md +55 -0
- data/docs/{ContainerContainerRemoteResponseHiddenFields.md → ContainerContainerPullThroughRemoteResponseHiddenFields.md} +2 -2
- data/docs/ContainerContainerPushRepository.md +6 -6
- data/docs/ContainerContainerPushRepositoryResponse.md +10 -10
- data/docs/ContainerContainerRemote.md +1 -1
- data/docs/ContainerContainerRemoteResponse.md +2 -2
- data/docs/ContentBlobsApi.md +2 -0
- data/docs/ContentManifestsApi.md +2 -0
- data/docs/ContentSignaturesApi.md +2 -0
- data/docs/ContentTagsApi.md +2 -0
- data/docs/DistributionsPullThroughApi.md +736 -0
- data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +23 -0
- data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +23 -0
- data/docs/PatchedcontainerContainerDistribution.md +6 -6
- data/docs/PatchedcontainerContainerPullThroughDistribution.md +35 -0
- data/docs/PatchedcontainerContainerPullThroughRemote.md +57 -0
- data/docs/PatchedcontainerContainerPushRepository.md +6 -6
- data/docs/PatchedcontainerContainerRemote.md +1 -1
- data/docs/{PolicyEnum.md → Policy762Enum.md} +2 -2
- data/docs/Policy8e2Enum.md +16 -0
- data/docs/RemotesPullThroughApi.md +734 -0
- data/lib/pulp_container_client/api/content_blobs_api.rb +3 -0
- data/lib/pulp_container_client/api/content_manifests_api.rb +3 -0
- data/lib/pulp_container_client/api/content_signatures_api.rb +3 -0
- data/lib/pulp_container_client/api/content_tags_api.rb +3 -0
- data/lib/pulp_container_client/api/distributions_pull_through_api.rb +907 -0
- data/lib/pulp_container_client/api/remotes_pull_through_api.rb +904 -0
- data/lib/pulp_container_client/models/container_container_distribution.rb +26 -26
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +55 -45
- data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +373 -0
- data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +349 -0
- data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +668 -0
- data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +496 -0
- data/lib/pulp_container_client/models/{container_container_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields.rb} +3 -3
- data/lib/pulp_container_client/models/container_container_push_repository.rb +51 -51
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +48 -48
- data/lib/pulp_container_client/models/container_container_remote.rb +1 -1
- data/lib/pulp_container_client/models/container_container_remote_response.rb +2 -2
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +237 -0
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +237 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +26 -26
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +350 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +650 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +43 -43
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +1 -1
- data/lib/pulp_container_client/models/{policy_enum.rb → policy762_enum.rb} +3 -3
- data/lib/pulp_container_client/models/policy8e2_enum.rb +35 -0
- data/lib/pulp_container_client/version.rb +1 -1
- data/lib/pulp_container_client.rb +13 -2
- data/spec/api/content_blobs_api_spec.rb +1 -0
- data/spec/api/content_manifests_api_spec.rb +1 -0
- data/spec/api/content_signatures_api_spec.rb +1 -0
- data/spec/api/content_tags_api_spec.rb +1 -0
- data/spec/api/distributions_pull_through_api_spec.rb +215 -0
- data/spec/api/remotes_pull_through_api_spec.rb +214 -0
- data/spec/models/container_container_distribution_response_spec.rb +14 -8
- data/spec/models/container_container_distribution_spec.rb +6 -6
- data/spec/models/container_container_pull_through_distribution_response_spec.rb +113 -0
- data/spec/models/container_container_pull_through_distribution_spec.rb +95 -0
- data/spec/models/{container_container_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_spec.rb} +6 -6
- data/spec/models/container_container_pull_through_remote_response_spec.rb +155 -0
- data/spec/models/container_container_pull_through_remote_spec.rb +161 -0
- data/spec/models/container_container_push_repository_response_spec.rb +7 -7
- data/spec/models/container_container_push_repository_spec.rb +4 -4
- data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +59 -0
- data/spec/models/patchedcontainer_container_distribution_spec.rb +6 -6
- data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +95 -0
- data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +161 -0
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +4 -4
- data/spec/models/{policy_enum_spec.rb → policy762_enum_spec.rb} +6 -6
- data/spec/models/policy8e2_enum_spec.rb +35 -0
- metadata +104 -60
|
@@ -15,10 +15,8 @@ require 'date'
|
|
|
15
15
|
module PulpContainerClient
|
|
16
16
|
# A serializer for ContainerDistribution.
|
|
17
17
|
class ContainerContainerDistribution
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
20
|
-
|
|
21
|
-
attr_accessor :pulp_labels
|
|
18
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
|
19
|
+
attr_accessor :content_guard
|
|
22
20
|
|
|
23
21
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
|
24
22
|
attr_accessor :base_path
|
|
@@ -26,12 +24,14 @@ module PulpContainerClient
|
|
|
26
24
|
# Whether this distribution should be shown in the content app.
|
|
27
25
|
attr_accessor :hidden
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
attr_accessor :content_guard
|
|
27
|
+
attr_accessor :pulp_labels
|
|
31
28
|
|
|
32
29
|
# A unique name. Ex, `rawhide` and `stable`.
|
|
33
30
|
attr_accessor :name
|
|
34
31
|
|
|
32
|
+
# The latest RepositoryVersion for this Repository will be served.
|
|
33
|
+
attr_accessor :repository
|
|
34
|
+
|
|
35
35
|
# RepositoryVersion to be served
|
|
36
36
|
attr_accessor :repository_version
|
|
37
37
|
|
|
@@ -44,12 +44,12 @@ module PulpContainerClient
|
|
|
44
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
45
|
def self.attribute_map
|
|
46
46
|
{
|
|
47
|
-
:'
|
|
48
|
-
:'pulp_labels' => :'pulp_labels',
|
|
47
|
+
:'content_guard' => :'content_guard',
|
|
49
48
|
:'base_path' => :'base_path',
|
|
50
49
|
:'hidden' => :'hidden',
|
|
51
|
-
:'
|
|
50
|
+
:'pulp_labels' => :'pulp_labels',
|
|
52
51
|
:'name' => :'name',
|
|
52
|
+
:'repository' => :'repository',
|
|
53
53
|
:'repository_version' => :'repository_version',
|
|
54
54
|
:'private' => :'private',
|
|
55
55
|
:'description' => :'description'
|
|
@@ -59,12 +59,12 @@ module PulpContainerClient
|
|
|
59
59
|
# Attribute type mapping.
|
|
60
60
|
def self.openapi_types
|
|
61
61
|
{
|
|
62
|
-
:'
|
|
63
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
62
|
+
:'content_guard' => :'String',
|
|
64
63
|
:'base_path' => :'String',
|
|
65
64
|
:'hidden' => :'Boolean',
|
|
66
|
-
:'
|
|
65
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
67
66
|
:'name' => :'String',
|
|
67
|
+
:'repository' => :'String',
|
|
68
68
|
:'repository_version' => :'String',
|
|
69
69
|
:'private' => :'Boolean',
|
|
70
70
|
:'description' => :'String'
|
|
@@ -95,14 +95,8 @@ module PulpContainerClient
|
|
|
95
95
|
h[k.to_sym] = v
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
if attributes.key?(:'
|
|
99
|
-
self.
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
if attributes.key?(:'pulp_labels')
|
|
103
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
104
|
-
self.pulp_labels = value
|
|
105
|
-
end
|
|
98
|
+
if attributes.key?(:'content_guard')
|
|
99
|
+
self.content_guard = attributes[:'content_guard']
|
|
106
100
|
end
|
|
107
101
|
|
|
108
102
|
if attributes.key?(:'base_path')
|
|
@@ -115,14 +109,20 @@ module PulpContainerClient
|
|
|
115
109
|
self.hidden = false
|
|
116
110
|
end
|
|
117
111
|
|
|
118
|
-
if attributes.key?(:'
|
|
119
|
-
|
|
112
|
+
if attributes.key?(:'pulp_labels')
|
|
113
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
114
|
+
self.pulp_labels = value
|
|
115
|
+
end
|
|
120
116
|
end
|
|
121
117
|
|
|
122
118
|
if attributes.key?(:'name')
|
|
123
119
|
self.name = attributes[:'name']
|
|
124
120
|
end
|
|
125
121
|
|
|
122
|
+
if attributes.key?(:'repository')
|
|
123
|
+
self.repository = attributes[:'repository']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
126
|
if attributes.key?(:'repository_version')
|
|
127
127
|
self.repository_version = attributes[:'repository_version']
|
|
128
128
|
end
|
|
@@ -217,12 +217,12 @@ module PulpContainerClient
|
|
|
217
217
|
def ==(o)
|
|
218
218
|
return true if self.equal?(o)
|
|
219
219
|
self.class == o.class &&
|
|
220
|
-
|
|
221
|
-
pulp_labels == o.pulp_labels &&
|
|
220
|
+
content_guard == o.content_guard &&
|
|
222
221
|
base_path == o.base_path &&
|
|
223
222
|
hidden == o.hidden &&
|
|
224
|
-
|
|
223
|
+
pulp_labels == o.pulp_labels &&
|
|
225
224
|
name == o.name &&
|
|
225
|
+
repository == o.repository &&
|
|
226
226
|
repository_version == o.repository_version &&
|
|
227
227
|
private == o.private &&
|
|
228
228
|
description == o.description
|
|
@@ -237,7 +237,7 @@ module PulpContainerClient
|
|
|
237
237
|
# Calculates hash code according to all attributes.
|
|
238
238
|
# @return [Integer] Hash code
|
|
239
239
|
def hash
|
|
240
|
-
[
|
|
240
|
+
[content_guard, base_path, hidden, pulp_labels, name, repository, repository_version, private, description].hash
|
|
241
241
|
end
|
|
242
242
|
|
|
243
243
|
# Builds the object from hash
|
|
@@ -15,34 +15,37 @@ require 'date'
|
|
|
15
15
|
module PulpContainerClient
|
|
16
16
|
# A serializer for ContainerDistribution.
|
|
17
17
|
class ContainerContainerDistributionResponse
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
20
|
-
|
|
21
|
-
# The latest RepositoryVersion for this Repository will be served.
|
|
22
|
-
attr_accessor :repository
|
|
23
|
-
|
|
24
|
-
attr_accessor :pulp_labels
|
|
18
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
|
19
|
+
attr_accessor :content_guard
|
|
25
20
|
|
|
26
21
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
|
27
22
|
attr_accessor :base_path
|
|
28
23
|
|
|
24
|
+
attr_accessor :pulp_href
|
|
25
|
+
|
|
29
26
|
# Whether this distribution should be shown in the content app.
|
|
30
27
|
attr_accessor :hidden
|
|
31
28
|
|
|
32
|
-
attr_accessor :
|
|
33
|
-
|
|
34
|
-
# An optional content-guard. If none is specified, a default one will be used.
|
|
35
|
-
attr_accessor :content_guard
|
|
29
|
+
attr_accessor :pulp_labels
|
|
36
30
|
|
|
37
31
|
# A unique name. Ex, `rawhide` and `stable`.
|
|
38
32
|
attr_accessor :name
|
|
39
33
|
|
|
34
|
+
# The latest RepositoryVersion for this Repository will be served.
|
|
35
|
+
attr_accessor :repository
|
|
36
|
+
|
|
37
|
+
# Timestamp of creation.
|
|
38
|
+
attr_accessor :pulp_created
|
|
39
|
+
|
|
40
40
|
# RepositoryVersion to be served
|
|
41
41
|
attr_accessor :repository_version
|
|
42
42
|
|
|
43
43
|
# The Registry hostname/name/ to use with docker pull command defined by this distribution.
|
|
44
44
|
attr_accessor :registry_path
|
|
45
45
|
|
|
46
|
+
# Remote that can be used to fetch content when using pull-through caching.
|
|
47
|
+
attr_accessor :remote
|
|
48
|
+
|
|
46
49
|
# Namespace this distribution belongs to.
|
|
47
50
|
attr_accessor :namespace
|
|
48
51
|
|
|
@@ -55,16 +58,17 @@ module PulpContainerClient
|
|
|
55
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
59
|
def self.attribute_map
|
|
57
60
|
{
|
|
58
|
-
:'
|
|
59
|
-
:'repository' => :'repository',
|
|
60
|
-
:'pulp_labels' => :'pulp_labels',
|
|
61
|
+
:'content_guard' => :'content_guard',
|
|
61
62
|
:'base_path' => :'base_path',
|
|
62
|
-
:'hidden' => :'hidden',
|
|
63
63
|
:'pulp_href' => :'pulp_href',
|
|
64
|
-
:'
|
|
64
|
+
:'hidden' => :'hidden',
|
|
65
|
+
:'pulp_labels' => :'pulp_labels',
|
|
65
66
|
:'name' => :'name',
|
|
67
|
+
:'repository' => :'repository',
|
|
68
|
+
:'pulp_created' => :'pulp_created',
|
|
66
69
|
:'repository_version' => :'repository_version',
|
|
67
70
|
:'registry_path' => :'registry_path',
|
|
71
|
+
:'remote' => :'remote',
|
|
68
72
|
:'namespace' => :'namespace',
|
|
69
73
|
:'private' => :'private',
|
|
70
74
|
:'description' => :'description'
|
|
@@ -74,16 +78,17 @@ module PulpContainerClient
|
|
|
74
78
|
# Attribute type mapping.
|
|
75
79
|
def self.openapi_types
|
|
76
80
|
{
|
|
77
|
-
:'
|
|
78
|
-
:'repository' => :'String',
|
|
79
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
81
|
+
:'content_guard' => :'String',
|
|
80
82
|
:'base_path' => :'String',
|
|
81
|
-
:'hidden' => :'Boolean',
|
|
82
83
|
:'pulp_href' => :'String',
|
|
83
|
-
:'
|
|
84
|
+
:'hidden' => :'Boolean',
|
|
85
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
84
86
|
:'name' => :'String',
|
|
87
|
+
:'repository' => :'String',
|
|
88
|
+
:'pulp_created' => :'DateTime',
|
|
85
89
|
:'repository_version' => :'String',
|
|
86
90
|
:'registry_path' => :'String',
|
|
91
|
+
:'remote' => :'String',
|
|
87
92
|
:'namespace' => :'String',
|
|
88
93
|
:'private' => :'Boolean',
|
|
89
94
|
:'description' => :'String'
|
|
@@ -114,42 +119,42 @@ module PulpContainerClient
|
|
|
114
119
|
h[k.to_sym] = v
|
|
115
120
|
}
|
|
116
121
|
|
|
117
|
-
if attributes.key?(:'
|
|
118
|
-
self.
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if attributes.key?(:'repository')
|
|
122
|
-
self.repository = attributes[:'repository']
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'pulp_labels')
|
|
126
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
127
|
-
self.pulp_labels = value
|
|
128
|
-
end
|
|
122
|
+
if attributes.key?(:'content_guard')
|
|
123
|
+
self.content_guard = attributes[:'content_guard']
|
|
129
124
|
end
|
|
130
125
|
|
|
131
126
|
if attributes.key?(:'base_path')
|
|
132
127
|
self.base_path = attributes[:'base_path']
|
|
133
128
|
end
|
|
134
129
|
|
|
130
|
+
if attributes.key?(:'pulp_href')
|
|
131
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
132
|
+
end
|
|
133
|
+
|
|
135
134
|
if attributes.key?(:'hidden')
|
|
136
135
|
self.hidden = attributes[:'hidden']
|
|
137
136
|
else
|
|
138
137
|
self.hidden = false
|
|
139
138
|
end
|
|
140
139
|
|
|
141
|
-
if attributes.key?(:'
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if attributes.key?(:'content_guard')
|
|
146
|
-
self.content_guard = attributes[:'content_guard']
|
|
140
|
+
if attributes.key?(:'pulp_labels')
|
|
141
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
142
|
+
self.pulp_labels = value
|
|
143
|
+
end
|
|
147
144
|
end
|
|
148
145
|
|
|
149
146
|
if attributes.key?(:'name')
|
|
150
147
|
self.name = attributes[:'name']
|
|
151
148
|
end
|
|
152
149
|
|
|
150
|
+
if attributes.key?(:'repository')
|
|
151
|
+
self.repository = attributes[:'repository']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'pulp_created')
|
|
155
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
156
|
+
end
|
|
157
|
+
|
|
153
158
|
if attributes.key?(:'repository_version')
|
|
154
159
|
self.repository_version = attributes[:'repository_version']
|
|
155
160
|
end
|
|
@@ -158,6 +163,10 @@ module PulpContainerClient
|
|
|
158
163
|
self.registry_path = attributes[:'registry_path']
|
|
159
164
|
end
|
|
160
165
|
|
|
166
|
+
if attributes.key?(:'remote')
|
|
167
|
+
self.remote = attributes[:'remote']
|
|
168
|
+
end
|
|
169
|
+
|
|
161
170
|
if attributes.key?(:'namespace')
|
|
162
171
|
self.namespace = attributes[:'namespace']
|
|
163
172
|
end
|
|
@@ -199,16 +208,17 @@ module PulpContainerClient
|
|
|
199
208
|
def ==(o)
|
|
200
209
|
return true if self.equal?(o)
|
|
201
210
|
self.class == o.class &&
|
|
202
|
-
|
|
203
|
-
repository == o.repository &&
|
|
204
|
-
pulp_labels == o.pulp_labels &&
|
|
211
|
+
content_guard == o.content_guard &&
|
|
205
212
|
base_path == o.base_path &&
|
|
206
|
-
hidden == o.hidden &&
|
|
207
213
|
pulp_href == o.pulp_href &&
|
|
208
|
-
|
|
214
|
+
hidden == o.hidden &&
|
|
215
|
+
pulp_labels == o.pulp_labels &&
|
|
209
216
|
name == o.name &&
|
|
217
|
+
repository == o.repository &&
|
|
218
|
+
pulp_created == o.pulp_created &&
|
|
210
219
|
repository_version == o.repository_version &&
|
|
211
220
|
registry_path == o.registry_path &&
|
|
221
|
+
remote == o.remote &&
|
|
212
222
|
namespace == o.namespace &&
|
|
213
223
|
private == o.private &&
|
|
214
224
|
description == o.description
|
|
@@ -223,7 +233,7 @@ module PulpContainerClient
|
|
|
223
233
|
# Calculates hash code according to all attributes.
|
|
224
234
|
# @return [Integer] Hash code
|
|
225
235
|
def hash
|
|
226
|
-
[
|
|
236
|
+
[content_guard, base_path, pulp_href, hidden, pulp_labels, name, repository, pulp_created, repository_version, registry_path, remote, namespace, private, description].hash
|
|
227
237
|
end
|
|
228
238
|
|
|
229
239
|
# Builds the object from hash
|
|
@@ -0,0 +1,373 @@
|
|
|
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 a specialized pull-through distribution referencing sub-distributions.
|
|
17
|
+
class ContainerContainerPullThroughDistribution
|
|
18
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
|
19
|
+
attr_accessor :content_guard
|
|
20
|
+
|
|
21
|
+
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
|
22
|
+
attr_accessor :base_path
|
|
23
|
+
|
|
24
|
+
# Whether this distribution should be shown in the content app.
|
|
25
|
+
attr_accessor :hidden
|
|
26
|
+
|
|
27
|
+
attr_accessor :pulp_labels
|
|
28
|
+
|
|
29
|
+
# A unique name. Ex, `rawhide` and `stable`.
|
|
30
|
+
attr_accessor :name
|
|
31
|
+
|
|
32
|
+
# The latest RepositoryVersion for this Repository will be served.
|
|
33
|
+
attr_accessor :repository
|
|
34
|
+
|
|
35
|
+
# Remote that can be used to fetch content when using pull-through caching.
|
|
36
|
+
attr_accessor :remote
|
|
37
|
+
|
|
38
|
+
# Distributions created after pulling content through cache
|
|
39
|
+
attr_accessor :distributions
|
|
40
|
+
|
|
41
|
+
# Restrict pull access to explicitly authorized users. Related distributions inherit this value. Defaults to unrestricted pull access.
|
|
42
|
+
attr_accessor :private
|
|
43
|
+
|
|
44
|
+
# An optional description.
|
|
45
|
+
attr_accessor :description
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'content_guard' => :'content_guard',
|
|
51
|
+
:'base_path' => :'base_path',
|
|
52
|
+
:'hidden' => :'hidden',
|
|
53
|
+
:'pulp_labels' => :'pulp_labels',
|
|
54
|
+
:'name' => :'name',
|
|
55
|
+
:'repository' => :'repository',
|
|
56
|
+
:'remote' => :'remote',
|
|
57
|
+
:'distributions' => :'distributions',
|
|
58
|
+
:'private' => :'private',
|
|
59
|
+
:'description' => :'description'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'content_guard' => :'String',
|
|
67
|
+
:'base_path' => :'String',
|
|
68
|
+
:'hidden' => :'Boolean',
|
|
69
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
70
|
+
:'name' => :'String',
|
|
71
|
+
:'repository' => :'String',
|
|
72
|
+
:'remote' => :'String',
|
|
73
|
+
:'distributions' => :'Array<String>',
|
|
74
|
+
:'private' => :'Boolean',
|
|
75
|
+
:'description' => :'String'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
:'repository',
|
|
83
|
+
:'description'
|
|
84
|
+
])
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Initializes the object
|
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
|
+
def initialize(attributes = {})
|
|
90
|
+
if (!attributes.is_a?(Hash))
|
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPullThroughDistribution` initialize method"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPullThroughDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'content_guard')
|
|
103
|
+
self.content_guard = attributes[:'content_guard']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'base_path')
|
|
107
|
+
self.base_path = attributes[:'base_path']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'hidden')
|
|
111
|
+
self.hidden = attributes[:'hidden']
|
|
112
|
+
else
|
|
113
|
+
self.hidden = false
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'pulp_labels')
|
|
117
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
118
|
+
self.pulp_labels = value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'name')
|
|
123
|
+
self.name = attributes[:'name']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'repository')
|
|
127
|
+
self.repository = attributes[:'repository']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'remote')
|
|
131
|
+
self.remote = attributes[:'remote']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'distributions')
|
|
135
|
+
if (value = attributes[:'distributions']).is_a?(Array)
|
|
136
|
+
self.distributions = value
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'private')
|
|
141
|
+
self.private = attributes[:'private']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'description')
|
|
145
|
+
self.description = attributes[:'description']
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
150
|
+
# @return Array for valid properties with the reasons
|
|
151
|
+
def list_invalid_properties
|
|
152
|
+
invalid_properties = Array.new
|
|
153
|
+
if @base_path.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @base_path.to_s.length < 1
|
|
158
|
+
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @name.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @name.to_s.length < 1
|
|
166
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if @remote.nil?
|
|
170
|
+
invalid_properties.push('invalid value for "remote", remote cannot be nil.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if !@description.nil? && @description.to_s.length < 1
|
|
174
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
invalid_properties
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Check to see if the all the properties in the model are valid
|
|
181
|
+
# @return true if the model is valid
|
|
182
|
+
def valid?
|
|
183
|
+
return false if @base_path.nil?
|
|
184
|
+
return false if @base_path.to_s.length < 1
|
|
185
|
+
return false if @name.nil?
|
|
186
|
+
return false if @name.to_s.length < 1
|
|
187
|
+
return false if @remote.nil?
|
|
188
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
|
189
|
+
true
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method with validation
|
|
193
|
+
# @param [Object] base_path Value to be assigned
|
|
194
|
+
def base_path=(base_path)
|
|
195
|
+
if base_path.nil?
|
|
196
|
+
fail ArgumentError, 'base_path cannot be nil'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if base_path.to_s.length < 1
|
|
200
|
+
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@base_path = base_path
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] name Value to be assigned
|
|
208
|
+
def name=(name)
|
|
209
|
+
if name.nil?
|
|
210
|
+
fail ArgumentError, 'name cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if name.to_s.length < 1
|
|
214
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@name = name
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] description Value to be assigned
|
|
222
|
+
def description=(description)
|
|
223
|
+
if !description.nil? && description.to_s.length < 1
|
|
224
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@description = description
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Checks equality by comparing each attribute.
|
|
231
|
+
# @param [Object] Object to be compared
|
|
232
|
+
def ==(o)
|
|
233
|
+
return true if self.equal?(o)
|
|
234
|
+
self.class == o.class &&
|
|
235
|
+
content_guard == o.content_guard &&
|
|
236
|
+
base_path == o.base_path &&
|
|
237
|
+
hidden == o.hidden &&
|
|
238
|
+
pulp_labels == o.pulp_labels &&
|
|
239
|
+
name == o.name &&
|
|
240
|
+
repository == o.repository &&
|
|
241
|
+
remote == o.remote &&
|
|
242
|
+
distributions == o.distributions &&
|
|
243
|
+
private == o.private &&
|
|
244
|
+
description == o.description
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# @see the `==` method
|
|
248
|
+
# @param [Object] Object to be compared
|
|
249
|
+
def eql?(o)
|
|
250
|
+
self == o
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Calculates hash code according to all attributes.
|
|
254
|
+
# @return [Integer] Hash code
|
|
255
|
+
def hash
|
|
256
|
+
[content_guard, base_path, hidden, pulp_labels, name, repository, remote, distributions, private, description].hash
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Builds the object from hash
|
|
260
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
261
|
+
# @return [Object] Returns the model itself
|
|
262
|
+
def self.build_from_hash(attributes)
|
|
263
|
+
new.build_from_hash(attributes)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Builds the object from hash
|
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
268
|
+
# @return [Object] Returns the model itself
|
|
269
|
+
def build_from_hash(attributes)
|
|
270
|
+
return nil unless attributes.is_a?(Hash)
|
|
271
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
272
|
+
if type =~ /\AArray<(.*)>/i
|
|
273
|
+
# check to ensure the input is an array given that the attribute
|
|
274
|
+
# is documented as an array but the input is not
|
|
275
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
276
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
277
|
+
end
|
|
278
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
279
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
280
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
self
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Deserializes the data based on type
|
|
287
|
+
# @param string type Data type
|
|
288
|
+
# @param string value Value to be deserialized
|
|
289
|
+
# @return [Object] Deserialized data
|
|
290
|
+
def _deserialize(type, value)
|
|
291
|
+
case type.to_sym
|
|
292
|
+
when :DateTime
|
|
293
|
+
DateTime.parse(value)
|
|
294
|
+
when :Date
|
|
295
|
+
Date.parse(value)
|
|
296
|
+
when :String
|
|
297
|
+
value.to_s
|
|
298
|
+
when :Integer
|
|
299
|
+
value.to_i
|
|
300
|
+
when :Float
|
|
301
|
+
value.to_f
|
|
302
|
+
when :Boolean
|
|
303
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
304
|
+
true
|
|
305
|
+
else
|
|
306
|
+
false
|
|
307
|
+
end
|
|
308
|
+
when :Object
|
|
309
|
+
# generic object (usually a Hash), return directly
|
|
310
|
+
value
|
|
311
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
312
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
313
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
314
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
315
|
+
k_type = Regexp.last_match[:k_type]
|
|
316
|
+
v_type = Regexp.last_match[:v_type]
|
|
317
|
+
{}.tap do |hash|
|
|
318
|
+
value.each do |k, v|
|
|
319
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
else # model
|
|
323
|
+
PulpContainerClient.const_get(type).build_from_hash(value)
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Returns the string representation of the object
|
|
328
|
+
# @return [String] String presentation of the object
|
|
329
|
+
def to_s
|
|
330
|
+
to_hash.to_s
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
334
|
+
# @return [Hash] Returns the object in the form of hash
|
|
335
|
+
def to_body
|
|
336
|
+
to_hash
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# Returns the object in the form of hash
|
|
340
|
+
# @return [Hash] Returns the object in the form of hash
|
|
341
|
+
def to_hash
|
|
342
|
+
hash = {}
|
|
343
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
344
|
+
value = self.send(attr)
|
|
345
|
+
if value.nil?
|
|
346
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
347
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
hash[param] = _to_hash(value)
|
|
351
|
+
end
|
|
352
|
+
hash
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Outputs non-array value in the form of hash
|
|
356
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
357
|
+
# @param [Object] value Any valid value
|
|
358
|
+
# @return [Hash] Returns the value in the form of hash
|
|
359
|
+
def _to_hash(value)
|
|
360
|
+
if value.is_a?(Array)
|
|
361
|
+
value.compact.map { |v| _to_hash(v) }
|
|
362
|
+
elsif value.is_a?(Hash)
|
|
363
|
+
{}.tap do |hash|
|
|
364
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
365
|
+
end
|
|
366
|
+
elsif value.respond_to? :to_hash
|
|
367
|
+
value.to_hash
|
|
368
|
+
else
|
|
369
|
+
value
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
end
|