pulpcore_client 3.84.0 → 3.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -4
  3. data/docs/ArtifactDistributionResponse.md +13 -13
  4. data/docs/FilesystemExportResponse.md +1 -1
  5. data/docs/GenericRemoteResponse.md +1 -1
  6. data/docs/GroupRoleResponse.md +1 -1
  7. data/docs/MultipleArtifactContentResponse.md +2 -0
  8. data/docs/NestedOpenPGPPublicSubkeyResponse.md +1 -1
  9. data/docs/NestedOpenPGPUserAttributeResponse.md +1 -1
  10. data/docs/NestedOpenPGPUserIDResponse.md +1 -1
  11. data/docs/OpenPGPPublicKeyResponse.md +5 -3
  12. data/docs/OpenPGPPublicSubkeyResponse.md +3 -1
  13. data/docs/OpenPGPSignatureResponse.md +2 -0
  14. data/docs/OpenPGPUserAttributeResponse.md +3 -1
  15. data/docs/OpenPGPUserIDResponse.md +3 -1
  16. data/docs/PaginatedVulnerabilityReportResponseList.md +24 -0
  17. data/docs/PulpExportResponse.md +1 -1
  18. data/docs/Purge.md +1 -1
  19. data/docs/RBACContentGuardResponse.md +2 -2
  20. data/docs/RepositoryVersionResponse.md +3 -1
  21. data/docs/TaskGroupResponse.md +2 -2
  22. data/docs/TaskResponse.md +4 -4
  23. data/docs/UploadDetailResponse.md +1 -1
  24. data/docs/UpstreamPulpResponse.md +1 -1
  25. data/docs/UserResponse.md +2 -2
  26. data/docs/UserRoleResponse.md +1 -1
  27. data/docs/VulnReportApi.md +241 -0
  28. data/docs/VulnerabilityReportResponse.md +30 -0
  29. data/lib/pulpcore_client/api/vuln_report_api.rb +230 -0
  30. data/lib/pulpcore_client/models/artifact_distribution_response.rb +63 -63
  31. data/lib/pulpcore_client/models/generic_remote_response.rb +0 -15
  32. data/lib/pulpcore_client/models/multiple_artifact_content_response.rb +10 -1
  33. data/lib/pulpcore_client/models/nested_open_pgp_signature.rb +0 -9
  34. data/lib/pulpcore_client/models/nested_open_pgp_signature_response.rb +0 -15
  35. data/lib/pulpcore_client/models/open_pgp_keyring.rb +0 -15
  36. data/lib/pulpcore_client/models/open_pgp_keyring_response.rb +0 -15
  37. data/lib/pulpcore_client/models/open_pgp_public_key_response.rb +10 -1
  38. data/lib/pulpcore_client/models/open_pgp_public_subkey_response.rb +10 -1
  39. data/lib/pulpcore_client/models/open_pgp_signature_response.rb +10 -16
  40. data/lib/pulpcore_client/models/open_pgp_user_attribute_response.rb +10 -1
  41. data/lib/pulpcore_client/models/open_pgp_user_id_response.rb +10 -1
  42. data/lib/pulpcore_client/models/orphans_cleanup.rb +0 -24
  43. data/lib/pulpcore_client/models/paginated_access_policy_response_list.rb +0 -2
  44. data/lib/pulpcore_client/models/paginated_artifact_distribution_response_list.rb +0 -2
  45. data/lib/pulpcore_client/models/paginated_artifact_response_list.rb +0 -2
  46. data/lib/pulpcore_client/models/paginated_composite_content_guard_response_list.rb +0 -2
  47. data/lib/pulpcore_client/models/paginated_content_guard_response_list.rb +0 -2
  48. data/lib/pulpcore_client/models/paginated_content_redirect_content_guard_response_list.rb +0 -2
  49. data/lib/pulpcore_client/models/paginated_distribution_response_list.rb +0 -2
  50. data/lib/pulpcore_client/models/paginated_domain_response_list.rb +0 -2
  51. data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +0 -2
  52. data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +0 -2
  53. data/lib/pulpcore_client/models/paginated_generic_remote_response_list.rb +0 -2
  54. data/lib/pulpcore_client/models/paginated_group_response_list.rb +0 -2
  55. data/lib/pulpcore_client/models/paginated_group_role_response_list.rb +0 -2
  56. data/lib/pulpcore_client/models/paginated_group_user_response_list.rb +0 -2
  57. data/lib/pulpcore_client/models/paginated_header_content_guard_response_list.rb +0 -2
  58. data/lib/pulpcore_client/models/paginated_import_response_list.rb +0 -2
  59. data/lib/pulpcore_client/models/paginated_multiple_artifact_content_response_list.rb +0 -2
  60. data/lib/pulpcore_client/models/paginated_open_pgp_distribution_response_list.rb +0 -2
  61. data/lib/pulpcore_client/models/paginated_open_pgp_keyring_response_list.rb +0 -2
  62. data/lib/pulpcore_client/models/paginated_open_pgp_public_key_response_list.rb +0 -2
  63. data/lib/pulpcore_client/models/paginated_open_pgp_public_subkey_response_list.rb +0 -2
  64. data/lib/pulpcore_client/models/paginated_open_pgp_signature_response_list.rb +0 -2
  65. data/lib/pulpcore_client/models/paginated_open_pgp_user_attribute_response_list.rb +0 -2
  66. data/lib/pulpcore_client/models/paginated_open_pgp_user_id_response_list.rb +0 -2
  67. data/lib/pulpcore_client/models/paginated_publication_response_list.rb +0 -2
  68. data/lib/pulpcore_client/models/paginated_pulp_export_response_list.rb +0 -2
  69. data/lib/pulpcore_client/models/paginated_pulp_exporter_response_list.rb +0 -2
  70. data/lib/pulpcore_client/models/paginated_pulp_importer_response_list.rb +0 -2
  71. data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +0 -2
  72. data/lib/pulpcore_client/models/paginated_repository_response_list.rb +0 -2
  73. data/lib/pulpcore_client/models/paginated_repository_version_response_list.rb +0 -2
  74. data/lib/pulpcore_client/models/paginated_role_response_list.rb +0 -2
  75. data/lib/pulpcore_client/models/paginated_signing_service_response_list.rb +0 -2
  76. data/lib/pulpcore_client/models/paginated_task_group_response_list.rb +0 -2
  77. data/lib/pulpcore_client/models/paginated_task_response_list.rb +0 -2
  78. data/lib/pulpcore_client/models/paginated_task_schedule_response_list.rb +0 -2
  79. data/lib/pulpcore_client/models/paginated_upload_response_list.rb +0 -2
  80. data/lib/pulpcore_client/models/paginated_upstream_pulp_response_list.rb +0 -2
  81. data/lib/pulpcore_client/models/paginated_user_response_list.rb +0 -2
  82. data/lib/pulpcore_client/models/paginated_user_role_response_list.rb +0 -2
  83. data/lib/pulpcore_client/models/paginated_vulnerability_report_response_list.rb +257 -0
  84. data/lib/pulpcore_client/models/paginated_worker_response_list.rb +0 -2
  85. data/lib/pulpcore_client/models/patched_open_pgp_keyring.rb +0 -15
  86. data/lib/pulpcore_client/models/purge.rb +2 -0
  87. data/lib/pulpcore_client/models/repository_response.rb +0 -15
  88. data/lib/pulpcore_client/models/repository_version_response.rb +13 -4
  89. data/lib/pulpcore_client/models/storage_response.rb +0 -45
  90. data/lib/pulpcore_client/models/vulnerability_report_response.rb +277 -0
  91. data/lib/pulpcore_client/version.rb +1 -1
  92. data/lib/pulpcore_client.rb +3 -0
  93. data/spec/api/vuln_report_api_spec.rb +79 -0
  94. data/spec/models/artifact_distribution_response_spec.rb +10 -10
  95. data/spec/models/multiple_artifact_content_response_spec.rb +6 -0
  96. data/spec/models/open_pgp_public_key_response_spec.rb +6 -0
  97. data/spec/models/open_pgp_public_subkey_response_spec.rb +6 -0
  98. data/spec/models/open_pgp_signature_response_spec.rb +6 -0
  99. data/spec/models/open_pgp_user_attribute_response_spec.rb +6 -0
  100. data/spec/models/open_pgp_user_id_response_spec.rb +6 -0
  101. data/spec/models/paginated_vulnerability_report_response_list_spec.rb +54 -0
  102. data/spec/models/repository_version_response_spec.rb +6 -0
  103. data/spec/models/vulnerability_report_response_spec.rb +72 -0
  104. metadata +199 -187
