pulp_container_client 2.22.1 → 2.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -14
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContainerBlobResponse.md +18 -17
- data/docs/ContainerContainerDistribution.md +24 -23
- data/docs/ContainerContainerDistributionResponse.md +40 -39
- data/docs/ContainerContainerNamespace.md +8 -7
- data/docs/ContainerContainerNamespaceResponse.md +16 -15
- data/docs/ContainerContainerPullThroughDistribution.md +26 -25
- data/docs/ContainerContainerPullThroughDistributionResponse.md +38 -37
- data/docs/ContainerContainerPullThroughRemote.md +52 -51
- data/docs/ContainerContainerPullThroughRemoteResponse.md +52 -51
- data/docs/ContainerContainerPullThroughRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/ContainerContainerPushRepository.md +16 -15
- data/docs/ContainerContainerPushRepositoryResponse.md +28 -27
- data/docs/ContainerContainerRemote.md +56 -55
- data/docs/ContainerContainerRemoteResponse.md +56 -55
- data/docs/ContainerContainerRepository.md +18 -17
- data/docs/ContainerContainerRepositoryResponse.md +30 -29
- data/docs/ContainerManifestResponse.md +42 -41
- data/docs/ContainerManifestSignatureResponse.md +28 -27
- data/docs/ContainerRepositorySyncURL.md +12 -11
- data/docs/ContainerTagResponse.md +18 -17
- data/docs/ContentBlobsApi.md +82 -49
- data/docs/ContentManifestsApi.md +86 -53
- data/docs/ContentSignaturesApi.md +97 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/ContentTagsApi.md +86 -53
- data/docs/DistributionsContainerApi.md +386 -183
- data/docs/DistributionsPullThroughApi.md +385 -182
- data/docs/ManifestCopy.md +14 -13
- data/docs/MediaTypesEnum.md +4 -5
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedcontainerBlobResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerDistributionResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerNamespaceResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPushRepositoryResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerRemoteResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerRepositoryResponseList.md +14 -13
- data/docs/PaginatedcontainerManifestResponseList.md +14 -13
- data/docs/PaginatedcontainerManifestSignatureResponseList.md +14 -13
- data/docs/PaginatedcontainerTagResponseList.md +14 -13
- data/docs/PatchedcontainerContainerDistribution.md +24 -23
- data/docs/PatchedcontainerContainerPullThroughDistribution.md +26 -25
- data/docs/PatchedcontainerContainerPullThroughRemote.md +52 -51
- data/docs/PatchedcontainerContainerPushRepository.md +16 -15
- data/docs/PatchedcontainerContainerRemote.md +56 -55
- data/docs/PatchedcontainerContainerRepository.md +18 -17
- data/docs/Policy692Enum.md +4 -5
- data/docs/Policy7e0Enum.md +4 -5
- data/docs/PulpContainerNamespacesApi.md +259 -124
- data/docs/RecursiveManage.md +8 -7
- data/docs/RemotesContainerApi.md +389 -184
- data/docs/RemotesPullThroughApi.md +389 -184
- data/docs/RemoveImage.md +8 -7
- data/docs/RemoveSignatures.md +8 -7
- data/docs/RemoveSignaturesResponse.md +8 -7
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesContainerApi.md +647 -291
- data/docs/RepositoriesContainerPushApi.md +419 -198
- data/docs/RepositoriesContainerPushVersionsApi.md +152 -82
- data/docs/RepositoriesContainerVersionsApi.md +152 -82
- data/docs/RepositorySign.md +12 -11
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/TagCopy.md +12 -11
- data/docs/TagImage.md +10 -9
- data/docs/TokenApi.md +25 -7
- data/docs/UnTagImage.md +8 -7
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_container_client/api/content_blobs_api.rb +11 -9
- data/lib/pulp_container_client/api/content_manifests_api.rb +11 -9
- data/lib/pulp_container_client/api/content_signatures_api.rb +11 -9
- data/lib/pulp_container_client/api/content_tags_api.rb +11 -9
- data/lib/pulp_container_client/api/distributions_container_api.rb +89 -56
- data/lib/pulp_container_client/api/distributions_pull_through_api.rb +89 -56
- data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +53 -36
- data/lib/pulp_container_client/api/remotes_container_api.rb +104 -68
- data/lib/pulp_container_client/api/remotes_pull_through_api.rb +104 -68
- data/lib/pulp_container_client/api/repositories_container_api.rb +171 -102
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +102 -62
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +40 -30
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +40 -30
- data/lib/pulp_container_client/api/token_api.rb +5 -4
- data/lib/pulp_container_client/api_client.rb +137 -102
- data/lib/pulp_container_client/api_error.rb +2 -1
- data/lib/pulp_container_client/configuration.rb +162 -21
- data/lib/pulp_container_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_container_client/models/container_blob_response.rb +37 -29
- data/lib/pulp_container_client/models/container_container_distribution.rb +86 -74
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
- data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
- data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
- data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +88 -74
- data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
- data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
- data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
- data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_container_client/models/container_container_push_repository.rb +83 -73
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
- data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
- data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
- data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
- data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
- data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
- data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
- data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
- data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
- data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
- data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
- data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_container_client/models/nested_role.rb +32 -22
- data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
- data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
- data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
- data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
- data/lib/pulp_container_client/models/remove_image.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
- data/lib/pulp_container_client/models/repair.rb +30 -22
- data/lib/pulp_container_client/models/repository_sign.rb +36 -24
- data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_container_client/models/set_label.rb +34 -22
- data/lib/pulp_container_client/models/set_label_response.rb +34 -22
- data/lib/pulp_container_client/models/tag_copy.rb +31 -23
- data/lib/pulp_container_client/models/tag_image.rb +34 -22
- data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
- data/lib/pulp_container_client/models/unset_label.rb +32 -22
- data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_container_client/version.rb +2 -2
- data/lib/pulp_container_client.rb +2 -3
- data/pulp_container_client.gemspec +9 -6
- data/spec/api/content_blobs_api_spec.rb +3 -3
- data/spec/api/content_manifests_api_spec.rb +3 -3
- data/spec/api/content_signatures_api_spec.rb +3 -3
- data/spec/api/content_tags_api_spec.rb +3 -3
- data/spec/api/distributions_container_api_spec.rb +13 -13
- data/spec/api/distributions_pull_through_api_spec.rb +13 -13
- data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
- data/spec/api/remotes_container_api_spec.rb +20 -19
- data/spec/api/remotes_pull_through_api_spec.rb +20 -19
- data/spec/api/repositories_container_api_spec.rb +22 -22
- data/spec/api/repositories_container_push_api_spec.rb +14 -14
- data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
- data/spec/api/repositories_container_versions_api_spec.rb +12 -11
- data/spec/api/token_api_spec.rb +2 -2
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/container_blob_response_spec.rb +12 -17
- data/spec/models/container_container_distribution_response_spec.rb +34 -39
- data/spec/models/container_container_distribution_spec.rb +20 -25
- data/spec/models/container_container_namespace_response_spec.rb +11 -16
- data/spec/models/container_container_namespace_spec.rb +7 -12
- data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
- data/spec/models/container_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
- data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/container_container_push_repository_response_spec.rb +28 -33
- data/spec/models/container_container_push_repository_spec.rb +15 -20
- data/spec/models/container_container_remote_response_spec.rb +31 -36
- data/spec/models/container_container_remote_spec.rb +31 -36
- data/spec/models/container_container_repository_response_spec.rb +18 -23
- data/spec/models/container_container_repository_spec.rb +12 -17
- data/spec/models/container_manifest_response_spec.rb +24 -29
- data/spec/models/container_manifest_signature_response_spec.rb +17 -22
- data/spec/models/container_repository_sync_url_spec.rb +9 -14
- data/spec/models/container_tag_response_spec.rb +12 -17
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/manifest_copy_spec.rb +10 -15
- data/spec/models/media_types_enum_spec.rb +6 -11
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
- data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -25
- data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
- data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
- data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
- data/spec/models/policy692_enum_spec.rb +6 -11
- data/spec/models/policy7e0_enum_spec.rb +6 -11
- data/spec/models/recursive_manage_spec.rb +7 -12
- data/spec/models/remove_image_spec.rb +7 -12
- data/spec/models/remove_signatures_response_spec.rb +7 -12
- data/spec/models/remove_signatures_spec.rb +7 -12
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_sign_spec.rb +9 -14
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/tag_copy_spec.rb +9 -14
- data/spec/models/tag_image_spec.rb +8 -13
- data/spec/models/un_tag_image_spec.rb +7 -12
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +105 -85
- data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
- data/docs/OCIBuildImage.md +0 -23
- data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/oci_build_image_spec.rb +0 -59
@@ -6,11 +6,12 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpContainerClient
|
16
17
|
# Serializer for ContainerNamespaces.
|
@@ -24,6 +25,11 @@ module PulpContainerClient
|
|
24
25
|
}
|
25
26
|
end
|
26
27
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
27
33
|
# Attribute type mapping.
|
28
34
|
def self.openapi_types
|
29
35
|
{
|
@@ -54,12 +60,15 @@ module PulpContainerClient
|
|
54
60
|
|
55
61
|
if attributes.key?(:'name')
|
56
62
|
self.name = attributes[:'name']
|
63
|
+
else
|
64
|
+
self.name = nil
|
57
65
|
end
|
58
66
|
end
|
59
67
|
|
60
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
61
69
|
# @return Array for valid properties with the reasons
|
62
70
|
def list_invalid_properties
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
63
72
|
invalid_properties = Array.new
|
64
73
|
if @name.nil?
|
65
74
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -75,6 +84,7 @@ module PulpContainerClient
|
|
75
84
|
# Check to see if the all the properties in the model are valid
|
76
85
|
# @return true if the model is valid
|
77
86
|
def valid?
|
87
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
78
88
|
return false if @name.nil?
|
79
89
|
return false if @name.to_s.length < 1
|
80
90
|
true
|
@@ -118,37 +128,33 @@ module PulpContainerClient
|
|
118
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
129
|
# @return [Object] Returns the model itself
|
120
130
|
def self.build_from_hash(attributes)
|
121
|
-
new.build_from_hash(attributes)
|
122
|
-
end
|
123
|
-
|
124
|
-
# Builds the object from hash
|
125
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
-
# @return [Object] Returns the model itself
|
127
|
-
def build_from_hash(attributes)
|
128
131
|
return nil unless attributes.is_a?(Hash)
|
129
|
-
|
130
|
-
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
131
138
|
# check to ensure the input is an array given that the attribute
|
132
139
|
# is documented as an array but the input is not
|
133
|
-
if attributes[
|
134
|
-
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
142
|
end
|
136
|
-
elsif !attributes[
|
137
|
-
|
138
|
-
end
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
145
|
+
end
|
139
146
|
end
|
140
|
-
|
141
|
-
self
|
147
|
+
new(transformed_hash)
|
142
148
|
end
|
143
149
|
|
144
150
|
# Deserializes the data based on type
|
145
151
|
# @param string type Data type
|
146
152
|
# @param string value Value to be deserialized
|
147
153
|
# @return [Object] Deserialized data
|
148
|
-
def _deserialize(type, value)
|
154
|
+
def self._deserialize(type, value)
|
149
155
|
case type.to_sym
|
150
|
-
when :
|
151
|
-
|
156
|
+
when :Time
|
157
|
+
Time.parse(value)
|
152
158
|
when :Date
|
153
159
|
Date.parse(value)
|
154
160
|
when :String
|
@@ -178,7 +184,9 @@ module PulpContainerClient
|
|
178
184
|
end
|
179
185
|
end
|
180
186
|
else # model
|
181
|
-
|
187
|
+
# models (e.g. Pet) or oneOf
|
188
|
+
klass = PulpContainerClient.const_get(type)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
190
|
end
|
183
191
|
end
|
184
192
|
|
@@ -204,7 +212,7 @@ module PulpContainerClient
|
|
204
212
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
213
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
214
|
end
|
207
|
-
|
215
|
+
|
208
216
|
hash[param] = _to_hash(value)
|
209
217
|
end
|
210
218
|
hash
|
@@ -227,5 +235,7 @@ module PulpContainerClient
|
|
227
235
|
value
|
228
236
|
end
|
229
237
|
end
|
238
|
+
|
230
239
|
end
|
240
|
+
|
231
241
|
end
|
@@ -6,11 +6,12 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpContainerClient
|
16
17
|
# Serializer for ContainerNamespaces.
|
@@ -39,13 +40,18 @@ module PulpContainerClient
|
|
39
40
|
}
|
40
41
|
end
|
41
42
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
44
|
+
def self.acceptable_attributes
|
45
|
+
attribute_map.values
|
46
|
+
end
|
47
|
+
|
42
48
|
# Attribute type mapping.
|
43
49
|
def self.openapi_types
|
44
50
|
{
|
45
51
|
:'pulp_href' => :'String',
|
46
52
|
:'prn' => :'String',
|
47
|
-
:'pulp_created' => :'
|
48
|
-
:'pulp_last_updated' => :'
|
53
|
+
:'pulp_created' => :'Time',
|
54
|
+
:'pulp_last_updated' => :'Time',
|
49
55
|
:'name' => :'String'
|
50
56
|
}
|
51
57
|
end
|
@@ -89,12 +95,15 @@ module PulpContainerClient
|
|
89
95
|
|
90
96
|
if attributes.key?(:'name')
|
91
97
|
self.name = attributes[:'name']
|
98
|
+
else
|
99
|
+
self.name = nil
|
92
100
|
end
|
93
101
|
end
|
94
102
|
|
95
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
96
104
|
# @return Array for valid properties with the reasons
|
97
105
|
def list_invalid_properties
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
98
107
|
invalid_properties = Array.new
|
99
108
|
if @name.nil?
|
100
109
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -106,6 +115,7 @@ module PulpContainerClient
|
|
106
115
|
# Check to see if the all the properties in the model are valid
|
107
116
|
# @return true if the model is valid
|
108
117
|
def valid?
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
119
|
return false if @name.nil?
|
110
120
|
true
|
111
121
|
end
|
@@ -138,37 +148,33 @@ module PulpContainerClient
|
|
138
148
|
# @param [Hash] attributes Model attributes in the form of hash
|
139
149
|
# @return [Object] Returns the model itself
|
140
150
|
def self.build_from_hash(attributes)
|
141
|
-
new.build_from_hash(attributes)
|
142
|
-
end
|
143
|
-
|
144
|
-
# Builds the object from hash
|
145
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
146
|
-
# @return [Object] Returns the model itself
|
147
|
-
def build_from_hash(attributes)
|
148
151
|
return nil unless attributes.is_a?(Hash)
|
149
|
-
|
150
|
-
|
152
|
+
attributes = attributes.transform_keys(&:to_sym)
|
153
|
+
transformed_hash = {}
|
154
|
+
openapi_types.each_pair do |key, type|
|
155
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = nil
|
157
|
+
elsif type =~ /\AArray<(.*)>/i
|
151
158
|
# check to ensure the input is an array given that the attribute
|
152
159
|
# is documented as an array but the input is not
|
153
|
-
if attributes[
|
154
|
-
|
160
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
161
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
155
162
|
end
|
156
|
-
elsif !attributes[
|
157
|
-
|
158
|
-
end
|
163
|
+
elsif !attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
165
|
+
end
|
159
166
|
end
|
160
|
-
|
161
|
-
self
|
167
|
+
new(transformed_hash)
|
162
168
|
end
|
163
169
|
|
164
170
|
# Deserializes the data based on type
|
165
171
|
# @param string type Data type
|
166
172
|
# @param string value Value to be deserialized
|
167
173
|
# @return [Object] Deserialized data
|
168
|
-
def _deserialize(type, value)
|
174
|
+
def self._deserialize(type, value)
|
169
175
|
case type.to_sym
|
170
|
-
when :
|
171
|
-
|
176
|
+
when :Time
|
177
|
+
Time.parse(value)
|
172
178
|
when :Date
|
173
179
|
Date.parse(value)
|
174
180
|
when :String
|
@@ -198,7 +204,9 @@ module PulpContainerClient
|
|
198
204
|
end
|
199
205
|
end
|
200
206
|
else # model
|
201
|
-
|
207
|
+
# models (e.g. Pet) or oneOf
|
208
|
+
klass = PulpContainerClient.const_get(type)
|
209
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
210
|
end
|
203
211
|
end
|
204
212
|
|
@@ -224,7 +232,7 @@ module PulpContainerClient
|
|
224
232
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
225
233
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
226
234
|
end
|
227
|
-
|
235
|
+
|
228
236
|
hash[param] = _to_hash(value)
|
229
237
|
end
|
230
238
|
hash
|
@@ -247,5 +255,7 @@ module PulpContainerClient
|
|
247
255
|
value
|
248
256
|
end
|
249
257
|
end
|
258
|
+
|
250
259
|
end
|
260
|
+
|
251
261
|
end
|
@@ -6,32 +6,33 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpContainerClient
|
16
17
|
# A serializer for a specialized pull-through distribution referencing sub-distributions.
|
17
18
|
class ContainerContainerPullThroughDistribution
|
18
|
-
# A unique name. Ex, `rawhide` and `stable`.
|
19
|
-
attr_accessor :name
|
20
|
-
|
21
|
-
# The latest RepositoryVersion for this Repository will be served.
|
22
|
-
attr_accessor :repository
|
23
|
-
|
24
19
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
25
20
|
attr_accessor :base_path
|
26
21
|
|
27
22
|
attr_accessor :pulp_labels
|
28
23
|
|
29
|
-
#
|
30
|
-
attr_accessor :
|
24
|
+
# A unique name. Ex, `rawhide` and `stable`.
|
25
|
+
attr_accessor :name
|
31
26
|
|
32
27
|
# Whether this distribution should be shown in the content app.
|
33
28
|
attr_accessor :hidden
|
34
29
|
|
30
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
31
|
+
attr_accessor :content_guard
|
32
|
+
|
33
|
+
# The latest RepositoryVersion for this Repository will be served.
|
34
|
+
attr_accessor :repository
|
35
|
+
|
35
36
|
# Remote that can be used to fetch content when using pull-through caching.
|
36
37
|
attr_accessor :remote
|
37
38
|
|
@@ -47,12 +48,12 @@ module PulpContainerClient
|
|
47
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
49
|
def self.attribute_map
|
49
50
|
{
|
50
|
-
:'name' => :'name',
|
51
|
-
:'repository' => :'repository',
|
52
51
|
:'base_path' => :'base_path',
|
53
52
|
:'pulp_labels' => :'pulp_labels',
|
54
|
-
:'
|
53
|
+
:'name' => :'name',
|
55
54
|
:'hidden' => :'hidden',
|
55
|
+
:'content_guard' => :'content_guard',
|
56
|
+
:'repository' => :'repository',
|
56
57
|
:'remote' => :'remote',
|
57
58
|
:'distributions' => :'distributions',
|
58
59
|
:'private' => :'private',
|
@@ -60,15 +61,20 @@ module PulpContainerClient
|
|
60
61
|
}
|
61
62
|
end
|
62
63
|
|
64
|
+
# Returns all the JSON keys this model knows about
|
65
|
+
def self.acceptable_attributes
|
66
|
+
attribute_map.values
|
67
|
+
end
|
68
|
+
|
63
69
|
# Attribute type mapping.
|
64
70
|
def self.openapi_types
|
65
71
|
{
|
66
|
-
:'name' => :'String',
|
67
|
-
:'repository' => :'String',
|
68
72
|
:'base_path' => :'String',
|
69
73
|
:'pulp_labels' => :'Hash<String, String>',
|
70
|
-
:'
|
74
|
+
:'name' => :'String',
|
71
75
|
:'hidden' => :'Boolean',
|
76
|
+
:'content_guard' => :'String',
|
77
|
+
:'repository' => :'String',
|
72
78
|
:'remote' => :'String',
|
73
79
|
:'distributions' => :'Array<String>',
|
74
80
|
:'private' => :'Boolean',
|
@@ -99,16 +105,10 @@ module PulpContainerClient
|
|
99
105
|
h[k.to_sym] = v
|
100
106
|
}
|
101
107
|
|
102
|
-
if attributes.key?(:'name')
|
103
|
-
self.name = attributes[:'name']
|
104
|
-
end
|
105
|
-
|
106
|
-
if attributes.key?(:'repository')
|
107
|
-
self.repository = attributes[:'repository']
|
108
|
-
end
|
109
|
-
|
110
108
|
if attributes.key?(:'base_path')
|
111
109
|
self.base_path = attributes[:'base_path']
|
110
|
+
else
|
111
|
+
self.base_path = nil
|
112
112
|
end
|
113
113
|
|
114
114
|
if attributes.key?(:'pulp_labels')
|
@@ -117,8 +117,10 @@ module PulpContainerClient
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
if attributes.key?(:'
|
121
|
-
self.
|
120
|
+
if attributes.key?(:'name')
|
121
|
+
self.name = attributes[:'name']
|
122
|
+
else
|
123
|
+
self.name = nil
|
122
124
|
end
|
123
125
|
|
124
126
|
if attributes.key?(:'hidden')
|
@@ -127,8 +129,18 @@ module PulpContainerClient
|
|
127
129
|
self.hidden = false
|
128
130
|
end
|
129
131
|
|
132
|
+
if attributes.key?(:'content_guard')
|
133
|
+
self.content_guard = attributes[:'content_guard']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'repository')
|
137
|
+
self.repository = attributes[:'repository']
|
138
|
+
end
|
139
|
+
|
130
140
|
if attributes.key?(:'remote')
|
131
141
|
self.remote = attributes[:'remote']
|
142
|
+
else
|
143
|
+
self.remote = nil
|
132
144
|
end
|
133
145
|
|
134
146
|
if attributes.key?(:'distributions')
|
@@ -149,15 +161,8 @@ module PulpContainerClient
|
|
149
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
150
162
|
# @return Array for valid properties with the reasons
|
151
163
|
def list_invalid_properties
|
164
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
152
165
|
invalid_properties = Array.new
|
153
|
-
if @name.nil?
|
154
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
155
|
-
end
|
156
|
-
|
157
|
-
if @name.to_s.length < 1
|
158
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
159
|
-
end
|
160
|
-
|
161
166
|
if @base_path.nil?
|
162
167
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
163
168
|
end
|
@@ -166,6 +171,14 @@ module PulpContainerClient
|
|
166
171
|
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
167
172
|
end
|
168
173
|
|
174
|
+
if @name.nil?
|
175
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @name.to_s.length < 1
|
179
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
180
|
+
end
|
181
|
+
|
169
182
|
if @remote.nil?
|
170
183
|
invalid_properties.push('invalid value for "remote", remote cannot be nil.')
|
171
184
|
end
|
@@ -180,29 +193,16 @@ module PulpContainerClient
|
|
180
193
|
# Check to see if the all the properties in the model are valid
|
181
194
|
# @return true if the model is valid
|
182
195
|
def valid?
|
183
|
-
|
184
|
-
return false if @name.to_s.length < 1
|
196
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
185
197
|
return false if @base_path.nil?
|
186
198
|
return false if @base_path.to_s.length < 1
|
199
|
+
return false if @name.nil?
|
200
|
+
return false if @name.to_s.length < 1
|
187
201
|
return false if @remote.nil?
|
188
202
|
return false if !@description.nil? && @description.to_s.length < 1
|
189
203
|
true
|
190
204
|
end
|
191
205
|
|
192
|
-
# Custom attribute writer method with validation
|
193
|
-
# @param [Object] name Value to be assigned
|
194
|
-
def name=(name)
|
195
|
-
if name.nil?
|
196
|
-
fail ArgumentError, 'name cannot be nil'
|
197
|
-
end
|
198
|
-
|
199
|
-
if name.to_s.length < 1
|
200
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
201
|
-
end
|
202
|
-
|
203
|
-
@name = name
|
204
|
-
end
|
205
|
-
|
206
206
|
# Custom attribute writer method with validation
|
207
207
|
# @param [Object] base_path Value to be assigned
|
208
208
|
def base_path=(base_path)
|
@@ -217,6 +217,20 @@ module PulpContainerClient
|
|
217
217
|
@base_path = base_path
|
218
218
|
end
|
219
219
|
|
220
|
+
# Custom attribute writer method with validation
|
221
|
+
# @param [Object] name Value to be assigned
|
222
|
+
def name=(name)
|
223
|
+
if name.nil?
|
224
|
+
fail ArgumentError, 'name cannot be nil'
|
225
|
+
end
|
226
|
+
|
227
|
+
if name.to_s.length < 1
|
228
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
229
|
+
end
|
230
|
+
|
231
|
+
@name = name
|
232
|
+
end
|
233
|
+
|
220
234
|
# Custom attribute writer method with validation
|
221
235
|
# @param [Object] description Value to be assigned
|
222
236
|
def description=(description)
|
@@ -232,12 +246,12 @@ module PulpContainerClient
|
|
232
246
|
def ==(o)
|
233
247
|
return true if self.equal?(o)
|
234
248
|
self.class == o.class &&
|
235
|
-
name == o.name &&
|
236
|
-
repository == o.repository &&
|
237
249
|
base_path == o.base_path &&
|
238
250
|
pulp_labels == o.pulp_labels &&
|
239
|
-
|
251
|
+
name == o.name &&
|
240
252
|
hidden == o.hidden &&
|
253
|
+
content_guard == o.content_guard &&
|
254
|
+
repository == o.repository &&
|
241
255
|
remote == o.remote &&
|
242
256
|
distributions == o.distributions &&
|
243
257
|
private == o.private &&
|
@@ -253,44 +267,40 @@ module PulpContainerClient
|
|
253
267
|
# Calculates hash code according to all attributes.
|
254
268
|
# @return [Integer] Hash code
|
255
269
|
def hash
|
256
|
-
[
|
270
|
+
[base_path, pulp_labels, name, hidden, content_guard, repository, remote, distributions, private, description].hash
|
257
271
|
end
|
258
272
|
|
259
273
|
# Builds the object from hash
|
260
274
|
# @param [Hash] attributes Model attributes in the form of hash
|
261
275
|
# @return [Object] Returns the model itself
|
262
276
|
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
277
|
return nil unless attributes.is_a?(Hash)
|
271
|
-
|
272
|
-
|
278
|
+
attributes = attributes.transform_keys(&:to_sym)
|
279
|
+
transformed_hash = {}
|
280
|
+
openapi_types.each_pair do |key, type|
|
281
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
282
|
+
transformed_hash["#{key}"] = nil
|
283
|
+
elsif type =~ /\AArray<(.*)>/i
|
273
284
|
# check to ensure the input is an array given that the attribute
|
274
285
|
# is documented as an array but the input is not
|
275
|
-
if attributes[
|
276
|
-
|
286
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
287
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
277
288
|
end
|
278
|
-
elsif !attributes[
|
279
|
-
|
280
|
-
end
|
289
|
+
elsif !attributes[attribute_map[key]].nil?
|
290
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
291
|
+
end
|
281
292
|
end
|
282
|
-
|
283
|
-
self
|
293
|
+
new(transformed_hash)
|
284
294
|
end
|
285
295
|
|
286
296
|
# Deserializes the data based on type
|
287
297
|
# @param string type Data type
|
288
298
|
# @param string value Value to be deserialized
|
289
299
|
# @return [Object] Deserialized data
|
290
|
-
def _deserialize(type, value)
|
300
|
+
def self._deserialize(type, value)
|
291
301
|
case type.to_sym
|
292
|
-
when :
|
293
|
-
|
302
|
+
when :Time
|
303
|
+
Time.parse(value)
|
294
304
|
when :Date
|
295
305
|
Date.parse(value)
|
296
306
|
when :String
|
@@ -320,7 +330,9 @@ module PulpContainerClient
|
|
320
330
|
end
|
321
331
|
end
|
322
332
|
else # model
|
323
|
-
|
333
|
+
# models (e.g. Pet) or oneOf
|
334
|
+
klass = PulpContainerClient.const_get(type)
|
335
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
324
336
|
end
|
325
337
|
end
|
326
338
|
|
@@ -346,7 +358,7 @@ module PulpContainerClient
|
|
346
358
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
347
359
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
348
360
|
end
|
349
|
-
|
361
|
+
|
350
362
|
hash[param] = _to_hash(value)
|
351
363
|
end
|
352
364
|
hash
|
@@ -369,5 +381,7 @@ module PulpContainerClient
|
|
369
381
|
value
|
370
382
|
end
|
371
383
|
end
|
384
|
+
|
372
385
|
end
|
386
|
+
|
373
387
|
end
|