pulp_container_client 2.22.1 → 2.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -14
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContainerBlobResponse.md +18 -17
- data/docs/ContainerContainerDistribution.md +24 -23
- data/docs/ContainerContainerDistributionResponse.md +40 -39
- data/docs/ContainerContainerNamespace.md +8 -7
- data/docs/ContainerContainerNamespaceResponse.md +16 -15
- data/docs/ContainerContainerPullThroughDistribution.md +26 -25
- data/docs/ContainerContainerPullThroughDistributionResponse.md +38 -37
- data/docs/ContainerContainerPullThroughRemote.md +52 -51
- data/docs/ContainerContainerPullThroughRemoteResponse.md +52 -51
- data/docs/ContainerContainerPullThroughRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/ContainerContainerPushRepository.md +16 -15
- data/docs/ContainerContainerPushRepositoryResponse.md +28 -27
- data/docs/ContainerContainerRemote.md +56 -55
- data/docs/ContainerContainerRemoteResponse.md +56 -55
- data/docs/ContainerContainerRepository.md +18 -17
- data/docs/ContainerContainerRepositoryResponse.md +30 -29
- data/docs/ContainerManifestResponse.md +42 -41
- data/docs/ContainerManifestSignatureResponse.md +28 -27
- data/docs/ContainerRepositorySyncURL.md +12 -11
- data/docs/ContainerTagResponse.md +18 -17
- data/docs/ContentBlobsApi.md +82 -49
- data/docs/ContentManifestsApi.md +86 -53
- data/docs/ContentSignaturesApi.md +97 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/ContentTagsApi.md +86 -53
- data/docs/DistributionsContainerApi.md +386 -183
- data/docs/DistributionsPullThroughApi.md +385 -182
- data/docs/ManifestCopy.md +14 -13
- data/docs/MediaTypesEnum.md +4 -5
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedcontainerBlobResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerDistributionResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerNamespaceResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerPushRepositoryResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerRemoteResponseList.md +14 -13
- data/docs/PaginatedcontainerContainerRepositoryResponseList.md +14 -13
- data/docs/PaginatedcontainerManifestResponseList.md +14 -13
- data/docs/PaginatedcontainerManifestSignatureResponseList.md +14 -13
- data/docs/PaginatedcontainerTagResponseList.md +14 -13
- data/docs/PatchedcontainerContainerDistribution.md +24 -23
- data/docs/PatchedcontainerContainerPullThroughDistribution.md +26 -25
- data/docs/PatchedcontainerContainerPullThroughRemote.md +52 -51
- data/docs/PatchedcontainerContainerPushRepository.md +16 -15
- data/docs/PatchedcontainerContainerRemote.md +56 -55
- data/docs/PatchedcontainerContainerRepository.md +18 -17
- data/docs/Policy692Enum.md +4 -5
- data/docs/Policy7e0Enum.md +4 -5
- data/docs/PulpContainerNamespacesApi.md +259 -124
- data/docs/RecursiveManage.md +8 -7
- data/docs/RemotesContainerApi.md +389 -184
- data/docs/RemotesPullThroughApi.md +389 -184
- data/docs/RemoveImage.md +8 -7
- data/docs/RemoveSignatures.md +8 -7
- data/docs/RemoveSignaturesResponse.md +8 -7
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesContainerApi.md +647 -291
- data/docs/RepositoriesContainerPushApi.md +419 -198
- data/docs/RepositoriesContainerPushVersionsApi.md +152 -82
- data/docs/RepositoriesContainerVersionsApi.md +152 -82
- data/docs/RepositorySign.md +12 -11
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/TagCopy.md +12 -11
- data/docs/TagImage.md +10 -9
- data/docs/TokenApi.md +25 -7
- data/docs/UnTagImage.md +8 -7
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_container_client/api/content_blobs_api.rb +11 -9
- data/lib/pulp_container_client/api/content_manifests_api.rb +11 -9
- data/lib/pulp_container_client/api/content_signatures_api.rb +11 -9
- data/lib/pulp_container_client/api/content_tags_api.rb +11 -9
- data/lib/pulp_container_client/api/distributions_container_api.rb +89 -56
- data/lib/pulp_container_client/api/distributions_pull_through_api.rb +89 -56
- data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +53 -36
- data/lib/pulp_container_client/api/remotes_container_api.rb +104 -68
- data/lib/pulp_container_client/api/remotes_pull_through_api.rb +104 -68
- data/lib/pulp_container_client/api/repositories_container_api.rb +171 -102
- data/lib/pulp_container_client/api/repositories_container_push_api.rb +102 -62
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +40 -30
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +40 -30
- data/lib/pulp_container_client/api/token_api.rb +5 -4
- data/lib/pulp_container_client/api_client.rb +137 -102
- data/lib/pulp_container_client/api_error.rb +2 -1
- data/lib/pulp_container_client/configuration.rb +162 -21
- data/lib/pulp_container_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_container_client/models/container_blob_response.rb +37 -29
- data/lib/pulp_container_client/models/container_container_distribution.rb +86 -74
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
- data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
- data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
- data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +88 -74
- data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
- data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
- data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
- data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_container_client/models/container_container_push_repository.rb +83 -73
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
- data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
- data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
- data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
- data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
- data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
- data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
- data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
- data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
- data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
- data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
- data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_container_client/models/nested_role.rb +32 -22
- data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
- data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
- data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
- data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
- data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
- data/lib/pulp_container_client/models/remove_image.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
- data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
- data/lib/pulp_container_client/models/repair.rb +30 -22
- data/lib/pulp_container_client/models/repository_sign.rb +36 -24
- data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_container_client/models/set_label.rb +34 -22
- data/lib/pulp_container_client/models/set_label_response.rb +34 -22
- data/lib/pulp_container_client/models/tag_copy.rb +31 -23
- data/lib/pulp_container_client/models/tag_image.rb +34 -22
- data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
- data/lib/pulp_container_client/models/unset_label.rb +32 -22
- data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_container_client/version.rb +2 -2
- data/lib/pulp_container_client.rb +2 -3
- data/pulp_container_client.gemspec +9 -6
- data/spec/api/content_blobs_api_spec.rb +3 -3
- data/spec/api/content_manifests_api_spec.rb +3 -3
- data/spec/api/content_signatures_api_spec.rb +3 -3
- data/spec/api/content_tags_api_spec.rb +3 -3
- data/spec/api/distributions_container_api_spec.rb +13 -13
- data/spec/api/distributions_pull_through_api_spec.rb +13 -13
- data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
- data/spec/api/remotes_container_api_spec.rb +20 -19
- data/spec/api/remotes_pull_through_api_spec.rb +20 -19
- data/spec/api/repositories_container_api_spec.rb +22 -22
- data/spec/api/repositories_container_push_api_spec.rb +14 -14
- data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
- data/spec/api/repositories_container_versions_api_spec.rb +12 -11
- data/spec/api/token_api_spec.rb +2 -2
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/container_blob_response_spec.rb +12 -17
- data/spec/models/container_container_distribution_response_spec.rb +34 -39
- data/spec/models/container_container_distribution_spec.rb +20 -25
- data/spec/models/container_container_namespace_response_spec.rb +11 -16
- data/spec/models/container_container_namespace_spec.rb +7 -12
- data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
- data/spec/models/container_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
- data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/container_container_push_repository_response_spec.rb +28 -33
- data/spec/models/container_container_push_repository_spec.rb +15 -20
- data/spec/models/container_container_remote_response_spec.rb +31 -36
- data/spec/models/container_container_remote_spec.rb +31 -36
- data/spec/models/container_container_repository_response_spec.rb +18 -23
- data/spec/models/container_container_repository_spec.rb +12 -17
- data/spec/models/container_manifest_response_spec.rb +24 -29
- data/spec/models/container_manifest_signature_response_spec.rb +17 -22
- data/spec/models/container_repository_sync_url_spec.rb +9 -14
- data/spec/models/container_tag_response_spec.rb +12 -17
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/manifest_copy_spec.rb +10 -15
- data/spec/models/media_types_enum_spec.rb +6 -11
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
- data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -25
- data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
- data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
- data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
- data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
- data/spec/models/policy692_enum_spec.rb +6 -11
- data/spec/models/policy7e0_enum_spec.rb +6 -11
- data/spec/models/recursive_manage_spec.rb +7 -12
- data/spec/models/remove_image_spec.rb +7 -12
- data/spec/models/remove_signatures_response_spec.rb +7 -12
- data/spec/models/remove_signatures_spec.rb +7 -12
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_sign_spec.rb +9 -14
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/tag_copy_spec.rb +9 -14
- data/spec/models/tag_image_spec.rb +8 -13
- data/spec/models/un_tag_image_spec.rb +7 -12
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +105 -85
- data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
- data/docs/OCIBuildImage.md +0 -23
- data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/oci_build_image_spec.rb +0 -59
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpContainerClient
|
16
17
|
# Serializer for container images signing.
|
@@ -33,12 +34,17 @@ module PulpContainerClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
39
45
|
:'manifest_signing_service' => :'String',
|
40
46
|
:'future_base_path' => :'String',
|
41
|
-
:'tags_list' => :'Array<
|
47
|
+
:'tags_list' => :'Array<Object>'
|
42
48
|
}
|
43
49
|
end
|
44
50
|
|
@@ -82,6 +88,7 @@ module PulpContainerClient
|
|
82
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
89
|
# @return Array for valid properties with the reasons
|
84
90
|
def list_invalid_properties
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
92
|
invalid_properties = Array.new
|
86
93
|
if !@future_base_path.nil? && @future_base_path.to_s.length < 1
|
87
94
|
invalid_properties.push('invalid value for "future_base_path", the character length must be great than or equal to 1.')
|
@@ -93,6 +100,7 @@ module PulpContainerClient
|
|
93
100
|
# Check to see if the all the properties in the model are valid
|
94
101
|
# @return true if the model is valid
|
95
102
|
def valid?
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
96
104
|
return false if !@future_base_path.nil? && @future_base_path.to_s.length < 1
|
97
105
|
true
|
98
106
|
end
|
@@ -100,7 +108,11 @@ module PulpContainerClient
|
|
100
108
|
# Custom attribute writer method with validation
|
101
109
|
# @param [Object] future_base_path Value to be assigned
|
102
110
|
def future_base_path=(future_base_path)
|
103
|
-
if
|
111
|
+
if future_base_path.nil?
|
112
|
+
fail ArgumentError, 'future_base_path cannot be nil'
|
113
|
+
end
|
114
|
+
|
115
|
+
if future_base_path.to_s.length < 1
|
104
116
|
fail ArgumentError, 'invalid value for "future_base_path", the character length must be great than or equal to 1.'
|
105
117
|
end
|
106
118
|
|
@@ -133,37 +145,33 @@ module PulpContainerClient
|
|
133
145
|
# @param [Hash] attributes Model attributes in the form of hash
|
134
146
|
# @return [Object] Returns the model itself
|
135
147
|
def self.build_from_hash(attributes)
|
136
|
-
new.build_from_hash(attributes)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Builds the object from hash
|
140
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
-
# @return [Object] Returns the model itself
|
142
|
-
def build_from_hash(attributes)
|
143
148
|
return nil unless attributes.is_a?(Hash)
|
144
|
-
|
145
|
-
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
150
|
+
transformed_hash = {}
|
151
|
+
openapi_types.each_pair do |key, type|
|
152
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
153
|
+
transformed_hash["#{key}"] = nil
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
155
|
# check to ensure the input is an array given that the attribute
|
147
156
|
# is documented as an array but the input is not
|
148
|
-
if attributes[
|
149
|
-
|
157
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
158
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
150
159
|
end
|
151
|
-
elsif !attributes[
|
152
|
-
|
153
|
-
end
|
160
|
+
elsif !attributes[attribute_map[key]].nil?
|
161
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
|
+
end
|
154
163
|
end
|
155
|
-
|
156
|
-
self
|
164
|
+
new(transformed_hash)
|
157
165
|
end
|
158
166
|
|
159
167
|
# Deserializes the data based on type
|
160
168
|
# @param string type Data type
|
161
169
|
# @param string value Value to be deserialized
|
162
170
|
# @return [Object] Deserialized data
|
163
|
-
def _deserialize(type, value)
|
171
|
+
def self._deserialize(type, value)
|
164
172
|
case type.to_sym
|
165
|
-
when :
|
166
|
-
|
173
|
+
when :Time
|
174
|
+
Time.parse(value)
|
167
175
|
when :Date
|
168
176
|
Date.parse(value)
|
169
177
|
when :String
|
@@ -193,7 +201,9 @@ module PulpContainerClient
|
|
193
201
|
end
|
194
202
|
end
|
195
203
|
else # model
|
196
|
-
|
204
|
+
# models (e.g. Pet) or oneOf
|
205
|
+
klass = PulpContainerClient.const_get(type)
|
206
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
207
|
end
|
198
208
|
end
|
199
209
|
|
@@ -219,7 +229,7 @@ module PulpContainerClient
|
|
219
229
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
230
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
231
|
end
|
222
|
-
|
232
|
+
|
223
233
|
hash[param] = _to_hash(value)
|
224
234
|
end
|
225
235
|
hash
|
@@ -242,5 +252,7 @@ module PulpContainerClient
|
|
242
252
|
value
|
243
253
|
end
|
244
254
|
end
|
255
|
+
|
245
256
|
end
|
257
|
+
|
246
258
|
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
|
# Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
@@ -50,13 +51,18 @@ module PulpContainerClient
|
|
50
51
|
}
|
51
52
|
end
|
52
53
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
53
59
|
# Attribute type mapping.
|
54
60
|
def self.openapi_types
|
55
61
|
{
|
56
62
|
:'pulp_href' => :'String',
|
57
63
|
:'prn' => :'String',
|
58
|
-
:'pulp_created' => :'
|
59
|
-
:'pulp_last_updated' => :'
|
64
|
+
:'pulp_created' => :'Time',
|
65
|
+
:'pulp_last_updated' => :'Time',
|
60
66
|
:'number' => :'Integer',
|
61
67
|
:'repository' => :'String',
|
62
68
|
:'base_version' => :'String',
|
@@ -121,6 +127,7 @@ module PulpContainerClient
|
|
121
127
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
128
|
# @return Array for valid properties with the reasons
|
123
129
|
def list_invalid_properties
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
131
|
invalid_properties = Array.new
|
125
132
|
invalid_properties
|
126
133
|
end
|
@@ -128,6 +135,7 @@ module PulpContainerClient
|
|
128
135
|
# Check to see if the all the properties in the model are valid
|
129
136
|
# @return true if the model is valid
|
130
137
|
def valid?
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
131
139
|
true
|
132
140
|
end
|
133
141
|
|
@@ -162,37 +170,33 @@ module PulpContainerClient
|
|
162
170
|
# @param [Hash] attributes Model attributes in the form of hash
|
163
171
|
# @return [Object] Returns the model itself
|
164
172
|
def self.build_from_hash(attributes)
|
165
|
-
new.build_from_hash(attributes)
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds the object from hash
|
169
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
-
# @return [Object] Returns the model itself
|
171
|
-
def build_from_hash(attributes)
|
172
173
|
return nil unless attributes.is_a?(Hash)
|
173
|
-
|
174
|
-
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
175
|
+
transformed_hash = {}
|
176
|
+
openapi_types.each_pair do |key, type|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = nil
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
175
180
|
# check to ensure the input is an array given that the attribute
|
176
181
|
# is documented as an array but the input is not
|
177
|
-
if attributes[
|
178
|
-
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
179
184
|
end
|
180
|
-
elsif !attributes[
|
181
|
-
|
182
|
-
end
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
187
|
+
end
|
183
188
|
end
|
184
|
-
|
185
|
-
self
|
189
|
+
new(transformed_hash)
|
186
190
|
end
|
187
191
|
|
188
192
|
# Deserializes the data based on type
|
189
193
|
# @param string type Data type
|
190
194
|
# @param string value Value to be deserialized
|
191
195
|
# @return [Object] Deserialized data
|
192
|
-
def _deserialize(type, value)
|
196
|
+
def self._deserialize(type, value)
|
193
197
|
case type.to_sym
|
194
|
-
when :
|
195
|
-
|
198
|
+
when :Time
|
199
|
+
Time.parse(value)
|
196
200
|
when :Date
|
197
201
|
Date.parse(value)
|
198
202
|
when :String
|
@@ -222,7 +226,9 @@ module PulpContainerClient
|
|
222
226
|
end
|
223
227
|
end
|
224
228
|
else # model
|
225
|
-
|
229
|
+
# models (e.g. Pet) or oneOf
|
230
|
+
klass = PulpContainerClient.const_get(type)
|
231
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
232
|
end
|
227
233
|
end
|
228
234
|
|
@@ -248,7 +254,7 @@ module PulpContainerClient
|
|
248
254
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
249
255
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
250
256
|
end
|
251
|
-
|
257
|
+
|
252
258
|
hash[param] = _to_hash(value)
|
253
259
|
end
|
254
260
|
hash
|
@@ -271,5 +277,7 @@ module PulpContainerClient
|
|
271
277
|
value
|
272
278
|
end
|
273
279
|
end
|
280
|
+
|
274
281
|
end
|
282
|
+
|
275
283
|
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 synchronously setting a label.
|
@@ -27,6 +28,11 @@ module PulpContainerClient
|
|
27
28
|
}
|
28
29
|
end
|
29
30
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.openapi_types
|
32
38
|
{
|
@@ -59,16 +65,21 @@ module PulpContainerClient
|
|
59
65
|
|
60
66
|
if attributes.key?(:'key')
|
61
67
|
self.key = attributes[:'key']
|
68
|
+
else
|
69
|
+
self.key = nil
|
62
70
|
end
|
63
71
|
|
64
72
|
if attributes.key?(:'value')
|
65
73
|
self.value = attributes[:'value']
|
74
|
+
else
|
75
|
+
self.value = nil
|
66
76
|
end
|
67
77
|
end
|
68
78
|
|
69
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
80
|
# @return Array for valid properties with the reasons
|
71
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
83
|
invalid_properties = Array.new
|
73
84
|
if @key.nil?
|
74
85
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
@@ -89,6 +100,7 @@ module PulpContainerClient
|
|
89
100
|
# Check to see if the all the properties in the model are valid
|
90
101
|
# @return true if the model is valid
|
91
102
|
def valid?
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
92
104
|
return false if @key.nil?
|
93
105
|
return false if @key.to_s.length < 1
|
94
106
|
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
@@ -139,37 +151,33 @@ module PulpContainerClient
|
|
139
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
140
152
|
# @return [Object] Returns the model itself
|
141
153
|
def self.build_from_hash(attributes)
|
142
|
-
new.build_from_hash(attributes)
|
143
|
-
end
|
144
|
-
|
145
|
-
# Builds the object from hash
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
-
# @return [Object] Returns the model itself
|
148
|
-
def build_from_hash(attributes)
|
149
154
|
return nil unless attributes.is_a?(Hash)
|
150
|
-
|
151
|
-
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
161
|
# check to ensure the input is an array given that the attribute
|
153
162
|
# is documented as an array but the input is not
|
154
|
-
if attributes[
|
155
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
156
165
|
end
|
157
|
-
elsif !attributes[
|
158
|
-
|
159
|
-
end
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
168
|
+
end
|
160
169
|
end
|
161
|
-
|
162
|
-
self
|
170
|
+
new(transformed_hash)
|
163
171
|
end
|
164
172
|
|
165
173
|
# Deserializes the data based on type
|
166
174
|
# @param string type Data type
|
167
175
|
# @param string value Value to be deserialized
|
168
176
|
# @return [Object] Deserialized data
|
169
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
170
178
|
case type.to_sym
|
171
|
-
when :
|
172
|
-
|
179
|
+
when :Time
|
180
|
+
Time.parse(value)
|
173
181
|
when :Date
|
174
182
|
Date.parse(value)
|
175
183
|
when :String
|
@@ -199,7 +207,9 @@ module PulpContainerClient
|
|
199
207
|
end
|
200
208
|
end
|
201
209
|
else # model
|
202
|
-
|
210
|
+
# models (e.g. Pet) or oneOf
|
211
|
+
klass = PulpContainerClient.const_get(type)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
203
213
|
end
|
204
214
|
end
|
205
215
|
|
@@ -225,7 +235,7 @@ module PulpContainerClient
|
|
225
235
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
226
236
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
227
237
|
end
|
228
|
-
|
238
|
+
|
229
239
|
hash[param] = _to_hash(value)
|
230
240
|
end
|
231
241
|
hash
|
@@ -248,5 +258,7 @@ module PulpContainerClient
|
|
248
258
|
value
|
249
259
|
end
|
250
260
|
end
|
261
|
+
|
251
262
|
end
|
263
|
+
|
252
264
|
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 synchronously setting a label.
|
@@ -27,6 +28,11 @@ module PulpContainerClient
|
|
27
28
|
}
|
28
29
|
end
|
29
30
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.openapi_types
|
32
38
|
{
|
@@ -59,16 +65,21 @@ module PulpContainerClient
|
|
59
65
|
|
60
66
|
if attributes.key?(:'key')
|
61
67
|
self.key = attributes[:'key']
|
68
|
+
else
|
69
|
+
self.key = nil
|
62
70
|
end
|
63
71
|
|
64
72
|
if attributes.key?(:'value')
|
65
73
|
self.value = attributes[:'value']
|
74
|
+
else
|
75
|
+
self.value = nil
|
66
76
|
end
|
67
77
|
end
|
68
78
|
|
69
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
80
|
# @return Array for valid properties with the reasons
|
71
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
83
|
invalid_properties = Array.new
|
73
84
|
if @key.nil?
|
74
85
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
@@ -85,6 +96,7 @@ module PulpContainerClient
|
|
85
96
|
# Check to see if the all the properties in the model are valid
|
86
97
|
# @return true if the model is valid
|
87
98
|
def valid?
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
100
|
return false if @key.nil?
|
89
101
|
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
90
102
|
true
|
@@ -130,37 +142,33 @@ module PulpContainerClient
|
|
130
142
|
# @param [Hash] attributes Model attributes in the form of hash
|
131
143
|
# @return [Object] Returns the model itself
|
132
144
|
def self.build_from_hash(attributes)
|
133
|
-
new.build_from_hash(attributes)
|
134
|
-
end
|
135
|
-
|
136
|
-
# Builds the object from hash
|
137
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
-
# @return [Object] Returns the model itself
|
139
|
-
def build_from_hash(attributes)
|
140
145
|
return nil unless attributes.is_a?(Hash)
|
141
|
-
|
142
|
-
|
146
|
+
attributes = attributes.transform_keys(&:to_sym)
|
147
|
+
transformed_hash = {}
|
148
|
+
openapi_types.each_pair do |key, type|
|
149
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
150
|
+
transformed_hash["#{key}"] = nil
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
143
152
|
# check to ensure the input is an array given that the attribute
|
144
153
|
# is documented as an array but the input is not
|
145
|
-
if attributes[
|
146
|
-
|
154
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
155
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
147
156
|
end
|
148
|
-
elsif !attributes[
|
149
|
-
|
150
|
-
end
|
157
|
+
elsif !attributes[attribute_map[key]].nil?
|
158
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
159
|
+
end
|
151
160
|
end
|
152
|
-
|
153
|
-
self
|
161
|
+
new(transformed_hash)
|
154
162
|
end
|
155
163
|
|
156
164
|
# Deserializes the data based on type
|
157
165
|
# @param string type Data type
|
158
166
|
# @param string value Value to be deserialized
|
159
167
|
# @return [Object] Deserialized data
|
160
|
-
def _deserialize(type, value)
|
168
|
+
def self._deserialize(type, value)
|
161
169
|
case type.to_sym
|
162
|
-
when :
|
163
|
-
|
170
|
+
when :Time
|
171
|
+
Time.parse(value)
|
164
172
|
when :Date
|
165
173
|
Date.parse(value)
|
166
174
|
when :String
|
@@ -190,7 +198,9 @@ module PulpContainerClient
|
|
190
198
|
end
|
191
199
|
end
|
192
200
|
else # model
|
193
|
-
|
201
|
+
# models (e.g. Pet) or oneOf
|
202
|
+
klass = PulpContainerClient.const_get(type)
|
203
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
204
|
end
|
195
205
|
end
|
196
206
|
|
@@ -216,7 +226,7 @@ module PulpContainerClient
|
|
216
226
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
217
227
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
218
228
|
end
|
219
|
-
|
229
|
+
|
220
230
|
hash[param] = _to_hash(value)
|
221
231
|
end
|
222
232
|
hash
|
@@ -239,5 +249,7 @@ module PulpContainerClient
|
|
239
249
|
value
|
240
250
|
end
|
241
251
|
end
|
252
|
+
|
242
253
|
end
|
254
|
+
|
243
255
|
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 copying tags from a source repository to a destination repository.
|
@@ -33,12 +34,17 @@ module PulpContainerClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
39
45
|
:'source_repository' => :'String',
|
40
46
|
:'source_repository_version' => :'String',
|
41
|
-
:'names' => :'Array<
|
47
|
+
:'names' => :'Array<Object>'
|
42
48
|
}
|
43
49
|
end
|
44
50
|
|
@@ -81,6 +87,7 @@ module PulpContainerClient
|
|
81
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
88
|
# @return Array for valid properties with the reasons
|
83
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
91
|
invalid_properties = Array.new
|
85
92
|
invalid_properties
|
86
93
|
end
|
@@ -88,6 +95,7 @@ module PulpContainerClient
|
|
88
95
|
# Check to see if the all the properties in the model are valid
|
89
96
|
# @return true if the model is valid
|
90
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
99
|
true
|
92
100
|
end
|
93
101
|
|
@@ -117,37 +125,33 @@ module PulpContainerClient
|
|
117
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
126
|
# @return [Object] Returns the model itself
|
119
127
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
128
|
return nil unless attributes.is_a?(Hash)
|
128
|
-
|
129
|
-
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
130
135
|
# check to ensure the input is an array given that the attribute
|
131
136
|
# is documented as an array but the input is not
|
132
|
-
if attributes[
|
133
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
134
139
|
end
|
135
|
-
elsif !attributes[
|
136
|
-
|
137
|
-
end
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
|
+
end
|
138
143
|
end
|
139
|
-
|
140
|
-
self
|
144
|
+
new(transformed_hash)
|
141
145
|
end
|
142
146
|
|
143
147
|
# Deserializes the data based on type
|
144
148
|
# @param string type Data type
|
145
149
|
# @param string value Value to be deserialized
|
146
150
|
# @return [Object] Deserialized data
|
147
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
148
152
|
case type.to_sym
|
149
|
-
when :
|
150
|
-
|
153
|
+
when :Time
|
154
|
+
Time.parse(value)
|
151
155
|
when :Date
|
152
156
|
Date.parse(value)
|
153
157
|
when :String
|
@@ -177,7 +181,9 @@ module PulpContainerClient
|
|
177
181
|
end
|
178
182
|
end
|
179
183
|
else # model
|
180
|
-
|
184
|
+
# models (e.g. Pet) or oneOf
|
185
|
+
klass = PulpContainerClient.const_get(type)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
187
|
end
|
182
188
|
end
|
183
189
|
|
@@ -203,7 +209,7 @@ module PulpContainerClient
|
|
203
209
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
204
210
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
205
211
|
end
|
206
|
-
|
212
|
+
|
207
213
|
hash[param] = _to_hash(value)
|
208
214
|
end
|
209
215
|
hash
|
@@ -226,5 +232,7 @@ module PulpContainerClient
|
|
226
232
|
value
|
227
233
|
end
|
228
234
|
end
|
235
|
+
|
229
236
|
end
|
237
|
+
|
230
238
|
end
|