pulp_file_client 1.10.5 → 1.11.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -12
  3. data/docs/AcsFileApi.md +235 -8
  4. data/docs/ContentFilesApi.md +5 -3
  5. data/docs/DistributionsFileApi.md +230 -2
  6. data/docs/FileFileContent.md +3 -1
  7. data/docs/FileFileRemote.md +3 -3
  8. data/docs/FileFileRemoteResponse.md +1 -1
  9. data/docs/MyPermissionsResponse.md +17 -0
  10. data/docs/NestedRole.md +21 -0
  11. data/docs/NestedRoleResponse.md +21 -0
  12. data/docs/ObjectRolesResponse.md +17 -0
  13. data/docs/PatchedfileFileRemote.md +3 -3
  14. data/docs/PublicationsFileApi.md +232 -2
  15. data/docs/RemotesFileApi.md +230 -2
  16. data/docs/Repair.md +17 -0
  17. data/docs/RepositoriesFileApi.md +233 -4
  18. data/docs/RepositoriesFileVersionsApi.md +6 -6
  19. data/lib/pulp_file_client/api/acs_file_api.rb +281 -15
  20. data/lib/pulp_file_client/api/content_files_api.rb +14 -3
  21. data/lib/pulp_file_client/api/distributions_file_api.rb +275 -3
  22. data/lib/pulp_file_client/api/publications_file_api.rb +278 -3
  23. data/lib/pulp_file_client/api/remotes_file_api.rb +275 -3
  24. data/lib/pulp_file_client/api/repositories_file_api.rb +277 -3
  25. data/lib/pulp_file_client/api/repositories_file_versions_api.rb +16 -12
  26. data/lib/pulp_file_client/api_client.rb +1 -1
  27. data/lib/pulp_file_client/models/file_file_alternate_content_source.rb +19 -0
  28. data/lib/pulp_file_client/models/file_file_content.rb +33 -4
  29. data/lib/pulp_file_client/models/file_file_distribution.rb +38 -0
  30. data/lib/pulp_file_client/models/file_file_publication.rb +15 -0
  31. data/lib/pulp_file_client/models/file_file_remote.rb +161 -3
  32. data/lib/pulp_file_client/models/file_file_remote_response.rb +1 -1
  33. data/lib/pulp_file_client/models/file_file_repository.rb +49 -0
  34. data/lib/pulp_file_client/models/{repository_version.rb → my_permissions_response.rb} +17 -12
  35. data/lib/pulp_file_client/models/{content_summary.rb → nested_role.rb} +28 -40
  36. data/lib/pulp_file_client/models/nested_role_response.rb +234 -0
  37. data/lib/pulp_file_client/models/object_roles_response.rb +213 -0
  38. data/lib/pulp_file_client/models/patchedfile_file_alternate_content_source.rb +15 -0
  39. data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +30 -0
  40. data/lib/pulp_file_client/models/patchedfile_file_remote.rb +153 -3
  41. data/lib/pulp_file_client/models/patchedfile_file_repository.rb +45 -0
  42. data/lib/pulp_file_client/models/repair.rb +209 -0
  43. data/lib/pulp_file_client/version.rb +1 -1
  44. data/lib/pulp_file_client.rb +5 -2
  45. data/pulp_file_client.gemspec +1 -1
  46. data/spec/api/acs_file_api_spec.rb +52 -2
  47. data/spec/api/content_files_api_spec.rb +2 -1
  48. data/spec/api/distributions_file_api_spec.rb +51 -1
  49. data/spec/api/publications_file_api_spec.rb +52 -1
  50. data/spec/api/remotes_file_api_spec.rb +51 -1
  51. data/spec/api/repositories_file_api_spec.rb +52 -1
  52. data/spec/api/repositories_file_versions_api_spec.rb +2 -2
  53. data/spec/models/file_file_content_spec.rb +6 -0
  54. data/spec/models/my_permissions_response_spec.rb +41 -0
  55. data/spec/models/nested_role_response_spec.rb +53 -0
  56. data/spec/models/{content_summary_spec.rb → nested_role_spec.rb} +9 -9
  57. data/spec/models/object_roles_response_spec.rb +41 -0
  58. data/spec/models/{repository_version_spec.rb → repair_spec.rb} +7 -7
  59. metadata +48 -36
  60. data/docs/ContentSummary.md +0 -21
  61. data/docs/RepositoryVersion.md +0 -17
