pulp_maven_client 0.2.0b1.dev01595620836 → 0.2.0b1.dev01596139522

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_maven_client might be problematic. Click here for more details.

Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -13
  3. data/docs/ContentArtifactApi.md +32 -32
  4. data/docs/ContentSummary.md +3 -3
  5. data/docs/ContentSummaryResponse.md +21 -0
  6. data/docs/DistributionsMavenApi.md +104 -56
  7. data/docs/InlineResponse200.md +3 -3
  8. data/docs/InlineResponse2001.md +3 -3
  9. data/docs/InlineResponse2002.md +3 -3
  10. data/docs/InlineResponse2003.md +3 -3
  11. data/docs/InlineResponse2004.md +3 -3
  12. data/docs/MavenMavenArtifact.md +3 -13
  13. data/docs/MavenMavenArtifactResponse.md +29 -0
  14. data/docs/MavenMavenDistribution.md +1 -7
  15. data/docs/MavenMavenDistributionResponse.md +29 -0
  16. data/docs/MavenMavenRemote.md +2 -8
  17. data/docs/MavenMavenRemoteResponse.md +43 -0
  18. data/docs/MavenMavenRepository.md +4 -10
  19. data/docs/MavenMavenRepositoryResponse.md +29 -0
  20. data/docs/PatchedmavenMavenDistribution.md +23 -0
  21. data/docs/PatchedmavenMavenRemote.md +37 -0
  22. data/docs/PatchedmavenMavenRepository.md +21 -0
  23. data/docs/PolicyEnum.md +16 -0
  24. data/docs/RemotesMavenApi.md +121 -61
  25. data/docs/RepositoriesMavenApi.md +73 -49
  26. data/docs/RepositoriesMavenVersionsApi.md +90 -58
  27. data/docs/RepositoryVersion.md +1 -9
  28. data/docs/RepositoryVersionResponse.md +25 -0
  29. data/lib/pulp_maven_client.rb +12 -2
  30. data/lib/pulp_maven_client/api/content_artifact_api.rb +44 -44
  31. data/lib/pulp_maven_client/api/distributions_maven_api.rb +131 -68
  32. data/lib/pulp_maven_client/api/remotes_maven_api.rb +159 -78
  33. data/lib/pulp_maven_client/api/repositories_maven_api.rb +89 -62
  34. data/lib/pulp_maven_client/api/repositories_maven_versions_api.rb +119 -74
  35. data/lib/pulp_maven_client/api_client.rb +2 -2
  36. data/lib/pulp_maven_client/api_error.rb +2 -2
  37. data/lib/pulp_maven_client/configuration.rb +3 -3
  38. data/lib/pulp_maven_client/models/async_operation_response.rb +3 -2
  39. data/lib/pulp_maven_client/models/content_summary.rb +9 -15
  40. data/lib/pulp_maven_client/models/content_summary_response.rb +240 -0
  41. data/lib/pulp_maven_client/models/inline_response200.rb +3 -13
  42. data/lib/pulp_maven_client/models/inline_response2001.rb +3 -13
  43. data/lib/pulp_maven_client/models/inline_response2002.rb +3 -13
  44. data/lib/pulp_maven_client/models/inline_response2003.rb +3 -13
  45. data/lib/pulp_maven_client/models/inline_response2004.rb +3 -13
  46. data/lib/pulp_maven_client/models/maven_maven_artifact.rb +14 -117
  47. data/lib/pulp_maven_client/models/maven_maven_artifact_response.rb +272 -0
  48. data/lib/pulp_maven_client/models/maven_maven_distribution.rb +4 -85
  49. data/lib/pulp_maven_client/models/maven_maven_distribution_response.rb +279 -0
  50. data/lib/pulp_maven_client/models/maven_maven_remote.rb +5 -197
  51. data/lib/pulp_maven_client/models/maven_maven_remote_response.rb +368 -0
  52. data/lib/pulp_maven_client/models/maven_maven_repository.rb +18 -78
  53. data/lib/pulp_maven_client/models/maven_maven_repository_response.rb +271 -0
  54. data/lib/pulp_maven_client/models/patchedmaven_maven_distribution.rb +240 -0
  55. data/lib/pulp_maven_client/models/patchedmaven_maven_remote.rb +329 -0
  56. data/lib/pulp_maven_client/models/patchedmaven_maven_repository.rb +229 -0
  57. data/lib/pulp_maven_client/models/policy_enum.rb +36 -0
  58. data/lib/pulp_maven_client/models/repository_version.rb +7 -43
  59. data/lib/pulp_maven_client/models/repository_version_response.rb +246 -0
  60. data/lib/pulp_maven_client/version.rb +3 -3
  61. data/pulp_maven_client.gemspec +4 -4
  62. data/spec/api/content_artifact_api_spec.rb +14 -14
  63. data/spec/api/distributions_maven_api_spec.rb +39 -18
  64. data/spec/api/remotes_maven_api_spec.rb +48 -21
  65. data/spec/api/repositories_maven_api_spec.rb +24 -15
  66. data/spec/api/repositories_maven_versions_api_spec.rb +38 -23
  67. data/spec/api_client_spec.rb +2 -2
  68. data/spec/configuration_spec.rb +2 -2
  69. data/spec/models/async_operation_response_spec.rb +2 -2
  70. data/spec/models/content_summary_response_spec.rb +53 -0
  71. data/spec/models/content_summary_spec.rb +2 -2
  72. data/spec/models/inline_response2001_spec.rb +2 -2
  73. data/spec/models/inline_response2002_spec.rb +2 -2
  74. data/spec/models/inline_response2003_spec.rb +2 -2
  75. data/spec/models/inline_response2004_spec.rb +2 -2
  76. data/spec/models/inline_response200_spec.rb +2 -2
  77. data/spec/models/maven_maven_artifact_response_spec.rb +77 -0
  78. data/spec/models/maven_maven_artifact_spec.rb +3 -33
  79. data/spec/models/maven_maven_distribution_response_spec.rb +77 -0
  80. data/spec/models/maven_maven_distribution_spec.rb +2 -20
  81. data/spec/models/maven_maven_remote_response_spec.rb +119 -0
  82. data/spec/models/maven_maven_remote_spec.rb +2 -24
  83. data/spec/models/maven_maven_repository_response_spec.rb +77 -0
  84. data/spec/models/maven_maven_repository_spec.rb +5 -23
  85. data/spec/models/patchedmaven_maven_distribution_spec.rb +59 -0
  86. data/spec/models/patchedmaven_maven_remote_spec.rb +101 -0
  87. data/spec/models/patchedmaven_maven_repository_spec.rb +53 -0
  88. data/spec/models/policy_enum_spec.rb +35 -0
  89. data/spec/models/repository_version_response_spec.rb +65 -0
  90. data/spec/models/repository_version_spec.rb +2 -26
  91. data/spec/spec_helper.rb +2 -2
  92. metadata +44 -4
