pulp_python_client 3.0.0b9 → 3.0.0b11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -42
- data/docs/ContentPackagesApi.md +54 -56
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsPypiApi.md +108 -60
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.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/PatchedpythonPythonDistribution.md +23 -0
- data/docs/PatchedpythonPythonRemote.md +43 -0
- data/docs/PatchedpythonPythonRepository.md +21 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsPypiApi.md +40 -40
- data/docs/PythonBanderRemote.md +19 -0
- data/docs/PythonPythonDistribution.md +1 -7
- data/docs/{PythonPythonDistributionRead.md → PythonPythonDistributionResponse.md} +2 -2
- data/docs/PythonPythonPackageContent.md +61 -0
- data/docs/{PythonPythonPackageContentRead.md → PythonPythonPackageContentResponse.md} +3 -3
- data/docs/PythonPythonPublication.md +2 -8
- data/docs/{PythonPythonPublicationRead.md → PythonPythonPublicationResponse.md} +2 -2
- data/docs/PythonPythonRemote.md +6 -12
- data/docs/{PythonPythonRemoteRead.md → PythonPythonRemoteResponse.md} +7 -7
- data/docs/PythonPythonRepository.md +4 -10
- data/docs/{PythonPythonRepositoryRead.md → PythonPythonRepositoryResponse.md} +5 -3
- data/docs/RemotesPythonApi.md +181 -65
- data/docs/RepositoriesPythonApi.md +97 -73
- data/docs/RepositoriesPythonVersionsApi.md +94 -60
- data/docs/RepositoryAddRemoveContent.md +2 -2
- data/docs/RepositorySyncURL.md +1 -1
- data/docs/RepositoryVersion.md +1 -9
- data/docs/{RepositoryVersionRead.md → RepositoryVersionResponse.md} +3 -3
- data/lib/pulp_python_client.rb +15 -9
- data/lib/pulp_python_client/api/content_packages_api.rb +73 -84
- data/lib/pulp_python_client/api/distributions_pypi_api.rb +153 -90
- data/lib/pulp_python_client/api/publications_pypi_api.rb +59 -59
- data/lib/pulp_python_client/api/remotes_python_api.rb +253 -100
- data/lib/pulp_python_client/api/repositories_python_api.rb +145 -118
- data/lib/pulp_python_client/api/repositories_python_versions_api.rb +137 -89
- data/lib/pulp_python_client/api_client.rb +2 -2
- data/lib/pulp_python_client/api_error.rb +2 -2
- data/lib/pulp_python_client/configuration.rb +3 -3
- data/lib/pulp_python_client/models/async_operation_response.rb +3 -2
- data/lib/pulp_python_client/models/content_summary.rb +9 -15
- data/lib/pulp_python_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_python_client/models/inline_response200.rb +3 -13
- data/lib/pulp_python_client/models/inline_response2001.rb +3 -13
- data/lib/pulp_python_client/models/inline_response2002.rb +3 -13
- data/lib/pulp_python_client/models/inline_response2003.rb +3 -13
- data/lib/pulp_python_client/models/inline_response2004.rb +3 -13
- data/lib/pulp_python_client/models/inline_response2005.rb +3 -13
- data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +240 -0
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +359 -0
- data/lib/pulp_python_client/models/patchedpython_python_repository.rb +229 -0
- data/lib/pulp_python_client/models/policy_enum.rb +37 -0
- data/lib/pulp_python_client/models/{project_specifier.rb → python_bander_remote.rb} +26 -40
- data/lib/pulp_python_client/models/python_python_distribution.rb +4 -85
- data/lib/pulp_python_client/models/{python_python_distribution_read.rb → python_python_distribution_response.rb} +6 -58
- data/lib/pulp_python_client/models/python_python_package_content.rb +433 -0
- data/lib/pulp_python_client/models/{python_python_package_content_read.rb → python_python_package_content_response.rb} +6 -89
- data/lib/pulp_python_client/models/python_python_publication.rb +7 -37
- data/lib/pulp_python_client/models/{python_python_publication_read.rb → python_python_publication_response.rb} +6 -5
- data/lib/pulp_python_client/models/python_python_remote.rb +13 -209
- data/lib/pulp_python_client/models/{python_python_remote_read.rb → python_python_remote_response.rb} +15 -182
- data/lib/pulp_python_client/models/python_python_repository.rb +18 -78
- data/lib/pulp_python_client/models/{python_python_repository_read.rb → python_python_repository_response.rb} +21 -44
- data/lib/pulp_python_client/models/repository_add_remove_content.rb +5 -4
- data/lib/pulp_python_client/models/repository_sync_url.rb +3 -8
- data/lib/pulp_python_client/models/repository_version.rb +7 -43
- data/lib/pulp_python_client/models/{repository_version_read.rb → repository_version_response.rb} +8 -6
- data/lib/pulp_python_client/version.rb +3 -3
- data/pulp_python_client.gemspec +4 -4
- data/spec/api/content_packages_api_spec.rb +24 -25
- data/spec/api/distributions_pypi_api_spec.rb +39 -18
- data/spec/api/publications_pypi_api_spec.rb +14 -14
- data/spec/api/remotes_python_api_spec.rb +61 -21
- data/spec/api/repositories_python_api_spec.rb +28 -19
- data/spec/api/repositories_python_versions_api_spec.rb +38 -22
- 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/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_response200_spec.rb +2 -2
- data/spec/models/patchedpython_python_distribution_spec.rb +59 -0
- data/spec/models/patchedpython_python_remote_spec.rb +119 -0
- data/spec/models/patchedpython_python_repository_spec.rb +53 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/{project_specifier_spec.rb → python_bander_remote_spec.rb} +10 -10
- data/spec/models/{python_python_distribution_read_spec.rb → python_python_distribution_response_spec.rb} +8 -8
- data/spec/models/python_python_distribution_spec.rb +2 -20
- data/spec/models/{python_python_package_content_read_spec.rb → python_python_package_content_response_spec.rb} +8 -8
- data/spec/models/python_python_package_content_spec.rb +173 -0
- data/spec/models/{python_python_publication_read_spec.rb → python_python_publication_response_spec.rb} +8 -8
- data/spec/models/python_python_publication_spec.rb +2 -20
- data/spec/models/{python_python_remote_read_spec.rb → python_python_remote_response_spec.rb} +8 -12
- data/spec/models/python_python_remote_spec.rb +2 -24
- data/spec/models/{python_python_repository_read_spec.rb → python_python_repository_response_spec.rb} +14 -8
- data/spec/models/python_python_repository_spec.rb +5 -23
- 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_read_spec.rb → repository_version_response_spec.rb} +8 -8
- data/spec/models/repository_version_spec.rb +2 -26
- data/spec/spec_helper.rb +2 -2
- metadata +70 -46
- data/docs/ProjectSpecifier.md +0 -19
@@ -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,7 +13,8 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpPythonClient
|
16
|
-
|
16
|
+
# Serializer for Pulp distributions for the Python type.
|
17
|
+
class PythonPythonDistributionResponse
|
17
18
|
attr_accessor :pulp_href
|
18
19
|
|
19
20
|
# Timestamp of creation.
|
@@ -72,13 +73,13 @@ module PulpPythonClient
|
|
72
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
73
74
|
def initialize(attributes = {})
|
74
75
|
if (!attributes.is_a?(Hash))
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonDistributionResponse` initialize method"
|
76
77
|
end
|
77
78
|
|
78
79
|
# check to see if the attribute exists and convert string to symbol for hash key
|
79
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
81
|
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonDistributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
83
|
end
|
83
84
|
h[k.to_sym] = v
|
84
85
|
}
|
@@ -120,22 +121,10 @@ module PulpPythonClient
|
|
120
121
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
121
122
|
end
|
122
123
|
|
123
|
-
if @base_path.to_s.length < 1
|
124
|
-
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
125
|
-
end
|
126
|
-
|
127
|
-
if !@base_url.nil? && @base_url.to_s.length < 1
|
128
|
-
invalid_properties.push('invalid value for "base_url", the character length must be great than or equal to 1.')
|
129
|
-
end
|
130
|
-
|
131
124
|
if @name.nil?
|
132
125
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
133
126
|
end
|
134
127
|
|
135
|
-
if @name.to_s.length < 1
|
136
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
137
|
-
end
|
138
|
-
|
139
128
|
invalid_properties
|
140
129
|
end
|
141
130
|
|
@@ -143,51 +132,10 @@ module PulpPythonClient
|
|
143
132
|
# @return true if the model is valid
|
144
133
|
def valid?
|
145
134
|
return false if @base_path.nil?
|
146
|
-
return false if @base_path.to_s.length < 1
|
147
|
-
return false if !@base_url.nil? && @base_url.to_s.length < 1
|
148
135
|
return false if @name.nil?
|
149
|
-
return false if @name.to_s.length < 1
|
150
136
|
true
|
151
137
|
end
|
152
138
|
|
153
|
-
# Custom attribute writer method with validation
|
154
|
-
# @param [Object] base_path Value to be assigned
|
155
|
-
def base_path=(base_path)
|
156
|
-
if base_path.nil?
|
157
|
-
fail ArgumentError, 'base_path cannot be nil'
|
158
|
-
end
|
159
|
-
|
160
|
-
if base_path.to_s.length < 1
|
161
|
-
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
162
|
-
end
|
163
|
-
|
164
|
-
@base_path = base_path
|
165
|
-
end
|
166
|
-
|
167
|
-
# Custom attribute writer method with validation
|
168
|
-
# @param [Object] base_url Value to be assigned
|
169
|
-
def base_url=(base_url)
|
170
|
-
if !base_url.nil? && base_url.to_s.length < 1
|
171
|
-
fail ArgumentError, 'invalid value for "base_url", the character length must be great than or equal to 1.'
|
172
|
-
end
|
173
|
-
|
174
|
-
@base_url = base_url
|
175
|
-
end
|
176
|
-
|
177
|
-
# Custom attribute writer method with validation
|
178
|
-
# @param [Object] name Value to be assigned
|
179
|
-
def name=(name)
|
180
|
-
if name.nil?
|
181
|
-
fail ArgumentError, 'name cannot be nil'
|
182
|
-
end
|
183
|
-
|
184
|
-
if name.to_s.length < 1
|
185
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
186
|
-
end
|
187
|
-
|
188
|
-
@name = name
|
189
|
-
end
|
190
|
-
|
191
139
|
# Checks equality by comparing each attribute.
|
192
140
|
# @param [Object] Object to be compared
|
193
141
|
def ==(o)
|
@@ -0,0 +1,433 @@
|
|
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 PulpPythonClient
|
16
|
+
# A Serializer for PythonPackageContent.
|
17
|
+
class PythonPythonPackageContent
|
18
|
+
# Artifact file representing the physical content
|
19
|
+
attr_accessor :artifact
|
20
|
+
|
21
|
+
# Path where the artifact is located relative to distributions base_path
|
22
|
+
attr_accessor :relative_path
|
23
|
+
|
24
|
+
# An uploaded file that may be turned into the artifact of the content unit.
|
25
|
+
attr_accessor :file
|
26
|
+
|
27
|
+
# A URI of a repository the new content unit should be associated with.
|
28
|
+
attr_accessor :repository
|
29
|
+
|
30
|
+
# A one-line summary of what the package does.
|
31
|
+
attr_accessor :summary
|
32
|
+
|
33
|
+
# A longer description of the package that can run to several paragraphs.
|
34
|
+
attr_accessor :description
|
35
|
+
|
36
|
+
# Additional keywords to be used to assist searching for the package in a larger catalog.
|
37
|
+
attr_accessor :keywords
|
38
|
+
|
39
|
+
# The URL for the package's home page.
|
40
|
+
attr_accessor :home_page
|
41
|
+
|
42
|
+
# Legacy field denoting the URL from which this package can be downloaded.
|
43
|
+
attr_accessor :download_url
|
44
|
+
|
45
|
+
# Text containing the author's name. Contact information can also be added, separated with newlines.
|
46
|
+
attr_accessor :author
|
47
|
+
|
48
|
+
# The author's e-mail address.
|
49
|
+
attr_accessor :author_email
|
50
|
+
|
51
|
+
# The maintainer's name at a minimum; additional contact information may be provided.
|
52
|
+
attr_accessor :maintainer
|
53
|
+
|
54
|
+
# The maintainer's e-mail address.
|
55
|
+
attr_accessor :maintainer_email
|
56
|
+
|
57
|
+
# Text indicating the license covering the distribution
|
58
|
+
attr_accessor :license
|
59
|
+
|
60
|
+
# The Python version(s) that the distribution is guaranteed to be compatible with.
|
61
|
+
attr_accessor :requires_python
|
62
|
+
|
63
|
+
# A browsable URL for the project and a label for it, separated by a comma.
|
64
|
+
attr_accessor :project_url
|
65
|
+
|
66
|
+
# A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
|
67
|
+
attr_accessor :platform
|
68
|
+
|
69
|
+
# Field to specify the OS and CPU for which the binary package was compiled.
|
70
|
+
attr_accessor :supported_platform
|
71
|
+
|
72
|
+
# A JSON list containing names of some other distutils project required by this distribution.
|
73
|
+
attr_accessor :requires_dist
|
74
|
+
|
75
|
+
# A JSON list containing names of a Distutils project which is contained within this distribution.
|
76
|
+
attr_accessor :provides_dist
|
77
|
+
|
78
|
+
# A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
|
79
|
+
attr_accessor :obsoletes_dist
|
80
|
+
|
81
|
+
# A JSON list containing some dependency in the system that the distribution is to be used.
|
82
|
+
attr_accessor :requires_external
|
83
|
+
|
84
|
+
# A JSON list containing classification values for a Python package.
|
85
|
+
attr_accessor :classifiers
|
86
|
+
|
87
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
88
|
+
def self.attribute_map
|
89
|
+
{
|
90
|
+
:'artifact' => :'artifact',
|
91
|
+
:'relative_path' => :'relative_path',
|
92
|
+
:'file' => :'file',
|
93
|
+
:'repository' => :'repository',
|
94
|
+
:'summary' => :'summary',
|
95
|
+
:'description' => :'description',
|
96
|
+
:'keywords' => :'keywords',
|
97
|
+
:'home_page' => :'home_page',
|
98
|
+
:'download_url' => :'download_url',
|
99
|
+
:'author' => :'author',
|
100
|
+
:'author_email' => :'author_email',
|
101
|
+
:'maintainer' => :'maintainer',
|
102
|
+
:'maintainer_email' => :'maintainer_email',
|
103
|
+
:'license' => :'license',
|
104
|
+
:'requires_python' => :'requires_python',
|
105
|
+
:'project_url' => :'project_url',
|
106
|
+
:'platform' => :'platform',
|
107
|
+
:'supported_platform' => :'supported_platform',
|
108
|
+
:'requires_dist' => :'requires_dist',
|
109
|
+
:'provides_dist' => :'provides_dist',
|
110
|
+
:'obsoletes_dist' => :'obsoletes_dist',
|
111
|
+
:'requires_external' => :'requires_external',
|
112
|
+
:'classifiers' => :'classifiers'
|
113
|
+
}
|
114
|
+
end
|
115
|
+
|
116
|
+
# Attribute type mapping.
|
117
|
+
def self.openapi_types
|
118
|
+
{
|
119
|
+
:'artifact' => :'String',
|
120
|
+
:'relative_path' => :'String',
|
121
|
+
:'file' => :'File',
|
122
|
+
:'repository' => :'String',
|
123
|
+
:'summary' => :'String',
|
124
|
+
:'description' => :'String',
|
125
|
+
:'keywords' => :'String',
|
126
|
+
:'home_page' => :'String',
|
127
|
+
:'download_url' => :'String',
|
128
|
+
:'author' => :'String',
|
129
|
+
:'author_email' => :'String',
|
130
|
+
:'maintainer' => :'String',
|
131
|
+
:'maintainer_email' => :'String',
|
132
|
+
:'license' => :'String',
|
133
|
+
:'requires_python' => :'String',
|
134
|
+
:'project_url' => :'String',
|
135
|
+
:'platform' => :'String',
|
136
|
+
:'supported_platform' => :'String',
|
137
|
+
:'requires_dist' => :'Object',
|
138
|
+
:'provides_dist' => :'Object',
|
139
|
+
:'obsoletes_dist' => :'Object',
|
140
|
+
:'requires_external' => :'Object',
|
141
|
+
:'classifiers' => :'Object'
|
142
|
+
}
|
143
|
+
end
|
144
|
+
|
145
|
+
# List of attributes with nullable: true
|
146
|
+
def self.openapi_nullable
|
147
|
+
Set.new([
|
148
|
+
])
|
149
|
+
end
|
150
|
+
|
151
|
+
# Initializes the object
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
def initialize(attributes = {})
|
154
|
+
if (!attributes.is_a?(Hash))
|
155
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonPackageContent` initialize method"
|
156
|
+
end
|
157
|
+
|
158
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
159
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
160
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
161
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonPackageContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
162
|
+
end
|
163
|
+
h[k.to_sym] = v
|
164
|
+
}
|
165
|
+
|
166
|
+
if attributes.key?(:'artifact')
|
167
|
+
self.artifact = attributes[:'artifact']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'relative_path')
|
171
|
+
self.relative_path = attributes[:'relative_path']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'file')
|
175
|
+
self.file = attributes[:'file']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'repository')
|
179
|
+
self.repository = attributes[:'repository']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'summary')
|
183
|
+
self.summary = attributes[:'summary']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'description')
|
187
|
+
self.description = attributes[:'description']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'keywords')
|
191
|
+
self.keywords = attributes[:'keywords']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'home_page')
|
195
|
+
self.home_page = attributes[:'home_page']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'download_url')
|
199
|
+
self.download_url = attributes[:'download_url']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'author')
|
203
|
+
self.author = attributes[:'author']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'author_email')
|
207
|
+
self.author_email = attributes[:'author_email']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'maintainer')
|
211
|
+
self.maintainer = attributes[:'maintainer']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'maintainer_email')
|
215
|
+
self.maintainer_email = attributes[:'maintainer_email']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'license')
|
219
|
+
self.license = attributes[:'license']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'requires_python')
|
223
|
+
self.requires_python = attributes[:'requires_python']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'project_url')
|
227
|
+
self.project_url = attributes[:'project_url']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'platform')
|
231
|
+
self.platform = attributes[:'platform']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'supported_platform')
|
235
|
+
self.supported_platform = attributes[:'supported_platform']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'requires_dist')
|
239
|
+
self.requires_dist = attributes[:'requires_dist']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'provides_dist')
|
243
|
+
self.provides_dist = attributes[:'provides_dist']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'obsoletes_dist')
|
247
|
+
self.obsoletes_dist = attributes[:'obsoletes_dist']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'requires_external')
|
251
|
+
self.requires_external = attributes[:'requires_external']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.key?(:'classifiers')
|
255
|
+
self.classifiers = attributes[:'classifiers']
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
260
|
+
# @return Array for valid properties with the reasons
|
261
|
+
def list_invalid_properties
|
262
|
+
invalid_properties = Array.new
|
263
|
+
if @relative_path.nil?
|
264
|
+
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
265
|
+
end
|
266
|
+
|
267
|
+
invalid_properties
|
268
|
+
end
|
269
|
+
|
270
|
+
# Check to see if the all the properties in the model are valid
|
271
|
+
# @return true if the model is valid
|
272
|
+
def valid?
|
273
|
+
return false if @relative_path.nil?
|
274
|
+
true
|
275
|
+
end
|
276
|
+
|
277
|
+
# Checks equality by comparing each attribute.
|
278
|
+
# @param [Object] Object to be compared
|
279
|
+
def ==(o)
|
280
|
+
return true if self.equal?(o)
|
281
|
+
self.class == o.class &&
|
282
|
+
artifact == o.artifact &&
|
283
|
+
relative_path == o.relative_path &&
|
284
|
+
file == o.file &&
|
285
|
+
repository == o.repository &&
|
286
|
+
summary == o.summary &&
|
287
|
+
description == o.description &&
|
288
|
+
keywords == o.keywords &&
|
289
|
+
home_page == o.home_page &&
|
290
|
+
download_url == o.download_url &&
|
291
|
+
author == o.author &&
|
292
|
+
author_email == o.author_email &&
|
293
|
+
maintainer == o.maintainer &&
|
294
|
+
maintainer_email == o.maintainer_email &&
|
295
|
+
license == o.license &&
|
296
|
+
requires_python == o.requires_python &&
|
297
|
+
project_url == o.project_url &&
|
298
|
+
platform == o.platform &&
|
299
|
+
supported_platform == o.supported_platform &&
|
300
|
+
requires_dist == o.requires_dist &&
|
301
|
+
provides_dist == o.provides_dist &&
|
302
|
+
obsoletes_dist == o.obsoletes_dist &&
|
303
|
+
requires_external == o.requires_external &&
|
304
|
+
classifiers == o.classifiers
|
305
|
+
end
|
306
|
+
|
307
|
+
# @see the `==` method
|
308
|
+
# @param [Object] Object to be compared
|
309
|
+
def eql?(o)
|
310
|
+
self == o
|
311
|
+
end
|
312
|
+
|
313
|
+
# Calculates hash code according to all attributes.
|
314
|
+
# @return [Integer] Hash code
|
315
|
+
def hash
|
316
|
+
[artifact, relative_path, file, repository, summary, description, keywords, home_page, download_url, author, author_email, maintainer, maintainer_email, license, requires_python, project_url, platform, supported_platform, requires_dist, provides_dist, obsoletes_dist, requires_external, classifiers].hash
|
317
|
+
end
|
318
|
+
|
319
|
+
# Builds the object from hash
|
320
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
321
|
+
# @return [Object] Returns the model itself
|
322
|
+
def self.build_from_hash(attributes)
|
323
|
+
new.build_from_hash(attributes)
|
324
|
+
end
|
325
|
+
|
326
|
+
# Builds the object from hash
|
327
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
328
|
+
# @return [Object] Returns the model itself
|
329
|
+
def build_from_hash(attributes)
|
330
|
+
return nil unless attributes.is_a?(Hash)
|
331
|
+
self.class.openapi_types.each_pair do |key, type|
|
332
|
+
if type =~ /\AArray<(.*)>/i
|
333
|
+
# check to ensure the input is an array given that the attribute
|
334
|
+
# is documented as an array but the input is not
|
335
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
336
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
337
|
+
end
|
338
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
339
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
340
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
341
|
+
end
|
342
|
+
|
343
|
+
self
|
344
|
+
end
|
345
|
+
|
346
|
+
# Deserializes the data based on type
|
347
|
+
# @param string type Data type
|
348
|
+
# @param string value Value to be deserialized
|
349
|
+
# @return [Object] Deserialized data
|
350
|
+
def _deserialize(type, value)
|
351
|
+
case type.to_sym
|
352
|
+
when :DateTime
|
353
|
+
DateTime.parse(value)
|
354
|
+
when :Date
|
355
|
+
Date.parse(value)
|
356
|
+
when :String
|
357
|
+
value.to_s
|
358
|
+
when :Integer
|
359
|
+
value.to_i
|
360
|
+
when :Float
|
361
|
+
value.to_f
|
362
|
+
when :Boolean
|
363
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
364
|
+
true
|
365
|
+
else
|
366
|
+
false
|
367
|
+
end
|
368
|
+
when :Object
|
369
|
+
# generic object (usually a Hash), return directly
|
370
|
+
value
|
371
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
372
|
+
inner_type = Regexp.last_match[:inner_type]
|
373
|
+
value.map { |v| _deserialize(inner_type, v) }
|
374
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
375
|
+
k_type = Regexp.last_match[:k_type]
|
376
|
+
v_type = Regexp.last_match[:v_type]
|
377
|
+
{}.tap do |hash|
|
378
|
+
value.each do |k, v|
|
379
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
380
|
+
end
|
381
|
+
end
|
382
|
+
else # model
|
383
|
+
PulpPythonClient.const_get(type).build_from_hash(value)
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
# Returns the string representation of the object
|
388
|
+
# @return [String] String presentation of the object
|
389
|
+
def to_s
|
390
|
+
to_hash.to_s
|
391
|
+
end
|
392
|
+
|
393
|
+
# to_body is an alias to to_hash (backward compatibility)
|
394
|
+
# @return [Hash] Returns the object in the form of hash
|
395
|
+
def to_body
|
396
|
+
to_hash
|
397
|
+
end
|
398
|
+
|
399
|
+
# Returns the object in the form of hash
|
400
|
+
# @return [Hash] Returns the object in the form of hash
|
401
|
+
def to_hash
|
402
|
+
hash = {}
|
403
|
+
self.class.attribute_map.each_pair do |attr, param|
|
404
|
+
value = self.send(attr)
|
405
|
+
if value.nil?
|
406
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
407
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
408
|
+
end
|
409
|
+
|
410
|
+
hash[param] = _to_hash(value)
|
411
|
+
end
|
412
|
+
hash
|
413
|
+
end
|
414
|
+
|
415
|
+
# Outputs non-array value in the form of hash
|
416
|
+
# For object, use to_hash. Otherwise, just return the value
|
417
|
+
# @param [Object] value Any valid value
|
418
|
+
# @return [Hash] Returns the value in the form of hash
|
419
|
+
def _to_hash(value)
|
420
|
+
if value.is_a?(Array)
|
421
|
+
value.compact.map { |v| _to_hash(v) }
|
422
|
+
elsif value.is_a?(Hash)
|
423
|
+
{}.tap do |hash|
|
424
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
425
|
+
end
|
426
|
+
elsif value.respond_to? :to_hash
|
427
|
+
value.to_hash
|
428
|
+
else
|
429
|
+
value
|
430
|
+
end
|
431
|
+
end
|
432
|
+
end
|
433
|
+
end
|