pulp_container_client 2.22.0 → 2.23.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 +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 +55 -43
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +76 -64
- 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 +57 -43
- data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +78 -64
- data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +76 -42
- data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +79 -45
- 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 +80 -70
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +101 -91
- data/lib/pulp_container_client/models/container_container_remote.rb +83 -43
- data/lib/pulp_container_client/models/container_container_remote_response.rb +81 -45
- 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 +61 -45
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +61 -45
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +82 -44
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +83 -71
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +92 -46
- 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 +19 -24
- 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 +20 -25
- 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 +16 -21
- 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 +19 -24
- data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +20 -25
- data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +16 -21
- 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 +108 -88
- 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
|
# A Serializer for ContainerRemote.
|
|
@@ -89,6 +90,28 @@ module PulpContainerClient
|
|
|
89
90
|
# A URL to a sigstore to download image signatures from
|
|
90
91
|
attr_accessor :sigstore
|
|
91
92
|
|
|
93
|
+
class EnumAttributeValidator
|
|
94
|
+
attr_reader :datatype
|
|
95
|
+
attr_reader :allowable_values
|
|
96
|
+
|
|
97
|
+
def initialize(datatype, allowable_values)
|
|
98
|
+
@allowable_values = allowable_values.map do |value|
|
|
99
|
+
case datatype.to_s
|
|
100
|
+
when /Integer/i
|
|
101
|
+
value.to_i
|
|
102
|
+
when /Float/i
|
|
103
|
+
value.to_f
|
|
104
|
+
else
|
|
105
|
+
value
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def valid?(value)
|
|
111
|
+
!value || allowable_values.include?(value)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
92
115
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
93
116
|
def self.attribute_map
|
|
94
117
|
{
|
|
@@ -120,6 +143,11 @@ module PulpContainerClient
|
|
|
120
143
|
}
|
|
121
144
|
end
|
|
122
145
|
|
|
146
|
+
# Returns all the JSON keys this model knows about
|
|
147
|
+
def self.acceptable_attributes
|
|
148
|
+
attribute_map.values
|
|
149
|
+
end
|
|
150
|
+
|
|
123
151
|
# Attribute type mapping.
|
|
124
152
|
def self.openapi_types
|
|
125
153
|
{
|
|
@@ -191,10 +219,14 @@ module PulpContainerClient
|
|
|
191
219
|
|
|
192
220
|
if attributes.key?(:'name')
|
|
193
221
|
self.name = attributes[:'name']
|
|
222
|
+
else
|
|
223
|
+
self.name = nil
|
|
194
224
|
end
|
|
195
225
|
|
|
196
226
|
if attributes.key?(:'url')
|
|
197
227
|
self.url = attributes[:'url']
|
|
228
|
+
else
|
|
229
|
+
self.url = nil
|
|
198
230
|
end
|
|
199
231
|
|
|
200
232
|
if attributes.key?(:'ca_cert')
|
|
@@ -279,6 +311,8 @@ module PulpContainerClient
|
|
|
279
311
|
|
|
280
312
|
if attributes.key?(:'upstream_name')
|
|
281
313
|
self.upstream_name = attributes[:'upstream_name']
|
|
314
|
+
else
|
|
315
|
+
self.upstream_name = nil
|
|
282
316
|
end
|
|
283
317
|
|
|
284
318
|
if attributes.key?(:'include_tags')
|
|
@@ -301,6 +335,7 @@ module PulpContainerClient
|
|
|
301
335
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
302
336
|
# @return Array for valid properties with the reasons
|
|
303
337
|
def list_invalid_properties
|
|
338
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
304
339
|
invalid_properties = Array.new
|
|
305
340
|
if @name.nil?
|
|
306
341
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
@@ -354,20 +389,20 @@ module PulpContainerClient
|
|
|
354
389
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
355
390
|
end
|
|
356
391
|
|
|
357
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
|
358
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
|
392
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
393
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
359
394
|
end
|
|
360
395
|
|
|
361
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
|
362
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
|
396
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
397
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
|
363
398
|
end
|
|
364
399
|
|
|
365
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
366
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
|
400
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
401
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
|
367
402
|
end
|
|
368
403
|
|
|
369
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
370
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
|
404
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
405
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
371
406
|
end
|
|
372
407
|
|
|
373
408
|
if @upstream_name.nil?
|
|
@@ -388,6 +423,7 @@ module PulpContainerClient
|
|
|
388
423
|
# Check to see if the all the properties in the model are valid
|
|
389
424
|
# @return true if the model is valid
|
|
390
425
|
def valid?
|
|
426
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
391
427
|
return false if @name.nil?
|
|
392
428
|
return false if @name.to_s.length < 1
|
|
393
429
|
return false if @url.nil?
|
|
@@ -401,10 +437,10 @@ module PulpContainerClient
|
|
|
401
437
|
return false if !@username.nil? && @username.to_s.length < 1
|
|
402
438
|
return false if !@password.nil? && @password.to_s.length < 1
|
|
403
439
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
404
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
|
405
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
|
406
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
407
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
440
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
441
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
442
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
443
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
408
444
|
return false if @upstream_name.nil?
|
|
409
445
|
return false if @upstream_name.to_s.length < 1
|
|
410
446
|
return false if !@sigstore.nil? && @sigstore.to_s.length < 1
|
|
@@ -532,8 +568,8 @@ module PulpContainerClient
|
|
|
532
568
|
# Custom attribute writer method with validation
|
|
533
569
|
# @param [Object] total_timeout Value to be assigned
|
|
534
570
|
def total_timeout=(total_timeout)
|
|
535
|
-
if !total_timeout.nil? && total_timeout < 0
|
|
536
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
|
571
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
|
572
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
|
537
573
|
end
|
|
538
574
|
|
|
539
575
|
@total_timeout = total_timeout
|
|
@@ -542,8 +578,8 @@ module PulpContainerClient
|
|
|
542
578
|
# Custom attribute writer method with validation
|
|
543
579
|
# @param [Object] connect_timeout Value to be assigned
|
|
544
580
|
def connect_timeout=(connect_timeout)
|
|
545
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
|
546
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
|
581
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
|
582
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
|
547
583
|
end
|
|
548
584
|
|
|
549
585
|
@connect_timeout = connect_timeout
|
|
@@ -552,8 +588,8 @@ module PulpContainerClient
|
|
|
552
588
|
# Custom attribute writer method with validation
|
|
553
589
|
# @param [Object] sock_connect_timeout Value to be assigned
|
|
554
590
|
def sock_connect_timeout=(sock_connect_timeout)
|
|
555
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
|
556
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
|
591
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
|
592
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
|
557
593
|
end
|
|
558
594
|
|
|
559
595
|
@sock_connect_timeout = sock_connect_timeout
|
|
@@ -562,8 +598,8 @@ module PulpContainerClient
|
|
|
562
598
|
# Custom attribute writer method with validation
|
|
563
599
|
# @param [Object] sock_read_timeout Value to be assigned
|
|
564
600
|
def sock_read_timeout=(sock_read_timeout)
|
|
565
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
|
566
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
|
601
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
|
602
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
|
567
603
|
end
|
|
568
604
|
|
|
569
605
|
@sock_read_timeout = sock_read_timeout
|
|
@@ -586,7 +622,11 @@ module PulpContainerClient
|
|
|
586
622
|
# Custom attribute writer method with validation
|
|
587
623
|
# @param [Object] sigstore Value to be assigned
|
|
588
624
|
def sigstore=(sigstore)
|
|
589
|
-
if
|
|
625
|
+
if sigstore.nil?
|
|
626
|
+
fail ArgumentError, 'sigstore cannot be nil'
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
if sigstore.to_s.length < 1
|
|
590
630
|
fail ArgumentError, 'invalid value for "sigstore", the character length must be great than or equal to 1.'
|
|
591
631
|
end
|
|
592
632
|
|
|
@@ -641,37 +681,33 @@ module PulpContainerClient
|
|
|
641
681
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
642
682
|
# @return [Object] Returns the model itself
|
|
643
683
|
def self.build_from_hash(attributes)
|
|
644
|
-
new.build_from_hash(attributes)
|
|
645
|
-
end
|
|
646
|
-
|
|
647
|
-
# Builds the object from hash
|
|
648
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
649
|
-
# @return [Object] Returns the model itself
|
|
650
|
-
def build_from_hash(attributes)
|
|
651
684
|
return nil unless attributes.is_a?(Hash)
|
|
652
|
-
|
|
653
|
-
|
|
685
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
686
|
+
transformed_hash = {}
|
|
687
|
+
openapi_types.each_pair do |key, type|
|
|
688
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
689
|
+
transformed_hash["#{key}"] = nil
|
|
690
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
654
691
|
# check to ensure the input is an array given that the attribute
|
|
655
692
|
# is documented as an array but the input is not
|
|
656
|
-
if attributes[
|
|
657
|
-
|
|
693
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
694
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
658
695
|
end
|
|
659
|
-
elsif !attributes[
|
|
660
|
-
|
|
661
|
-
end
|
|
696
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
697
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
698
|
+
end
|
|
662
699
|
end
|
|
663
|
-
|
|
664
|
-
self
|
|
700
|
+
new(transformed_hash)
|
|
665
701
|
end
|
|
666
702
|
|
|
667
703
|
# Deserializes the data based on type
|
|
668
704
|
# @param string type Data type
|
|
669
705
|
# @param string value Value to be deserialized
|
|
670
706
|
# @return [Object] Deserialized data
|
|
671
|
-
def _deserialize(type, value)
|
|
707
|
+
def self._deserialize(type, value)
|
|
672
708
|
case type.to_sym
|
|
673
|
-
when :
|
|
674
|
-
|
|
709
|
+
when :Time
|
|
710
|
+
Time.parse(value)
|
|
675
711
|
when :Date
|
|
676
712
|
Date.parse(value)
|
|
677
713
|
when :String
|
|
@@ -701,7 +737,9 @@ module PulpContainerClient
|
|
|
701
737
|
end
|
|
702
738
|
end
|
|
703
739
|
else # model
|
|
704
|
-
|
|
740
|
+
# models (e.g. Pet) or oneOf
|
|
741
|
+
klass = PulpContainerClient.const_get(type)
|
|
742
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
705
743
|
end
|
|
706
744
|
end
|
|
707
745
|
|
|
@@ -727,7 +765,7 @@ module PulpContainerClient
|
|
|
727
765
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
728
766
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
729
767
|
end
|
|
730
|
-
|
|
768
|
+
|
|
731
769
|
hash[param] = _to_hash(value)
|
|
732
770
|
end
|
|
733
771
|
hash
|
|
@@ -750,5 +788,7 @@ module PulpContainerClient
|
|
|
750
788
|
value
|
|
751
789
|
end
|
|
752
790
|
end
|
|
791
|
+
|
|
753
792
|
end
|
|
793
|
+
|
|
754
794
|
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
|
# A Serializer for ContainerRemote.
|
|
@@ -88,6 +89,28 @@ module PulpContainerClient
|
|
|
88
89
|
# A URL to a sigstore to download image signatures from
|
|
89
90
|
attr_accessor :sigstore
|
|
90
91
|
|
|
92
|
+
class EnumAttributeValidator
|
|
93
|
+
attr_reader :datatype
|
|
94
|
+
attr_reader :allowable_values
|
|
95
|
+
|
|
96
|
+
def initialize(datatype, allowable_values)
|
|
97
|
+
@allowable_values = allowable_values.map do |value|
|
|
98
|
+
case datatype.to_s
|
|
99
|
+
when /Integer/i
|
|
100
|
+
value.to_i
|
|
101
|
+
when /Float/i
|
|
102
|
+
value.to_f
|
|
103
|
+
else
|
|
104
|
+
value
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def valid?(value)
|
|
110
|
+
!value || allowable_values.include?(value)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
91
114
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
92
115
|
def self.attribute_map
|
|
93
116
|
{
|
|
@@ -119,13 +142,18 @@ module PulpContainerClient
|
|
|
119
142
|
}
|
|
120
143
|
end
|
|
121
144
|
|
|
145
|
+
# Returns all the JSON keys this model knows about
|
|
146
|
+
def self.acceptable_attributes
|
|
147
|
+
attribute_map.values
|
|
148
|
+
end
|
|
149
|
+
|
|
122
150
|
# Attribute type mapping.
|
|
123
151
|
def self.openapi_types
|
|
124
152
|
{
|
|
125
153
|
:'pulp_href' => :'String',
|
|
126
154
|
:'prn' => :'String',
|
|
127
|
-
:'pulp_created' => :'
|
|
128
|
-
:'pulp_last_updated' => :'
|
|
155
|
+
:'pulp_created' => :'Time',
|
|
156
|
+
:'pulp_last_updated' => :'Time',
|
|
129
157
|
:'name' => :'String',
|
|
130
158
|
:'url' => :'String',
|
|
131
159
|
:'ca_cert' => :'String',
|
|
@@ -142,7 +170,7 @@ module PulpContainerClient
|
|
|
142
170
|
:'sock_read_timeout' => :'Float',
|
|
143
171
|
:'headers' => :'Array<Object>',
|
|
144
172
|
:'rate_limit' => :'Integer',
|
|
145
|
-
:'hidden_fields' => :'Array<
|
|
173
|
+
:'hidden_fields' => :'Array<ContainerContainerPullThroughRemoteResponseHiddenFieldsInner>',
|
|
146
174
|
:'upstream_name' => :'String',
|
|
147
175
|
:'include_tags' => :'Array<String>',
|
|
148
176
|
:'exclude_tags' => :'Array<String>',
|
|
@@ -201,10 +229,14 @@ module PulpContainerClient
|
|
|
201
229
|
|
|
202
230
|
if attributes.key?(:'name')
|
|
203
231
|
self.name = attributes[:'name']
|
|
232
|
+
else
|
|
233
|
+
self.name = nil
|
|
204
234
|
end
|
|
205
235
|
|
|
206
236
|
if attributes.key?(:'url')
|
|
207
237
|
self.url = attributes[:'url']
|
|
238
|
+
else
|
|
239
|
+
self.url = nil
|
|
208
240
|
end
|
|
209
241
|
|
|
210
242
|
if attributes.key?(:'ca_cert')
|
|
@@ -275,6 +307,8 @@ module PulpContainerClient
|
|
|
275
307
|
|
|
276
308
|
if attributes.key?(:'upstream_name')
|
|
277
309
|
self.upstream_name = attributes[:'upstream_name']
|
|
310
|
+
else
|
|
311
|
+
self.upstream_name = nil
|
|
278
312
|
end
|
|
279
313
|
|
|
280
314
|
if attributes.key?(:'include_tags')
|
|
@@ -297,6 +331,7 @@ module PulpContainerClient
|
|
|
297
331
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
298
332
|
# @return Array for valid properties with the reasons
|
|
299
333
|
def list_invalid_properties
|
|
334
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
300
335
|
invalid_properties = Array.new
|
|
301
336
|
if @name.nil?
|
|
302
337
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
@@ -310,20 +345,20 @@ module PulpContainerClient
|
|
|
310
345
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
311
346
|
end
|
|
312
347
|
|
|
313
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
|
314
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
|
348
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
349
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
315
350
|
end
|
|
316
351
|
|
|
317
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
|
318
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
|
352
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
353
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
|
319
354
|
end
|
|
320
355
|
|
|
321
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
322
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
|
356
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
357
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
|
323
358
|
end
|
|
324
359
|
|
|
325
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
326
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
|
360
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
361
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
327
362
|
end
|
|
328
363
|
|
|
329
364
|
if @upstream_name.nil?
|
|
@@ -336,13 +371,14 @@ module PulpContainerClient
|
|
|
336
371
|
# Check to see if the all the properties in the model are valid
|
|
337
372
|
# @return true if the model is valid
|
|
338
373
|
def valid?
|
|
374
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
339
375
|
return false if @name.nil?
|
|
340
376
|
return false if @url.nil?
|
|
341
377
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
342
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
|
343
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
|
344
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
|
345
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
|
378
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
379
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
380
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
381
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
346
382
|
return false if @upstream_name.nil?
|
|
347
383
|
true
|
|
348
384
|
end
|
|
@@ -360,8 +396,8 @@ module PulpContainerClient
|
|
|
360
396
|
# Custom attribute writer method with validation
|
|
361
397
|
# @param [Object] total_timeout Value to be assigned
|
|
362
398
|
def total_timeout=(total_timeout)
|
|
363
|
-
if !total_timeout.nil? && total_timeout < 0
|
|
364
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
|
399
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
|
400
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
|
365
401
|
end
|
|
366
402
|
|
|
367
403
|
@total_timeout = total_timeout
|
|
@@ -370,8 +406,8 @@ module PulpContainerClient
|
|
|
370
406
|
# Custom attribute writer method with validation
|
|
371
407
|
# @param [Object] connect_timeout Value to be assigned
|
|
372
408
|
def connect_timeout=(connect_timeout)
|
|
373
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
|
374
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
|
409
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
|
410
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
|
375
411
|
end
|
|
376
412
|
|
|
377
413
|
@connect_timeout = connect_timeout
|
|
@@ -380,8 +416,8 @@ module PulpContainerClient
|
|
|
380
416
|
# Custom attribute writer method with validation
|
|
381
417
|
# @param [Object] sock_connect_timeout Value to be assigned
|
|
382
418
|
def sock_connect_timeout=(sock_connect_timeout)
|
|
383
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
|
384
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
|
419
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
|
420
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
|
385
421
|
end
|
|
386
422
|
|
|
387
423
|
@sock_connect_timeout = sock_connect_timeout
|
|
@@ -390,8 +426,8 @@ module PulpContainerClient
|
|
|
390
426
|
# Custom attribute writer method with validation
|
|
391
427
|
# @param [Object] sock_read_timeout Value to be assigned
|
|
392
428
|
def sock_read_timeout=(sock_read_timeout)
|
|
393
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
|
394
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
|
429
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
|
430
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
|
395
431
|
end
|
|
396
432
|
|
|
397
433
|
@sock_read_timeout = sock_read_timeout
|
|
@@ -445,37 +481,33 @@ module PulpContainerClient
|
|
|
445
481
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
446
482
|
# @return [Object] Returns the model itself
|
|
447
483
|
def self.build_from_hash(attributes)
|
|
448
|
-
new.build_from_hash(attributes)
|
|
449
|
-
end
|
|
450
|
-
|
|
451
|
-
# Builds the object from hash
|
|
452
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
453
|
-
# @return [Object] Returns the model itself
|
|
454
|
-
def build_from_hash(attributes)
|
|
455
484
|
return nil unless attributes.is_a?(Hash)
|
|
456
|
-
|
|
457
|
-
|
|
485
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
486
|
+
transformed_hash = {}
|
|
487
|
+
openapi_types.each_pair do |key, type|
|
|
488
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
489
|
+
transformed_hash["#{key}"] = nil
|
|
490
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
458
491
|
# check to ensure the input is an array given that the attribute
|
|
459
492
|
# is documented as an array but the input is not
|
|
460
|
-
if attributes[
|
|
461
|
-
|
|
493
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
494
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
462
495
|
end
|
|
463
|
-
elsif !attributes[
|
|
464
|
-
|
|
465
|
-
end
|
|
496
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
497
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
498
|
+
end
|
|
466
499
|
end
|
|
467
|
-
|
|
468
|
-
self
|
|
500
|
+
new(transformed_hash)
|
|
469
501
|
end
|
|
470
502
|
|
|
471
503
|
# Deserializes the data based on type
|
|
472
504
|
# @param string type Data type
|
|
473
505
|
# @param string value Value to be deserialized
|
|
474
506
|
# @return [Object] Deserialized data
|
|
475
|
-
def _deserialize(type, value)
|
|
507
|
+
def self._deserialize(type, value)
|
|
476
508
|
case type.to_sym
|
|
477
|
-
when :
|
|
478
|
-
|
|
509
|
+
when :Time
|
|
510
|
+
Time.parse(value)
|
|
479
511
|
when :Date
|
|
480
512
|
Date.parse(value)
|
|
481
513
|
when :String
|
|
@@ -505,7 +537,9 @@ module PulpContainerClient
|
|
|
505
537
|
end
|
|
506
538
|
end
|
|
507
539
|
else # model
|
|
508
|
-
|
|
540
|
+
# models (e.g. Pet) or oneOf
|
|
541
|
+
klass = PulpContainerClient.const_get(type)
|
|
542
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
509
543
|
end
|
|
510
544
|
end
|
|
511
545
|
|
|
@@ -531,7 +565,7 @@ module PulpContainerClient
|
|
|
531
565
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
532
566
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
533
567
|
end
|
|
534
|
-
|
|
568
|
+
|
|
535
569
|
hash[param] = _to_hash(value)
|
|
536
570
|
end
|
|
537
571
|
hash
|
|
@@ -554,5 +588,7 @@ module PulpContainerClient
|
|
|
554
588
|
value
|
|
555
589
|
end
|
|
556
590
|
end
|
|
591
|
+
|
|
557
592
|
end
|
|
593
|
+
|
|
558
594
|
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 Container Repositories.
|
|
@@ -44,6 +45,11 @@ module PulpContainerClient
|
|
|
44
45
|
}
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
47
53
|
# Attribute type mapping.
|
|
48
54
|
def self.openapi_types
|
|
49
55
|
{
|
|
@@ -89,6 +95,8 @@ 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
|
|
|
94
102
|
if attributes.key?(:'description')
|
|
@@ -111,6 +119,7 @@ module PulpContainerClient
|
|
|
111
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
120
|
# @return Array for valid properties with the reasons
|
|
113
121
|
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
123
|
invalid_properties = Array.new
|
|
115
124
|
if @name.nil?
|
|
116
125
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
@@ -134,6 +143,7 @@ module PulpContainerClient
|
|
|
134
143
|
# Check to see if the all the properties in the model are valid
|
|
135
144
|
# @return true if the model is valid
|
|
136
145
|
def valid?
|
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
147
|
return false if @name.nil?
|
|
138
148
|
return false if @name.to_s.length < 1
|
|
139
149
|
return false if !@description.nil? && @description.to_s.length < 1
|
|
@@ -204,37 +214,33 @@ module PulpContainerClient
|
|
|
204
214
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
215
|
# @return [Object] Returns the model itself
|
|
206
216
|
def self.build_from_hash(attributes)
|
|
207
|
-
new.build_from_hash(attributes)
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# Builds the object from hash
|
|
211
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
212
|
-
# @return [Object] Returns the model itself
|
|
213
|
-
def build_from_hash(attributes)
|
|
214
217
|
return nil unless attributes.is_a?(Hash)
|
|
215
|
-
|
|
216
|
-
|
|
218
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
219
|
+
transformed_hash = {}
|
|
220
|
+
openapi_types.each_pair do |key, type|
|
|
221
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
222
|
+
transformed_hash["#{key}"] = nil
|
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
217
224
|
# check to ensure the input is an array given that the attribute
|
|
218
225
|
# is documented as an array but the input is not
|
|
219
|
-
if attributes[
|
|
220
|
-
|
|
226
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
227
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
221
228
|
end
|
|
222
|
-
elsif !attributes[
|
|
223
|
-
|
|
224
|
-
end
|
|
229
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
230
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
231
|
+
end
|
|
225
232
|
end
|
|
226
|
-
|
|
227
|
-
self
|
|
233
|
+
new(transformed_hash)
|
|
228
234
|
end
|
|
229
235
|
|
|
230
236
|
# Deserializes the data based on type
|
|
231
237
|
# @param string type Data type
|
|
232
238
|
# @param string value Value to be deserialized
|
|
233
239
|
# @return [Object] Deserialized data
|
|
234
|
-
def _deserialize(type, value)
|
|
240
|
+
def self._deserialize(type, value)
|
|
235
241
|
case type.to_sym
|
|
236
|
-
when :
|
|
237
|
-
|
|
242
|
+
when :Time
|
|
243
|
+
Time.parse(value)
|
|
238
244
|
when :Date
|
|
239
245
|
Date.parse(value)
|
|
240
246
|
when :String
|
|
@@ -264,7 +270,9 @@ module PulpContainerClient
|
|
|
264
270
|
end
|
|
265
271
|
end
|
|
266
272
|
else # model
|
|
267
|
-
|
|
273
|
+
# models (e.g. Pet) or oneOf
|
|
274
|
+
klass = PulpContainerClient.const_get(type)
|
|
275
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
268
276
|
end
|
|
269
277
|
end
|
|
270
278
|
|
|
@@ -290,7 +298,7 @@ module PulpContainerClient
|
|
|
290
298
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
291
299
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
292
300
|
end
|
|
293
|
-
|
|
301
|
+
|
|
294
302
|
hash[param] = _to_hash(value)
|
|
295
303
|
end
|
|
296
304
|
hash
|
|
@@ -313,5 +321,7 @@ module PulpContainerClient
|
|
|
313
321
|
value
|
|
314
322
|
end
|
|
315
323
|
end
|
|
324
|
+
|
|
316
325
|
end
|
|
326
|
+
|
|
317
327
|
end
|