@@ -0,0 +1,368 @@
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 PulpMavenClient
16
+ # A Serializer for MavenRemote. Add any new fields if defined on MavenRemote. Similar to the example above, in MavenArtifactSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = platform.RemoteSerializer.Meta.validators + [myValidator1, myValidator2]
17
+ class MavenMavenRemoteResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # A unique name for this remote.
24
+ attr_accessor :name
25
+
26
+ # The URL of an external content source.
27
+ attr_accessor :url
28
+
29
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
30
+ attr_accessor :ca_cert
31
+
32
+ # A PEM encoded client certificate used for authentication.
33
+ attr_accessor :client_cert
34
+
35
+ # A PEM encoded private key used for authentication.
36
+ attr_accessor :client_key
37
+
38
+ # If True, TLS peer validation must be performed.
39
+ attr_accessor :tls_validation
40
+
41
+ # The proxy URL. Format: scheme://user:password@host:port
42
+ attr_accessor :proxy_url
43
+
44
+ # The username to be used for authentication when syncing.
45
+ attr_accessor :username
46
+
47
+ # The password to be used for authentication when syncing.
48
+ attr_accessor :password
49
+
50
+ # Timestamp of the most recent update of the remote.
51
+ attr_accessor :pulp_last_updated
52
+
53
+ # Total number of simultaneous connections.
54
+ attr_accessor :download_concurrency
55
+
56
+ # The policy to use when downloading content.
57
+ attr_accessor :policy
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'pulp_href' => :'pulp_href',
63
+ :'pulp_created' => :'pulp_created',
64
+ :'name' => :'name',
65
+ :'url' => :'url',
66
+ :'ca_cert' => :'ca_cert',
67
+ :'client_cert' => :'client_cert',
68
+ :'client_key' => :'client_key',
69
+ :'tls_validation' => :'tls_validation',
70
+ :'proxy_url' => :'proxy_url',
71
+ :'username' => :'username',
72
+ :'password' => :'password',
73
+ :'pulp_last_updated' => :'pulp_last_updated',
74
+ :'download_concurrency' => :'download_concurrency',
75
+ :'policy' => :'policy'
76
+ }
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'pulp_href' => :'String',
83
+ :'pulp_created' => :'DateTime',
84
+ :'name' => :'String',
85
+ :'url' => :'String',
86
+ :'ca_cert' => :'String',
87
+ :'client_cert' => :'String',
88
+ :'client_key' => :'String',
89
+ :'tls_validation' => :'Boolean',
90
+ :'proxy_url' => :'String',
91
+ :'username' => :'String',
92
+ :'password' => :'String',
93
+ :'pulp_last_updated' => :'DateTime',
94
+ :'download_concurrency' => :'Integer',
95
+ :'policy' => :'PolicyEnum'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ :'ca_cert',
103
+ :'client_cert',
104
+ :'client_key',
105
+ :'proxy_url',
106
+ :'username',
107
+ :'password',
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpMavenClient::MavenMavenRemoteResponse` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpMavenClient::MavenMavenRemoteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'pulp_href')
127
+ self.pulp_href = attributes[:'pulp_href']
128
+ end
129
+
130
+ if attributes.key?(:'pulp_created')
131
+ self.pulp_created = attributes[:'pulp_created']
132
+ end
133
+
134
+ if attributes.key?(:'name')
135
+ self.name = attributes[:'name']
136
+ end
137
+
138
+ if attributes.key?(:'url')
139
+ self.url = attributes[:'url']
140
+ end
141
+
142
+ if attributes.key?(:'ca_cert')
143
+ self.ca_cert = attributes[:'ca_cert']
144
+ end
145
+
146
+ if attributes.key?(:'client_cert')
147
+ self.client_cert = attributes[:'client_cert']
148
+ end
149
+
150
+ if attributes.key?(:'client_key')
151
+ self.client_key = attributes[:'client_key']
152
+ end
153
+
154
+ if attributes.key?(:'tls_validation')
155
+ self.tls_validation = attributes[:'tls_validation']
156
+ end
157
+
158
+ if attributes.key?(:'proxy_url')
159
+ self.proxy_url = attributes[:'proxy_url']
160
+ end
161
+
162
+ if attributes.key?(:'username')
163
+ self.username = attributes[:'username']
164
+ end
165
+
166
+ if attributes.key?(:'password')
167
+ self.password = attributes[:'password']
168
+ end
169
+
170
+ if attributes.key?(:'pulp_last_updated')
171
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
172
+ end
173
+
174
+ if attributes.key?(:'download_concurrency')
175
+ self.download_concurrency = attributes[:'download_concurrency']
176
+ end
177
+
178
+ if attributes.key?(:'policy')
179
+ self.policy = attributes[:'policy']
180
+ end
181
+ end
182
+
183
+ # Show invalid properties with the reasons. Usually used together with valid?
184
+ # @return Array for valid properties with the reasons
185
+ def list_invalid_properties
186
+ invalid_properties = Array.new
187
+ if @name.nil?
188
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
189
+ end
190
+
191
+ if @url.nil?
192
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
193
+ end
194
+
195
+ if !@download_concurrency.nil? && @download_concurrency < 1
196
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
197
+ end
198
+
199
+ invalid_properties
200
+ end
201
+
202
+ # Check to see if the all the properties in the model are valid
203
+ # @return true if the model is valid
204
+ def valid?
205
+ return false if @name.nil?
206
+ return false if @url.nil?
207
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
208
+ true
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] download_concurrency Value to be assigned
213
+ def download_concurrency=(download_concurrency)
214
+ if !download_concurrency.nil? && download_concurrency < 1
215
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
216
+ end
217
+
218
+ @download_concurrency = download_concurrency
219
+ end
220
+
221
+ # Checks equality by comparing each attribute.
222
+ # @param [Object] Object to be compared
223
+ def ==(o)
224
+ return true if self.equal?(o)
225
+ self.class == o.class &&
226
+ pulp_href == o.pulp_href &&
227
+ pulp_created == o.pulp_created &&
228
+ name == o.name &&
229
+ url == o.url &&
230
+ ca_cert == o.ca_cert &&
231
+ client_cert == o.client_cert &&
232
+ client_key == o.client_key &&
233
+ tls_validation == o.tls_validation &&
234
+ proxy_url == o.proxy_url &&
235
+ username == o.username &&
236
+ password == o.password &&
237
+ pulp_last_updated == o.pulp_last_updated &&
238
+ download_concurrency == o.download_concurrency &&
239
+ policy == o.policy
240
+ end
241
+
242
+ # @see the `==` method
243
+ # @param [Object] Object to be compared
244
+ def eql?(o)
245
+ self == o
246
+ end
247
+
248
+ # Calculates hash code according to all attributes.
249
+ # @return [Integer] Hash code
250
+ def hash
251
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, pulp_last_updated, download_concurrency, policy].hash
252
+ end
253
+
254
+ # Builds the object from hash
255
+ # @param [Hash] attributes Model attributes in the form of hash
256
+ # @return [Object] Returns the model itself
257
+ def self.build_from_hash(attributes)
258
+ new.build_from_hash(attributes)
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ self.class.openapi_types.each_pair do |key, type|
267
+ if type =~ /\AArray<(.*)>/i
268
+ # check to ensure the input is an array given that the attribute
269
+ # is documented as an array but the input is not
270
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
271
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
272
+ end
273
+ elsif !attributes[self.class.attribute_map[key]].nil?
274
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
275
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
276
+ end
277
+
278
+ self
279
+ end
280
+
281
+ # Deserializes the data based on type
282
+ # @param string type Data type
283
+ # @param string value Value to be deserialized
284
+ # @return [Object] Deserialized data
285
+ def _deserialize(type, value)
286
+ case type.to_sym
287
+ when :DateTime
288
+ DateTime.parse(value)
289
+ when :Date
290
+ Date.parse(value)
291
+ when :String
292
+ value.to_s
293
+ when :Integer
294
+ value.to_i
295
+ when :Float
296
+ value.to_f
297
+ when :Boolean
298
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
299
+ true
300
+ else
301
+ false
302
+ end
303
+ when :Object
304
+ # generic object (usually a Hash), return directly
305
+ value
306
+ when /\AArray<(?<inner_type>.+)>\z/
307
+ inner_type = Regexp.last_match[:inner_type]
308
+ value.map { |v| _deserialize(inner_type, v) }
309
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
310
+ k_type = Regexp.last_match[:k_type]
311
+ v_type = Regexp.last_match[:v_type]
312
+ {}.tap do |hash|
313
+ value.each do |k, v|
314
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
315
+ end
316
+ end
317
+ else # model
318
+ PulpMavenClient.const_get(type).build_from_hash(value)
319
+ end
320
+ end
321
+
322
+ # Returns the string representation of the object
323
+ # @return [String] String presentation of the object
324
+ def to_s
325
+ to_hash.to_s
326
+ end
327
+
328
+ # to_body is an alias to to_hash (backward compatibility)
329
+ # @return [Hash] Returns the object in the form of hash
330
+ def to_body
331
+ to_hash
332
+ end
333
+
334
+ # Returns the object in the form of hash
335
+ # @return [Hash] Returns the object in the form of hash
336
+ def to_hash
337
+ hash = {}
338
+ self.class.attribute_map.each_pair do |attr, param|
339
+ value = self.send(attr)
340
+ if value.nil?
341
+ is_nullable = self.class.openapi_nullable.include?(attr)
342
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
343
+ end
344
+
345
+ hash[param] = _to_hash(value)
346
+ end
347
+ hash
348
+ end
349
+
350
+ # Outputs non-array value in the form of hash
351
+ # For object, use to_hash. Otherwise, just return the value
352
+ # @param [Object] value Any valid value
353
+ # @return [Hash] Returns the value in the form of hash
354
+ def _to_hash(value)
355
+ if value.is_a?(Array)
356
+ value.compact.map { |v| _to_hash(v) }
357
+ elsif value.is_a?(Hash)
358
+ {}.tap do |hash|
359
+ value.each { |k, v| hash[k] = _to_hash(v) }
360
+ end
361
+ elsif value.respond_to? :to_hash
362
+ value.to_hash
363
+ else
364
+ value
365
+ end
366
+ end
367
+ end
368
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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,50 +13,39 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpMavenClient
16
+ # Serializer for Maven Repositories.
16
17
  class MavenMavenRepository
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- attr_accessor :versions_href
23
-
24
- attr_accessor :latest_version_href
25
-
26
18
  # A unique name for this repository.
27
19
  attr_accessor :name
28
20
 
29
21
  # An optional description.
30
22
  attr_accessor :description
31
23
 
24
+ attr_accessor :remote
25
+
32
26
  # Attribute mapping from ruby-style variable name to JSON key.
33
27
  def self.attribute_map
34
28
  {
35
- :'pulp_href' => :'pulp_href',
36
- :'pulp_created' => :'pulp_created',
37
- :'versions_href' => :'versions_href',
38
- :'latest_version_href' => :'latest_version_href',
39
29
  :'name' => :'name',
40
- :'description' => :'description'
30
+ :'description' => :'description',
31
+ :'remote' => :'remote'
41
32
  }
42
33
  end
43
34
 
44
35
  # Attribute type mapping.
45
36
  def self.openapi_types
46
37
  {
47
- :'pulp_href' => :'String',
48
- :'pulp_created' => :'DateTime',
49
- :'versions_href' => :'String',
50
- :'latest_version_href' => :'String',
51
38
  :'name' => :'String',
52
- :'description' => :'String'
39
+ :'description' => :'String',
40
+ :'remote' => :'String'
53
41
  }
54
42
  end
55
43
 
56
44
  # List of attributes with nullable: true
57
45
  def self.openapi_nullable
58
46
  Set.new([
59
- :'description'
47
+ :'description',
48
+ :'remote'
60
49
  ])
61
50
  end
62
51
 
@@ -75,22 +64,6 @@ module PulpMavenClient
75
64
  h[k.to_sym] = v
76
65
  }
77
66
 
78
- if attributes.key?(:'pulp_href')
79
- self.pulp_href = attributes[:'pulp_href']
80
- end
81
-
82
- if attributes.key?(:'pulp_created')
83
- self.pulp_created = attributes[:'pulp_created']
84
- end
85
-
86
- if attributes.key?(:'versions_href')
87
- self.versions_href = attributes[:'versions_href']
88
- end
89
-
90
- if attributes.key?(:'latest_version_href')
91
- self.latest_version_href = attributes[:'latest_version_href']
92
- end
93
-
94
67
  if attributes.key?(:'name')
95
68
  self.name = attributes[:'name']
96
69
  end
@@ -98,6 +71,10 @@ module PulpMavenClient
98
71
  if attributes.key?(:'description')
99
72
  self.description = attributes[:'description']
100
73
  end
74
+
75
+ if attributes.key?(:'remote')
76
+ self.remote = attributes[:'remote']
77
+ end
101
78
  end
102
79
 
103
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,14 +85,6 @@ module PulpMavenClient
108
85
  invalid_properties.push('invalid value for "name", name cannot be nil.')
109
86
  end
110
87
 
111
- if @name.to_s.length < 1
112
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
113
- end
114
-
115
- if !@description.nil? && @description.to_s.length < 1
116
- invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
117
- end
118
-
119
88
  invalid_properties
120
89
  end
121
90
 
@@ -123,46 +92,17 @@ module PulpMavenClient
123
92
  # @return true if the model is valid
124
93
  def valid?
125
94
  return false if @name.nil?
126
- return false if @name.to_s.length < 1
127
- return false if !@description.nil? && @description.to_s.length < 1
128
95
  true
129
96
  end
130
97
 
131
- # Custom attribute writer method with validation
132
- # @param [Object] name Value to be assigned
133
- def name=(name)
134
- if name.nil?
135
- fail ArgumentError, 'name cannot be nil'
136
- end
137
-
138
- if name.to_s.length < 1
139
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
140
- end
141
-
142
- @name = name
143
- end
144
-
145
- # Custom attribute writer method with validation
146
- # @param [Object] description Value to be assigned
147
- def description=(description)
148
- if !description.nil? && description.to_s.length < 1
149
- fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
150
- end
151
-
152
- @description = description
153
- end
154
-
155
98
  # Checks equality by comparing each attribute.
156
99
  # @param [Object] Object to be compared
157
100
  def ==(o)
158
101
  return true if self.equal?(o)
159
102
  self.class == o.class &&
160
- pulp_href == o.pulp_href &&
161
- pulp_created == o.pulp_created &&
162
- versions_href == o.versions_href &&
163
- latest_version_href == o.latest_version_href &&
164
103
  name == o.name &&
165
- description == o.description
104
+ description == o.description &&
105
+ remote == o.remote
166
106
  end
167
107
 
168
108
  # @see the `==` method
@@ -174,7 +114,7 @@ module PulpMavenClient
174
114
  # Calculates hash code according to all attributes.
175
115
  # @return [Integer] Hash code
176
116
  def hash
177
- [pulp_href, pulp_created, versions_href, latest_version_href, name, description].hash
117
+ [name, description, remote].hash
178
118
  end
179
119
 
180
120
  # Builds the object from hash