@@ -95,7 +95,7 @@ module PulpFileClient
95
95
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
96
96
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
97
97
  # @option opts [Integer] :offset The initial index from which to return the results.
98
- # @option opts [String] :ordering Which field to use when ordering the results.
98
+ # @option opts [Array<String>] :ordering Ordering
99
99
  # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
100
100
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
101
101
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
@@ -124,7 +124,7 @@ module PulpFileClient
124
124
  # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
125
125
  # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
126
126
  # @option opts [Integer] :offset The initial index from which to return the results.
127
- # @option opts [String] :ordering Which field to use when ordering the results.
127
+ # @option opts [Array<String>] :ordering Ordering
128
128
  # @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
129
129
  # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
130
130
  # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
@@ -142,6 +142,10 @@ module PulpFileClient
142
142
  if @api_client.config.client_side_validation && file_file_repository_href.nil?
143
143
  fail ArgumentError, "Missing the required parameter 'file_file_repository_href' when calling RepositoriesFileVersionsApi.list"
144
144
  end
145
+ allowable_values = ["-added_memberships", "-base_version", "-complete", "-counts", "-distribution", "-group_roles", "-number", "-pk", "-publication", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-removed_memberships", "-repository", "-user_roles", "-versions", "added_memberships", "base_version", "complete", "counts", "distribution", "group_roles", "number", "pk", "publication", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "removed_memberships", "repository", "user_roles", "versions"]
146
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
147
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
148
+ end
145
149
  # resource path
146
150
  local_var_path = '{file_file_repository_href}versions/'.sub('{' + 'file_file_repository_href' + '}', CGI.escape(file_file_repository_href.to_s).gsub('%2F', '/'))
147
151
 
@@ -157,7 +161,7 @@ module PulpFileClient
157
161
  query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
158
162
  query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
159
163
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
160
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
164
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
161
165
  query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
162
166
  query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
163
167
  query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
@@ -270,20 +274,20 @@ module PulpFileClient
270
274
 
271
275
  # Trigger an asynchronous task to repair a repository version.
272
276
  # @param file_file_repository_version_href [String]
273
- # @param repository_version [RepositoryVersion]
277
+ # @param repair [Repair]
274
278
  # @param [Hash] opts the optional parameters
275
279
  # @return [AsyncOperationResponse]
276
- def repair(file_file_repository_version_href, repository_version, opts = {})
277
- data, _status_code, _headers = repair_with_http_info(file_file_repository_version_href, repository_version, opts)
280
+ def repair(file_file_repository_version_href, repair, opts = {})
281
+ data, _status_code, _headers = repair_with_http_info(file_file_repository_version_href, repair, opts)
278
282
  data
279
283
  end
280
284
 
281
285
  # Trigger an asynchronous task to repair a repository version.
282
286
  # @param file_file_repository_version_href [String]
283
- # @param repository_version [RepositoryVersion]
287
+ # @param repair [Repair]
284
288
  # @param [Hash] opts the optional parameters
285
289
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
286
- def repair_with_http_info(file_file_repository_version_href, repository_version, opts = {})
290
+ def repair_with_http_info(file_file_repository_version_href, repair, opts = {})
287
291
  if @api_client.config.debugging
288
292
  @api_client.config.logger.debug 'Calling API: RepositoriesFileVersionsApi.repair ...'
289
293
  end
@@ -291,9 +295,9 @@ module PulpFileClient
291
295
  if @api_client.config.client_side_validation && file_file_repository_version_href.nil?
292
296
  fail ArgumentError, "Missing the required parameter 'file_file_repository_version_href' when calling RepositoriesFileVersionsApi.repair"
293
297
  end
294
- # verify the required parameter 'repository_version' is set
295
- if @api_client.config.client_side_validation && repository_version.nil?
296
- fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesFileVersionsApi.repair"
298
+ # verify the required parameter 'repair' is set
299
+ if @api_client.config.client_side_validation && repair.nil?
300
+ fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesFileVersionsApi.repair"
297
301
  end
298
302
  # resource path
299
303
  local_var_path = '{file_file_repository_version_href}repair/'.sub('{' + 'file_file_repository_version_href' + '}', CGI.escape(file_file_repository_version_href.to_s).gsub('%2F', '/'))
@@ -312,7 +316,7 @@ module PulpFileClient
312
316
  form_params = opts[:form_params] || {}
313
317
 
314
318
  # http body (model)
315
- post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
319
+ post_body = opts[:body] || @api_client.object_to_http_body(repair)
316
320
 
317
321
  # return_type
318
322
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -154,7 +154,7 @@ module PulpFileClient
154
154
  case value
155
155
  when ::File, ::Tempfile
156
156
  # TODO hardcode to application/octet-stream, need better way to detect content type
157
- data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
157
+ data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
158
158
  when ::Array, nil
159
159
  # let Faraday handle Array and nil parameters
160
160
  data[key] = value
@@ -96,6 +96,10 @@ module PulpFileClient
96
96
  invalid_properties.push('invalid value for "name", name cannot be nil.')
97
97
  end
98
98
 
99
+ if @name.to_s.length < 1
100
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
101
+ end
102
+
99
103
  if @remote.nil?
100
104
  invalid_properties.push('invalid value for "remote", remote cannot be nil.')
101
105
  end
@@ -107,10 +111,25 @@ module PulpFileClient
107
111
  # @return true if the model is valid
108
112
  def valid?
109
113
  return false if @name.nil?
114
+ return false if @name.to_s.length < 1
110
115
  return false if @remote.nil?
111
116
  true
112
117
  end
113
118
 
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] name Value to be assigned
121
+ def name=(name)
122
+ if name.nil?
123
+ fail ArgumentError, 'name cannot be nil'
124
+ end
125
+
126
+ if name.to_s.length < 1
127
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
128
+ end
129
+
130
+ @name = name
131
+ end
132
+
114
133
  # Checks equality by comparing each attribute.
