pulp_hugging_face_client 0.2.2 → 0.3.1

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/docs/ContentHuggingFaceApi.md +6 -6
  4. data/docs/DistributionsHuggingFaceApi.md +4 -4
  5. data/docs/HuggingFaceHuggingFaceContent.md +2 -0
  6. data/docs/HuggingFaceHuggingFaceDistribution.md +2 -0
  7. data/docs/HuggingFaceHuggingFaceDistributionResponse.md +4 -0
  8. data/docs/HuggingFaceHuggingFaceRemote.md +6 -6
  9. data/docs/HuggingFaceHuggingFaceRemoteResponse.md +8 -8
  10. data/docs/HuggingFaceHuggingFaceRepository.md +2 -0
  11. data/docs/HuggingFaceHuggingFaceRepositoryResponse.md +2 -0
  12. data/docs/PatchedhuggingFaceHuggingFaceDistribution.md +2 -0
  13. data/docs/PatchedhuggingFaceHuggingFaceRemote.md +6 -6
  14. data/docs/PatchedhuggingFaceHuggingFaceRepository.md +2 -0
  15. data/docs/PublicationsHuggingFaceApi.md +2 -2
  16. data/docs/RepositoriesHuggingFaceApi.md +20 -4
  17. data/docs/RepositoryAddRemoveContent.md +3 -1
  18. data/lib/pulp_hugging_face_client/api/content_hugging_face_api.rb +6 -6
  19. data/lib/pulp_hugging_face_client/api/distributions_hugging_face_api.rb +4 -4
  20. data/lib/pulp_hugging_face_client/api/publications_hugging_face_api.rb +2 -2
  21. data/lib/pulp_hugging_face_client/api/repositories_hugging_face_api.rb +29 -5
  22. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content.rb +11 -1
  23. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution.rb +12 -1
  24. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution_response.rb +22 -1
  25. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote.rb +48 -33
  26. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response.rb +60 -45
  27. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository.rb +42 -1
  28. data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository_response.rb +42 -1
  29. data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_distribution.rb +12 -1
  30. data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_remote.rb +48 -33
  31. data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_repository.rb +42 -1
  32. data/lib/pulp_hugging_face_client/models/repository_add_remove_content.rb +16 -4
  33. data/lib/pulp_hugging_face_client/models/set_label.rb +0 -11
  34. data/lib/pulp_hugging_face_client/models/set_label_response.rb +0 -21
  35. data/lib/pulp_hugging_face_client/models/unset_label.rb +0 -11
  36. data/lib/pulp_hugging_face_client/models/unset_label_response.rb +0 -21
  37. data/lib/pulp_hugging_face_client/version.rb +1 -1
  38. data/spec/api/content_hugging_face_api_spec.rb +3 -3
  39. data/spec/api/distributions_hugging_face_api_spec.rb +2 -2
  40. data/spec/api/publications_hugging_face_api_spec.rb +1 -1
  41. data/spec/api/repositories_hugging_face_api_spec.rb +10 -2
  42. data/spec/models/hugging_face_hugging_face_content_spec.rb +6 -0
  43. data/spec/models/hugging_face_hugging_face_distribution_response_spec.rb +12 -0
  44. data/spec/models/hugging_face_hugging_face_distribution_spec.rb +6 -0
  45. data/spec/models/hugging_face_hugging_face_remote_response_spec.rb +10 -10
  46. data/spec/models/hugging_face_hugging_face_remote_spec.rb +17 -17
  47. data/spec/models/hugging_face_hugging_face_repository_response_spec.rb +6 -0
  48. data/spec/models/hugging_face_hugging_face_repository_spec.rb +6 -0
  49. data/spec/models/patchedhugging_face_hugging_face_distribution_spec.rb +6 -0
  50. data/spec/models/patchedhugging_face_hugging_face_remote_spec.rb +17 -17
  51. data/spec/models/patchedhugging_face_hugging_face_repository_spec.rb +6 -0
  52. data/spec/models/repository_add_remove_content_spec.rb +6 -0
  53. metadata +30 -30
@@ -33,6 +33,14 @@ module PulpHuggingFaceClient
33
33
  # The URL of an external content source.
34
34
  attr_accessor :url
35
35
 
36
+ attr_accessor :pulp_labels
37
+
38
+ # The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' enables pull-through caching. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
39
+ attr_accessor :policy
40
+
41
+ # List of hidden (write only) fields
42
+ attr_accessor :hidden_fields
43
+
36
44
  # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
