pulp_container_client 2.22.0 → 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 +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
|
{
|
@@ -301,6 +329,7 @@ module PulpContainerClient
|
|
301
329
|
# Show invalid properties with the reasons. Usually used together with valid?
|
302
330
|
# @return Array for valid properties with the reasons
|
303
331
|
def list_invalid_properties
|
332
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
304
333
|
invalid_properties = Array.new
|
305
334
|
if !@name.nil? && @name.to_s.length < 1
|
306
335
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -346,20 +375,20 @@ module PulpContainerClient
|
|
346
375
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
347
376
|
end
|
348
377
|
|
349
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
350
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
378
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
379
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
351
380
|
end
|
352
381
|
|
353
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
354
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
382
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
383
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
355
384
|
end
|
356
385
|
|
357
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
358
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
386
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
387
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
359
388
|
end
|
360
389
|
|
361
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
362
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
390
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
391
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
363
392
|
end
|
364
393
|
|
365
394
|
if !@upstream_name.nil? && @upstream_name.to_s.length < 1
|
@@ -376,6 +405,7 @@ module PulpContainerClient
|
|
376
405
|
# Check to see if the all the properties in the model are valid
|
377
406
|
# @return true if the model is valid
|
378
407
|
def valid?
|
408
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
379
409
|
return false if !@name.nil? && @name.to_s.length < 1
|
380
410
|
return false if !@url.nil? && @url.to_s.length < 1
|
381
411
|
return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
|
@@ -387,10 +417,10 @@ module PulpContainerClient
|
|
387
417
|
return false if !@username.nil? && @username.to_s.length < 1
|
388
418
|
return false if !@password.nil? && @password.to_s.length < 1
|
389
419
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
390
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
391
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
392
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
393
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
420
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
421
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
422
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
423
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
394
424
|
return false if !@upstream_name.nil? && @upstream_name.to_s.length < 1
|
395
425
|
return false if !@sigstore.nil? && @sigstore.to_s.length < 1
|
396
426
|
true
|
@@ -399,7 +429,11 @@ module PulpContainerClient
|
|
399
429
|
# Custom attribute writer method with validation
|
400
430
|
# @param [Object] name Value to be assigned
|
401
431
|
def name=(name)
|
402
|
-
if
|
432
|
+
if name.nil?
|
433
|
+
fail ArgumentError, 'name cannot be nil'
|
434
|
+
end
|
435
|
+
|
436
|
+
if name.to_s.length < 1
|
403
437
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
404
438
|
end
|
405
439
|
|
@@ -409,7 +443,11 @@ module PulpContainerClient
|
|
409
443
|
# Custom attribute writer method with validation
|
410
444
|
# @param [Object] url Value to be assigned
|
411
445
|
def url=(url)
|
412
|
-
if
|
446
|
+
if url.nil?
|
447
|
+
fail ArgumentError, 'url cannot be nil'
|
448
|
+
end
|
449
|
+
|
450
|
+
if url.to_s.length < 1
|
413
451
|
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
414
452
|
end
|
415
453
|
|
@@ -509,8 +547,8 @@ module PulpContainerClient
|
|
509
547
|
# Custom attribute writer method with validation
|
510
548
|
# @param [Object] total_timeout Value to be assigned
|
511
549
|
def total_timeout=(total_timeout)
|
512
|
-
if !total_timeout.nil? && total_timeout < 0
|
513
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
550
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
551
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
514
552
|
end
|
515
553
|
|
516
554
|
@total_timeout = total_timeout
|
@@ -519,8 +557,8 @@ module PulpContainerClient
|
|
519
557
|
# Custom attribute writer method with validation
|
520
558
|
# @param [Object] connect_timeout Value to be assigned
|
521
559
|
def connect_timeout=(connect_timeout)
|
522
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
523
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
560
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
561
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
524
562
|
end
|
525
563
|
|
526
564
|
@connect_timeout = connect_timeout
|
@@ -529,8 +567,8 @@ module PulpContainerClient
|
|
529
567
|
# Custom attribute writer method with validation
|
530
568
|
# @param [Object] sock_connect_timeout Value to be assigned
|
531
569
|
def sock_connect_timeout=(sock_connect_timeout)
|
532
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
533
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
570
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
571
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
534
572
|
end
|
535
573
|
|
536
574
|
@sock_connect_timeout = sock_connect_timeout
|
@@ -539,8 +577,8 @@ module PulpContainerClient
|
|
539
577
|
# Custom attribute writer method with validation
|
540
578
|
# @param [Object] sock_read_timeout Value to be assigned
|
541
579
|
def sock_read_timeout=(sock_read_timeout)
|
542
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
543
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
580
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
581
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
544
582
|
end
|
545
583
|
|
546
584
|
@sock_read_timeout = sock_read_timeout
|
@@ -549,7 +587,11 @@ module PulpContainerClient
|
|
549
587
|
# Custom attribute writer method with validation
|
550
588
|
# @param [Object] upstream_name Value to be assigned
|
551
589
|
def upstream_name=(upstream_name)
|
552
|
-
if
|
590
|
+
if upstream_name.nil?
|
591
|
+
fail ArgumentError, 'upstream_name cannot be nil'
|
592
|
+
end
|
593
|
+
|
594
|
+
if upstream_name.to_s.length < 1
|
553
595
|
fail ArgumentError, 'invalid value for "upstream_name", the character length must be great than or equal to 1.'
|
554
596
|
end
|
555
597
|
|
@@ -559,7 +601,11 @@ module PulpContainerClient
|
|
559
601
|
# Custom attribute writer method with validation
|
560
602
|
# @param [Object] sigstore Value to be assigned
|
561
603
|
def sigstore=(sigstore)
|
562
|
-
if
|
604
|
+
if sigstore.nil?
|
605
|
+
fail ArgumentError, 'sigstore cannot be nil'
|
606
|
+
end
|
607
|
+
|
608
|
+
if sigstore.to_s.length < 1
|
563
609
|
fail ArgumentError, 'invalid value for "sigstore", the character length must be great than or equal to 1.'
|
564
610
|
end
|
565
611
|
|
@@ -614,37 +660,33 @@ module PulpContainerClient
|
|
614
660
|
# @param [Hash] attributes Model attributes in the form of hash
|
615
661
|
# @return [Object] Returns the model itself
|
616
662
|
def self.build_from_hash(attributes)
|
617
|
-
new.build_from_hash(attributes)
|
618
|
-
end
|
619
|
-
|
620
|
-
# Builds the object from hash
|
621
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
622
|
-
# @return [Object] Returns the model itself
|
623
|
-
def build_from_hash(attributes)
|
624
663
|
return nil unless attributes.is_a?(Hash)
|
625
|
-
|
626
|
-
|
664
|
+
attributes = attributes.transform_keys(&:to_sym)
|
665
|
+
transformed_hash = {}
|
666
|
+
openapi_types.each_pair do |key, type|
|
667
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
668
|
+
transformed_hash["#{key}"] = nil
|
669
|
+
elsif type =~ /\AArray<(.*)>/i
|
627
670
|
# check to ensure the input is an array given that the attribute
|
628
671
|
# is documented as an array but the input is not
|
629
|
-
if attributes[
|
630
|
-
|
672
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
673
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
631
674
|
end
|
632
|
-
elsif !attributes[
|
633
|
-
|
634
|
-
end
|
675
|
+
elsif !attributes[attribute_map[key]].nil?
|
676
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
677
|
+
end
|
635
678
|
end
|
636
|
-
|
637
|
-
self
|
679
|
+
new(transformed_hash)
|
638
680
|
end
|
639
681
|
|
640
682
|
# Deserializes the data based on type
|
641
683
|
# @param string type Data type
|
642
684
|
# @param string value Value to be deserialized
|
643
685
|
# @return [Object] Deserialized data
|
644
|
-
def _deserialize(type, value)
|
686
|
+
def self._deserialize(type, value)
|
645
687
|
case type.to_sym
|
646
|
-
when :
|
647
|
-
|
688
|
+
when :Time
|
689
|
+
Time.parse(value)
|
648
690
|
when :Date
|
649
691
|
Date.parse(value)
|
650
692
|
when :String
|
@@ -674,7 +716,9 @@ module PulpContainerClient
|
|
674
716
|
end
|
675
717
|
end
|
676
718
|
else # model
|
677
|
-
|
719
|
+
# models (e.g. Pet) or oneOf
|
720
|
+
klass = PulpContainerClient.const_get(type)
|
721
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
678
722
|
end
|
679
723
|
end
|
680
724
|
|
@@ -700,7 +744,7 @@ module PulpContainerClient
|
|
700
744
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
701
745
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
702
746
|
end
|
703
|
-
|
747
|
+
|
704
748
|
hash[param] = _to_hash(value)
|
705
749
|
end
|
706
750
|
hash
|
@@ -723,5 +767,7 @@ module PulpContainerClient
|
|
723
767
|
value
|
724
768
|
end
|
725
769
|
end
|
770
|
+
|
726
771
|
end
|
772
|
+
|
727
773
|
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
|
{
|
@@ -111,6 +117,7 @@ module PulpContainerClient
|
|
111
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
118
|
# @return Array for valid properties with the reasons
|
113
119
|
def list_invalid_properties
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
121
|
invalid_properties = Array.new
|
115
122
|
if !@name.nil? && @name.to_s.length < 1
|
116
123
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -130,6 +137,7 @@ module PulpContainerClient
|
|
130
137
|
# Check to see if the all the properties in the model are valid
|
131
138
|
# @return true if the model is valid
|
132
139
|
def valid?
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
141
|
return false if !@name.nil? && @name.to_s.length < 1
|
134
142
|
return false if !@description.nil? && @description.to_s.length < 1
|
135
143
|
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
@@ -139,7 +147,11 @@ module PulpContainerClient
|
|
139
147
|
# Custom attribute writer method with validation
|
140
148
|
# @param [Object] name Value to be assigned
|
141
149
|
def name=(name)
|
142
|
-
if
|
150
|
+
if name.nil?
|
151
|
+
fail ArgumentError, 'name cannot be nil'
|
152
|
+
end
|
153
|
+
|
154
|
+
if name.to_s.length < 1
|
143
155
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
144
156
|
end
|
145
157
|
|
@@ -195,37 +207,33 @@ module PulpContainerClient
|
|
195
207
|
# @param [Hash] attributes Model attributes in the form of hash
|
196
208
|
# @return [Object] Returns the model itself
|
197
209
|
def self.build_from_hash(attributes)
|
198
|
-
new.build_from_hash(attributes)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Builds the object from hash
|
202
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
203
|
-
# @return [Object] Returns the model itself
|
204
|
-
def build_from_hash(attributes)
|
205
210
|
return nil unless attributes.is_a?(Hash)
|
206
|
-
|
207
|
-
|
211
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
|
+
transformed_hash = {}
|
213
|
+
openapi_types.each_pair do |key, type|
|
214
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
215
|
+
transformed_hash["#{key}"] = nil
|
216
|
+
elsif type =~ /\AArray<(.*)>/i
|
208
217
|
# check to ensure the input is an array given that the attribute
|
209
218
|
# is documented as an array but the input is not
|
210
|
-
if attributes[
|
211
|
-
|
219
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
220
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
212
221
|
end
|
213
|
-
elsif !attributes[
|
214
|
-
|
215
|
-
end
|
222
|
+
elsif !attributes[attribute_map[key]].nil?
|
223
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
224
|
+
end
|
216
225
|
end
|
217
|
-
|
218
|
-
self
|
226
|
+
new(transformed_hash)
|
219
227
|
end
|
220
228
|
|
221
229
|
# Deserializes the data based on type
|
222
230
|
# @param string type Data type
|
223
231
|
# @param string value Value to be deserialized
|
224
232
|
# @return [Object] Deserialized data
|
225
|
-
def _deserialize(type, value)
|
233
|
+
def self._deserialize(type, value)
|
226
234
|
case type.to_sym
|
227
|
-
when :
|
228
|
-
|
235
|
+
when :Time
|
236
|
+
Time.parse(value)
|
229
237
|
when :Date
|
230
238
|
Date.parse(value)
|
231
239
|
when :String
|
@@ -255,7 +263,9 @@ module PulpContainerClient
|
|
255
263
|
end
|
256
264
|
end
|
257
265
|
else # model
|
258
|
-
|
266
|
+
# models (e.g. Pet) or oneOf
|
267
|
+
klass = PulpContainerClient.const_get(type)
|
268
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
259
269
|
end
|
260
270
|
end
|
261
271
|
|
@@ -281,7 +291,7 @@ module PulpContainerClient
|
|
281
291
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
282
292
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
283
293
|
end
|
284
|
-
|
294
|
+
|
285
295
|
hash[param] = _to_hash(value)
|
286
296
|
end
|
287
297
|
hash
|
@@ -304,5 +314,7 @@ module PulpContainerClient
|
|
304
314
|
value
|
305
315
|
end
|
306
316
|
end
|
317
|
+
|
307
318
|
end
|
319
|
+
|
308
320
|
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
|
class Policy692Enum
|
@@ -18,6 +19,10 @@ module PulpContainerClient
|
|
18
19
|
ON_DEMAND = "on_demand".freeze
|
19
20
|
STREAMED = "streamed".freeze
|
20
21
|
|
22
|
+
def self.all_vars
|
23
|
+
@all_vars ||= [IMMEDIATE, ON_DEMAND, STREAMED].freeze
|
24
|
+
end
|
25
|
+
|
21
26
|
# Builds the enum from string
|
22
27
|
# @param [String] The enum value in the form of the string
|
23
28
|
# @return [String] The enum value
|
@@ -29,9 +34,8 @@ module PulpContainerClient
|
|
29
34
|
# @param [String] The enum value in the form of the string
|
30
35
|
# @return [String] The enum value
|
31
36
|
def build_from_hash(value)
|
32
|
-
|
33
|
-
raise "Invalid ENUM value #{value} for class #Policy692Enum"
|
34
|
-
value
|
37
|
+
return value if Policy692Enum.all_vars.include?(value)
|
38
|
+
raise "Invalid ENUM value #{value} for class #Policy692Enum"
|
35
39
|
end
|
36
40
|
end
|
37
41
|
end
|
@@ -6,16 +6,21 @@
|
|
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
|
class Policy7e0Enum
|
17
18
|
ON_DEMAND = "on_demand".freeze
|
18
19
|
|
20
|
+
def self.all_vars
|
21
|
+
@all_vars ||= [ON_DEMAND].freeze
|
22
|
+
end
|
23
|
+
|
19
24
|
# Builds the enum from string
|
20
25
|
# @param [String] The enum value in the form of the string
|
21
26
|
# @return [String] The enum value
|
@@ -27,9 +32,8 @@ module PulpContainerClient
|
|
27
32
|
# @param [String] The enum value in the form of the string
|
28
33
|
# @return [String] The enum value
|
29
34
|
def build_from_hash(value)
|
30
|
-
|
31
|
-
raise "Invalid ENUM value #{value} for class #Policy7e0Enum"
|
32
|
-
value
|
35
|
+
return value if Policy7e0Enum.all_vars.include?(value)
|
36
|
+
raise "Invalid ENUM value #{value} for class #Policy7e0Enum"
|
33
37
|
end
|
34
38
|
end
|
35
39
|
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 adding and removing content to/from a Container repository.
|
@@ -25,10 +26,15 @@ module PulpContainerClient
|
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
28
34
|
# Attribute type mapping.
|
29
35
|
def self.openapi_types
|
30
36
|
{
|
31
|
-
:'content_units' => :'Array<
|
37
|
+
:'content_units' => :'Array<Object>'
|
32
38
|
}
|
33
39
|
end
|
34
40
|
|
@@ -63,6 +69,7 @@ module PulpContainerClient
|
|
63
69
|
# Show invalid properties with the reasons. Usually used together with valid?
|
64
70
|
# @return Array for valid properties with the reasons
|
65
71
|
def list_invalid_properties
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
66
73
|
invalid_properties = Array.new
|
67
74
|
invalid_properties
|
68
75
|
end
|
@@ -70,6 +77,7 @@ module PulpContainerClient
|
|
70
77
|
# Check to see if the all the properties in the model are valid
|
71
78
|
# @return true if the model is valid
|
72
79
|
def valid?
|
80
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
73
81
|
true
|
74
82
|
end
|
75
83
|
|
@@ -97,37 +105,33 @@ module PulpContainerClient
|
|
97
105
|
# @param [Hash] attributes Model attributes in the form of hash
|
98
106
|
# @return [Object] Returns the model itself
|
99
107
|
def self.build_from_hash(attributes)
|
100
|
-
new.build_from_hash(attributes)
|
101
|
-
end
|
102
|
-
|
103
|
-
# Builds the object from hash
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
-
# @return [Object] Returns the model itself
|
106
|
-
def build_from_hash(attributes)
|
107
108
|
return nil unless attributes.is_a?(Hash)
|
108
|
-
|
109
|
-
|
109
|
+
attributes = attributes.transform_keys(&:to_sym)
|
110
|
+
transformed_hash = {}
|
111
|
+
openapi_types.each_pair do |key, type|
|
112
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
113
|
+
transformed_hash["#{key}"] = nil
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
110
115
|
# check to ensure the input is an array given that the attribute
|
111
116
|
# is documented as an array but the input is not
|
112
|
-
if attributes[
|
113
|
-
|
117
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
118
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
114
119
|
end
|
115
|
-
elsif !attributes[
|
116
|
-
|
117
|
-
end
|
120
|
+
elsif !attributes[attribute_map[key]].nil?
|
121
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
|
+
end
|
118
123
|
end
|
119
|
-
|
120
|
-
self
|
124
|
+
new(transformed_hash)
|
121
125
|
end
|
122
126
|
|
123
127
|
# Deserializes the data based on type
|
124
128
|
# @param string type Data type
|
125
129
|
# @param string value Value to be deserialized
|
126
130
|
# @return [Object] Deserialized data
|
127
|
-
def _deserialize(type, value)
|
131
|
+
def self._deserialize(type, value)
|
128
132
|
case type.to_sym
|
129
|
-
when :
|
130
|
-
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
131
135
|
when :Date
|
132
136
|
Date.parse(value)
|
133
137
|
when :String
|
@@ -157,7 +161,9 @@ module PulpContainerClient
|
|
157
161
|
end
|
158
162
|
end
|
159
163
|
else # model
|
160
|
-
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = PulpContainerClient.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
161
167
|
end
|
162
168
|
end
|
163
169
|
|
@@ -183,7 +189,7 @@ module PulpContainerClient
|
|
183
189
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
184
190
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
185
191
|
end
|
186
|
-
|
192
|
+
|
187
193
|
hash[param] = _to_hash(value)
|
188
194
|
end
|
189
195
|
hash
|
@@ -206,5 +212,7 @@ module PulpContainerClient
|
|
206
212
|
value
|
207
213
|
end
|
208
214
|
end
|
215
|
+
|
209
216
|
end
|
217
|
+
|
210
218
|
end
|