pulp_deb_client 2.3.0b1 → 2.4.0b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -8
- data/docs/ContentGenericContentsApi.md +5 -5
- data/docs/ContentInstallerFileIndicesApi.md +5 -5
- data/docs/ContentInstallerPackagesApi.md +5 -5
- data/docs/ContentPackageIndicesApi.md +5 -5
- data/docs/ContentPackageReleaseComponentsApi.md +5 -5
- data/docs/ContentPackagesApi.md +5 -5
- data/docs/ContentReleaseArchitecturesApi.md +5 -5
- data/docs/ContentReleaseComponentsApi.md +5 -5
- data/docs/ContentReleaseFilesApi.md +5 -5
- data/docs/ContentReleasesApi.md +5 -5
- data/docs/{DebBasePackage.md → DebBasePackageRead.md} +2 -2
- data/docs/DebDebDistributionRead.md +29 -0
- data/docs/DebDebPublicationRead.md +29 -0
- data/docs/DebDebRemote.md +7 -3
- data/docs/DebDebRemoteRead.md +57 -0
- data/docs/DebDebRepositoryRead.md +27 -0
- data/docs/{DebGenericContent.md → DebGenericContentRead.md} +2 -2
- data/docs/DebInstallerFileIndexRead.md +29 -0
- data/docs/DebPackageIndexRead.md +29 -0
- data/docs/DebPackageReleaseComponentRead.md +23 -0
- data/docs/DebReleaseArchitectureRead.md +23 -0
- data/docs/DebReleaseComponentRead.md +23 -0
- data/docs/DebReleaseFileRead.md +29 -0
- data/docs/DebReleaseRead.md +25 -0
- data/docs/DebVerbatimPublicationRead.md +23 -0
- data/docs/DistributionsAptApi.md +3 -3
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +1 -1
- data/docs/InlineResponse20011.md +1 -1
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +1 -1
- data/docs/InlineResponse20014.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/PublicationsAptApi.md +3 -3
- data/docs/PublicationsVerbatimApi.md +3 -3
- data/docs/RemotesAptApi.md +5 -5
- data/docs/RepositoriesAptApi.md +10 -10
- data/docs/RepositoriesDebVersionsApi.md +3 -3
- data/docs/RepositoryVersionRead.md +25 -0
- data/lib/pulp_deb_client/api/content_generic_contents_api.rb +5 -5
- data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +5 -5
- data/lib/pulp_deb_client/api/content_package_indices_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_package_release_components_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_packages_api.rb +5 -5
- data/lib/pulp_deb_client/api/content_release_architectures_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_release_components_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_release_files_api.rb +6 -6
- data/lib/pulp_deb_client/api/content_releases_api.rb +6 -6
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +3 -3
- data/lib/pulp_deb_client/api/publications_apt_api.rb +3 -3
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +3 -3
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +6 -6
- data/lib/pulp_deb_client/api/repositories_apt_api.rb +15 -15
- data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +3 -3
- data/lib/pulp_deb_client/configuration.rb +2 -2
- data/lib/pulp_deb_client/models/{deb_base_package.rb → deb_base_package_read.rb} +3 -3
- data/lib/pulp_deb_client/models/deb_deb_distribution_read.rb +331 -0
- data/lib/pulp_deb_client/models/deb_deb_publication_read.rb +269 -0
- data/lib/pulp_deb_client/models/deb_deb_remote.rb +56 -4
- data/lib/pulp_deb_client/models/deb_deb_remote_read.rb +670 -0
- data/lib/pulp_deb_client/models/deb_deb_repository_read.rb +294 -0
- data/lib/pulp_deb_client/models/{deb_generic_content.rb → deb_generic_content_read.rb} +3 -3
- data/lib/pulp_deb_client/models/deb_installer_file_index_read.rb +341 -0
- data/lib/pulp_deb_client/models/deb_package_index_read.rb +341 -0
- data/lib/pulp_deb_client/models/deb_package_release_component_read.rb +246 -0
- data/lib/pulp_deb_client/models/deb_release_architecture_read.rb +265 -0
- data/lib/pulp_deb_client/models/deb_release_component_read.rb +265 -0
- data/lib/pulp_deb_client/models/deb_release_file_read.rb +342 -0
- data/lib/pulp_deb_client/models/deb_release_read.rb +315 -0
- data/lib/pulp_deb_client/models/deb_verbatim_publication_read.rb +235 -0
- data/lib/pulp_deb_client/models/inline_response200.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response20010.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response20011.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response20012.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response20013.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response20014.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2003.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2004.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2005.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2006.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2007.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2008.rb +1 -1
- data/lib/pulp_deb_client/models/inline_response2009.rb +1 -1
- data/lib/pulp_deb_client/models/repository_version_read.rb +244 -0
- data/lib/pulp_deb_client/version.rb +1 -1
- data/lib/pulp_deb_client.rb +15 -2
- data/spec/api/content_generic_contents_api_spec.rb +2 -2
- data/spec/api/content_installer_file_indices_api_spec.rb +2 -2
- data/spec/api/content_installer_packages_api_spec.rb +2 -2
- data/spec/api/content_package_indices_api_spec.rb +2 -2
- data/spec/api/content_package_release_components_api_spec.rb +2 -2
- data/spec/api/content_packages_api_spec.rb +2 -2
- data/spec/api/content_release_architectures_api_spec.rb +2 -2
- data/spec/api/content_release_components_api_spec.rb +2 -2
- data/spec/api/content_release_files_api_spec.rb +2 -2
- data/spec/api/content_releases_api_spec.rb +2 -2
- data/spec/api/distributions_apt_api_spec.rb +1 -1
- data/spec/api/publications_apt_api_spec.rb +1 -1
- data/spec/api/publications_verbatim_api_spec.rb +1 -1
- data/spec/api/remotes_apt_api_spec.rb +2 -2
- data/spec/api/repositories_apt_api_spec.rb +6 -6
- data/spec/api/repositories_deb_versions_api_spec.rb +1 -1
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/{deb_base_package_spec.rb → deb_base_package_read_spec.rb} +6 -6
- data/spec/models/deb_deb_distribution_read_spec.rb +77 -0
- data/spec/models/deb_deb_publication_read_spec.rb +77 -0
- data/spec/models/deb_deb_remote_read_spec.rb +165 -0
- data/spec/models/deb_deb_remote_spec.rb +12 -0
- data/spec/models/deb_deb_repository_read_spec.rb +71 -0
- data/spec/models/{deb_generic_content_spec.rb → deb_generic_content_read_spec.rb} +6 -6
- data/spec/models/deb_installer_file_index_read_spec.rb +77 -0
- data/spec/models/deb_package_index_read_spec.rb +77 -0
- data/spec/models/deb_package_release_component_read_spec.rb +59 -0
- data/spec/models/deb_release_architecture_read_spec.rb +59 -0
- data/spec/models/deb_release_component_read_spec.rb +59 -0
- data/spec/models/deb_release_file_read_spec.rb +77 -0
- data/spec/models/deb_release_read_spec.rb +65 -0
- data/spec/models/deb_verbatim_publication_read_spec.rb +59 -0
- data/spec/models/repository_version_read_spec.rb +65 -0
- metadata +62 -10
@@ -0,0 +1,235 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
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
|
+
class DebVerbatimPublicationRead
|
17
|
+
attr_accessor :pulp_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :pulp_created
|
21
|
+
|
22
|
+
attr_accessor :repository_version
|
23
|
+
|
24
|
+
# A URI of the repository to be published.
|
25
|
+
attr_accessor :repository
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'pulp_href' => :'pulp_href',
|
31
|
+
:'pulp_created' => :'pulp_created',
|
32
|
+
:'repository_version' => :'repository_version',
|
33
|
+
:'repository' => :'repository'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'pulp_href' => :'String',
|
41
|
+
:'pulp_created' => :'DateTime',
|
42
|
+
:'repository_version' => :'String',
|
43
|
+
:'repository' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebVerbatimPublicationRead` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebVerbatimPublicationRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'pulp_href')
|
69
|
+
self.pulp_href = attributes[:'pulp_href']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'pulp_created')
|
73
|
+
self.pulp_created = attributes[:'pulp_created']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'repository_version')
|
77
|
+
self.repository_version = attributes[:'repository_version']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'repository')
|
81
|
+
self.repository = attributes[:'repository']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
pulp_href == o.pulp_href &&
|
104
|
+
pulp_created == o.pulp_created &&
|
105
|
+
repository_version == o.repository_version &&
|
106
|
+
repository == o.repository
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Integer] Hash code
|
117
|
+
def hash
|
118
|
+
[pulp_href, pulp_created, repository_version, repository].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def self.build_from_hash(attributes)
|
125
|
+
new.build_from_hash(attributes)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
self.class.openapi_types.each_pair do |key, type|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :DateTime
|
155
|
+
DateTime.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
PulpDebClient.const_get(type).build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
if value.nil?
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
210
|
+
end
|
211
|
+
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
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
|
+
class RepositoryVersionRead
|
17
|
+
attr_accessor :pulp_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :pulp_created
|
21
|
+
|
22
|
+
attr_accessor :number
|
23
|
+
|
24
|
+
# A repository version whose content was used as the initial set of content for this repository version
|
25
|
+
attr_accessor :base_version
|
26
|
+
|
27
|
+
attr_accessor :content_summary
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'pulp_href' => :'pulp_href',
|
33
|
+
:'pulp_created' => :'pulp_created',
|
34
|
+
:'number' => :'number',
|
35
|
+
:'base_version' => :'base_version',
|
36
|
+
:'content_summary' => :'content_summary'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'pulp_href' => :'String',
|
44
|
+
:'pulp_created' => :'DateTime',
|
45
|
+
:'number' => :'Integer',
|
46
|
+
:'base_version' => :'String',
|
47
|
+
:'content_summary' => :'ContentSummary'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::RepositoryVersionRead` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::RepositoryVersionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'pulp_href')
|
73
|
+
self.pulp_href = attributes[:'pulp_href']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'pulp_created')
|
77
|
+
self.pulp_created = attributes[:'pulp_created']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'number')
|
81
|
+
self.number = attributes[:'number']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'base_version')
|
85
|
+
self.base_version = attributes[:'base_version']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'content_summary')
|
89
|
+
self.content_summary = attributes[:'content_summary']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
pulp_href == o.pulp_href &&
|
112
|
+
pulp_created == o.pulp_created &&
|
113
|
+
number == o.number &&
|
114
|
+
base_version == o.base_version &&
|
115
|
+
content_summary == o.content_summary
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[pulp_href, pulp_created, number, base_version, content_summary].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
152
|
+
end
|
153
|
+
|
154
|
+
self
|
155
|
+
end
|
156
|
+
|
157
|
+
# Deserializes the data based on type
|
158
|
+
# @param string type Data type
|
159
|
+
# @param string value Value to be deserialized
|
160
|
+
# @return [Object] Deserialized data
|
161
|
+
def _deserialize(type, value)
|
162
|
+
case type.to_sym
|
163
|
+
when :DateTime
|
164
|
+
DateTime.parse(value)
|
165
|
+
when :Date
|
166
|
+
Date.parse(value)
|
167
|
+
when :String
|
168
|
+
value.to_s
|
169
|
+
when :Integer
|
170
|
+
value.to_i
|
171
|
+
when :Float
|
172
|
+
value.to_f
|
173
|
+
when :Boolean
|
174
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
+
true
|
176
|
+
else
|
177
|
+
false
|
178
|
+
end
|
179
|
+
when :Object
|
180
|
+
# generic object (usually a Hash), return directly
|
181
|
+
value
|
182
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
+
inner_type = Regexp.last_match[:inner_type]
|
184
|
+
value.map { |v| _deserialize(inner_type, v) }
|
185
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
+
k_type = Regexp.last_match[:k_type]
|
187
|
+
v_type = Regexp.last_match[:v_type]
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each do |k, v|
|
190
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
else # model
|
194
|
+
PulpDebClient.const_get(type).build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
if value.nil?
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
+
end
|
220
|
+
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
data/lib/pulp_deb_client.rb
CHANGED
@@ -19,20 +19,32 @@ require 'pulp_deb_client/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'pulp_deb_client/models/async_operation_response'
|
21
21
|
require 'pulp_deb_client/models/content_summary'
|
22
|
-
require 'pulp_deb_client/models/
|
22
|
+
require 'pulp_deb_client/models/deb_base_package_read'
|
23
23
|
require 'pulp_deb_client/models/deb_deb_distribution'
|
24
|
+
require 'pulp_deb_client/models/deb_deb_distribution_read'
|
24
25
|
require 'pulp_deb_client/models/deb_deb_publication'
|
26
|
+
require 'pulp_deb_client/models/deb_deb_publication_read'
|
25
27
|
require 'pulp_deb_client/models/deb_deb_remote'
|
28
|
+
require 'pulp_deb_client/models/deb_deb_remote_read'
|
26
29
|
require 'pulp_deb_client/models/deb_deb_repository'
|
27
|
-
require 'pulp_deb_client/models/
|
30
|
+
require 'pulp_deb_client/models/deb_deb_repository_read'
|
31
|
+
require 'pulp_deb_client/models/deb_generic_content_read'
|
28
32
|
require 'pulp_deb_client/models/deb_installer_file_index'
|
33
|
+
require 'pulp_deb_client/models/deb_installer_file_index_read'
|
29
34
|
require 'pulp_deb_client/models/deb_package_index'
|
35
|
+
require 'pulp_deb_client/models/deb_package_index_read'
|
30
36
|
require 'pulp_deb_client/models/deb_package_release_component'
|
37
|
+
require 'pulp_deb_client/models/deb_package_release_component_read'
|
31
38
|
require 'pulp_deb_client/models/deb_release'
|
32
39
|
require 'pulp_deb_client/models/deb_release_architecture'
|
40
|
+
require 'pulp_deb_client/models/deb_release_architecture_read'
|
33
41
|
require 'pulp_deb_client/models/deb_release_component'
|
42
|
+
require 'pulp_deb_client/models/deb_release_component_read'
|
34
43
|
require 'pulp_deb_client/models/deb_release_file'
|
44
|
+
require 'pulp_deb_client/models/deb_release_file_read'
|
45
|
+
require 'pulp_deb_client/models/deb_release_read'
|
35
46
|
require 'pulp_deb_client/models/deb_verbatim_publication'
|
47
|
+
require 'pulp_deb_client/models/deb_verbatim_publication_read'
|
36
48
|
require 'pulp_deb_client/models/inline_response200'
|
37
49
|
require 'pulp_deb_client/models/inline_response2001'
|
38
50
|
require 'pulp_deb_client/models/inline_response20010'
|
@@ -51,6 +63,7 @@ require 'pulp_deb_client/models/inline_response2009'
|
|
51
63
|
require 'pulp_deb_client/models/repository_add_remove_content'
|
52
64
|
require 'pulp_deb_client/models/repository_sync_url'
|
53
65
|
require 'pulp_deb_client/models/repository_version'
|
66
|
+
require 'pulp_deb_client/models/repository_version_read'
|
54
67
|
|
55
68
|
# APIs
|
56
69
|
require 'pulp_deb_client/api/content_generic_contents_api'
|