37
45
  attr_accessor :ca_cert
38
46
 
@@ -45,17 +53,9 @@ module PulpHuggingFaceClient
45
53
  # The proxy URL. Format: scheme://host:port
46
54
  attr_accessor :proxy_url
47
55
 
48
- attr_accessor :pulp_labels
49
-
50
- # Total number of simultaneous connections. If not set then the default value will be used.
51
- attr_accessor :download_concurrency
52
-
53
56
  # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
54
57
  attr_accessor :max_retries
55
58
 
56
- # The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' enables pull-through caching. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
57
- attr_accessor :policy
58
-
59
59
  # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
60
60
  attr_accessor :total_timeout
61
61
 
@@ -71,12 +71,12 @@ module PulpHuggingFaceClient
71
71
  # Headers for aiohttp.Clientsession
72
72
  attr_accessor :headers
73
73
 
74
+ # Total number of simultaneous connections. If not set then the default value will be used.
75
+ attr_accessor :download_concurrency
76
+
74
77
  # Limits requests per second for each concurrent downloader
75
78
  attr_accessor :rate_limit
76
79
 
77
- # List of hidden (write only) fields
78
- attr_accessor :hidden_fields
79
-
80
80
  # Base URL for Hugging Face Hub
81
81
  attr_accessor :hf_hub_url
82
82
 
@@ -114,21 +114,21 @@ module PulpHuggingFaceClient
114
114
  :'pulp_last_updated' => :'pulp_last_updated',
115
115
  :'name' => :'name',
116
116
  :'url' => :'url',
117
+ :'pulp_labels' => :'pulp_labels',
118
+ :'policy' => :'policy',
119
+ :'hidden_fields' => :'hidden_fields',
117
120
  :'ca_cert' => :'ca_cert',
118
121
  :'client_cert' => :'client_cert',
119
122
  :'tls_validation' => :'tls_validation',
120
123
  :'proxy_url' => :'proxy_url',
121
- :'pulp_labels' => :'pulp_labels',
122
- :'download_concurrency' => :'download_concurrency',
123
124
  :'max_retries' => :'max_retries',
124
- :'policy' => :'policy',
125
125
  :'total_timeout' => :'total_timeout',
126
126
  :'connect_timeout' => :'connect_timeout',
127
127
  :'sock_connect_timeout' => :'sock_connect_timeout',
128
128
  :'sock_read_timeout' => :'sock_read_timeout',
129
129
  :'headers' => :'headers',
130
+ :'download_concurrency' => :'download_concurrency',
130
131
  :'rate_limit' => :'rate_limit',
131
- :'hidden_fields' => :'hidden_fields',
132
132
  :'hf_hub_url' => :'hf_hub_url',
133
133
  :'hf_token' => :'hf_token'
134
134
  }
@@ -148,21 +148,21 @@ module PulpHuggingFaceClient
148
148
  :'pulp_last_updated' => :'Time',
149
149
  :'name' => :'String',
150
150
  :'url' => :'String',
151
+ :'pulp_labels' => :'Hash<String, String>',
152
+ :'policy' => :'PolicyEnum',
153
+ :'hidden_fields' => :'Array<HuggingFaceHuggingFaceRemoteResponseHiddenFieldsInner>',
151
154
  :'ca_cert' => :'String',
152
155
  :'client_cert' => :'String',
153
156
  :'tls_validation' => :'Boolean',
154
157
  :'proxy_url' => :'String',
155
- :'pulp_labels' => :'Hash<String, String>',
156
- :'download_concurrency' => :'Integer',
157
158
  :'max_retries' => :'Integer',
158
- :'policy' => :'PolicyEnum',
159
159
  :'total_timeout' => :'Float',
160
160
  :'connect_timeout' => :'Float',
161
161
  :'sock_connect_timeout' => :'Float',
162
162
  :'sock_read_timeout' => :'Float',
163
163
  :'headers' => :'Array<Object>',
164
+ :'download_concurrency' => :'Integer',
164
165
  :'rate_limit' => :'Integer',
165
- :'hidden_fields' => :'Array<HuggingFaceHuggingFaceRemoteResponseHiddenFieldsInner>',
166
166
  :'hf_hub_url' => :'String',
167
167
  :'hf_token' => :'String'