@@ -0,0 +1,257 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PulpcoreClient
17
+ class PaginatedVulnerabilityReportResponseList
18
+ attr_accessor :count
19
+
20
+ attr_accessor :_next
21
+
22
+ attr_accessor :previous
23
+
24
+ attr_accessor :results
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'count' => :'count',
30
+ :'_next' => :'next',
31
+ :'previous' => :'previous',
32
+ :'results' => :'results'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'count' => :'Integer',
45
+ :'_next' => :'String',
46
+ :'previous' => :'String',
47
+ :'results' => :'Array<VulnerabilityReportResponse>'
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 `PulpcoreClient::PaginatedVulnerabilityReportResponseList` 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 `PulpcoreClient::PaginatedVulnerabilityReportResponseList`. 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?(:'count')
73
+ self.count = attributes[:'count']
74
+ else
75
+ self.count = nil
76
+ end
77
+
78
+ if attributes.key?(:'_next')
79
+ self._next = attributes[:'_next']
80
+ end
81
+
82
+ if attributes.key?(:'previous')
83
+ self.previous = attributes[:'previous']
84
+ end
85
+
86
+ if attributes.key?(:'results')
87
+ if (value = attributes[:'results']).is_a?(Array)
88
+ self.results = value
89
+ end
90
+ else
91
+ self.results = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @count.nil?
101
+ invalid_properties.push('invalid value for "count", count cannot be nil.')
102
+ end
103
+
104
+ if @results.nil?
105
+ invalid_properties.push('invalid value for "results", results cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @count.nil?
116
+ return false if @results.nil?
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ count == o.count &&
126
+ _next == o._next &&
127
+ previous == o.previous &&
128
+ results == o.results
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [count, _next, previous, results].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ transformed_hash = {}
150
+ openapi_types.each_pair do |key, type|
151
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = nil
153
+ elsif type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[attribute_map[key]].is_a?(Array)
157
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
158
+ end
159
+ elsif !attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
161
+ end
162
+ end
163
+ new(transformed_hash)
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def self._deserialize(type, value)
171
+ case type.to_sym
172
+ when :Time
173
+ Time.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ # models (e.g. Pet) or oneOf
204
+ klass = PulpcoreClient.const_get(type)
205
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -51,8 +51,6 @@ module PulpcoreClient
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
- :'_next',
55
- :'previous',
56
54
  ])