115
134
  # @param [Object] Object to be compared
116
135
  def ==(o)
@@ -27,13 +27,17 @@ module PulpFileClient
27
27
  # A URI of a repository the new content unit should be associated with.
28
28
  attr_accessor :repository
29
29
 
30
+ # An uncommitted upload that may be turned into the artifact of the content unit.
31
+ attr_accessor :upload
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
33
36
  :'artifact' => :'artifact',
34
37
  :'relative_path' => :'relative_path',
35
38
  :'file' => :'file',
36
- :'repository' => :'repository'
39
+ :'repository' => :'repository',
40
+ :'upload' => :'upload'
37
41
  }
38
42
  end
39
43
 
@@ -43,7 +47,8 @@ module PulpFileClient
43
47
  :'artifact' => :'String',
44
48
  :'relative_path' => :'String',
45
49
  :'file' => :'File',
46
- :'repository' => :'String'
50
+ :'repository' => :'String',
51
+ :'upload' => :'String'
47
52
  }
48
53
  end
49
54
 
@@ -83,6 +88,10 @@ module PulpFileClient
83
88
  if attributes.key?(:'repository')
84
89
  self.repository = attributes[:'repository']
85
90
  end
91
+
92
+ if attributes.key?(:'upload')
93
+ self.upload = attributes[:'upload']
94
+ end
86
95
  end
87
96
 
88
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -93,6 +102,10 @@ module PulpFileClient
93
102
  invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
94
103
  end
95
104
 
105
+ if @relative_path.to_s.length < 1
106
+ invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
107
+ end
108
+
96
109
  invalid_properties
97
110
  end
98
111
 
@@ -100,9 +113,24 @@ module PulpFileClient
100
113
  # @return true if the model is valid
101
114
  def valid?
102
115
  return false if @relative_path.nil?
116
+ return false if @relative_path.to_s.length < 1
103
117
  true
104
118
  end
105
119
 
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] relative_path Value to be assigned
122
+ def relative_path=(relative_path)
123
+ if relative_path.nil?
124
+ fail ArgumentError, 'relative_path cannot be nil'
125
+ end
126
+
127
+ if relative_path.to_s.length < 1
128
+ fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
129
+ end
130
+
131
+ @relative_path = relative_path
132
+ end
133
+
106
134
  # Checks equality by comparing each attribute.
107
135
  # @param [Object] Object to be compared
108
136
  def ==(o)
@@ -111,7 +139,8 @@ module PulpFileClient
111
139
  artifact == o.artifact &&
112
140
  relative_path == o.relative_path &&
113
141
  file == o.file &&