168
168
  }
@@ -174,12 +174,12 @@ module PulpHuggingFaceClient
174
174
  :'ca_cert',
175
175
  :'client_cert',
176
176
  :'proxy_url',
177
- :'download_concurrency',
178
177
  :'max_retries',
179
178
  :'total_timeout',
180
179
  :'connect_timeout',
181
180
  :'sock_connect_timeout',
182
181
  :'sock_read_timeout',
182
+ :'download_concurrency',
183
183
  :'rate_limit',
184
184
  :'hf_token'
185
185
  ])
@@ -228,6 +228,22 @@ module PulpHuggingFaceClient
228
228
  self.url = nil
229
229
  end
230
230
 
231
+ if attributes.key?(:'pulp_labels')
232
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
233
+ self.pulp_labels = value
234
+ end
235
+ end
236
+
237
+ if attributes.key?(:'policy')
238
+ self.policy = attributes[:'policy']
239
+ end
240
+
241
+ if attributes.key?(:'hidden_fields')
242
+ if (value = attributes[:'hidden_fields']).is_a?(Array)
243
+ self.hidden_fields = value
244
+ end
245
+ end
246
+
231
247
  if attributes.key?(:'ca_cert')
232
248
  self.ca_cert = attributes[:'ca_cert']
233
249
  end
@@ -244,24 +260,10 @@ module PulpHuggingFaceClient
244
260
  self.proxy_url = attributes[:'proxy_url']
245
261
  end
246
262
 
247
- if attributes.key?(:'pulp_labels')
248
- if (value = attributes[:'pulp_labels']).is_a?(Hash)
249
- self.pulp_labels = value
250
- end
251
- end
252
-
253
- if attributes.key?(:'download_concurrency')
254
- self.download_concurrency = attributes[:'download_concurrency']
255
- end
256
-
257
263
  if attributes.key?(:'max_retries')
258
264
  self.max_retries = attributes[:'max_retries']
259
265
  end
260
266
 
261
- if attributes.key?(:'policy')
262
- self.policy = attributes[:'policy']
263
- end
264
-
265
267
  if attributes.key?(:'total_timeout')
266
268
  self.total_timeout = attributes[:'total_timeout']
267
269
  end
@@ -284,14 +286,12 @@ module PulpHuggingFaceClient
284
286
  end
285
287
  end
286
288
 
287
- if attributes.key?(:'rate_limit')
288
- self.rate_limit = attributes[:'rate_limit']
289
+ if attributes.key?(:'download_concurrency')
290
+ self.download_concurrency = attributes[:'download_concurrency']
289
291
  end
290
292
 
291
- if attributes.key?(:'hidden_fields')
292
- if (value = attributes[:'hidden_fields']).is_a?(Array)
293
- self.hidden_fields = value
294
- end
293
+ if attributes.key?(:'rate_limit')
294
+ self.rate_limit = attributes[:'rate_limit']
295
295
  end
296
296
 
297
297
  if attributes.key?(:'hf_hub_url')
@@ -334,6 +334,10 @@ module PulpHuggingFaceClient
334
334
  invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
335
335
  end
336
336
 
337
+ if !@download_concurrency.nil? && @download_concurrency < 1
338
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
339
+ end
340
+
337
341
  invalid_properties
338
342
  end
339
343
 
@@ -347,6 +351,7 @@ module PulpHuggingFaceClient
347
351
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
348
352
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
349
353
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
354
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
350
355
  true
351
356
  end
352
357
 
@@ -390,6 +395,16 @@ module PulpHuggingFaceClient
390
395
  @sock_read_timeout = sock_read_timeout
391
396
  end
392
397
 
398
+ # Custom attribute writer method with validation
399
+ # @param [Object] download_concurrency Value to be assigned
400
+ def download_concurrency=(download_concurrency)
401
+ if !download_concurrency.nil? && download_concurrency < 1
402
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
403
+ end
404
+
405
+ @download_concurrency = download_concurrency
406
+ end
407
+
393
408
  # Checks equality by comparing each attribute.
394
409
  # @param [Object] Object to be compared
395
410
  def ==(o)
@@ -401,21 +416,21 @@ module PulpHuggingFaceClient
401
416
  pulp_last_updated == o.pulp_last_updated &&
402
417
  name == o.name &&
403
418
  url == o.url &&