57
55
  end
58
56
 
@@ -117,10 +117,6 @@ module PulpcoreClient
117
117
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
118
118
  end
119
119
 
120
- if !@retain_repo_versions.nil? && @retain_repo_versions < 1
121
- invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
122
- end
123
-
124
120
  invalid_properties
125
121
  end
126
122
 
@@ -130,7 +126,6 @@ module PulpcoreClient
130
126
  warn '[DEPRECATED] the `valid?` method is obsolete'
131
127
  return false if !@name.nil? && @name.to_s.length < 1
132
128
  return false if !@description.nil? && @description.to_s.length < 1
133
- return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
134
129
  true
135
130
  end
136
131
 
@@ -158,16 +153,6 @@ module PulpcoreClient
158
153
  @description = description
159
154
  end
160
155
 
161
- # Custom attribute writer method with validation
162
- # @param [Object] retain_repo_versions Value to be assigned
163
- def retain_repo_versions=(retain_repo_versions)
164
- if !retain_repo_versions.nil? && retain_repo_versions < 1
165
- fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
166
- end
167
-
168
- @retain_repo_versions = retain_repo_versions
169
- end
170
-
171
156
  # Checks equality by comparing each attribute.
172
157
  # @param [Object] Object to be compared
173
158
  def ==(o)
@@ -65,6 +65,8 @@ module PulpcoreClient
65
65
 
66
66
  if attributes.key?(:'finished_before')
67
67
  self.finished_before = attributes[:'finished_before']
68
+ else
69
+ self.finished_before = '2025-07-13'
68
70
  end
69
71
 
70
72
  if attributes.key?(:'states')
@@ -166,10 +166,6 @@ module PulpcoreClient
166
166
  invalid_properties.push('invalid value for "name", name cannot be nil.')
167
167
  end
168
168
 
169
- if !@retain_repo_versions.nil? && @retain_repo_versions < 1
170
- invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
171
- end
172
-
173
169
  invalid_properties
174
170
  end
175
171
 
@@ -178,20 +174,9 @@ module PulpcoreClient
178
174
  def valid?
179
175
  warn '[DEPRECATED] the `valid?` method is obsolete'
180
176
  return false if @name.nil?
181
- return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
182
177
  true
183
178
  end
184
179
 
185
- # Custom attribute writer method with validation
186
- # @param [Object] retain_repo_versions Value to be assigned
187
- def retain_repo_versions=(retain_repo_versions)
188
- if !retain_repo_versions.nil? && retain_repo_versions < 1
189
- fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
190
- end
191
-
192
- @retain_repo_versions = retain_repo_versions
193
- end
194
-
195
180
  # Checks equality by comparing each attribute.