114
- repository == o.repository
142
+ repository == o.repository &&
143
+ upload == o.upload
115
144
  end
116
145
 
117
146
  # @see the `==` method
@@ -123,7 +152,7 @@ module PulpFileClient
123
152
  # Calculates hash code according to all attributes.
124
153
  # @return [Integer] Hash code
125
154
  def hash
126
- [artifact, relative_path, file, repository].hash
155
+ [artifact, relative_path, file, repository, upload].hash
127
156
  end
128
157
 
129
158
  # Builds the object from hash
@@ -113,10 +113,18 @@ module PulpFileClient
113
113
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
114
114
  end
115
115
 
116
+ if @base_path.to_s.length < 1
117
+ invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
118
+ end
119
+
116
120
  if @name.nil?
117
121
  invalid_properties.push('invalid value for "name", name cannot be nil.')
118
122
  end
119
123
 
124
+ if @name.to_s.length < 1
125
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
126
+ end
127
+
120
128
  invalid_properties
121
129
  end
122
130
 
@@ -124,10 +132,40 @@ module PulpFileClient
124
132
  # @return true if the model is valid
125
133
  def valid?
126
134
  return false if @base_path.nil?
135
+ return false if @base_path.to_s.length < 1
127
136
  return false if @name.nil?
137
+ return false if @name.to_s.length < 1
128
138
  true
129
139
  end
130
140
 
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] base_path Value to be assigned
143
+ def base_path=(base_path)
144
+ if base_path.nil?
145
+ fail ArgumentError, 'base_path cannot be nil'
146
+ end
147
+
148
+ if base_path.to_s.length < 1
149
+ fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
150
+ end
151
+
152
+ @base_path = base_path
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] name Value to be assigned
157
+ def name=(name)
158
+ if name.nil?
159
+ fail ArgumentError, 'name cannot be nil'
160
+ end
161
+
162
+ if name.to_s.length < 1
163
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
164
+ end
165
+
166
+ @name = name
167
+ end
168
+
131
169
  # Checks equality by comparing each attribute.
132
170
  # @param [Object] Object to be compared
133
171
  def ==(o)
@@ -81,15 +81,30 @@ module PulpFileClient
81
81
  # @return Array for valid properties with the reasons
82
82
  def list_invalid_properties
83
83
  invalid_properties = Array.new
84
+ if !@manifest.nil? && @manifest.to_s.length < 1
85
+ invalid_properties.push('invalid value for "manifest", the character length must be great than or equal to 1.')
86
+ end
87
+
84
88
  invalid_properties
85
89
  end
86
90
 
87
91
  # Check to see if the all the properties in the model are valid
88
92
  # @return true if the model is valid
89
93
  def valid?
94
+ return false if !@manifest.nil? && @manifest.to_s.length < 1
90
95
  true
91
96
  end
92
97
 
98
+ # Custom attribute writer method with validation
99
+ # @param [Object] manifest Value to be assigned
100
+ def manifest=(manifest)
101
+ if !manifest.nil? && manifest.to_s.length < 1
102
+ fail ArgumentError, 'invalid value for "manifest", the character length must be great than or equal to 1.'
103
+ end
104
+
105
+ @manifest = manifest
106
+ end
107
+
93
108
  # Checks equality by comparing each attribute.
94
109
  # @param [Object] Object to be compared
95
110
  def ==(o)
@@ -39,13 +39,13 @@ module PulpFileClient
39
39
  # The username to authenticte to the proxy.
40
40
  attr_accessor :proxy_username
41
41
 
42
- # The password to authenticte to the proxy.
42
+ # The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.
43
43
  attr_accessor :proxy_password
44
44
 
45
45
  # The username to be used for authentication when syncing.
46
46
  attr_accessor :username
47
47
 
48
- # The password to be used for authentication when syncing.
48
+ # The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
49
49
  attr_accessor :password
50
50
 
51
51
  attr_accessor :pulp_labels
@@ -74,7 +74,7 @@ module PulpFileClient
74
74
  # Headers for aiohttp.Clientsession
75
75
  attr_accessor :headers
76
76
 
77
- # Limits total download rate in requests per second
77
+ # Limits requests per second for each concurrent downloader
78
78
  attr_accessor :rate_limit
79
79
 
80
80
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -262,10 +262,50 @@ module PulpFileClient
262
262
  invalid_properties.push('invalid value for "name", name cannot be nil.')