419
+ pulp_labels == o.pulp_labels &&
420
+ policy == o.policy &&
421
+ hidden_fields == o.hidden_fields &&
404
422
  ca_cert == o.ca_cert &&
405
423
  client_cert == o.client_cert &&
406
424
  tls_validation == o.tls_validation &&
407
425
  proxy_url == o.proxy_url &&
408
- pulp_labels == o.pulp_labels &&
409
- download_concurrency == o.download_concurrency &&
410
426
  max_retries == o.max_retries &&
411
- policy == o.policy &&
412
427
  total_timeout == o.total_timeout &&
413
428
  connect_timeout == o.connect_timeout &&
414
429
  sock_connect_timeout == o.sock_connect_timeout &&
415
430
  sock_read_timeout == o.sock_read_timeout &&
416
431
  headers == o.headers &&
432
+ download_concurrency == o.download_concurrency &&
417
433
  rate_limit == o.rate_limit &&
418
- hidden_fields == o.hidden_fields &&
419
434
  hf_hub_url == o.hf_hub_url &&
420
435
  hf_token == o.hf_token
421
436
  end
@@ -429,7 +444,7 @@ module PulpHuggingFaceClient
429
444
  # Calculates hash code according to all attributes.
430
445
  # @return [Integer] Hash code
431
446
  def hash
432
- [pulp_href, prn, pulp_created, pulp_last_updated, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, hidden_fields, hf_hub_url, hf_token].hash
447
+ [pulp_href, prn, pulp_created, pulp_last_updated, name, url, pulp_labels, policy, hidden_fields, ca_cert, client_cert, tls_validation, proxy_url, max_retries, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, download_concurrency, rate_limit, hf_hub_url, hf_token].hash
433
448
  end
434
449
 
435
450
  # Builds the object from hash
@@ -27,6 +27,9 @@ module PulpHuggingFaceClient
27
27
  # Retain X versions of the repository. Default is null which retains all versions.
28
28
  attr_accessor :retain_repo_versions
29
29
 
30
+ # Retain X checkpoint publications for the repository. Default is null which retains all checkpoints.
31
+ attr_accessor :retain_checkpoints
32
+
30
33
  # An optional remote to use by default when syncing.
31
34
  attr_accessor :remote
32
35
 
@@ -37,6 +40,7 @@ module PulpHuggingFaceClient
37
40
  :'name' => :'name',
38
41
  :'description' => :'description',
39
42
  :'retain_repo_versions' => :'retain_repo_versions',
43
+ :'retain_checkpoints' => :'retain_checkpoints',
40
44
  :'remote' => :'remote'
41
45
  }
42
46
  end
@@ -53,6 +57,7 @@ module PulpHuggingFaceClient
53
57
  :'name' => :'String',
54
58
  :'description' => :'String',
55
59
  :'retain_repo_versions' => :'Integer',
60
+ :'retain_checkpoints' => :'Integer',
56
61
  :'remote' => :'String'
57
62
  }
58
63
  end
@@ -62,6 +67,7 @@ module PulpHuggingFaceClient
62
67
  Set.new([
63
68
  :'description',
64
69
  :'retain_repo_versions',
70
+ :'retain_checkpoints',
65
71
  :'remote'
66
72
  ])
67
73
  end
@@ -101,6 +107,10 @@ module PulpHuggingFaceClient
101
107
  self.retain_repo_versions = attributes[:'retain_repo_versions']
102
108
  end
103
109
 
110
+ if attributes.key?(:'retain_checkpoints')
111
+ self.retain_checkpoints = attributes[:'retain_checkpoints']
112
+ end
113
+
104
114
  if attributes.key?(:'remote')
105
115
  self.remote = attributes[:'remote']
106
116
  end
@@ -123,6 +133,14 @@ module PulpHuggingFaceClient
123
133
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
124
134
  end
125
135
 
136
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
137
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
138
+ end
139
+
140
+ if !@retain_checkpoints.nil? && @retain_checkpoints < 1
141
+ invalid_properties.push('invalid value for "retain_checkpoints", must be greater than or equal to 1.')
142
+ end
143
+
126
144
  invalid_properties
127
145
  end
128
146
 
@@ -133,6 +151,8 @@ module PulpHuggingFaceClient
133
151
  return false if @name.nil?
134
152
  return false if @name.to_s.length < 1
135
153
  return false if !@description.nil? && @description.to_s.length < 1
