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
data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb
CHANGED
@@ -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 PatchedcontainerContainerPullThroughDistribution
|
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,14 +105,6 @@ 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']
|
112
110
|
end
|
@@ -117,8 +115,8 @@ module PulpContainerClient
|
|
117
115
|
end
|
118
116
|
end
|
119
117
|
|
120
|
-
if attributes.key?(:'
|
121
|
-
self.
|
118
|
+
if attributes.key?(:'name')
|
119
|
+
self.name = attributes[:'name']
|
122
120
|
end
|
123
121
|
|
124
122
|
if attributes.key?(:'hidden')
|
@@ -127,6 +125,14 @@ module PulpContainerClient
|
|
127
125
|
self.hidden = false
|
128
126
|
end
|
129
127
|
|
128
|
+
if attributes.key?(:'content_guard')
|
129
|
+
self.content_guard = attributes[:'content_guard']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'repository')
|
133
|
+
self.repository = attributes[:'repository']
|
134
|
+
end
|
135
|
+
|
130
136
|
if attributes.key?(:'remote')
|
131
137
|
self.remote = attributes[:'remote']
|
132
138
|
end
|
@@ -149,15 +155,16 @@ module PulpContainerClient
|
|
149
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
150
156
|
# @return Array for valid properties with the reasons
|
151
157
|
def list_invalid_properties
|
158
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
152
159
|
invalid_properties = Array.new
|
153
|
-
if !@name.nil? && @name.to_s.length < 1
|
154
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
155
|
-
end
|
156
|
-
|
157
160
|
if !@base_path.nil? && @base_path.to_s.length < 1
|
158
161
|
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
159
162
|
end
|
160
163
|
|
164
|
+
if !@name.nil? && @name.to_s.length < 1
|
165
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
166
|
+
end
|
167
|
+
|
161
168
|
if !@description.nil? && @description.to_s.length < 1
|
162
169
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
163
170
|
end
|
@@ -168,30 +175,39 @@ module PulpContainerClient
|
|
168
175
|
# Check to see if the all the properties in the model are valid
|
169
176
|
# @return true if the model is valid
|
170
177
|
def valid?
|
171
|
-
|
178
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
172
179
|
return false if !@base_path.nil? && @base_path.to_s.length < 1
|
180
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
173
181
|
return false if !@description.nil? && @description.to_s.length < 1
|
174
182
|
true
|
175
183
|
end
|
176
184
|
|
177
185
|
# Custom attribute writer method with validation
|
178
|
-
# @param [Object]
|
179
|
-
def
|
180
|
-
if
|
181
|
-
fail ArgumentError, '
|
186
|
+
# @param [Object] base_path Value to be assigned
|
187
|
+
def base_path=(base_path)
|
188
|
+
if base_path.nil?
|
189
|
+
fail ArgumentError, 'base_path cannot be nil'
|
182
190
|
end
|
183
191
|
|
184
|
-
|
192
|
+
if base_path.to_s.length < 1
|
193
|
+
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
194
|
+
end
|
195
|
+
|
196
|
+
@base_path = base_path
|
185
197
|
end
|
186
198
|
|
187
199
|
# Custom attribute writer method with validation
|
188
|
-
# @param [Object]
|
189
|
-
def
|
190
|
-
if
|
191
|
-
fail ArgumentError, '
|
200
|
+
# @param [Object] name Value to be assigned
|
201
|
+
def name=(name)
|
202
|
+
if name.nil?
|
203
|
+
fail ArgumentError, 'name cannot be nil'
|
192
204
|
end
|
193
205
|
|
194
|
-
|
206
|
+
if name.to_s.length < 1
|
207
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
208
|
+
end
|
209
|
+
|
210
|
+
@name = name
|
195
211
|
end
|
196
212
|
|
197
213
|
# Custom attribute writer method with validation
|
@@ -209,12 +225,12 @@ module PulpContainerClient
|
|
209
225
|
def ==(o)
|
210
226
|
return true if self.equal?(o)
|
211
227
|
self.class == o.class &&
|
212
|
-
name == o.name &&
|
213
|
-
repository == o.repository &&
|
214
228
|
base_path == o.base_path &&
|
215
229
|
pulp_labels == o.pulp_labels &&
|
216
|
-
|
230
|
+
name == o.name &&
|
217
231
|
hidden == o.hidden &&
|
232
|
+
content_guard == o.content_guard &&
|
233
|
+
repository == o.repository &&
|
218
234
|
remote == o.remote &&
|
219
235
|
distributions == o.distributions &&
|
220
236
|
private == o.private &&
|
@@ -230,44 +246,40 @@ module PulpContainerClient
|
|
230
246
|
# Calculates hash code according to all attributes.
|
231
247
|
# @return [Integer] Hash code
|
232
248
|
def hash
|
233
|
-
[
|
249
|
+
[base_path, pulp_labels, name, hidden, content_guard, repository, remote, distributions, private, description].hash
|
234
250
|
end
|
235
251
|
|
236
252
|
# Builds the object from hash
|
237
253
|
# @param [Hash] attributes Model attributes in the form of hash
|
238
254
|
# @return [Object] Returns the model itself
|
239
255
|
def self.build_from_hash(attributes)
|
240
|
-
new.build_from_hash(attributes)
|
241
|
-
end
|
242
|
-
|
243
|
-
# Builds the object from hash
|
244
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
245
|
-
# @return [Object] Returns the model itself
|
246
|
-
def build_from_hash(attributes)
|
247
256
|
return nil unless attributes.is_a?(Hash)
|
248
|
-
|
249
|
-
|
257
|
+
attributes = attributes.transform_keys(&:to_sym)
|
258
|
+
transformed_hash = {}
|
259
|
+
openapi_types.each_pair do |key, type|
|
260
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
261
|
+
transformed_hash["#{key}"] = nil
|
262
|
+
elsif type =~ /\AArray<(.*)>/i
|
250
263
|
# check to ensure the input is an array given that the attribute
|
251
264
|
# is documented as an array but the input is not
|
252
|
-
if attributes[
|
253
|
-
|
265
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
266
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
254
267
|
end
|
255
|
-
elsif !attributes[
|
256
|
-
|
257
|
-
end
|
268
|
+
elsif !attributes[attribute_map[key]].nil?
|
269
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
270
|
+
end
|
258
271
|
end
|
259
|
-
|
260
|
-
self
|
272
|
+
new(transformed_hash)
|
261
273
|
end
|
262
274
|
|
263
275
|
# Deserializes the data based on type
|
264
276
|
# @param string type Data type
|
265
277
|
# @param string value Value to be deserialized
|
266
278
|
# @return [Object] Deserialized data
|
267
|
-
def _deserialize(type, value)
|
279
|
+
def self._deserialize(type, value)
|
268
280
|
case type.to_sym
|
269
|
-
when :
|
270
|
-
|
281
|
+
when :Time
|
282
|
+
Time.parse(value)
|
271
283
|
when :Date
|
272
284
|
Date.parse(value)
|
273
285
|
when :String
|
@@ -297,7 +309,9 @@ module PulpContainerClient
|
|
297
309
|
end
|
298
310
|
end
|
299
311
|
else # model
|
300
|
-
|
312
|
+
# models (e.g. Pet) or oneOf
|
313
|
+
klass = PulpContainerClient.const_get(type)
|
314
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
301
315
|
end
|
302
316
|
end
|
303
317
|
|
@@ -323,7 +337,7 @@ module PulpContainerClient
|
|
323
337
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
324
338
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
325
339
|
end
|
326
|
-
|
340
|
+
|
327
341
|
hash[param] = _to_hash(value)
|
328
342
|
end
|
329
343
|
hash
|
@@ -346,5 +360,7 @@ module PulpContainerClient
|
|
346
360
|
value
|
347
361
|
end
|
348
362
|
end
|
363
|
+
|
349
364
|
end
|
365
|
+
|
350
366
|
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 a remote used in the pull-through distribution.
|
@@ -82,6 +83,28 @@ module PulpContainerClient
|
|
82
83
|
# A list of remotes to exclude during pull-through caching. Wildcards *, ? are recognized. 'excludes' is evaluated after 'includes'.
|
83
84
|
attr_accessor :excludes
|
84
85
|
|
86
|
+
class EnumAttributeValidator
|
87
|
+
attr_reader :datatype
|
88
|
+
attr_reader :allowable_values
|
89
|
+
|
90
|
+
def initialize(datatype, allowable_values)
|
91
|
+
@allowable_values = allowable_values.map do |value|
|
92
|
+
case datatype.to_s
|
93
|
+
when /Integer/i
|
94
|
+
value.to_i
|
95
|
+
when /Float/i
|
96
|
+
value.to_f
|
97
|
+
else
|
98
|
+
value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def valid?(value)
|
104
|
+
!value || allowable_values.include?(value)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
85
108
|
# Attribute mapping from ruby-style variable name to JSON key.
|
86
109
|
def self.attribute_map
|
87
110
|
{
|
@@ -111,6 +134,11 @@ module PulpContainerClient
|
|
111
134
|
}
|
112
135
|
end
|
113
136
|
|
137
|
+
# Returns all the JSON keys this model knows about
|
138
|
+
def self.acceptable_attributes
|
139
|
+
attribute_map.values
|
140
|
+
end
|
141
|
+
|
114
142
|
# Attribute type mapping.
|
115
143
|
def self.openapi_types
|
116
144
|
{
|
@@ -282,6 +310,7 @@ module PulpContainerClient
|
|
282
310
|
# Show invalid properties with the reasons. Usually used together with valid?
|
283
311
|
# @return Array for valid properties with the reasons
|
284
312
|
def list_invalid_properties
|
313
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
285
314
|
invalid_properties = Array.new
|
286
315
|
if !@name.nil? && @name.to_s.length < 1
|
287
316
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -349,6 +378,7 @@ module PulpContainerClient
|
|
349
378
|
# Check to see if the all the properties in the model are valid
|
350
379
|
# @return true if the model is valid
|
351
380
|
def valid?
|
381
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
352
382
|
return false if !@name.nil? && @name.to_s.length < 1
|
353
383
|
return false if !@url.nil? && @url.to_s.length < 1
|
354
384
|
return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
|
@@ -370,7 +400,11 @@ module PulpContainerClient
|
|
370
400
|
# Custom attribute writer method with validation
|
371
401
|
# @param [Object] name Value to be assigned
|
372
402
|
def name=(name)
|
373
|
-
if
|
403
|
+
if name.nil?
|
404
|
+
fail ArgumentError, 'name cannot be nil'
|
405
|
+
end
|
406
|
+
|
407
|
+
if name.to_s.length < 1
|
374
408
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
375
409
|
end
|
376
410
|
|
@@ -380,7 +414,11 @@ module PulpContainerClient
|
|
380
414
|
# Custom attribute writer method with validation
|
381
415
|
# @param [Object] url Value to be assigned
|
382
416
|
def url=(url)
|
383
|
-
if
|
417
|
+
if url.nil?
|
418
|
+
fail ArgumentError, 'url cannot be nil'
|
419
|
+
end
|
420
|
+
|
421
|
+
if url.to_s.length < 1
|
384
422
|
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
385
423
|
end
|
386
424
|
|
@@ -563,37 +601,33 @@ module PulpContainerClient
|
|
563
601
|
# @param [Hash] attributes Model attributes in the form of hash
|
564
602
|
# @return [Object] Returns the model itself
|
565
603
|
def self.build_from_hash(attributes)
|
566
|
-
new.build_from_hash(attributes)
|
567
|
-
end
|
568
|
-
|
569
|
-
# Builds the object from hash
|
570
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
571
|
-
# @return [Object] Returns the model itself
|
572
|
-
def build_from_hash(attributes)
|
573
604
|
return nil unless attributes.is_a?(Hash)
|
574
|
-
|
575
|
-
|
605
|
+
attributes = attributes.transform_keys(&:to_sym)
|
606
|
+
transformed_hash = {}
|
607
|
+
openapi_types.each_pair do |key, type|
|
608
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
609
|
+
transformed_hash["#{key}"] = nil
|
610
|
+
elsif type =~ /\AArray<(.*)>/i
|
576
611
|
# check to ensure the input is an array given that the attribute
|
577
612
|
# is documented as an array but the input is not
|
578
|
-
if attributes[
|
579
|
-
|
613
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
614
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
580
615
|
end
|
581
|
-
elsif !attributes[
|
582
|
-
|
583
|
-
end
|
616
|
+
elsif !attributes[attribute_map[key]].nil?
|
617
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
618
|
+
end
|
584
619
|
end
|
585
|
-
|
586
|
-
self
|
620
|
+
new(transformed_hash)
|
587
621
|
end
|
588
622
|
|
589
623
|
# Deserializes the data based on type
|
590
624
|
# @param string type Data type
|
591
625
|
# @param string value Value to be deserialized
|
592
626
|
# @return [Object] Deserialized data
|
593
|
-
def _deserialize(type, value)
|
627
|
+
def self._deserialize(type, value)
|
594
628
|
case type.to_sym
|
595
|
-
when :
|
596
|
-
|
629
|
+
when :Time
|
630
|
+
Time.parse(value)
|
597
631
|
when :Date
|
598
632
|
Date.parse(value)
|
599
633
|
when :String
|
@@ -623,7 +657,9 @@ module PulpContainerClient
|
|
623
657
|
end
|
624
658
|
end
|
625
659
|
else # model
|
626
|
-
|
660
|
+
# models (e.g. Pet) or oneOf
|
661
|
+
klass = PulpContainerClient.const_get(type)
|
662
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
627
663
|
end
|
628
664
|
end
|
629
665
|
|
@@ -649,7 +685,7 @@ module PulpContainerClient
|
|
649
685
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
650
686
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
651
687
|
end
|
652
|
-
|
688
|
+
|
653
689
|
hash[param] = _to_hash(value)
|
654
690
|
end
|
655
691
|
hash
|
@@ -672,5 +708,7 @@ module PulpContainerClient
|
|
672
708
|
value
|
673
709
|
end
|
674
710
|
end
|
711
|
+
|
675
712
|
end
|
713
|
+
|
676
714
|
end
|