263
263
  end
264
264
 
265
+ if @name.to_s.length < 1
266
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
267
+ end
268
+
265
269
  if @url.nil?
266
270
  invalid_properties.push('invalid value for "url", url cannot be nil.')
267
271
  end
268
272
 
273
+ if @url.to_s.length < 1
274
+ invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
275
+ end
276
+
277
+ if !@ca_cert.nil? && @ca_cert.to_s.length < 1
278
+ invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
279
+ end
280
+
281
+ if !@client_cert.nil? && @client_cert.to_s.length < 1
282
+ invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
283
+ end
284
+
285
+ if !@client_key.nil? && @client_key.to_s.length < 1
286
+ invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
287
+ end
288
+
289
+ if !@proxy_url.nil? && @proxy_url.to_s.length < 1
290
+ invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
291
+ end
292
+
293
+ if !@proxy_username.nil? && @proxy_username.to_s.length < 1
294
+ invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
295
+ end
296
+
297
+ if !@proxy_password.nil? && @proxy_password.to_s.length < 1
298
+ invalid_properties.push('invalid value for "proxy_password", the character length must be great than or equal to 1.')
299
+ end
300
+
301
+ if !@username.nil? && @username.to_s.length < 1
302
+ invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
303
+ end
304
+
305
+ if !@password.nil? && @password.to_s.length < 1
306
+ invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
307
+ end
308
+
269
309
  if !@download_concurrency.nil? && @download_concurrency < 1
270
310
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
271
311
  end
@@ -293,7 +333,17 @@ module PulpFileClient
293
333
  # @return true if the model is valid
294
334
  def valid?
295
335
  return false if @name.nil?
336
+ return false if @name.to_s.length < 1
296
337
  return false if @url.nil?
338
+ return false if @url.to_s.length < 1
339
+ return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
340
+ return false if !@client_cert.nil? && @client_cert.to_s.length < 1
341
+ return false if !@client_key.nil? && @client_key.to_s.length < 1
342
+ return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
343
+ return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
344
+ return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
345
+ return false if !@username.nil? && @username.to_s.length < 1
346
+ return false if !@password.nil? && @password.to_s.length < 1
297
347
  return false if !@download_concurrency.nil? && @download_concurrency < 1
298
348
  return false if !@total_timeout.nil? && @total_timeout < 0.0
299
349
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
@@ -302,6 +352,114 @@ module PulpFileClient
302
352
  true
303
353
  end
304
354
 
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] name Value to be assigned
357
+ def name=(name)
358
+ if name.nil?
359
+ fail ArgumentError, 'name cannot be nil'
360
+ end
361
+
362
+ if name.to_s.length < 1
363
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
364
+ end
365
+
366
+ @name = name
367
+ end
368
+
369
+ # Custom attribute writer method with validation
370
+ # @param [Object] url Value to be assigned
371
+ def url=(url)
372
+ if url.nil?
373
+ fail ArgumentError, 'url cannot be nil'
374
+ end
375
+
376
+ if url.to_s.length < 1
377
+ fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
378
+ end
379
+
380
+ @url = url
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] ca_cert Value to be assigned
385
+ def ca_cert=(ca_cert)
386
+ if !ca_cert.nil? && ca_cert.to_s.length < 1
387
+ fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
388
+ end
389
+
390
+ @ca_cert = ca_cert
391
+ end
392
+
393
+ # Custom attribute writer method with validation
394
+ # @param [Object] client_cert Value to be assigned
395
+ def client_cert=(client_cert)
396
+ if !client_cert.nil? && client_cert.to_s.length < 1
397
+ fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
398
+ end
399
+
400
+ @client_cert = client_cert
401
+ end
402
+
403
+ # Custom attribute writer method with validation
404
+ # @param [Object] client_key Value to be assigned
405
+ def client_key=(client_key)
406
+ if !client_key.nil? && client_key.to_s.length < 1
407
+ fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
408
+ end
409
+
410
+ @client_key = client_key
411
+ end
412
+
413
+ # Custom attribute writer method with validation
414
+ # @param [Object] proxy_url Value to be assigned
415
+ def proxy_url=(proxy_url)
416
+ if !proxy_url.nil? && proxy_url.to_s.length < 1
417
+ fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
418
+ end
419
+
420
+ @proxy_url = proxy_url
421
+ end
422
+
423
+ # Custom attribute writer method with validation
424
+ # @param [Object] proxy_username Value to be assigned
425
+ def proxy_username=(proxy_username)
426
+ if !proxy_username.nil? && proxy_username.to_s.length < 1
427
+ fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
428
+ end
429
+
430
+ @proxy_username = proxy_username
431
+ end
432
+
433
+ # Custom attribute writer method with validation
434
+ # @param [Object] proxy_password Value to be assigned
435
+ def proxy_password=(proxy_password)
436
+ if !proxy_password.nil? && proxy_password.to_s.length < 1
437
+ fail ArgumentError, 'invalid value for "proxy_password", the character length must be great than or equal to 1.'
438
+ end
439
+
440
+ @proxy_password = proxy_password
441
+ end
442
+
443
+ # Custom attribute writer method with validation
444
+ # @param [Object] username Value to be assigned
445
+ def username=(username)
446
+ if !username.nil? && username.to_s.length < 1
447
+ fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
448
+ end
449
+
450
+ @username = username
451
+ end
452
+
453
+ # Custom attribute writer method with validation
454
+ # @param [Object] password Value to be assigned
455
+ def password=(password)
456
+ if !password.nil? && password.to_s.length < 1
457
+ fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
458
+ end
459
+
460
+ @password = password
461
+ end
462
+
305
463
  # Custom attribute writer method with validation