154
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
155
+ return false if !@retain_checkpoints.nil? && @retain_checkpoints < 1
136
156
  true
137
157
  end
138
158
 
@@ -160,6 +180,26 @@ module PulpHuggingFaceClient
160
180
  @description = description
161
181
  end
162
182
 
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] retain_repo_versions Value to be assigned
185
+ def retain_repo_versions=(retain_repo_versions)
186
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
187
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
188
+ end
189
+
190
+ @retain_repo_versions = retain_repo_versions
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] retain_checkpoints Value to be assigned
195
+ def retain_checkpoints=(retain_checkpoints)
196
+ if !retain_checkpoints.nil? && retain_checkpoints < 1
197
+ fail ArgumentError, 'invalid value for "retain_checkpoints", must be greater than or equal to 1.'
198
+ end
199
+
200
+ @retain_checkpoints = retain_checkpoints
201
+ end
202
+
163
203
  # Checks equality by comparing each attribute.
164
204
  # @param [Object] Object to be compared
165
205
  def ==(o)
@@ -169,6 +209,7 @@ module PulpHuggingFaceClient
169
209
  name == o.name &&
170
210
  description == o.description &&
171
211
  retain_repo_versions == o.retain_repo_versions &&
212
+ retain_checkpoints == o.retain_checkpoints &&
172
213
  remote == o.remote
173
214
  end
174
215
 
@@ -181,7 +222,7 @@ module PulpHuggingFaceClient
181
222
  # Calculates hash code according to all attributes.
182
223
  # @return [Integer] Hash code
183
224
  def hash
184
- [pulp_labels, name, description, retain_repo_versions, remote].hash
225
+ [pulp_labels, name, description, retain_repo_versions, retain_checkpoints, remote].hash
185
226
  end
186
227
 
187
228
  # Builds the object from hash
@@ -42,6 +42,9 @@ module PulpHuggingFaceClient
42
42
  # Retain X versions of the repository. Default is null which retains all versions.
43
43
  attr_accessor :retain_repo_versions
44
44
 
45
+ # Retain X checkpoint publications for the repository. Default is null which retains all checkpoints.
46
+ attr_accessor :retain_checkpoints
47
+
45
48
  # An optional remote to use by default when syncing.
46
49
  attr_accessor :remote
47
50
 
@@ -58,6 +61,7 @@ module PulpHuggingFaceClient
58
61
  :'name' => :'name',
59
62
  :'description' => :'description',
60
63
  :'retain_repo_versions' => :'retain_repo_versions',
64
+ :'retain_checkpoints' => :'retain_checkpoints',
61
65
  :'remote' => :'remote'
62
66
  }
63
67
  end
@@ -80,6 +84,7 @@ module PulpHuggingFaceClient
80
84
  :'name' => :'String',
81
85
  :'description' => :'String',
82
86
  :'retain_repo_versions' => :'Integer',
87
+ :'retain_checkpoints' => :'Integer',
83
88
  :'remote' => :'String'
84
89
  }
85
90
  end
@@ -89,6 +94,7 @@ module PulpHuggingFaceClient
89
94
  Set.new([
90
95
  :'description',
91
96
  :'retain_repo_versions',
97
+ :'retain_checkpoints',
92
98
  :'remote'
93
99
  ])
94
100
  end
@@ -152,6 +158,10 @@ module PulpHuggingFaceClient
152
158
  self.retain_repo_versions = attributes[:'retain_repo_versions']
153
159
  end
154
160
 
161
+ if attributes.key?(:'retain_checkpoints')
162
+ self.retain_checkpoints = attributes[:'retain_checkpoints']
163
+ end
164
+
155
165
  if attributes.key?(:'remote')
156
166
  self.remote = attributes[:'remote']
157
167
  end
@@ -166,6 +176,14 @@ module PulpHuggingFaceClient
166
176
  invalid_properties.push('invalid value for "name", name cannot be nil.')
167
177
  end
168
178
 
179
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
180
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
181
+ end
182
+
183
+ if !@retain_checkpoints.nil? && @retain_checkpoints < 1
184
+ invalid_properties.push('invalid value for "retain_checkpoints", must be greater than or equal to 1.')
185
+ end
186
+
169
187
  invalid_properties
170
188
  end
171
189
 
@@ -174,9 +192,31 @@ module PulpHuggingFaceClient
174
192
  def valid?
175
193
  warn '[DEPRECATED] the `valid?` method is obsolete'
