pulp_container_client 2.22.2 → 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 +66 -54
- 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 +68 -54
- 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 +73 -63
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +88 -78
- 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 +72 -56
- data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +72 -56
- 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 +76 -64
- 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 +27 -32
- data/spec/models/container_container_push_repository_spec.rb +16 -21
- data/spec/models/container_container_remote_response_spec.rb +31 -36
- data/spec/models/container_container_remote_spec.rb +31 -36
- data/spec/models/container_container_repository_response_spec.rb +18 -23
- data/spec/models/container_container_repository_spec.rb +12 -17
- data/spec/models/container_manifest_response_spec.rb +24 -29
- data/spec/models/container_manifest_signature_response_spec.rb +17 -22
- data/spec/models/container_repository_sync_url_spec.rb +9 -14
- data/spec/models/container_tag_response_spec.rb +12 -17
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/manifest_copy_spec.rb +10 -15
- data/spec/models/media_types_enum_spec.rb +6 -11
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
- data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
- data/spec/models/patchedcontainer_container_distribution_spec.rb +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 +16 -21
- data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
- data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
- data/spec/models/policy692_enum_spec.rb +6 -11
- data/spec/models/policy7e0_enum_spec.rb +6 -11
- data/spec/models/recursive_manage_spec.rb +7 -12
- data/spec/models/remove_image_spec.rb +7 -12
- data/spec/models/remove_signatures_response_spec.rb +7 -12
- data/spec/models/remove_signatures_spec.rb +7 -12
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_sign_spec.rb +9 -14
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/tag_copy_spec.rb +9 -14
- data/spec/models/tag_image_spec.rb +8 -13
- data/spec/models/un_tag_image_spec.rb +7 -12
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +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,14 +6,15 @@
|
|
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
|
-
class
|
17
|
+
class ContainerContainerPullThroughRemoteResponseHiddenFieldsInner
|
17
18
|
attr_accessor :name
|
18
19
|
|
19
20
|
attr_accessor :is_set
|
@@ -26,6 +27,11 @@ module PulpContainerClient
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -44,29 +50,34 @@ module PulpContainerClient
|
|
44
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
45
51
|
def initialize(attributes = {})
|
46
52
|
if (!attributes.is_a?(Hash))
|
47
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPullThroughRemoteResponseHiddenFieldsInner` initialize method"
|
48
54
|
end
|
49
55
|
|
50
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
51
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPullThroughRemoteResponseHiddenFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
60
|
end
|
55
61
|
h[k.to_sym] = v
|
56
62
|
}
|
57
63
|
|
58
64
|
if attributes.key?(:'name')
|
59
65
|
self.name = attributes[:'name']
|
66
|
+
else
|
67
|
+
self.name = nil
|
60
68
|
end
|
61
69
|
|
62
70
|
if attributes.key?(:'is_set')
|
63
71
|
self.is_set = attributes[:'is_set']
|
72
|
+
else
|
73
|
+
self.is_set = nil
|
64
74
|
end
|
65
75
|
end
|
66
76
|
|
67
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
78
|
# @return Array for valid properties with the reasons
|
69
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
81
|
invalid_properties = Array.new
|
71
82
|
if @name.nil?
|
72
83
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -82,6 +93,7 @@ module PulpContainerClient
|
|
82
93
|
# Check to see if the all the properties in the model are valid
|
83
94
|
# @return true if the model is valid
|
84
95
|
def valid?
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
97
|
return false if @name.nil?
|
86
98
|
return false if @is_set.nil?
|
87
99
|
true
|
@@ -112,37 +124,33 @@ module PulpContainerClient
|
|
112
124
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
125
|
# @return [Object] Returns the model itself
|
114
126
|
def self.build_from_hash(attributes)
|
115
|
-
new.build_from_hash(attributes)
|
116
|
-
end
|
117
|
-
|
118
|
-
# Builds the object from hash
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
# @return [Object] Returns the model itself
|
121
|
-
def build_from_hash(attributes)
|
122
127
|
return nil unless attributes.is_a?(Hash)
|
123
|
-
|
124
|
-
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
transformed_hash = {}
|
130
|
+
openapi_types.each_pair do |key, type|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = nil
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
134
|
# check to ensure the input is an array given that the attribute
|
126
135
|
# is documented as an array but the input is not
|
127
|
-
if attributes[
|
128
|
-
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
129
138
|
end
|
130
|
-
elsif !attributes[
|
131
|
-
|
132
|
-
end
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
141
|
+
end
|
133
142
|
end
|
134
|
-
|
135
|
-
self
|
143
|
+
new(transformed_hash)
|
136
144
|
end
|
137
145
|
|
138
146
|
# Deserializes the data based on type
|
139
147
|
# @param string type Data type
|
140
148
|
# @param string value Value to be deserialized
|
141
149
|
# @return [Object] Deserialized data
|
142
|
-
def _deserialize(type, value)
|
150
|
+
def self._deserialize(type, value)
|
143
151
|
case type.to_sym
|
144
|
-
when :
|
145
|
-
|
152
|
+
when :Time
|
153
|
+
Time.parse(value)
|
146
154
|
when :Date
|
147
155
|
Date.parse(value)
|
148
156
|
when :String
|
@@ -172,7 +180,9 @@ module PulpContainerClient
|
|
172
180
|
end
|
173
181
|
end
|
174
182
|
else # model
|
175
|
-
|
183
|
+
# models (e.g. Pet) or oneOf
|
184
|
+
klass = PulpContainerClient.const_get(type)
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
186
|
end
|
177
187
|
end
|
178
188
|
|
@@ -198,7 +208,7 @@ module PulpContainerClient
|
|
198
208
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
209
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
210
|
end
|
201
|
-
|
211
|
+
|
202
212
|
hash[param] = _to_hash(value)
|
203
213
|
end
|
204
214
|
hash
|
@@ -221,5 +231,7 @@ module PulpContainerClient
|
|
221
231
|
value
|
222
232
|
end
|
223
233
|
end
|
234
|
+
|
224
235
|
end
|
236
|
+
|
225
237
|
end
|
@@ -6,15 +6,22 @@
|
|
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 Push Repositories.
|
17
18
|
class ContainerContainerPushRepository
|
19
|
+
# Retain X versions of the repository. Default is null which retains all versions.
|
20
|
+
attr_accessor :retain_repo_versions
|
21
|
+
|
22
|
+
# A reference to an associated signing service.
|
23
|
+
attr_accessor :manifest_signing_service
|
24
|
+
|
18
25
|
attr_accessor :pulp_labels
|
19
26
|
|
20
27
|
# An optional description.
|
@@ -23,40 +30,39 @@ module PulpContainerClient
|
|
23
30
|
# A unique name for this repository.
|
24
31
|
attr_accessor :name
|
25
32
|
|
26
|
-
# A reference to an associated signing service.
|
27
|
-
attr_accessor :manifest_signing_service
|
28
|
-
|
29
|
-
# Retain X versions of the repository. Default is null which retains all versions.
|
30
|
-
attr_accessor :retain_repo_versions
|
31
|
-
|
32
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
34
|
def self.attribute_map
|
34
35
|
{
|
36
|
+
:'retain_repo_versions' => :'retain_repo_versions',
|
37
|
+
:'manifest_signing_service' => :'manifest_signing_service',
|
35
38
|
:'pulp_labels' => :'pulp_labels',
|
36
39
|
:'description' => :'description',
|
37
|
-
:'name' => :'name'
|
38
|
-
:'manifest_signing_service' => :'manifest_signing_service',
|
39
|
-
:'retain_repo_versions' => :'retain_repo_versions'
|
40
|
+
:'name' => :'name'
|
40
41
|
}
|
41
42
|
end
|
42
43
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
43
49
|
# Attribute type mapping.
|
44
50
|
def self.openapi_types
|
45
51
|
{
|
52
|
+
:'retain_repo_versions' => :'Integer',
|
53
|
+
:'manifest_signing_service' => :'String',
|
46
54
|
:'pulp_labels' => :'Hash<String, String>',
|
47
55
|
:'description' => :'String',
|
48
|
-
:'name' => :'String'
|
49
|
-
:'manifest_signing_service' => :'String',
|
50
|
-
:'retain_repo_versions' => :'Integer'
|
56
|
+
:'name' => :'String'
|
51
57
|
}
|
52
58
|
end
|
53
59
|
|
54
60
|
# List of attributes with nullable: true
|
55
61
|
def self.openapi_nullable
|
56
62
|
Set.new([
|
57
|
-
:'
|
63
|
+
:'retain_repo_versions',
|
58
64
|
:'manifest_signing_service',
|
59
|
-
:'
|
65
|
+
:'description',
|
60
66
|
])
|
61
67
|
end
|
62
68
|
|
@@ -75,6 +81,14 @@ module PulpContainerClient
|
|
75
81
|
h[k.to_sym] = v
|
76
82
|
}
|
77
83
|
|
84
|
+
if attributes.key?(:'retain_repo_versions')
|
85
|
+
self.retain_repo_versions = attributes[:'retain_repo_versions']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'manifest_signing_service')
|
89
|
+
self.manifest_signing_service = attributes[:'manifest_signing_service']
|
90
|
+
end
|
91
|
+
|
78
92
|
if attributes.key?(:'pulp_labels')
|
79
93
|
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
80
94
|
self.pulp_labels = value
|
@@ -87,21 +101,20 @@ module PulpContainerClient
|
|
87
101
|
|
88
102
|
if attributes.key?(:'name')
|
89
103
|
self.name = attributes[:'name']
|
90
|
-
|
91
|
-
|
92
|
-
if attributes.key?(:'manifest_signing_service')
|
93
|
-
self.manifest_signing_service = attributes[:'manifest_signing_service']
|
94
|
-
end
|
95
|
-
|
96
|
-
if attributes.key?(:'retain_repo_versions')
|
97
|
-
self.retain_repo_versions = attributes[:'retain_repo_versions']
|
104
|
+
else
|
105
|
+
self.name = nil
|
98
106
|
end
|
99
107
|
end
|
100
108
|
|
101
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
110
|
# @return Array for valid properties with the reasons
|
103
111
|
def list_invalid_properties
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
113
|
invalid_properties = Array.new
|
114
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
115
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
116
|
+
end
|
117
|
+
|
105
118
|
if !@description.nil? && @description.to_s.length < 1
|
106
119
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
107
120
|
end
|
@@ -114,23 +127,30 @@ module PulpContainerClient
|
|
114
127
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
115
128
|
end
|
116
129
|
|
117
|
-
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
118
|
-
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
119
|
-
end
|
120
|
-
|
121
130
|
invalid_properties
|
122
131
|
end
|
123
132
|
|
124
133
|
# Check to see if the all the properties in the model are valid
|
125
134
|
# @return true if the model is valid
|
126
135
|
def valid?
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
137
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
127
138
|
return false if !@description.nil? && @description.to_s.length < 1
|
128
139
|
return false if @name.nil?
|
129
140
|
return false if @name.to_s.length < 1
|
130
|
-
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
131
141
|
true
|
132
142
|
end
|
133
143
|
|
144
|
+
# Custom attribute writer method with validation
|
145
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
146
|
+
def retain_repo_versions=(retain_repo_versions)
|
147
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
148
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
149
|
+
end
|
150
|
+
|
151
|
+
@retain_repo_versions = retain_repo_versions
|
152
|
+
end
|
153
|
+
|
134
154
|
# Custom attribute writer method with validation
|
135
155
|
# @param [Object] description Value to be assigned
|
136
156
|
def description=(description)
|
@@ -155,26 +175,16 @@ module PulpContainerClient
|
|
155
175
|
@name = name
|
156
176
|
end
|
157
177
|
|
158
|
-
# Custom attribute writer method with validation
|
159
|
-
# @param [Object] retain_repo_versions Value to be assigned
|
160
|
-
def retain_repo_versions=(retain_repo_versions)
|
161
|
-
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
162
|
-
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
163
|
-
end
|
164
|
-
|
165
|
-
@retain_repo_versions = retain_repo_versions
|
166
|
-
end
|
167
|
-
|
168
178
|
# Checks equality by comparing each attribute.
|
169
179
|
# @param [Object] Object to be compared
|
170
180
|
def ==(o)
|
171
181
|
return true if self.equal?(o)
|
172
182
|
self.class == o.class &&
|
183
|
+
retain_repo_versions == o.retain_repo_versions &&
|
184
|
+
manifest_signing_service == o.manifest_signing_service &&
|
173
185
|
pulp_labels == o.pulp_labels &&
|
174
186
|
description == o.description &&
|
175
|
-
name == o.name
|
176
|
-
manifest_signing_service == o.manifest_signing_service &&
|
177
|
-
retain_repo_versions == o.retain_repo_versions
|
187
|
+
name == o.name
|
178
188
|
end
|
179
189
|
|
180
190
|
# @see the `==` method
|
@@ -186,44 +196,40 @@ module PulpContainerClient
|
|
186
196
|
# Calculates hash code according to all attributes.
|
187
197
|
# @return [Integer] Hash code
|
188
198
|
def hash
|
189
|
-
[
|
199
|
+
[retain_repo_versions, manifest_signing_service, pulp_labels, description, name].hash
|
190
200
|
end
|
191
201
|
|
192
202
|
# Builds the object from hash
|
193
203
|
# @param [Hash] attributes Model attributes in the form of hash
|
194
204
|
# @return [Object] Returns the model itself
|
195
205
|
def self.build_from_hash(attributes)
|
196
|
-
new.build_from_hash(attributes)
|
197
|
-
end
|
198
|
-
|
199
|
-
# Builds the object from hash
|
200
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
-
# @return [Object] Returns the model itself
|
202
|
-
def build_from_hash(attributes)
|
203
206
|
return nil unless attributes.is_a?(Hash)
|
204
|
-
|
205
|
-
|
207
|
+
attributes = attributes.transform_keys(&:to_sym)
|
208
|
+
transformed_hash = {}
|
209
|
+
openapi_types.each_pair do |key, type|
|
210
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
211
|
+
transformed_hash["#{key}"] = nil
|
212
|
+
elsif type =~ /\AArray<(.*)>/i
|
206
213
|
# check to ensure the input is an array given that the attribute
|
207
214
|
# is documented as an array but the input is not
|
208
|
-
if attributes[
|
209
|
-
|
215
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
216
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
210
217
|
end
|
211
|
-
elsif !attributes[
|
212
|
-
|
213
|
-
end
|
218
|
+
elsif !attributes[attribute_map[key]].nil?
|
219
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
220
|
+
end
|
214
221
|
end
|
215
|
-
|
216
|
-
self
|
222
|
+
new(transformed_hash)
|
217
223
|
end
|
218
224
|
|
219
225
|
# Deserializes the data based on type
|
220
226
|
# @param string type Data type
|
221
227
|
# @param string value Value to be deserialized
|
222
228
|
# @return [Object] Deserialized data
|
223
|
-
def _deserialize(type, value)
|
229
|
+
def self._deserialize(type, value)
|
224
230
|
case type.to_sym
|
225
|
-
when :
|
226
|
-
|
231
|
+
when :Time
|
232
|
+
Time.parse(value)
|
227
233
|
when :Date
|
228
234
|
Date.parse(value)
|
229
235
|
when :String
|
@@ -253,7 +259,9 @@ module PulpContainerClient
|
|
253
259
|
end
|
254
260
|
end
|
255
261
|
else # model
|
256
|
-
|
262
|
+
# models (e.g. Pet) or oneOf
|
263
|
+
klass = PulpContainerClient.const_get(type)
|
264
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
257
265
|
end
|
258
266
|
end
|
259
267
|
|
@@ -279,7 +287,7 @@ module PulpContainerClient
|
|
279
287
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
280
288
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
281
289
|
end
|
282
|
-
|
290
|
+
|
283
291
|
hash[param] = _to_hash(value)
|
284
292
|
end
|
285
293
|
hash
|
@@ -302,5 +310,7 @@ module PulpContainerClient
|
|
302
310
|
value
|
303
311
|
end
|
304
312
|
end
|
313
|
+
|
305
314
|
end
|
315
|
+
|
306
316
|
end
|