306
464
  # @param [Object] download_concurrency Value to be assigned
307
465
  def download_concurrency=(download_concurrency)
@@ -67,7 +67,7 @@ module PulpFileClient
67
67
  # Headers for aiohttp.Clientsession
68
68
  attr_accessor :headers
69
69
 
70
- # Limits total download rate in requests per second
70
+ # Limits requests per second for each concurrent downloader
71
71
  attr_accessor :rate_limit
72
72
 
73
73
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -126,10 +126,22 @@ module PulpFileClient
126
126
  invalid_properties.push('invalid value for "name", name cannot be nil.')
127
127
  end
128
128
 
129
+ if @name.to_s.length < 1
130
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
131
+ end
132
+
133
+ if !@description.nil? && @description.to_s.length < 1
134
+ invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
135
+ end
136
+
129
137
  if !@retain_repo_versions.nil? && @retain_repo_versions < 1
130
138
  invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
131
139
  end
132
140
 
141
+ if !@manifest.nil? && @manifest.to_s.length < 1
142
+ invalid_properties.push('invalid value for "manifest", the character length must be great than or equal to 1.')
143
+ end
144
+
133
145
  invalid_properties
134
146
  end
135
147
 
@@ -137,10 +149,37 @@ module PulpFileClient
137
149
  # @return true if the model is valid
138
150
  def valid?
139
151
  return false if @name.nil?
152
+ return false if @name.to_s.length < 1
153
+ return false if !@description.nil? && @description.to_s.length < 1
140
154
  return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
155
+ return false if !@manifest.nil? && @manifest.to_s.length < 1
141
156
  true
142
157
  end
143
158
 
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] name Value to be assigned
161
+ def name=(name)
162
+ if name.nil?
163
+ fail ArgumentError, 'name cannot be nil'
164
+ end
165
+
166
+ if name.to_s.length < 1
167
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
168
+ end
169
+
170
+ @name = name
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] description Value to be assigned
175
+ def description=(description)
176
+ if !description.nil? && description.to_s.length < 1
177
+ fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
178
+ end
179
+
180
+ @description = description
181
+ end
182
+
144
183
  # Custom attribute writer method with validation
145
184
  # @param [Object] retain_repo_versions Value to be assigned
146
185
  def retain_repo_versions=(retain_repo_versions)
@@ -151,6 +190,16 @@ module PulpFileClient
151
190
  @retain_repo_versions = retain_repo_versions
152
191
  end
153
192
 
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] manifest Value to be assigned
195
+ def manifest=(manifest)
196
+ if !manifest.nil? && manifest.to_s.length < 1
197
+ fail ArgumentError, 'invalid value for "manifest", the character length must be great than or equal to 1.'
198
+ end
199
+
200
+ @manifest = manifest
201
+ end
202
+
154
203
  # Checks equality by comparing each attribute.
155
204
  # @param [Object] Object to be compared
156
205
  def ==(o)