196
181
  # @param [Object] Object to be compared
197
182
  def ==(o)
@@ -37,6 +37,8 @@ module PulpcoreClient
37
37
  # Various count summaries of the content in the version and the HREF to view them.
38
38
  attr_accessor :content_summary
39
39
 
40
+ attr_accessor :vuln_report
41
+
40
42
  # Attribute mapping from ruby-style variable name to JSON key.
41
43
  def self.attribute_map
42
44
  {
@@ -47,7 +49,8 @@ module PulpcoreClient
47
49
  :'number' => :'number',
48
50
  :'repository' => :'repository',
49
51
  :'base_version' => :'base_version',
50
- :'content_summary' => :'content_summary'
52
+ :'content_summary' => :'content_summary',
53
+ :'vuln_report' => :'vuln_report'
51
54
  }
52
55
  end
53
56
 
@@ -66,7 +69,8 @@ module PulpcoreClient
66
69
  :'number' => :'Integer',
67
70
  :'repository' => :'String',
68
71
  :'base_version' => :'String',
69
- :'content_summary' => :'ContentSummaryResponse'
72
+ :'content_summary' => :'ContentSummaryResponse',
73
+ :'vuln_report' => :'String'
70
74
  }
71
75
  end
72
76
 
@@ -122,6 +126,10 @@ module PulpcoreClient
122
126
  if attributes.key?(:'content_summary')
123
127
  self.content_summary = attributes[:'content_summary']
124
128
  end
129
+
130
+ if attributes.key?(:'vuln_report')
131
+ self.vuln_report = attributes[:'vuln_report']
132
+ end
125
133
  end
126
134
 
127
135
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,7 +159,8 @@ module PulpcoreClient
151
159
  number == o.number &&
152
160
  repository == o.repository &&
153
161
  base_version == o.base_version &&
154
- content_summary == o.content_summary
162
+ content_summary == o.content_summary &&
163
+ vuln_report == o.vuln_report
155
164
  end
156
165
 
157
166
  # @see the `==` method
@@ -163,7 +172,7 @@ module PulpcoreClient
163
172
  # Calculates hash code according to all attributes.
164
173
  # @return [Integer] Hash code
165
174
  def hash
166
- [pulp_href, prn, pulp_created, pulp_last_updated, number, repository, base_version, content_summary].hash
175
+ [pulp_href, prn, pulp_created, pulp_last_updated, number, repository, base_version, content_summary, vuln_report].hash
167
176
  end
168
177
 
169
178
  # Builds the object from hash
@@ -96,18 +96,6 @@ module PulpcoreClient
96
96
  def list_invalid_properties
97
97
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
98
  invalid_properties = Array.new
99
- if @total < 0
100
- invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
101
- end
102
-
103
- if @used < 0
104
- invalid_properties.push('invalid value for "used", must be greater than or equal to 0.')
105
- end
106
-
107
- if @free < 0
108
- invalid_properties.push('invalid value for "free", must be greater than or equal to 0.')
109
- end
110
-
111
99
  invalid_properties
112
100
  end
113
101
 
@@ -115,42 +103,9 @@ module PulpcoreClient
115
103
  # @return true if the model is valid
116
104
  def valid?
117
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
118
- return false if @total < 0
119
- return false if @used < 0
120
- return false if @free < 0
121
106
  true
122
107
  end
123
108
 
124
- # Custom attribute writer method with validation
125
- # @param [Object] total Value to be assigned
126
- def total=(total)
127
- if !total.nil? && total < 0
128
- fail ArgumentError, 'invalid value for "total", must be greater than or equal to 0.'
129
- end
130
-
131
- @total = total
132
- end
133
-
134
- # Custom attribute writer method with validation
135
- # @param [Object] used Value to be assigned
136
- def used=(used)
137
- if !used.nil? && used < 0
138
- fail ArgumentError, 'invalid value for "used", must be greater than or equal to 0.'
139
- end
140
-
141
- @used = used
142
- end
143
-
144
- # Custom attribute writer method with validation
145
- # @param [Object] free Value to be assigned
146
- def free=(free)
147
- if !free.nil? && free < 0
148
- fail ArgumentError, 'invalid value for "free", must be greater than or equal to 0.'
149
- end
150
-
151
- @free = free
152
- end
153
-
154
109
  # Checks equality by comparing each attribute.
155
110
  # @param [Object] Object to be compared
156
111
  def ==(o)