pulp_file_client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +51 -37
- data/docs/ContentFilesApi.md +24 -24
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsFileApi.md +108 -60
- data/docs/{Export.md → ExportResponse.md} +2 -2
- data/docs/ExportersFileExportsApi.md +34 -34
- data/docs/ExportersFilesystemApi.md +61 -61
- data/docs/FileFileContent.md +5 -17
- data/docs/FileFileContentResponse.md +35 -0
- data/docs/FileFileDistribution.md +1 -7
- data/docs/FileFileDistributionResponse.md +29 -0
- data/docs/FileFileFilesystemExporter.md +1 -5
- data/docs/FileFileFilesystemExporterResponse.md +23 -0
- data/docs/FileFilePublication.md +1 -7
- data/docs/FileFilePublicationResponse.md +27 -0
- data/docs/FileFileRemote.md +4 -10
- data/docs/FileFileRemoteResponse.md +43 -0
- data/docs/FileFileRepository.md +4 -10
- data/docs/FileFileRepositoryResponse.md +29 -0
- 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/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/PatchedfileFileDistribution.md +23 -0
- data/docs/PatchedfileFileFilesystemExporter.md +19 -0
- data/docs/PatchedfileFileRemote.md +37 -0
- data/docs/PatchedfileFileRepository.md +21 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsFileApi.md +40 -40
- data/docs/RemotesFileApi.md +125 -65
- data/docs/RepositoriesFileApi.md +97 -73
- data/docs/RepositoriesFileVersionsApi.md +94 -62
- 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_file_client/api/content_files_api.rb +32 -36
- data/lib/pulp_file_client/api/distributions_file_api.rb +153 -90
- data/lib/pulp_file_client/api/exporters_file_exports_api.rb +55 -55
- data/lib/pulp_file_client/api/exporters_filesystem_api.rb +102 -102
- data/lib/pulp_file_client/api/publications_file_api.rb +59 -59
- data/lib/pulp_file_client/api/remotes_file_api.rb +181 -100
- data/lib/pulp_file_client/api/repositories_file_api.rb +145 -118
- data/lib/pulp_file_client/api/repositories_file_versions_api.rb +137 -92
- data/lib/pulp_file_client/api_client.rb +2 -2
- data/lib/pulp_file_client/api_error.rb +2 -2
- data/lib/pulp_file_client/configuration.rb +3 -3
- data/lib/pulp_file_client/models/async_operation_response.rb +3 -2
- data/lib/pulp_file_client/models/content_summary.rb +9 -15
- data/lib/pulp_file_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_file_client/models/{export.rb → export_response.rb} +6 -5
- data/lib/pulp_file_client/models/file_file_content.rb +18 -185
- data/lib/pulp_file_client/models/file_file_content_response.rb +302 -0
- data/lib/pulp_file_client/models/file_file_distribution.rb +4 -85
- data/lib/pulp_file_client/models/file_file_distribution_response.rb +279 -0
- data/lib/pulp_file_client/models/file_file_filesystem_exporter.rb +4 -60
- data/lib/pulp_file_client/models/file_file_filesystem_exporter_response.rb +247 -0
- data/lib/pulp_file_client/models/file_file_publication.rb +4 -49
- data/lib/pulp_file_client/models/file_file_publication_response.rb +260 -0
- data/lib/pulp_file_client/models/file_file_remote.rb +7 -199
- data/lib/pulp_file_client/models/file_file_remote_response.rb +368 -0
- data/lib/pulp_file_client/models/file_file_repository.rb +18 -78
- data/lib/pulp_file_client/models/file_file_repository_response.rb +271 -0
- data/lib/pulp_file_client/models/inline_response200.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2001.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2002.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2003.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2004.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2005.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2006.rb +3 -13
- data/lib/pulp_file_client/models/inline_response2007.rb +3 -13
- data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +240 -0
- data/lib/pulp_file_client/models/patchedfile_file_filesystem_exporter.rb +218 -0
- data/lib/pulp_file_client/models/patchedfile_file_remote.rb +329 -0
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +229 -0
- data/lib/pulp_file_client/models/policy_enum.rb +37 -0
- data/lib/pulp_file_client/models/publication_export.rb +3 -2
- data/lib/pulp_file_client/models/repository_add_remove_content.rb +5 -4
- data/lib/pulp_file_client/models/repository_sync_url.rb +3 -8
- data/lib/pulp_file_client/models/repository_version.rb +7 -43
- data/lib/pulp_file_client/models/repository_version_response.rb +246 -0
- data/lib/pulp_file_client/version.rb +3 -3
- data/lib/pulp_file_client.rb +16 -3
- data/pulp_file_client.gemspec +4 -4
- data/spec/api/content_files_api_spec.rb +10 -10
- data/spec/api/distributions_file_api_spec.rb +39 -18
- data/spec/api/exporters_file_exports_api_spec.rb +9 -9
- data/spec/api/exporters_filesystem_api_spec.rb +23 -23
- data/spec/api/publications_file_api_spec.rb +14 -14
- data/spec/api/remotes_file_api_spec.rb +48 -21
- data/spec/api/repositories_file_api_spec.rb +28 -19
- data/spec/api/repositories_file_versions_api_spec.rb +38 -23
- 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/{export_spec.rb → export_response_spec.rb} +8 -8
- data/spec/models/file_file_content_response_spec.rb +95 -0
- data/spec/models/file_file_content_spec.rb +4 -40
- data/spec/models/file_file_distribution_response_spec.rb +77 -0
- data/spec/models/file_file_distribution_spec.rb +2 -20
- data/spec/models/file_file_filesystem_exporter_response_spec.rb +59 -0
- data/spec/models/file_file_filesystem_exporter_spec.rb +2 -14
- data/spec/models/file_file_publication_response_spec.rb +71 -0
- data/spec/models/file_file_publication_spec.rb +2 -20
- data/spec/models/file_file_remote_response_spec.rb +119 -0
- data/spec/models/file_file_remote_spec.rb +2 -24
- data/spec/models/file_file_repository_response_spec.rb +77 -0
- data/spec/models/file_file_repository_spec.rb +5 -23
- 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_response200_spec.rb +2 -2
- data/spec/models/patchedfile_file_distribution_spec.rb +59 -0
- data/spec/models/patchedfile_file_filesystem_exporter_spec.rb +47 -0
- data/spec/models/patchedfile_file_remote_spec.rb +101 -0
- data/spec/models/patchedfile_file_repository_spec.rb +53 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/publication_export_spec.rb +2 -2
- 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 +76 -24
@@ -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 PulpFileClient
|
16
|
+
# Serializer for File Content.
|
17
|
+
class FileFileContentResponse
|
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 `PulpFileClient::FileFileContentResponse` 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 `PulpFileClient::FileFileContentResponse`. 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
|
+
PulpFileClient.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
|
@@ -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,18 +13,11 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpFileClient
|
16
|
+
# Serializer for File Distributions.
|
16
17
|
class FileFileDistribution
|
17
|
-
attr_accessor :pulp_href
|
18
|
-
|
19
|
-
# Timestamp of creation.
|
20
|
-
attr_accessor :pulp_created
|
21
|
-
|
22
18
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
23
19
|
attr_accessor :base_path
|
24
20
|
|
25
|
-
# The URL for accessing the publication as defined by this distribution.
|
26
|
-
attr_accessor :base_url
|
27
|
-
|
28
21
|
# An optional content-guard.
|
29
22
|
attr_accessor :content_guard
|
30
23
|
|
@@ -37,10 +30,7 @@ module PulpFileClient
|
|
37
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
31
|
def self.attribute_map
|
39
32
|
{
|
40
|
-
:'pulp_href' => :'pulp_href',
|
41
|
-
:'pulp_created' => :'pulp_created',
|
42
33
|
:'base_path' => :'base_path',
|
43
|
-
:'base_url' => :'base_url',
|
44
34
|
:'content_guard' => :'content_guard',
|
45
35
|
:'name' => :'name',
|
46
36
|
:'publication' => :'publication'
|
@@ -50,10 +40,7 @@ module PulpFileClient
|
|
50
40
|
# Attribute type mapping.
|
51
41
|
def self.openapi_types
|
52
42
|
{
|
53
|
-
:'pulp_href' => :'String',
|
54
|
-
:'pulp_created' => :'DateTime',
|
55
43
|
:'base_path' => :'String',
|
56
|
-
:'base_url' => :'String',
|
57
44
|
:'content_guard' => :'String',
|
58
45
|
:'name' => :'String',
|
59
46
|
:'publication' => :'String'
|
@@ -83,22 +70,10 @@ module PulpFileClient
|
|
83
70
|
h[k.to_sym] = v
|
84
71
|
}
|
85
72
|
|
86
|
-
if attributes.key?(:'pulp_href')
|
87
|
-
self.pulp_href = attributes[:'pulp_href']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.key?(:'pulp_created')
|
91
|
-
self.pulp_created = attributes[:'pulp_created']
|
92
|
-
end
|
93
|
-
|
94
73
|
if attributes.key?(:'base_path')
|
95
74
|
self.base_path = attributes[:'base_path']
|
96
75
|
end
|
97
76
|
|
98
|
-
if attributes.key?(:'base_url')
|
99
|
-
self.base_url = attributes[:'base_url']
|
100
|
-
end
|
101
|
-
|
102
77
|
if attributes.key?(:'content_guard')
|
103
78
|
self.content_guard = attributes[:'content_guard']
|
104
79
|
end
|
@@ -120,22 +95,10 @@ module PulpFileClient
|
|
120
95
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
121
96
|
end
|
122
97
|
|
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
98
|
if @name.nil?
|
132
99
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
133
100
|
end
|
134
101
|
|
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
102
|
invalid_properties
|
140
103
|
end
|
141
104
|
|
@@ -143,60 +106,16 @@ module PulpFileClient
|
|
143
106
|
# @return true if the model is valid
|
144
107
|
def valid?
|
145
108
|
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
109
|
return false if @name.nil?
|
149
|
-
return false if @name.to_s.length < 1
|
150
110
|
true
|
151
111
|
end
|
152
112
|
|
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
113
|
# Checks equality by comparing each attribute.
|
192
114
|
# @param [Object] Object to be compared
|
193
115
|
def ==(o)
|
194
116
|
return true if self.equal?(o)
|
195
117
|
self.class == o.class &&
|
196
|
-
pulp_href == o.pulp_href &&
|
197
|
-
pulp_created == o.pulp_created &&
|
198
118
|
base_path == o.base_path &&
|
199
|
-
base_url == o.base_url &&
|
200
119
|
content_guard == o.content_guard &&
|
201
120
|
name == o.name &&
|
202
121
|
publication == o.publication
|
@@ -211,7 +130,7 @@ module PulpFileClient
|
|
211
130
|
# Calculates hash code according to all attributes.
|
212
131
|
# @return [Integer] Hash code
|
213
132
|
def hash
|
214
|
-
[
|
133
|
+
[base_path, content_guard, name, publication].hash
|
215
134
|
end
|
216
135
|
|
217
136
|
# Builds the object from hash
|