176
194
  return false if @name.nil?
195
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
196
+ return false if !@retain_checkpoints.nil? && @retain_checkpoints < 1
177
197
  true
178
198
  end
179
199
 
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] retain_repo_versions Value to be assigned
202
+ def retain_repo_versions=(retain_repo_versions)
203
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
204
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
205
+ end
206
+
207
+ @retain_repo_versions = retain_repo_versions
208
+ end
209
+
210
+ # Custom attribute writer method with validation
211
+ # @param [Object] retain_checkpoints Value to be assigned
212
+ def retain_checkpoints=(retain_checkpoints)
213
+ if !retain_checkpoints.nil? && retain_checkpoints < 1
214
+ fail ArgumentError, 'invalid value for "retain_checkpoints", must be greater than or equal to 1.'
215
+ end
216
+
217
+ @retain_checkpoints = retain_checkpoints
218
+ end
219
+
180
220
  # Checks equality by comparing each attribute.
181
221
  # @param [Object] Object to be compared
182
222
  def ==(o)
@@ -192,6 +232,7 @@ module PulpHuggingFaceClient
192
232
  name == o.name &&
193
233
  description == o.description &&
194
234
  retain_repo_versions == o.retain_repo_versions &&
235
+ retain_checkpoints == o.retain_checkpoints &&
195
236
  remote == o.remote
196
237
  end
197
238
 
@@ -204,7 +245,7 @@ module PulpHuggingFaceClient
204
245
  # Calculates hash code according to all attributes.
205
246
  # @return [Integer] Hash code
206
247
  def hash
207
- [pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, remote].hash
248
+ [pulp_href, prn, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, retain_checkpoints, remote].hash
208
249
  end
209
250
 
210
251
  # Builds the object from hash
@@ -33,6 +33,9 @@ module PulpHuggingFaceClient
33
33
  # The latest RepositoryVersion for this Repository will be served.
34
34
  attr_accessor :repository
35
35
 
36
+ # RepositoryVersion to be served
37
+ attr_accessor :repository_version
38
+
36
39
  # Publication to be served
37
40
  attr_accessor :publication
38
41
 
@@ -48,6 +51,7 @@ module PulpHuggingFaceClient
48
51
  :'pulp_labels' => :'pulp_labels',
49
52
  :'name' => :'name',
50
53
  :'repository' => :'repository',
54
+ :'repository_version' => :'repository_version',
51
55
  :'publication' => :'publication',
52
56
  :'remote' => :'remote'
53
57
  }
@@ -67,6 +71,7 @@ module PulpHuggingFaceClient
67
71
  :'pulp_labels' => :'Hash<String, String>',
68
72
  :'name' => :'String',
69
73
  :'repository' => :'String',
74
+ :'repository_version' => :'String',
70
75
  :'publication' => :'String',
71
76
  :'remote' => :'String'
72
77
  }
@@ -77,6 +82,7 @@ module PulpHuggingFaceClient
77
82
  Set.new([
78
83
  :'content_guard',
79
84
  :'repository',
85
+ :'repository_version',
80
86
  :'publication',
81
87
  :'remote'
82
88
  ])
@@ -125,6 +131,10 @@ module PulpHuggingFaceClient
125
131
  self.repository = attributes[:'repository']
126
132
  end
127
133
 
134
+ if attributes.key?(:'repository_version')
135
+ self.repository_version = attributes[:'repository_version']
136
+ end
137
+
128
138
  if attributes.key?(:'publication')
129
139
  self.publication = attributes[:'publication']
130
140
  end
@@ -198,6 +208,7 @@ module PulpHuggingFaceClient
198
208
  pulp_labels == o.pulp_labels &&
199
209
  name == o.name &&
200
210
  repository == o.repository &&
211
+ repository_version == o.repository_version &&
201
212
  publication == o.publication &&
202
213
  remote == o.remote
203
214
  end
@@ -211,7 +222,7 @@ module PulpHuggingFaceClient
211
222
  # Calculates hash code according to all attributes.
212
223
  # @return [Integer] Hash code
213
224
  def hash
214
- [base_path, content_guard, hidden, pulp_labels, name, repository, publication, remote].hash
225
+ [base_path, content_guard, hidden, pulp_labels, name, repository, repository_version, publication, remote].hash
215
226
  end
216
227
 
217
228
  # Builds the object from hash