pulp_deb_client 2.5.0b1 → 2.6.0b1
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 +60 -39
- data/docs/ContentGenericContentsApi.md +26 -26
- data/docs/ContentInstallerFileIndicesApi.md +37 -37
- data/docs/ContentInstallerPackagesApi.md +56 -56
- data/docs/ContentPackageIndicesApi.md +37 -37
- data/docs/ContentPackageReleaseComponentsApi.md +33 -33
- data/docs/ContentPackagesApi.md +58 -58
- data/docs/ContentReleaseArchitecturesApi.md +33 -33
- data/docs/ContentReleaseComponentsApi.md +33 -33
- data/docs/ContentReleaseFilesApi.md +37 -37
- data/docs/ContentReleasesApi.md +35 -35
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DebAptDistribution.md +1 -7
- data/docs/DebAptDistributionResponse.md +29 -0
- data/docs/DebAptPublication.md +1 -5
- data/docs/DebAptPublicationResponse.md +29 -0
- data/docs/DebAptRemote.md +4 -10
- data/docs/DebAptRemoteResponse.md +57 -0
- data/docs/DebAptRepository.md +4 -10
- data/docs/DebAptRepositoryResponse.md +29 -0
- data/docs/DebBasePackage.md +5 -75
- data/docs/DebBasePackageResponse.md +93 -0
- data/docs/DebGenericContent.md +5 -17
- data/docs/DebGenericContentResponse.md +35 -0
- data/docs/DebInstallerFileIndex.md +2 -6
- data/docs/DebInstallerFileIndexResponse.md +29 -0
- data/docs/DebPackageIndex.md +2 -6
- data/docs/DebPackageIndexResponse.md +29 -0
- data/docs/DebPackageReleaseComponent.md +1 -5
- data/docs/DebPackageReleaseComponentResponse.md +23 -0
- data/docs/DebRelease.md +1 -5
- data/docs/DebReleaseArchitecture.md +1 -5
- data/docs/DebReleaseArchitectureResponse.md +23 -0
- data/docs/DebReleaseComponent.md +1 -5
- data/docs/DebReleaseComponentResponse.md +23 -0
- data/docs/DebReleaseFile.md +2 -6
- data/docs/DebReleaseFileResponse.md +29 -0
- data/docs/DebReleaseResponse.md +25 -0
- data/docs/DebVerbatimPublication.md +1 -5
- data/docs/DebVerbatimPublicationResponse.md +23 -0
- data/docs/DistributionsAptApi.md +110 -62
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +3 -3
- data/docs/InlineResponse20011.md +3 -3
- data/docs/InlineResponse20012.md +3 -3
- data/docs/InlineResponse20013.md +3 -3
- data/docs/InlineResponse20014.md +3 -3
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse2003.md +3 -3
- data/docs/InlineResponse2004.md +3 -3
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/InlineResponse2008.md +3 -3
- data/docs/InlineResponse2009.md +3 -3
- data/docs/PatcheddebAptDistribution.md +23 -0
- data/docs/PatcheddebAptRemote.md +51 -0
- data/docs/PatcheddebAptRepository.md +21 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsAptApi.md +43 -43
- data/docs/PublicationsVerbatimApi.md +43 -43
- data/docs/RemotesAptApi.md +128 -68
- data/docs/RepositoriesAptApi.md +100 -76
- data/docs/RepositoriesDebVersionsApi.md +96 -64
- data/docs/RepositoryAddRemoveContent.md +2 -2
- data/docs/RepositorySyncURL.md +1 -1
- data/docs/RepositoryVersion.md +1 -9
- data/docs/RepositoryVersionResponse.md +25 -0
- data/lib/pulp_deb_client/api/content_generic_contents_api.rb +36 -40
- data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +57 -57
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +90 -82
- data/lib/pulp_deb_client/api/content_package_indices_api.rb +57 -57
- data/lib/pulp_deb_client/api/content_package_release_components_api.rb +50 -50
- data/lib/pulp_deb_client/api/content_packages_api.rb +92 -84
- data/lib/pulp_deb_client/api/content_release_architectures_api.rb +51 -51
- data/lib/pulp_deb_client/api/content_release_components_api.rb +51 -51
- data/lib/pulp_deb_client/api/content_release_files_api.rb +57 -57
- data/lib/pulp_deb_client/api/content_releases_api.rb +54 -54
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +157 -94
- data/lib/pulp_deb_client/api/publications_apt_api.rb +65 -65
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +65 -65
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +187 -106
- data/lib/pulp_deb_client/api/repositories_apt_api.rb +151 -124
- data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +141 -96
- data/lib/pulp_deb_client/api_client.rb +2 -2
- data/lib/pulp_deb_client/api_error.rb +2 -2
- data/lib/pulp_deb_client/configuration.rb +3 -3
- data/lib/pulp_deb_client/models/async_operation_response.rb +3 -2
- data/lib/pulp_deb_client/models/content_summary.rb +9 -15
- data/lib/pulp_deb_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_deb_client/models/deb_apt_distribution.rb +4 -85
- data/lib/pulp_deb_client/models/deb_apt_distribution_response.rb +279 -0
- data/lib/pulp_deb_client/models/deb_apt_publication.rb +4 -22
- data/lib/pulp_deb_client/models/deb_apt_publication_response.rb +270 -0
- data/lib/pulp_deb_client/models/deb_apt_remote.rb +7 -263
- data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +446 -0
- data/lib/pulp_deb_client/models/deb_apt_repository.rb +18 -78
- data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +271 -0
- data/lib/pulp_deb_client/models/deb_base_package.rb +18 -847
- data/lib/pulp_deb_client/models/deb_base_package_response.rb +558 -0
- data/lib/pulp_deb_client/models/deb_generic_content.rb +18 -185
- data/lib/pulp_deb_client/models/deb_generic_content_response.rb +302 -0
- data/lib/pulp_deb_client/models/deb_installer_file_index.rb +6 -79
- data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +287 -0
- data/lib/pulp_deb_client/models/deb_package_index.rb +6 -79
- data/lib/pulp_deb_client/models/deb_package_index_response.rb +287 -0
- data/lib/pulp_deb_client/models/deb_package_release_component.rb +4 -22
- data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +247 -0
- data/lib/pulp_deb_client/models/deb_release.rb +4 -79
- data/lib/pulp_deb_client/models/deb_release_architecture.rb +4 -41
- data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +247 -0
- data/lib/pulp_deb_client/models/deb_release_component.rb +4 -41
- data/lib/pulp_deb_client/models/deb_release_component_response.rb +247 -0
- data/lib/pulp_deb_client/models/deb_release_file.rb +6 -90
- data/lib/pulp_deb_client/models/deb_release_file_response.rb +277 -0
- data/lib/pulp_deb_client/models/deb_release_response.rb +259 -0
- data/lib/pulp_deb_client/models/deb_verbatim_publication.rb +4 -22
- data/lib/pulp_deb_client/models/deb_verbatim_publication_response.rb +236 -0
- data/lib/pulp_deb_client/models/inline_response200.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2001.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response20010.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response20011.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response20012.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response20013.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response20014.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2002.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2003.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2004.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2005.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2006.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2007.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2008.rb +3 -13
- data/lib/pulp_deb_client/models/inline_response2009.rb +3 -13
- data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +240 -0
- data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +402 -0
- data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +229 -0
- data/lib/pulp_deb_client/models/policy_enum.rb +37 -0
- data/lib/pulp_deb_client/models/repository_add_remove_content.rb +5 -4
- data/lib/pulp_deb_client/models/repository_sync_url.rb +3 -8
- data/lib/pulp_deb_client/models/repository_version.rb +7 -43
- data/lib/pulp_deb_client/models/repository_version_response.rb +246 -0
- data/lib/pulp_deb_client/version.rb +3 -3
- data/lib/pulp_deb_client.rb +22 -2
- data/pulp_deb_client.gemspec +4 -4
- data/spec/api/content_generic_contents_api_spec.rb +12 -12
- data/spec/api/content_installer_file_indices_api_spec.rb +17 -17
- data/spec/api/content_installer_packages_api_spec.rb +27 -27
- data/spec/api/content_package_indices_api_spec.rb +17 -17
- data/spec/api/content_package_release_components_api_spec.rb +15 -15
- data/spec/api/content_packages_api_spec.rb +28 -28
- data/spec/api/content_release_architectures_api_spec.rb +15 -15
- data/spec/api/content_release_components_api_spec.rb +15 -15
- data/spec/api/content_release_files_api_spec.rb +17 -17
- data/spec/api/content_releases_api_spec.rb +16 -16
- data/spec/api/distributions_apt_api_spec.rb +41 -20
- data/spec/api/publications_apt_api_spec.rb +17 -17
- data/spec/api/publications_verbatim_api_spec.rb +17 -17
- data/spec/api/remotes_apt_api_spec.rb +51 -24
- data/spec/api/repositories_apt_api_spec.rb +31 -22
- data/spec/api/repositories_deb_versions_api_spec.rb +40 -25
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/async_operation_response_spec.rb +2 -2
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/content_summary_spec.rb +2 -2
- data/spec/models/deb_apt_distribution_response_spec.rb +77 -0
- data/spec/models/deb_apt_distribution_spec.rb +2 -20
- data/spec/models/deb_apt_publication_response_spec.rb +77 -0
- data/spec/models/deb_apt_publication_spec.rb +2 -14
- data/spec/models/deb_apt_remote_response_spec.rb +161 -0
- data/spec/models/deb_apt_remote_spec.rb +2 -24
- data/spec/models/deb_apt_repository_response_spec.rb +77 -0
- data/spec/models/deb_apt_repository_spec.rb +5 -23
- data/spec/models/deb_base_package_response_spec.rb +269 -0
- data/spec/models/deb_base_package_spec.rb +4 -214
- data/spec/models/deb_generic_content_response_spec.rb +95 -0
- data/spec/models/deb_generic_content_spec.rb +4 -40
- data/spec/models/deb_installer_file_index_response_spec.rb +77 -0
- data/spec/models/deb_installer_file_index_spec.rb +2 -14
- data/spec/models/deb_package_index_response_spec.rb +77 -0
- data/spec/models/deb_package_index_spec.rb +2 -14
- data/spec/models/deb_package_release_component_response_spec.rb +59 -0
- data/spec/models/deb_package_release_component_spec.rb +2 -14
- data/spec/models/deb_release_architecture_response_spec.rb +59 -0
- data/spec/models/deb_release_architecture_spec.rb +2 -14
- data/spec/models/deb_release_component_response_spec.rb +59 -0
- data/spec/models/deb_release_component_spec.rb +2 -14
- data/spec/models/deb_release_file_response_spec.rb +77 -0
- data/spec/models/deb_release_file_spec.rb +2 -14
- data/spec/models/deb_release_response_spec.rb +65 -0
- data/spec/models/deb_release_spec.rb +2 -14
- data/spec/models/deb_verbatim_publication_response_spec.rb +59 -0
- data/spec/models/deb_verbatim_publication_spec.rb +2 -14
- data/spec/models/inline_response20010_spec.rb +2 -2
- data/spec/models/inline_response20011_spec.rb +2 -2
- data/spec/models/inline_response20012_spec.rb +2 -2
- data/spec/models/inline_response20013_spec.rb +2 -2
- data/spec/models/inline_response20014_spec.rb +2 -2
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2003_spec.rb +2 -2
- data/spec/models/inline_response2004_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +2 -2
- data/spec/models/inline_response2006_spec.rb +2 -2
- data/spec/models/inline_response2007_spec.rb +2 -2
- data/spec/models/inline_response2008_spec.rb +2 -2
- data/spec/models/inline_response2009_spec.rb +2 -2
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/patcheddeb_apt_distribution_spec.rb +59 -0
- data/spec/models/patcheddeb_apt_remote_spec.rb +143 -0
- data/spec/models/patcheddeb_apt_repository_spec.rb +53 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repository_add_remove_content_spec.rb +2 -2
- data/spec/models/repository_sync_url_spec.rb +2 -2
- data/spec/models/repository_version_response_spec.rb +65 -0
- data/spec/models/repository_version_spec.rb +2 -26
- data/spec/spec_helper.rb +2 -2
- metadata +120 -40
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Pulp 3 API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
5
|
|
|
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
|
OpenAPI Generator version: 4.2.3
|
|
10
10
|
|
|
@@ -13,65 +13,37 @@ OpenAPI Generator version: 4.2.3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module PulpDebClient
|
|
16
|
+
# A serializer for GenericContent.
|
|
16
17
|
class DebGenericContent
|
|
17
|
-
attr_accessor :pulp_href
|
|
18
|
-
|
|
19
|
-
# Timestamp of creation.
|
|
20
|
-
attr_accessor :pulp_created
|
|
21
|
-
|
|
22
18
|
# Artifact file representing the physical content
|
|
23
19
|
attr_accessor :artifact
|
|
24
20
|
|
|
25
21
|
# Path where the artifact is located relative to distributions base_path
|
|
26
22
|
attr_accessor :relative_path
|
|
27
23
|
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
30
|
-
|
|
31
|
-
# The SHA-1 checksum if available.
|
|
32
|
-
attr_accessor :sha1
|
|
24
|
+
# An uploaded file that may be turned into the artifact of the content unit.
|
|
25
|
+
attr_accessor :file
|
|
33
26
|
|
|
34
|
-
#
|
|
35
|
-
attr_accessor :
|
|
36
|
-
|
|
37
|
-
# The SHA-256 checksum if available.
|
|
38
|
-
attr_accessor :sha256
|
|
39
|
-
|
|
40
|
-
# The SHA-384 checksum if available.
|
|
41
|
-
attr_accessor :sha384
|
|
42
|
-
|
|
43
|
-
# The SHA-512 checksum if available.
|
|
44
|
-
attr_accessor :sha512
|
|
27
|
+
# A URI of a repository the new content unit should be associated with.
|
|
28
|
+
attr_accessor :repository
|
|
45
29
|
|
|
46
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
31
|
def self.attribute_map
|
|
48
32
|
{
|
|
49
|
-
:'pulp_href' => :'pulp_href',
|
|
50
|
-
:'pulp_created' => :'pulp_created',
|
|
51
33
|
:'artifact' => :'artifact',
|
|
52
34
|
:'relative_path' => :'relative_path',
|
|
53
|
-
:'
|
|
54
|
-
:'
|
|
55
|
-
:'sha224' => :'sha224',
|
|
56
|
-
:'sha256' => :'sha256',
|
|
57
|
-
:'sha384' => :'sha384',
|
|
58
|
-
:'sha512' => :'sha512'
|
|
35
|
+
:'file' => :'file',
|
|
36
|
+
:'repository' => :'repository'
|
|
59
37
|
}
|
|
60
38
|
end
|
|
61
39
|
|
|
62
40
|
# Attribute type mapping.
|
|
63
41
|
def self.openapi_types
|
|
64
42
|
{
|
|
65
|
-
:'pulp_href' => :'String',
|
|
66
|
-
:'pulp_created' => :'DateTime',
|
|
67
43
|
:'artifact' => :'String',
|
|
68
44
|
:'relative_path' => :'String',
|
|
69
|
-
:'
|
|
70
|
-
:'
|
|
71
|
-
:'sha224' => :'String',
|
|
72
|
-
:'sha256' => :'String',
|
|
73
|
-
:'sha384' => :'String',
|
|
74
|
-
:'sha512' => :'String'
|
|
45
|
+
:'file' => :'File',
|
|
46
|
+
:'repository' => :'String'
|
|
75
47
|
}
|
|
76
48
|
end
|
|
77
49
|
|
|
@@ -96,14 +68,6 @@ module PulpDebClient
|
|
|
96
68
|
h[k.to_sym] = v
|
|
97
69
|
}
|
|
98
70
|
|
|
99
|
-
if attributes.key?(:'pulp_href')
|
|
100
|
-
self.pulp_href = attributes[:'pulp_href']
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
if attributes.key?(:'pulp_created')
|
|
104
|
-
self.pulp_created = attributes[:'pulp_created']
|
|
105
|
-
end
|
|
106
|
-
|
|
107
71
|
if attributes.key?(:'artifact')
|
|
108
72
|
self.artifact = attributes[:'artifact']
|
|
109
73
|
end
|
|
@@ -112,28 +76,12 @@ module PulpDebClient
|
|
|
112
76
|
self.relative_path = attributes[:'relative_path']
|
|
113
77
|
end
|
|
114
78
|
|
|
115
|
-
if attributes.key?(:'
|
|
116
|
-
self.
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
if attributes.key?(:'sha1')
|
|
120
|
-
self.sha1 = attributes[:'sha1']
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
if attributes.key?(:'sha224')
|
|
124
|
-
self.sha224 = attributes[:'sha224']
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
if attributes.key?(:'sha256')
|
|
128
|
-
self.sha256 = attributes[:'sha256']
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
if attributes.key?(:'sha384')
|
|
132
|
-
self.sha384 = attributes[:'sha384']
|
|
79
|
+
if attributes.key?(:'file')
|
|
80
|
+
self.file = attributes[:'file']
|
|
133
81
|
end
|
|
134
82
|
|
|
135
|
-
if attributes.key?(:'
|
|
136
|
-
self.
|
|
83
|
+
if attributes.key?(:'repository')
|
|
84
|
+
self.repository = attributes[:'repository']
|
|
137
85
|
end
|
|
138
86
|
end
|
|
139
87
|
|
|
@@ -145,34 +93,6 @@ module PulpDebClient
|
|
|
145
93
|
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
|
146
94
|
end
|
|
147
95
|
|
|
148
|
-
if @relative_path.to_s.length < 1
|
|
149
|
-
invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
if !@md5.nil? && @md5.to_s.length < 1
|
|
153
|
-
invalid_properties.push('invalid value for "md5", the character length must be great than or equal to 1.')
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
if !@sha1.nil? && @sha1.to_s.length < 1
|
|
157
|
-
invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
if !@sha224.nil? && @sha224.to_s.length < 1
|
|
161
|
-
invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
if !@sha256.nil? && @sha256.to_s.length < 1
|
|
165
|
-
invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
if !@sha384.nil? && @sha384.to_s.length < 1
|
|
169
|
-
invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
if !@sha512.nil? && @sha512.to_s.length < 1
|
|
173
|
-
invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
|
|
174
|
-
end
|
|
175
|
-
|
|
176
96
|
invalid_properties
|
|
177
97
|
end
|
|
178
98
|
|
|
@@ -180,105 +100,18 @@ module PulpDebClient
|
|
|
180
100
|
# @return true if the model is valid
|
|
181
101
|
def valid?
|
|
182
102
|
return false if @relative_path.nil?
|
|
183
|
-
return false if @relative_path.to_s.length < 1
|
|
184
|
-
return false if !@md5.nil? && @md5.to_s.length < 1
|
|
185
|
-
return false if !@sha1.nil? && @sha1.to_s.length < 1
|
|
186
|
-
return false if !@sha224.nil? && @sha224.to_s.length < 1
|
|
187
|
-
return false if !@sha256.nil? && @sha256.to_s.length < 1
|
|
188
|
-
return false if !@sha384.nil? && @sha384.to_s.length < 1
|
|
189
|
-
return false if !@sha512.nil? && @sha512.to_s.length < 1
|
|
190
103
|
true
|
|
191
104
|
end
|
|
192
105
|
|
|
193
|
-
# Custom attribute writer method with validation
|
|
194
|
-
# @param [Object] relative_path Value to be assigned
|
|
195
|
-
def relative_path=(relative_path)
|
|
196
|
-
if relative_path.nil?
|
|
197
|
-
fail ArgumentError, 'relative_path cannot be nil'
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
if relative_path.to_s.length < 1
|
|
201
|
-
fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
@relative_path = relative_path
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
# Custom attribute writer method with validation
|
|
208
|
-
# @param [Object] md5 Value to be assigned
|
|
209
|
-
def md5=(md5)
|
|
210
|
-
if !md5.nil? && md5.to_s.length < 1
|
|
211
|
-
fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
@md5 = md5
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Custom attribute writer method with validation
|
|
218
|
-
# @param [Object] sha1 Value to be assigned
|
|
219
|
-
def sha1=(sha1)
|
|
220
|
-
if !sha1.nil? && sha1.to_s.length < 1
|
|
221
|
-
fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
@sha1 = sha1
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
# Custom attribute writer method with validation
|
|
228
|
-
# @param [Object] sha224 Value to be assigned
|
|
229
|
-
def sha224=(sha224)
|
|
230
|
-
if !sha224.nil? && sha224.to_s.length < 1
|
|
231
|
-
fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
@sha224 = sha224
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
# Custom attribute writer method with validation
|
|
238
|
-
# @param [Object] sha256 Value to be assigned
|
|
239
|
-
def sha256=(sha256)
|
|
240
|
-
if !sha256.nil? && sha256.to_s.length < 1
|
|
241
|
-
fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
@sha256 = sha256
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
# Custom attribute writer method with validation
|
|
248
|
-
# @param [Object] sha384 Value to be assigned
|
|
249
|
-
def sha384=(sha384)
|
|
250
|
-
if !sha384.nil? && sha384.to_s.length < 1
|
|
251
|
-
fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
@sha384 = sha384
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
# Custom attribute writer method with validation
|
|
258
|
-
# @param [Object] sha512 Value to be assigned
|
|
259
|
-
def sha512=(sha512)
|
|
260
|
-
if !sha512.nil? && sha512.to_s.length < 1
|
|
261
|
-
fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
@sha512 = sha512
|
|
265
|
-
end
|
|
266
|
-
|
|
267
106
|
# Checks equality by comparing each attribute.
|
|
268
107
|
# @param [Object] Object to be compared
|
|
269
108
|
def ==(o)
|
|
270
109
|
return true if self.equal?(o)
|
|
271
110
|
self.class == o.class &&
|
|
272
|
-
pulp_href == o.pulp_href &&
|
|
273
|
-
pulp_created == o.pulp_created &&
|
|
274
111
|
artifact == o.artifact &&
|
|
275
112
|
relative_path == o.relative_path &&
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
sha224 == o.sha224 &&
|
|
279
|
-
sha256 == o.sha256 &&
|
|
280
|
-
sha384 == o.sha384 &&
|
|
281
|
-
sha512 == o.sha512
|
|
113
|
+
file == o.file &&
|
|
114
|
+
repository == o.repository
|
|
282
115
|
end
|
|
283
116
|
|
|
284
117
|
# @see the `==` method
|
|
@@ -290,7 +123,7 @@ module PulpDebClient
|
|
|
290
123
|
# Calculates hash code according to all attributes.
|
|
291
124
|
# @return [Integer] Hash code
|
|
292
125
|
def hash
|
|
293
|
-
[
|
|
126
|
+
[artifact, relative_path, file, repository].hash
|
|
294
127
|
end
|
|
295
128
|
|
|
296
129
|
# Builds the object from hash
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpDebClient
|
|
16
|
+
# A serializer for GenericContent.
|
|
17
|
+
class DebGenericContentResponse
|
|
18
|
+
attr_accessor :pulp_href
|
|
19
|
+
|
|
20
|
+
# Timestamp of creation.
|
|
21
|
+
attr_accessor :pulp_created
|
|
22
|
+
|
|
23
|
+
# Artifact file representing the physical content
|
|
24
|
+
attr_accessor :artifact
|
|
25
|
+
|
|
26
|
+
# Path where the artifact is located relative to distributions base_path
|
|
27
|
+
attr_accessor :relative_path
|
|
28
|
+
|
|
29
|
+
# The MD5 checksum if available.
|
|
30
|
+
attr_accessor :md5
|
|
31
|
+
|
|
32
|
+
# The SHA-1 checksum if available.
|
|
33
|
+
attr_accessor :sha1
|
|
34
|
+
|
|
35
|
+
# The SHA-224 checksum if available.
|
|
36
|
+
attr_accessor :sha224
|
|
37
|
+
|
|
38
|
+
# The SHA-256 checksum if available.
|
|
39
|
+
attr_accessor :sha256
|
|
40
|
+
|
|
41
|
+
# The SHA-384 checksum if available.
|
|
42
|
+
attr_accessor :sha384
|
|
43
|
+
|
|
44
|
+
# The SHA-512 checksum if available.
|
|
45
|
+
attr_accessor :sha512
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'pulp_href' => :'pulp_href',
|
|
51
|
+
:'pulp_created' => :'pulp_created',
|
|
52
|
+
:'artifact' => :'artifact',
|
|
53
|
+
:'relative_path' => :'relative_path',
|
|
54
|
+
:'md5' => :'md5',
|
|
55
|
+
:'sha1' => :'sha1',
|
|
56
|
+
:'sha224' => :'sha224',
|
|
57
|
+
:'sha256' => :'sha256',
|
|
58
|
+
:'sha384' => :'sha384',
|
|
59
|
+
:'sha512' => :'sha512'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'pulp_href' => :'String',
|
|
67
|
+
:'pulp_created' => :'DateTime',
|
|
68
|
+
:'artifact' => :'String',
|
|
69
|
+
:'relative_path' => :'String',
|
|
70
|
+
:'md5' => :'String',
|
|
71
|
+
:'sha1' => :'String',
|
|
72
|
+
:'sha224' => :'String',
|
|
73
|
+
:'sha256' => :'String',
|
|
74
|
+
:'sha384' => :'String',
|
|
75
|
+
:'sha512' => :'String'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
])
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Initializes the object
|
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
87
|
+
def initialize(attributes = {})
|
|
88
|
+
if (!attributes.is_a?(Hash))
|
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebGenericContentResponse` initialize method"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebGenericContentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'pulp_href')
|
|
101
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'pulp_created')
|
|
105
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'artifact')
|
|
109
|
+
self.artifact = attributes[:'artifact']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'relative_path')
|
|
113
|
+
self.relative_path = attributes[:'relative_path']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'md5')
|
|
117
|
+
self.md5 = attributes[:'md5']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'sha1')
|
|
121
|
+
self.sha1 = attributes[:'sha1']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'sha224')
|
|
125
|
+
self.sha224 = attributes[:'sha224']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'sha256')
|
|
129
|
+
self.sha256 = attributes[:'sha256']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'sha384')
|
|
133
|
+
self.sha384 = attributes[:'sha384']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'sha512')
|
|
137
|
+
self.sha512 = attributes[:'sha512']
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
142
|
+
# @return Array for valid properties with the reasons
|
|
143
|
+
def list_invalid_properties
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @relative_path.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
invalid_properties
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Check to see if the all the properties in the model are valid
|
|
153
|
+
# @return true if the model is valid
|
|
154
|
+
def valid?
|
|
155
|
+
return false if @relative_path.nil?
|
|
156
|
+
true
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Checks equality by comparing each attribute.
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def ==(o)
|
|
162
|
+
return true if self.equal?(o)
|
|
163
|
+
self.class == o.class &&
|
|
164
|
+
pulp_href == o.pulp_href &&
|
|
165
|
+
pulp_created == o.pulp_created &&
|
|
166
|
+
artifact == o.artifact &&
|
|
167
|
+
relative_path == o.relative_path &&
|
|
168
|
+
md5 == o.md5 &&
|
|
169
|
+
sha1 == o.sha1 &&
|
|
170
|
+
sha224 == o.sha224 &&
|
|
171
|
+
sha256 == o.sha256 &&
|
|
172
|
+
sha384 == o.sha384 &&
|
|
173
|
+
sha512 == o.sha512
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @see the `==` method
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def eql?(o)
|
|
179
|
+
self == o
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Calculates hash code according to all attributes.
|
|
183
|
+
# @return [Integer] Hash code
|
|
184
|
+
def hash
|
|
185
|
+
[pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Builds the object from hash
|
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
190
|
+
# @return [Object] Returns the model itself
|
|
191
|
+
def self.build_from_hash(attributes)
|
|
192
|
+
new.build_from_hash(attributes)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Builds the object from hash
|
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
|
+
# @return [Object] Returns the model itself
|
|
198
|
+
def build_from_hash(attributes)
|
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
|
200
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
201
|
+
if type =~ /\AArray<(.*)>/i
|
|
202
|
+
# check to ensure the input is an array given that the attribute
|
|
203
|
+
# is documented as an array but the input is not
|
|
204
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
205
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
206
|
+
end
|
|
207
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
208
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
209
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
self
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Deserializes the data based on type
|
|
216
|
+
# @param string type Data type
|
|
217
|
+
# @param string value Value to be deserialized
|
|
218
|
+
# @return [Object] Deserialized data
|
|
219
|
+
def _deserialize(type, value)
|
|
220
|
+
case type.to_sym
|
|
221
|
+
when :DateTime
|
|
222
|
+
DateTime.parse(value)
|
|
223
|
+
when :Date
|
|
224
|
+
Date.parse(value)
|
|
225
|
+
when :String
|
|
226
|
+
value.to_s
|
|
227
|
+
when :Integer
|
|
228
|
+
value.to_i
|
|
229
|
+
when :Float
|
|
230
|
+
value.to_f
|
|
231
|
+
when :Boolean
|
|
232
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
233
|
+
true
|
|
234
|
+
else
|
|
235
|
+
false
|
|
236
|
+
end
|
|
237
|
+
when :Object
|
|
238
|
+
# generic object (usually a Hash), return directly
|
|
239
|
+
value
|
|
240
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
241
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
242
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
243
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
244
|
+
k_type = Regexp.last_match[:k_type]
|
|
245
|
+
v_type = Regexp.last_match[:v_type]
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each do |k, v|
|
|
248
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
else # model
|
|
252
|
+
PulpDebClient.const_get(type).build_from_hash(value)
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the string representation of the object
|
|
257
|
+
# @return [String] String presentation of the object
|
|
258
|
+
def to_s
|
|
259
|
+
to_hash.to_s
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
|
264
|
+
def to_body
|
|
265
|
+
to_hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Returns the object in the form of hash
|
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
|
270
|
+
def to_hash
|
|
271
|
+
hash = {}
|
|
272
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
273
|
+
value = self.send(attr)
|
|
274
|
+
if value.nil?
|
|
275
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
276
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
hash[param] = _to_hash(value)
|
|
280
|
+
end
|
|
281
|
+
hash
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Outputs non-array value in the form of hash
|
|
285
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
286
|
+
# @param [Object] value Any valid value
|
|
287
|
+
# @return [Hash] Returns the value in the form of hash
|
|
288
|
+
def _to_hash(value)
|
|
289
|
+
if value.is_a?(Array)
|
|
290
|
+
value.compact.map { |v| _to_hash(v) }
|
|
291
|
+
elsif value.is_a?(Hash)
|
|
292
|
+
{}.tap do |hash|
|
|
293
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
294
|
+
end
|
|
295
|
+
elsif value.respond_to? :to_hash
|
|
296
|
+
value.to_hash
|
|
297
|
+
else
|
|
298
|
+
value
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
end
|