pulp_container_client 2.22.1 → 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 +86 -74
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
- data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
- data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
- data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +88 -74
- data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
- data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
- data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
- data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_container_client/models/container_container_push_repository.rb +83 -73
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
- data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
- data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
- data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
- data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
- data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
- data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
- data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
- data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
- data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
- data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
- data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_container_client/models/nested_role.rb +32 -22
- data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
- data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
- data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
- data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
- data/lib/pulp_container_client/models/remove_image.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
- data/lib/pulp_container_client/models/repair.rb +30 -22
- data/lib/pulp_container_client/models/repository_sign.rb +36 -24
- data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_container_client/models/set_label.rb +34 -22
- data/lib/pulp_container_client/models/set_label_response.rb +34 -22
- data/lib/pulp_container_client/models/tag_copy.rb +31 -23
- data/lib/pulp_container_client/models/tag_image.rb +34 -22
- data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
- data/lib/pulp_container_client/models/unset_label.rb +32 -22
- data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_container_client/version.rb +2 -2
- data/lib/pulp_container_client.rb +2 -3
- data/pulp_container_client.gemspec +9 -6
- data/spec/api/content_blobs_api_spec.rb +3 -3
- data/spec/api/content_manifests_api_spec.rb +3 -3
- data/spec/api/content_signatures_api_spec.rb +3 -3
- data/spec/api/content_tags_api_spec.rb +3 -3
- data/spec/api/distributions_container_api_spec.rb +13 -13
- data/spec/api/distributions_pull_through_api_spec.rb +13 -13
- data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
- data/spec/api/remotes_container_api_spec.rb +20 -19
- data/spec/api/remotes_pull_through_api_spec.rb +20 -19
- data/spec/api/repositories_container_api_spec.rb +22 -22
- data/spec/api/repositories_container_push_api_spec.rb +14 -14
- data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
- data/spec/api/repositories_container_versions_api_spec.rb +12 -11
- data/spec/api/token_api_spec.rb +2 -2
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/container_blob_response_spec.rb +12 -17
- data/spec/models/container_container_distribution_response_spec.rb +34 -39
- data/spec/models/container_container_distribution_spec.rb +20 -25
- data/spec/models/container_container_namespace_response_spec.rb +11 -16
- data/spec/models/container_container_namespace_spec.rb +7 -12
- data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
- data/spec/models/container_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
- data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/container_container_push_repository_response_spec.rb +28 -33
- data/spec/models/container_container_push_repository_spec.rb +15 -20
- data/spec/models/container_container_remote_response_spec.rb +31 -36
- data/spec/models/container_container_remote_spec.rb +31 -36
- data/spec/models/container_container_repository_response_spec.rb +18 -23
- data/spec/models/container_container_repository_spec.rb +12 -17
- data/spec/models/container_manifest_response_spec.rb +24 -29
- data/spec/models/container_manifest_signature_response_spec.rb +17 -22
- data/spec/models/container_repository_sync_url_spec.rb +9 -14
- data/spec/models/container_tag_response_spec.rb +12 -17
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/manifest_copy_spec.rb +10 -15
- data/spec/models/media_types_enum_spec.rb +6 -11
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
- data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -25
- data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
- data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
- data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
- data/spec/models/policy692_enum_spec.rb +6 -11
- data/spec/models/policy7e0_enum_spec.rb +6 -11
- data/spec/models/recursive_manage_spec.rb +7 -12
- data/spec/models/remove_image_spec.rb +7 -12
- data/spec/models/remove_signatures_response_spec.rb +7 -12
- data/spec/models/remove_signatures_spec.rb +7 -12
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_sign_spec.rb +9 -14
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/tag_copy_spec.rb +9 -14
- data/spec/models/tag_image_spec.rb +8 -13
- data/spec/models/un_tag_image_spec.rb +7 -12
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +105 -85
- data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
- data/docs/OCIBuildImage.md +0 -23
- data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/oci_build_image_spec.rb +0 -59
|
@@ -6,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 ContainerDistribution.
|
|
17
18
|
class ContainerContainerDistribution
|
|
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
|
# RepositoryVersion to be served
|
|
36
37
|
attr_accessor :repository_version
|
|
37
38
|
|
|
@@ -44,27 +45,32 @@ module PulpContainerClient
|
|
|
44
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
46
|
def self.attribute_map
|
|
46
47
|
{
|
|
47
|
-
:'name' => :'name',
|
|
48
|
-
:'repository' => :'repository',
|
|
49
48
|
:'base_path' => :'base_path',
|
|
50
49
|
:'pulp_labels' => :'pulp_labels',
|
|
51
|
-
:'
|
|
50
|
+
:'name' => :'name',
|
|
52
51
|
:'hidden' => :'hidden',
|
|
52
|
+
:'content_guard' => :'content_guard',
|
|
53
|
+
:'repository' => :'repository',
|
|
53
54
|
:'repository_version' => :'repository_version',
|
|
54
55
|
:'private' => :'private',
|
|
55
56
|
:'description' => :'description'
|
|
56
57
|
}
|
|
57
58
|
end
|
|
58
59
|
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
59
65
|
# Attribute type mapping.
|
|
60
66
|
def self.openapi_types
|
|
61
67
|
{
|
|
62
|
-
:'name' => :'String',
|
|
63
|
-
:'repository' => :'String',
|
|
64
68
|
:'base_path' => :'String',
|
|
65
69
|
:'pulp_labels' => :'Hash<String, String>',
|
|
66
|
-
:'
|
|
70
|
+
:'name' => :'String',
|
|
67
71
|
:'hidden' => :'Boolean',
|
|
72
|
+
:'content_guard' => :'String',
|
|
73
|
+
:'repository' => :'String',
|
|
68
74
|
:'repository_version' => :'String',
|
|
69
75
|
:'private' => :'Boolean',
|
|
70
76
|
:'description' => :'String'
|
|
@@ -95,16 +101,10 @@ module PulpContainerClient
|
|
|
95
101
|
h[k.to_sym] = v
|
|
96
102
|
}
|
|
97
103
|
|
|
98
|
-
if attributes.key?(:'name')
|
|
99
|
-
self.name = attributes[:'name']
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
if attributes.key?(:'repository')
|
|
103
|
-
self.repository = attributes[:'repository']
|
|
104
|
-
end
|
|
105
|
-
|
|
106
104
|
if attributes.key?(:'base_path')
|
|
107
105
|
self.base_path = attributes[:'base_path']
|
|
106
|
+
else
|
|
107
|
+
self.base_path = nil
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
if attributes.key?(:'pulp_labels')
|
|
@@ -113,8 +113,10 @@ module PulpContainerClient
|
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
-
if attributes.key?(:'
|
|
117
|
-
self.
|
|
116
|
+
if attributes.key?(:'name')
|
|
117
|
+
self.name = attributes[:'name']
|
|
118
|
+
else
|
|
119
|
+
self.name = nil
|
|
118
120
|
end
|
|
119
121
|
|
|
120
122
|
if attributes.key?(:'hidden')
|
|
@@ -123,6 +125,14 @@ module PulpContainerClient
|
|
|
123
125
|
self.hidden = false
|
|
124
126
|
end
|
|
125
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
|
+
|
|
126
136
|
if attributes.key?(:'repository_version')
|
|
127
137
|
self.repository_version = attributes[:'repository_version']
|
|
128
138
|
end
|
|
@@ -139,15 +149,8 @@ module PulpContainerClient
|
|
|
139
149
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
140
150
|
# @return Array for valid properties with the reasons
|
|
141
151
|
def list_invalid_properties
|
|
152
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
153
|
invalid_properties = Array.new
|
|
143
|
-
if @name.nil?
|
|
144
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
if @name.to_s.length < 1
|
|
148
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
149
|
-
end
|
|
150
|
-
|
|
151
154
|
if @base_path.nil?
|
|
152
155
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
|
153
156
|
end
|
|
@@ -156,6 +159,14 @@ module PulpContainerClient
|
|
|
156
159
|
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
|
157
160
|
end
|
|
158
161
|
|
|
162
|
+
if @name.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if @name.to_s.length < 1
|
|
167
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
168
|
+
end
|
|
169
|
+
|
|
159
170
|
if !@description.nil? && @description.to_s.length < 1
|
|
160
171
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
161
172
|
end
|
|
@@ -166,28 +177,15 @@ module PulpContainerClient
|
|
|
166
177
|
# Check to see if the all the properties in the model are valid
|
|
167
178
|
# @return true if the model is valid
|
|
168
179
|
def valid?
|
|
169
|
-
|
|
170
|
-
return false if @name.to_s.length < 1
|
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
171
181
|
return false if @base_path.nil?
|
|
172
182
|
return false if @base_path.to_s.length < 1
|
|
183
|
+
return false if @name.nil?
|
|
184
|
+
return false if @name.to_s.length < 1
|
|
173
185
|
return false if !@description.nil? && @description.to_s.length < 1
|
|
174
186
|
true
|
|
175
187
|
end
|
|
176
188
|
|
|
177
|
-
# Custom attribute writer method with validation
|
|
178
|
-
# @param [Object] name Value to be assigned
|
|
179
|
-
def name=(name)
|
|
180
|
-
if name.nil?
|
|
181
|
-
fail ArgumentError, 'name cannot be nil'
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
if name.to_s.length < 1
|
|
185
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
@name = name
|
|
189
|
-
end
|
|
190
|
-
|
|
191
189
|
# Custom attribute writer method with validation
|
|
192
190
|
# @param [Object] base_path Value to be assigned
|
|
193
191
|
def base_path=(base_path)
|
|
@@ -202,6 +200,20 @@ module PulpContainerClient
|
|
|
202
200
|
@base_path = base_path
|
|
203
201
|
end
|
|
204
202
|
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] name Value to be assigned
|
|
205
|
+
def name=(name)
|
|
206
|
+
if name.nil?
|
|
207
|
+
fail ArgumentError, 'name cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if name.to_s.length < 1
|
|
211
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@name = name
|
|
215
|
+
end
|
|
216
|
+
|
|
205
217
|
# Custom attribute writer method with validation
|
|
206
218
|
# @param [Object] description Value to be assigned
|
|
207
219
|
def description=(description)
|
|
@@ -217,12 +229,12 @@ module PulpContainerClient
|
|
|
217
229
|
def ==(o)
|
|
218
230
|
return true if self.equal?(o)
|
|
219
231
|
self.class == o.class &&
|
|
220
|
-
name == o.name &&
|
|
221
|
-
repository == o.repository &&
|
|
222
232
|
base_path == o.base_path &&
|
|
223
233
|
pulp_labels == o.pulp_labels &&
|
|
224
|
-
|
|
234
|
+
name == o.name &&
|
|
225
235
|
hidden == o.hidden &&
|
|
236
|
+
content_guard == o.content_guard &&
|
|
237
|
+
repository == o.repository &&
|
|
226
238
|
repository_version == o.repository_version &&
|
|
227
239
|
private == o.private &&
|
|
228
240
|
description == o.description
|
|
@@ -237,44 +249,40 @@ module PulpContainerClient
|
|
|
237
249
|
# Calculates hash code according to all attributes.
|
|
238
250
|
# @return [Integer] Hash code
|
|
239
251
|
def hash
|
|
240
|
-
[
|
|
252
|
+
[base_path, pulp_labels, name, hidden, content_guard, repository, repository_version, private, description].hash
|
|
241
253
|
end
|
|
242
254
|
|
|
243
255
|
# Builds the object from hash
|
|
244
256
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
245
257
|
# @return [Object] Returns the model itself
|
|
246
258
|
def self.build_from_hash(attributes)
|
|
247
|
-
new.build_from_hash(attributes)
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
# Builds the object from hash
|
|
251
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
252
|
-
# @return [Object] Returns the model itself
|
|
253
|
-
def build_from_hash(attributes)
|
|
254
259
|
return nil unless attributes.is_a?(Hash)
|
|
255
|
-
|
|
256
|
-
|
|
260
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
261
|
+
transformed_hash = {}
|
|
262
|
+
openapi_types.each_pair do |key, type|
|
|
263
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
264
|
+
transformed_hash["#{key}"] = nil
|
|
265
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
257
266
|
# check to ensure the input is an array given that the attribute
|
|
258
267
|
# is documented as an array but the input is not
|
|
259
|
-
if attributes[
|
|
260
|
-
|
|
268
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
269
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
261
270
|
end
|
|
262
|
-
elsif !attributes[
|
|
263
|
-
|
|
264
|
-
end
|
|
271
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
272
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
273
|
+
end
|
|
265
274
|
end
|
|
266
|
-
|
|
267
|
-
self
|
|
275
|
+
new(transformed_hash)
|
|
268
276
|
end
|
|
269
277
|
|
|
270
278
|
# Deserializes the data based on type
|
|
271
279
|
# @param string type Data type
|
|
272
280
|
# @param string value Value to be deserialized
|
|
273
281
|
# @return [Object] Deserialized data
|
|
274
|
-
def _deserialize(type, value)
|
|
282
|
+
def self._deserialize(type, value)
|
|
275
283
|
case type.to_sym
|
|
276
|
-
when :
|
|
277
|
-
|
|
284
|
+
when :Time
|
|
285
|
+
Time.parse(value)
|
|
278
286
|
when :Date
|
|
279
287
|
Date.parse(value)
|
|
280
288
|
when :String
|
|
@@ -304,7 +312,9 @@ module PulpContainerClient
|
|
|
304
312
|
end
|
|
305
313
|
end
|
|
306
314
|
else # model
|
|
307
|
-
|
|
315
|
+
# models (e.g. Pet) or oneOf
|
|
316
|
+
klass = PulpContainerClient.const_get(type)
|
|
317
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
308
318
|
end
|
|
309
319
|
end
|
|
310
320
|
|
|
@@ -330,7 +340,7 @@ module PulpContainerClient
|
|
|
330
340
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
331
341
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
332
342
|
end
|
|
333
|
-
|
|
343
|
+
|
|
334
344
|
hash[param] = _to_hash(value)
|
|
335
345
|
end
|
|
336
346
|
hash
|
|
@@ -353,5 +363,7 @@ module PulpContainerClient
|
|
|
353
363
|
value
|
|
354
364
|
end
|
|
355
365
|
end
|
|
366
|
+
|
|
356
367
|
end
|
|
368
|
+
|
|
357
369
|
end
|
|
@@ -6,25 +6,31 @@
|
|
|
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 ContainerDistribution.
|
|
17
18
|
class ContainerContainerDistributionResponse
|
|
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\")
|
|
20
|
+
attr_accessor :base_path
|
|
21
|
+
|
|
22
|
+
attr_accessor :pulp_labels
|
|
23
|
+
|
|
18
24
|
# A unique name. Ex, `rawhide` and `stable`.
|
|
19
25
|
attr_accessor :name
|
|
20
26
|
|
|
21
|
-
#
|
|
22
|
-
attr_accessor :
|
|
27
|
+
# Whether this distribution should be shown in the content app.
|
|
28
|
+
attr_accessor :hidden
|
|
23
29
|
|
|
24
|
-
# The
|
|
25
|
-
attr_accessor :
|
|
30
|
+
# The Pulp Resource Name (PRN).
|
|
31
|
+
attr_accessor :prn
|
|
26
32
|
|
|
27
|
-
attr_accessor :
|
|
33
|
+
attr_accessor :pulp_href
|
|
28
34
|
|
|
29
35
|
# An optional content-guard. If none is specified, a default one will be used.
|
|
30
36
|
attr_accessor :content_guard
|
|
@@ -32,19 +38,14 @@ module PulpContainerClient
|
|
|
32
38
|
# Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
|
|
33
39
|
attr_accessor :no_content_change_since
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
|
42
|
+
attr_accessor :pulp_last_updated
|
|
36
43
|
|
|
37
44
|
# Timestamp of creation.
|
|
38
45
|
attr_accessor :pulp_created
|
|
39
46
|
|
|
40
|
-
# The
|
|
41
|
-
attr_accessor :
|
|
42
|
-
|
|
43
|
-
# Whether this distribution should be shown in the content app.
|
|
44
|
-
attr_accessor :hidden
|
|
45
|
-
|
|
46
|
-
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
|
47
|
-
attr_accessor :pulp_last_updated
|
|
47
|
+
# The latest RepositoryVersion for this Repository will be served.
|
|
48
|
+
attr_accessor :repository
|
|
48
49
|
|
|
49
50
|
# RepositoryVersion to be served
|
|
50
51
|
attr_accessor :repository_version
|
|
@@ -67,17 +68,17 @@ module PulpContainerClient
|
|
|
67
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
68
69
|
def self.attribute_map
|
|
69
70
|
{
|
|
70
|
-
:'name' => :'name',
|
|
71
|
-
:'repository' => :'repository',
|
|
72
71
|
:'base_path' => :'base_path',
|
|
73
72
|
:'pulp_labels' => :'pulp_labels',
|
|
73
|
+
:'name' => :'name',
|
|
74
|
+
:'hidden' => :'hidden',
|
|
75
|
+
:'prn' => :'prn',
|
|
76
|
+
:'pulp_href' => :'pulp_href',
|
|
74
77
|
:'content_guard' => :'content_guard',
|
|
75
78
|
:'no_content_change_since' => :'no_content_change_since',
|
|
76
|
-
:'pulp_href' => :'pulp_href',
|
|
77
|
-
:'pulp_created' => :'pulp_created',
|
|
78
|
-
:'prn' => :'prn',
|
|
79
|
-
:'hidden' => :'hidden',
|
|
80
79
|
:'pulp_last_updated' => :'pulp_last_updated',
|
|
80
|
+
:'pulp_created' => :'pulp_created',
|
|
81
|
+
:'repository' => :'repository',
|
|
81
82
|
:'repository_version' => :'repository_version',
|
|
82
83
|
:'registry_path' => :'registry_path',
|
|
83
84
|
:'remote' => :'remote',
|
|
@@ -87,20 +88,25 @@ module PulpContainerClient
|
|
|
87
88
|
}
|
|
88
89
|
end
|
|
89
90
|
|
|
91
|
+
# Returns all the JSON keys this model knows about
|
|
92
|
+
def self.acceptable_attributes
|
|
93
|
+
attribute_map.values
|
|
94
|
+
end
|
|
95
|
+
|
|
90
96
|
# Attribute type mapping.
|
|
91
97
|
def self.openapi_types
|
|
92
98
|
{
|
|
93
|
-
:'name' => :'String',
|
|
94
|
-
:'repository' => :'String',
|
|
95
99
|
:'base_path' => :'String',
|
|
96
100
|
:'pulp_labels' => :'Hash<String, String>',
|
|
101
|
+
:'name' => :'String',
|
|
102
|
+
:'hidden' => :'Boolean',
|
|
103
|
+
:'prn' => :'String',
|
|
104
|
+
:'pulp_href' => :'String',
|
|
97
105
|
:'content_guard' => :'String',
|
|
98
106
|
:'no_content_change_since' => :'String',
|
|
99
|
-
:'
|
|
100
|
-
:'pulp_created' => :'
|
|
101
|
-
:'
|
|
102
|
-
:'hidden' => :'Boolean',
|
|
103
|
-
:'pulp_last_updated' => :'DateTime',
|
|
107
|
+
:'pulp_last_updated' => :'Time',
|
|
108
|
+
:'pulp_created' => :'Time',
|
|
109
|
+
:'repository' => :'String',
|
|
104
110
|
:'repository_version' => :'String',
|
|
105
111
|
:'registry_path' => :'String',
|
|
106
112
|
:'remote' => :'String',
|
|
@@ -134,16 +140,10 @@ module PulpContainerClient
|
|
|
134
140
|
h[k.to_sym] = v
|
|
135
141
|
}
|
|
136
142
|
|
|
137
|
-
if attributes.key?(:'name')
|
|
138
|
-
self.name = attributes[:'name']
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
if attributes.key?(:'repository')
|
|
142
|
-
self.repository = attributes[:'repository']
|
|
143
|
-
end
|
|
144
|
-
|
|
145
143
|
if attributes.key?(:'base_path')
|
|
146
144
|
self.base_path = attributes[:'base_path']
|
|
145
|
+
else
|
|
146
|
+
self.base_path = nil
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
if attributes.key?(:'pulp_labels')
|
|
@@ -152,36 +152,46 @@ module PulpContainerClient
|
|
|
152
152
|
end
|
|
153
153
|
end
|
|
154
154
|
|
|
155
|
-
if attributes.key?(:'
|
|
156
|
-
self.
|
|
155
|
+
if attributes.key?(:'name')
|
|
156
|
+
self.name = attributes[:'name']
|
|
157
|
+
else
|
|
158
|
+
self.name = nil
|
|
157
159
|
end
|
|
158
160
|
|
|
159
|
-
if attributes.key?(:'
|
|
160
|
-
self.
|
|
161
|
+
if attributes.key?(:'hidden')
|
|
162
|
+
self.hidden = attributes[:'hidden']
|
|
163
|
+
else
|
|
164
|
+
self.hidden = false
|
|
161
165
|
end
|
|
162
166
|
|
|
163
|
-
if attributes.key?(:'
|
|
164
|
-
self.
|
|
167
|
+
if attributes.key?(:'prn')
|
|
168
|
+
self.prn = attributes[:'prn']
|
|
165
169
|
end
|
|
166
170
|
|
|
167
|
-
if attributes.key?(:'
|
|
168
|
-
self.
|
|
171
|
+
if attributes.key?(:'pulp_href')
|
|
172
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
169
173
|
end
|
|
170
174
|
|
|
171
|
-
if attributes.key?(:'
|
|
172
|
-
self.
|
|
175
|
+
if attributes.key?(:'content_guard')
|
|
176
|
+
self.content_guard = attributes[:'content_guard']
|
|
173
177
|
end
|
|
174
178
|
|
|
175
|
-
if attributes.key?(:'
|
|
176
|
-
self.
|
|
177
|
-
else
|
|
178
|
-
self.hidden = false
|
|
179
|
+
if attributes.key?(:'no_content_change_since')
|
|
180
|
+
self.no_content_change_since = attributes[:'no_content_change_since']
|
|
179
181
|
end
|
|
180
182
|
|
|
181
183
|
if attributes.key?(:'pulp_last_updated')
|
|
182
184
|
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
|
183
185
|
end
|
|
184
186
|
|
|
187
|
+
if attributes.key?(:'pulp_created')
|
|
188
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'repository')
|
|
192
|
+
self.repository = attributes[:'repository']
|
|
193
|
+
end
|
|
194
|
+
|
|
185
195
|
if attributes.key?(:'repository_version')
|
|
186
196
|
self.repository_version = attributes[:'repository_version']
|
|
187
197
|
end
|
|
@@ -210,23 +220,25 @@ module PulpContainerClient
|
|
|
210
220
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
211
221
|
# @return Array for valid properties with the reasons
|
|
212
222
|
def list_invalid_properties
|
|
223
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
213
224
|
invalid_properties = Array.new
|
|
214
|
-
if @name.nil?
|
|
215
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
216
|
-
end
|
|
217
|
-
|
|
218
225
|
if @base_path.nil?
|
|
219
226
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
|
220
227
|
end
|
|
221
228
|
|
|
229
|
+
if @name.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
222
233
|
invalid_properties
|
|
223
234
|
end
|
|
224
235
|
|
|
225
236
|
# Check to see if the all the properties in the model are valid
|
|
226
237
|
# @return true if the model is valid
|
|
227
238
|
def valid?
|
|
228
|
-
|
|
239
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
229
240
|
return false if @base_path.nil?
|
|
241
|
+
return false if @name.nil?
|
|
230
242
|
true
|
|
231
243
|
end
|
|
232
244
|
|
|
@@ -235,17 +247,17 @@ module PulpContainerClient
|
|
|
235
247
|
def ==(o)
|
|
236
248
|
return true if self.equal?(o)
|
|
237
249
|
self.class == o.class &&
|
|
238
|
-
name == o.name &&
|
|
239
|
-
repository == o.repository &&
|
|
240
250
|
base_path == o.base_path &&
|
|
241
251
|
pulp_labels == o.pulp_labels &&
|
|
252
|
+
name == o.name &&
|
|
253
|
+
hidden == o.hidden &&
|
|
254
|
+
prn == o.prn &&
|
|
255
|
+
pulp_href == o.pulp_href &&
|
|
242
256
|
content_guard == o.content_guard &&
|
|
243
257
|
no_content_change_since == o.no_content_change_since &&
|
|
244
|
-
pulp_href == o.pulp_href &&
|
|
245
|
-
pulp_created == o.pulp_created &&
|
|
246
|
-
prn == o.prn &&
|
|
247
|
-
hidden == o.hidden &&
|
|
248
258
|
pulp_last_updated == o.pulp_last_updated &&
|
|
259
|
+
pulp_created == o.pulp_created &&
|
|
260
|
+
repository == o.repository &&
|
|
249
261
|
repository_version == o.repository_version &&
|
|
250
262
|
registry_path == o.registry_path &&
|
|
251
263
|
remote == o.remote &&
|
|
@@ -263,44 +275,40 @@ module PulpContainerClient
|
|
|
263
275
|
# Calculates hash code according to all attributes.
|
|
264
276
|
# @return [Integer] Hash code
|
|
265
277
|
def hash
|
|
266
|
-
[name,
|
|
278
|
+
[base_path, pulp_labels, name, hidden, prn, pulp_href, content_guard, no_content_change_since, pulp_last_updated, pulp_created, repository, repository_version, registry_path, remote, namespace, private, description].hash
|
|
267
279
|
end
|
|
268
280
|
|
|
269
281
|
# Builds the object from hash
|
|
270
282
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
271
283
|
# @return [Object] Returns the model itself
|
|
272
284
|
def self.build_from_hash(attributes)
|
|
273
|
-
new.build_from_hash(attributes)
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
# Builds the object from hash
|
|
277
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
278
|
-
# @return [Object] Returns the model itself
|
|
279
|
-
def build_from_hash(attributes)
|
|
280
285
|
return nil unless attributes.is_a?(Hash)
|
|
281
|
-
|
|
282
|
-
|
|
286
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
287
|
+
transformed_hash = {}
|
|
288
|
+
openapi_types.each_pair do |key, type|
|
|
289
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
290
|
+
transformed_hash["#{key}"] = nil
|
|
291
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
283
292
|
# check to ensure the input is an array given that the attribute
|
|
284
293
|
# is documented as an array but the input is not
|
|
285
|
-
if attributes[
|
|
286
|
-
|
|
294
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
295
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
287
296
|
end
|
|
288
|
-
elsif !attributes[
|
|
289
|
-
|
|
290
|
-
end
|
|
297
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
298
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
299
|
+
end
|
|
291
300
|
end
|
|
292
|
-
|
|
293
|
-
self
|
|
301
|
+
new(transformed_hash)
|
|
294
302
|
end
|
|
295
303
|
|
|
296
304
|
# Deserializes the data based on type
|
|
297
305
|
# @param string type Data type
|
|
298
306
|
# @param string value Value to be deserialized
|
|
299
307
|
# @return [Object] Deserialized data
|
|
300
|
-
def _deserialize(type, value)
|
|
308
|
+
def self._deserialize(type, value)
|
|
301
309
|
case type.to_sym
|
|
302
|
-
when :
|
|
303
|
-
|
|
310
|
+
when :Time
|
|
311
|
+
Time.parse(value)
|
|
304
312
|
when :Date
|
|
305
313
|
Date.parse(value)
|
|
306
314
|
when :String
|
|
@@ -330,7 +338,9 @@ module PulpContainerClient
|
|
|
330
338
|
end
|
|
331
339
|
end
|
|
332
340
|
else # model
|
|
333
|
-
|
|
341
|
+
# models (e.g. Pet) or oneOf
|
|
342
|
+
klass = PulpContainerClient.const_get(type)
|
|
343
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
334
344
|
end
|
|
335
345
|
end
|
|
336
346
|
|
|
@@ -356,7 +366,7 @@ module PulpContainerClient
|
|
|
356
366
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
357
367
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
358
368
|
end
|
|
359
|
-
|
|
369
|
+
|
|
360
370
|
hash[param] = _to_hash(value)
|
|
361
371
|
end
|
|
362
372
|
hash
|
|
@@ -379,5 +389,7 @@ module PulpContainerClient
|
|
|
379
389
|
value
|
|
380
390
|
end
|
|
381
391
|
end
|
|
392
|
+
|
|
382
393
|
end
|
|
394
|
+
|
|
383
395
|
end
|