pulp_container_client 2.22.0 → 2.23.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 (244) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -14
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContainerBlobResponse.md +18 -17
  5. data/docs/ContainerContainerDistribution.md +24 -23
  6. data/docs/ContainerContainerDistributionResponse.md +40 -39
  7. data/docs/ContainerContainerNamespace.md +8 -7
  8. data/docs/ContainerContainerNamespaceResponse.md +16 -15
  9. data/docs/ContainerContainerPullThroughDistribution.md +26 -25
  10. data/docs/ContainerContainerPullThroughDistributionResponse.md +38 -37
  11. data/docs/ContainerContainerPullThroughRemote.md +52 -51
  12. data/docs/ContainerContainerPullThroughRemoteResponse.md +52 -51
  13. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFieldsInner.md +20 -0
  14. data/docs/ContainerContainerPushRepository.md +16 -15
  15. data/docs/ContainerContainerPushRepositoryResponse.md +28 -27
  16. data/docs/ContainerContainerRemote.md +56 -55
  17. data/docs/ContainerContainerRemoteResponse.md +56 -55
  18. data/docs/ContainerContainerRepository.md +18 -17
  19. data/docs/ContainerContainerRepositoryResponse.md +30 -29
  20. data/docs/ContainerManifestResponse.md +42 -41
  21. data/docs/ContainerManifestSignatureResponse.md +28 -27
  22. data/docs/ContainerRepositorySyncURL.md +12 -11
  23. data/docs/ContainerTagResponse.md +18 -17
  24. data/docs/ContentBlobsApi.md +82 -49
  25. data/docs/ContentManifestsApi.md +86 -53
  26. data/docs/ContentSignaturesApi.md +97 -64
  27. data/docs/ContentSummaryResponse.md +12 -11
  28. data/docs/ContentTagsApi.md +86 -53
  29. data/docs/DistributionsContainerApi.md +386 -183
  30. data/docs/DistributionsPullThroughApi.md +385 -182
  31. data/docs/ManifestCopy.md +14 -13
  32. data/docs/MediaTypesEnum.md +4 -5
  33. data/docs/MyPermissionsResponse.md +8 -7
  34. data/docs/NestedRole.md +12 -11
  35. data/docs/NestedRoleResponse.md +12 -11
  36. data/docs/ObjectRolesResponse.md +8 -7
  37. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  38. data/docs/PaginatedcontainerBlobResponseList.md +14 -13
  39. data/docs/PaginatedcontainerContainerDistributionResponseList.md +14 -13
  40. data/docs/PaginatedcontainerContainerNamespaceResponseList.md +14 -13
  41. data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +14 -13
  42. data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +14 -13
  43. data/docs/PaginatedcontainerContainerPushRepositoryResponseList.md +14 -13
  44. data/docs/PaginatedcontainerContainerRemoteResponseList.md +14 -13
  45. data/docs/PaginatedcontainerContainerRepositoryResponseList.md +14 -13
  46. data/docs/PaginatedcontainerManifestResponseList.md +14 -13
  47. data/docs/PaginatedcontainerManifestSignatureResponseList.md +14 -13
  48. data/docs/PaginatedcontainerTagResponseList.md +14 -13
  49. data/docs/PatchedcontainerContainerDistribution.md +24 -23
  50. data/docs/PatchedcontainerContainerPullThroughDistribution.md +26 -25
  51. data/docs/PatchedcontainerContainerPullThroughRemote.md +52 -51
  52. data/docs/PatchedcontainerContainerPushRepository.md +16 -15
  53. data/docs/PatchedcontainerContainerRemote.md +56 -55
  54. data/docs/PatchedcontainerContainerRepository.md +18 -17
  55. data/docs/Policy692Enum.md +4 -5
  56. data/docs/Policy7e0Enum.md +4 -5
  57. data/docs/PulpContainerNamespacesApi.md +259 -124
  58. data/docs/RecursiveManage.md +8 -7
  59. data/docs/RemotesContainerApi.md +389 -184
  60. data/docs/RemotesPullThroughApi.md +389 -184
  61. data/docs/RemoveImage.md +8 -7
  62. data/docs/RemoveSignatures.md +8 -7
  63. data/docs/RemoveSignaturesResponse.md +8 -7
  64. data/docs/Repair.md +8 -7
  65. data/docs/RepositoriesContainerApi.md +647 -291
  66. data/docs/RepositoriesContainerPushApi.md +419 -198
  67. data/docs/RepositoriesContainerPushVersionsApi.md +152 -82
  68. data/docs/RepositoriesContainerVersionsApi.md +152 -82
  69. data/docs/RepositorySign.md +12 -11
  70. data/docs/RepositoryVersionResponse.md +22 -21
  71. data/docs/SetLabel.md +10 -9
  72. data/docs/SetLabelResponse.md +10 -9
  73. data/docs/TagCopy.md +12 -11
  74. data/docs/TagImage.md +10 -9
  75. data/docs/TokenApi.md +25 -7
  76. data/docs/UnTagImage.md +8 -7
  77. data/docs/UnsetLabel.md +8 -7
  78. data/docs/UnsetLabelResponse.md +10 -9
  79. data/lib/pulp_container_client/api/content_blobs_api.rb +11 -9
  80. data/lib/pulp_container_client/api/content_manifests_api.rb +11 -9
  81. data/lib/pulp_container_client/api/content_signatures_api.rb +11 -9
  82. data/lib/pulp_container_client/api/content_tags_api.rb +11 -9
  83. data/lib/pulp_container_client/api/distributions_container_api.rb +89 -56
  84. data/lib/pulp_container_client/api/distributions_pull_through_api.rb +89 -56
  85. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +53 -36
  86. data/lib/pulp_container_client/api/remotes_container_api.rb +104 -68
  87. data/lib/pulp_container_client/api/remotes_pull_through_api.rb +104 -68
  88. data/lib/pulp_container_client/api/repositories_container_api.rb +171 -102
  89. data/lib/pulp_container_client/api/repositories_container_push_api.rb +102 -62
  90. data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +40 -30
  91. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +40 -30
  92. data/lib/pulp_container_client/api/token_api.rb +5 -4
  93. data/lib/pulp_container_client/api_client.rb +137 -102
  94. data/lib/pulp_container_client/api_error.rb +2 -1
  95. data/lib/pulp_container_client/configuration.rb +162 -21
  96. data/lib/pulp_container_client/models/async_operation_response.rb +32 -22
  97. data/lib/pulp_container_client/models/container_blob_response.rb +37 -29
  98. data/lib/pulp_container_client/models/container_container_distribution.rb +55 -43
  99. data/lib/pulp_container_client/models/container_container_distribution_response.rb +76 -64
  100. data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
  101. data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
  102. data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +57 -43
  103. data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +78 -64
  104. data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +76 -42
  105. data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +79 -45
  106. data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
  107. data/lib/pulp_container_client/models/container_container_push_repository.rb +80 -70
  108. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +101 -91
  109. data/lib/pulp_container_client/models/container_container_remote.rb +83 -43
  110. data/lib/pulp_container_client/models/container_container_remote_response.rb +81 -45
  111. data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
  112. data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
  113. data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
  114. data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
  115. data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
  116. data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
  117. data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
  118. data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
  119. data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
  120. data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
  121. data/lib/pulp_container_client/models/nested_role.rb +32 -22
  122. data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
  123. data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
  124. data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
  125. data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
  126. data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
  127. data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
  128. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
  129. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
  130. data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
  131. data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
  132. data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
  133. data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
  134. data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
  135. data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
  136. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +61 -45
  137. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +61 -45
  138. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +82 -44
  139. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +83 -71
  140. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +92 -46
  141. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
  142. data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
  143. data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
  144. data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
  145. data/lib/pulp_container_client/models/remove_image.rb +32 -22
  146. data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
  147. data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
  148. data/lib/pulp_container_client/models/repair.rb +30 -22
  149. data/lib/pulp_container_client/models/repository_sign.rb +36 -24
  150. data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
  151. data/lib/pulp_container_client/models/set_label.rb +34 -22
  152. data/lib/pulp_container_client/models/set_label_response.rb +34 -22
  153. data/lib/pulp_container_client/models/tag_copy.rb +31 -23
  154. data/lib/pulp_container_client/models/tag_image.rb +34 -22
  155. data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
  156. data/lib/pulp_container_client/models/unset_label.rb +32 -22
  157. data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
  158. data/lib/pulp_container_client/version.rb +2 -2
  159. data/lib/pulp_container_client.rb +2 -3
  160. data/pulp_container_client.gemspec +9 -6
  161. data/spec/api/content_blobs_api_spec.rb +3 -3
  162. data/spec/api/content_manifests_api_spec.rb +3 -3
  163. data/spec/api/content_signatures_api_spec.rb +3 -3
  164. data/spec/api/content_tags_api_spec.rb +3 -3
  165. data/spec/api/distributions_container_api_spec.rb +13 -13
  166. data/spec/api/distributions_pull_through_api_spec.rb +13 -13
  167. data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
  168. data/spec/api/remotes_container_api_spec.rb +20 -19
  169. data/spec/api/remotes_pull_through_api_spec.rb +20 -19
  170. data/spec/api/repositories_container_api_spec.rb +22 -22
  171. data/spec/api/repositories_container_push_api_spec.rb +14 -14
  172. data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
  173. data/spec/api/repositories_container_versions_api_spec.rb +12 -11
  174. data/spec/api/token_api_spec.rb +2 -2
  175. data/spec/models/async_operation_response_spec.rb +7 -12
  176. data/spec/models/container_blob_response_spec.rb +12 -17
  177. data/spec/models/container_container_distribution_response_spec.rb +34 -39
  178. data/spec/models/container_container_distribution_spec.rb +19 -24
  179. data/spec/models/container_container_namespace_response_spec.rb +11 -16
  180. data/spec/models/container_container_namespace_spec.rb +7 -12
  181. data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
  182. data/spec/models/container_container_pull_through_distribution_spec.rb +20 -25
  183. data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
  184. data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
  185. data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
  186. data/spec/models/container_container_push_repository_response_spec.rb +28 -33
  187. data/spec/models/container_container_push_repository_spec.rb +16 -21
  188. data/spec/models/container_container_remote_response_spec.rb +31 -36
  189. data/spec/models/container_container_remote_spec.rb +31 -36
  190. data/spec/models/container_container_repository_response_spec.rb +18 -23
  191. data/spec/models/container_container_repository_spec.rb +12 -17
  192. data/spec/models/container_manifest_response_spec.rb +24 -29
  193. data/spec/models/container_manifest_signature_response_spec.rb +17 -22
  194. data/spec/models/container_repository_sync_url_spec.rb +9 -14
  195. data/spec/models/container_tag_response_spec.rb +12 -17
  196. data/spec/models/content_summary_response_spec.rb +9 -14
  197. data/spec/models/manifest_copy_spec.rb +10 -15
  198. data/spec/models/media_types_enum_spec.rb +6 -11
  199. data/spec/models/my_permissions_response_spec.rb +7 -12
  200. data/spec/models/nested_role_response_spec.rb +9 -14
  201. data/spec/models/nested_role_spec.rb +9 -14
  202. data/spec/models/object_roles_response_spec.rb +7 -12
  203. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  204. data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
  205. data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
  206. data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
  207. data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
  208. data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
  209. data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
  210. data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
  211. data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
  212. data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
  213. data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
  214. data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
  215. data/spec/models/patchedcontainer_container_distribution_spec.rb +19 -24
  216. data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +20 -25
  217. data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
  218. data/spec/models/patchedcontainer_container_push_repository_spec.rb +16 -21
  219. data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
  220. data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
  221. data/spec/models/policy692_enum_spec.rb +6 -11
  222. data/spec/models/policy7e0_enum_spec.rb +6 -11
  223. data/spec/models/recursive_manage_spec.rb +7 -12
  224. data/spec/models/remove_image_spec.rb +7 -12
  225. data/spec/models/remove_signatures_response_spec.rb +7 -12
  226. data/spec/models/remove_signatures_spec.rb +7 -12
  227. data/spec/models/repair_spec.rb +7 -12
  228. data/spec/models/repository_sign_spec.rb +9 -14
  229. data/spec/models/repository_version_response_spec.rb +14 -19
  230. data/spec/models/set_label_response_spec.rb +8 -13
  231. data/spec/models/set_label_spec.rb +8 -13
  232. data/spec/models/tag_copy_spec.rb +9 -14
  233. data/spec/models/tag_image_spec.rb +8 -13
  234. data/spec/models/un_tag_image_spec.rb +7 -12
  235. data/spec/models/unset_label_response_spec.rb +8 -13
  236. data/spec/models/unset_label_spec.rb +7 -12
  237. data/spec/spec_helper.rb +1 -1
  238. metadata +108 -88
  239. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
  240. data/docs/OCIBuildImage.md +0 -23
  241. data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
  242. data/spec/api_client_spec.rb +0 -188
  243. data/spec/configuration_spec.rb +0 -42
  244. data/spec/models/oci_build_image_spec.rb +0 -59
@@ -6,11 +6,12 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module PulpContainerClient
16
17
  # A serializer for a remote used in the pull-through distribution.
@@ -82,6 +83,28 @@ module PulpContainerClient
82
83
  # A list of remotes to exclude during pull-through caching. Wildcards *, ? are recognized. 'excludes' is evaluated after 'includes'.
83
84
  attr_accessor :excludes
84
85
 
86
+ class EnumAttributeValidator
87
+ attr_reader :datatype
88
+ attr_reader :allowable_values
89
+
90
+ def initialize(datatype, allowable_values)
91
+ @allowable_values = allowable_values.map do |value|
92
+ case datatype.to_s
93
+ when /Integer/i
94
+ value.to_i
95
+ when /Float/i
96
+ value.to_f
97
+ else
98
+ value
99
+ end
100
+ end
101
+ end
102
+
103
+ def valid?(value)
104
+ !value || allowable_values.include?(value)
105
+ end
106
+ end
107
+
85
108
  # Attribute mapping from ruby-style variable name to JSON key.
86
109
  def self.attribute_map
87
110
  {
@@ -111,6 +134,11 @@ module PulpContainerClient
111
134
  }
112
135
  end
113
136
 
137
+ # Returns all the JSON keys this model knows about
138
+ def self.acceptable_attributes
139
+ attribute_map.values
140
+ end
141
+
114
142
  # Attribute type mapping.
115
143
  def self.openapi_types
116
144
  {
@@ -282,6 +310,7 @@ module PulpContainerClient
282
310
  # Show invalid properties with the reasons. Usually used together with valid?
283
311
  # @return Array for valid properties with the reasons
284
312
  def list_invalid_properties
313
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
285
314
  invalid_properties = Array.new
286
315
  if !@name.nil? && @name.to_s.length < 1
287
316
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
@@ -327,20 +356,20 @@ module PulpContainerClient
327
356
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
328
357
  end
329
358
 
330
- if !@total_timeout.nil? && @total_timeout < 0
331
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
359
+ if !@total_timeout.nil? && @total_timeout < 0.0
360
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
332
361
  end
333
362
 
334
- if !@connect_timeout.nil? && @connect_timeout < 0
335
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
363
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
364
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
336
365
  end
337
366
 
338
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
339
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
367
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
368
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
340
369
  end
341
370
 
342
- if !@sock_read_timeout.nil? && @sock_read_timeout < 0
343
- invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
371
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
372
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
344
373
  end
345
374
 
346
375
  invalid_properties
@@ -349,6 +378,7 @@ module PulpContainerClient
349
378
  # Check to see if the all the properties in the model are valid
350
379
  # @return true if the model is valid
351
380
  def valid?
381
+ warn '[DEPRECATED] the `valid?` method is obsolete'
352
382
  return false if !@name.nil? && @name.to_s.length < 1
353
383
  return false if !@url.nil? && @url.to_s.length < 1
354
384
  return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
@@ -360,17 +390,21 @@ module PulpContainerClient
360
390
  return false if !@username.nil? && @username.to_s.length < 1
361
391
  return false if !@password.nil? && @password.to_s.length < 1
362
392
  return false if !@download_concurrency.nil? && @download_concurrency < 1
363
- return false if !@total_timeout.nil? && @total_timeout < 0
364
- return false if !@connect_timeout.nil? && @connect_timeout < 0
365
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
366
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
393
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
394
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
395
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
396
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
367
397
  true
368
398
  end
369
399
 
370
400
  # Custom attribute writer method with validation
371
401
  # @param [Object] name Value to be assigned
372
402
  def name=(name)
373
- if !name.nil? && name.to_s.length < 1
403
+ if name.nil?
404
+ fail ArgumentError, 'name cannot be nil'
405
+ end
406
+
407
+ if name.to_s.length < 1
374
408
  fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
375
409
  end
376
410
 
@@ -380,7 +414,11 @@ module PulpContainerClient
380
414
  # Custom attribute writer method with validation
381
415
  # @param [Object] url Value to be assigned
382
416
  def url=(url)
383
- if !url.nil? && url.to_s.length < 1
417
+ if url.nil?
418
+ fail ArgumentError, 'url cannot be nil'
419
+ end
420
+
421
+ if url.to_s.length < 1
384
422
  fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
385
423
  end
386
424
 
@@ -480,8 +518,8 @@ module PulpContainerClient
480
518
  # Custom attribute writer method with validation
481
519
  # @param [Object] total_timeout Value to be assigned
482
520
  def total_timeout=(total_timeout)
483
- if !total_timeout.nil? && total_timeout < 0
484
- fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
521
+ if !total_timeout.nil? && total_timeout < 0.0
522
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
485
523
  end
486
524
 
487
525
  @total_timeout = total_timeout
@@ -490,8 +528,8 @@ module PulpContainerClient
490
528
  # Custom attribute writer method with validation
491
529
  # @param [Object] connect_timeout Value to be assigned
492
530
  def connect_timeout=(connect_timeout)
493
- if !connect_timeout.nil? && connect_timeout < 0
494
- fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
531
+ if !connect_timeout.nil? && connect_timeout < 0.0
532
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
495
533
  end
496
534
 
497
535
  @connect_timeout = connect_timeout
@@ -500,8 +538,8 @@ module PulpContainerClient
500
538
  # Custom attribute writer method with validation
501
539
  # @param [Object] sock_connect_timeout Value to be assigned
502
540
  def sock_connect_timeout=(sock_connect_timeout)
503
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0
504
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
541
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
542
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
505
543
  end
506
544
 
507
545
  @sock_connect_timeout = sock_connect_timeout
@@ -510,8 +548,8 @@ module PulpContainerClient
510
548
  # Custom attribute writer method with validation
511
549
  # @param [Object] sock_read_timeout Value to be assigned
512
550
  def sock_read_timeout=(sock_read_timeout)
513
- if !sock_read_timeout.nil? && sock_read_timeout < 0
514
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
551
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
552
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
515
553
  end
516
554
 
517
555
  @sock_read_timeout = sock_read_timeout
@@ -563,37 +601,33 @@ module PulpContainerClient
563
601
  # @param [Hash] attributes Model attributes in the form of hash
564
602
  # @return [Object] Returns the model itself
565
603
  def self.build_from_hash(attributes)
566
- new.build_from_hash(attributes)
567
- end
568
-
569
- # Builds the object from hash
570
- # @param [Hash] attributes Model attributes in the form of hash
571
- # @return [Object] Returns the model itself
572
- def build_from_hash(attributes)
573
604
  return nil unless attributes.is_a?(Hash)
574
- self.class.openapi_types.each_pair do |key, type|
575
- if type =~ /\AArray<(.*)>/i
605
+ attributes = attributes.transform_keys(&:to_sym)
606
+ transformed_hash = {}
607
+ openapi_types.each_pair do |key, type|
608
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
609
+ transformed_hash["#{key}"] = nil
610
+ elsif type =~ /\AArray<(.*)>/i
576
611
  # check to ensure the input is an array given that the attribute
577
612
  # is documented as an array but the input is not
578
- if attributes[self.class.attribute_map[key]].is_a?(Array)
579
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
613
+ if attributes[attribute_map[key]].is_a?(Array)
614
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
580
615
  end
581
- elsif !attributes[self.class.attribute_map[key]].nil?
582
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
583
- end # or else data not found in attributes(hash), not an issue as the data can be optional
616
+ elsif !attributes[attribute_map[key]].nil?
617
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
618
+ end
584
619
  end
585
-
586
- self
620
+ new(transformed_hash)
587
621
  end
588
622
 
589
623
  # Deserializes the data based on type
590
624
  # @param string type Data type
591
625
  # @param string value Value to be deserialized
592
626
  # @return [Object] Deserialized data
593
- def _deserialize(type, value)
627
+ def self._deserialize(type, value)
594
628
  case type.to_sym
595
- when :DateTime
596
- DateTime.parse(value)
629
+ when :Time
630
+ Time.parse(value)
597
631
  when :Date
598
632
  Date.parse(value)
599
633
  when :String
@@ -623,7 +657,9 @@ module PulpContainerClient
623
657
  end
624
658
  end
625
659
  else # model
626
- PulpContainerClient.const_get(type).build_from_hash(value)
660
+ # models (e.g. Pet) or oneOf
661
+ klass = PulpContainerClient.const_get(type)
662
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
627
663
  end
628
664
  end
629
665
 
@@ -649,7 +685,7 @@ module PulpContainerClient
649
685
  is_nullable = self.class.openapi_nullable.include?(attr)
650
686
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
651
687
  end
652
-
688
+
653
689
  hash[param] = _to_hash(value)
654
690
  end
655
691
  hash
@@ -672,5 +708,7 @@ module PulpContainerClient
672
708
  value
673
709
  end
674
710
  end
711
+
675
712
  end
713
+
676
714
  end
@@ -6,57 +6,63 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module PulpContainerClient
16
17
  # Serializer for Container Push Repositories.
17
18
  class PatchedcontainerContainerPushRepository
18
- # An optional description.
19
- attr_accessor :description
20
-
21
- attr_accessor :pulp_labels
22
-
23
- # A unique name for this repository.
24
- attr_accessor :name
25
-
26
19
  # Retain X versions of the repository. Default is null which retains all versions.
27
20
  attr_accessor :retain_repo_versions
28
21
 
29
22
  # A reference to an associated signing service.
30
23
  attr_accessor :manifest_signing_service
31
24
 
25
+ attr_accessor :pulp_labels
26
+
27
+ # An optional description.
28
+ attr_accessor :description
29
+
30
+ # A unique name for this repository.
31
+ attr_accessor :name
32
+
32
33
  # Attribute mapping from ruby-style variable name to JSON key.
33
34
  def self.attribute_map
34
35
  {
35
- :'description' => :'description',
36
- :'pulp_labels' => :'pulp_labels',
37
- :'name' => :'name',
38
36
  :'retain_repo_versions' => :'retain_repo_versions',
39
- :'manifest_signing_service' => :'manifest_signing_service'
37
+ :'manifest_signing_service' => :'manifest_signing_service',
38
+ :'pulp_labels' => :'pulp_labels',
39
+ :'description' => :'description',
40
+ :'name' => :'name'
40
41
  }
41
42
  end
42
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
43
49
  # Attribute type mapping.
44
50
  def self.openapi_types
45
51
  {
46
- :'description' => :'String',
47
- :'pulp_labels' => :'Hash<String, String>',
48
- :'name' => :'String',
49
52
  :'retain_repo_versions' => :'Integer',
50
- :'manifest_signing_service' => :'String'
53
+ :'manifest_signing_service' => :'String',
54
+ :'pulp_labels' => :'Hash<String, String>',
55
+ :'description' => :'String',
56
+ :'name' => :'String'
51
57
  }
52
58
  end
53
59
 
54
60
  # List of attributes with nullable: true
55
61
  def self.openapi_nullable
56
62
  Set.new([
57
- :'description',
58
63
  :'retain_repo_versions',
59
- :'manifest_signing_service'
64
+ :'manifest_signing_service',
65
+ :'description',
60
66
  ])
61
67
  end
62
68
 
@@ -75,8 +81,12 @@ module PulpContainerClient
75
81
  h[k.to_sym] = v
76
82
  }
77
83
 
78
- if attributes.key?(:'description')
79
- self.description = attributes[:'description']
84
+ if attributes.key?(:'retain_repo_versions')
85
+ self.retain_repo_versions = attributes[:'retain_repo_versions']
86
+ end
87
+
88
+ if attributes.key?(:'manifest_signing_service')
89
+ self.manifest_signing_service = attributes[:'manifest_signing_service']
80
90
  end
81
91
 
82
92
  if attributes.key?(:'pulp_labels')
@@ -85,23 +95,24 @@ module PulpContainerClient
85
95
  end
86
96
  end
87
97
 
88
- if attributes.key?(:'name')
89
- self.name = attributes[:'name']
90
- end
91
-
92
- if attributes.key?(:'retain_repo_versions')
93
- self.retain_repo_versions = attributes[:'retain_repo_versions']
98
+ if attributes.key?(:'description')
99
+ self.description = attributes[:'description']
94
100
  end
95
101
 
96
- if attributes.key?(:'manifest_signing_service')
97
- self.manifest_signing_service = attributes[:'manifest_signing_service']
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
98
104
  end
99
105
  end
100
106
 
101
107
  # Show invalid properties with the reasons. Usually used together with valid?
102
108
  # @return Array for valid properties with the reasons
103
109
  def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
111
  invalid_properties = Array.new
112
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
113
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
114
+ end
115
+
105
116
  if !@description.nil? && @description.to_s.length < 1
106
117
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
107
118
  end
@@ -110,22 +121,29 @@ module PulpContainerClient
110
121
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
111
122
  end
112
123
 
113
- if !@retain_repo_versions.nil? && @retain_repo_versions < 1
114
- invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
115
- end
116
-
117
124
  invalid_properties
118
125
  end
119
126
 
120
127
  # Check to see if the all the properties in the model are valid
121
128
  # @return true if the model is valid
122
129
  def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
123
132
  return false if !@description.nil? && @description.to_s.length < 1
124
133
  return false if !@name.nil? && @name.to_s.length < 1
125
- return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
126
134
  true
127
135
  end
128
136
 
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] retain_repo_versions Value to be assigned
139
+ def retain_repo_versions=(retain_repo_versions)
140
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
141
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
142
+ end
143
+
144
+ @retain_repo_versions = retain_repo_versions
145
+ end
146
+
129
147
  # Custom attribute writer method with validation
130
148
  # @param [Object] description Value to be assigned
131
149
  def description=(description)
@@ -139,21 +157,15 @@ module PulpContainerClient
139
157
  # Custom attribute writer method with validation
140
158
  # @param [Object] name Value to be assigned
141
159
  def name=(name)
142
- if !name.nil? && name.to_s.length < 1
143
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
160
+ if name.nil?
161
+ fail ArgumentError, 'name cannot be nil'
144
162
  end
145
163
 
146
- @name = name
147
- end
148
-
149
- # Custom attribute writer method with validation
150
- # @param [Object] retain_repo_versions Value to be assigned
151
- def retain_repo_versions=(retain_repo_versions)
152
- if !retain_repo_versions.nil? && retain_repo_versions < 1
153
- fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
164
+ if name.to_s.length < 1
165
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
154
166
  end
155
167
 
156
- @retain_repo_versions = retain_repo_versions
168
+ @name = name
157
169
  end
158
170
 
159
171
  # Checks equality by comparing each attribute.
@@ -161,11 +173,11 @@ module PulpContainerClient
161
173
  def ==(o)
162
174
  return true if self.equal?(o)
163
175
  self.class == o.class &&
164
- description == o.description &&
165
- pulp_labels == o.pulp_labels &&
166
- name == o.name &&
167
176
  retain_repo_versions == o.retain_repo_versions &&
168
- manifest_signing_service == o.manifest_signing_service
177
+ manifest_signing_service == o.manifest_signing_service &&
178
+ pulp_labels == o.pulp_labels &&
179
+ description == o.description &&
180
+ name == o.name
169
181
  end
170
182
 
171
183
  # @see the `==` method
@@ -177,44 +189,40 @@ module PulpContainerClient
177
189
  # Calculates hash code according to all attributes.
178
190
  # @return [Integer] Hash code
179
191
  def hash
180
- [description, pulp_labels, name, retain_repo_versions, manifest_signing_service].hash
192
+ [retain_repo_versions, manifest_signing_service, pulp_labels, description, name].hash
181
193
  end
182
194
 
183
195
  # Builds the object from hash
184
196
  # @param [Hash] attributes Model attributes in the form of hash
185
197
  # @return [Object] Returns the model itself
186
198
  def self.build_from_hash(attributes)
187
- new.build_from_hash(attributes)
188
- end
189
-
190
- # Builds the object from hash
191
- # @param [Hash] attributes Model attributes in the form of hash
192
- # @return [Object] Returns the model itself
193
- def build_from_hash(attributes)
194
199
  return nil unless attributes.is_a?(Hash)
195
- self.class.openapi_types.each_pair do |key, type|
196
- if type =~ /\AArray<(.*)>/i
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ transformed_hash = {}
202
+ openapi_types.each_pair do |key, type|
203
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = nil
205
+ elsif type =~ /\AArray<(.*)>/i
197
206
  # check to ensure the input is an array given that the attribute
198
207
  # is documented as an array but the input is not
199
- if attributes[self.class.attribute_map[key]].is_a?(Array)
200
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
208
+ if attributes[attribute_map[key]].is_a?(Array)
209
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
210
  end
202
- elsif !attributes[self.class.attribute_map[key]].nil?
203
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
204
- end # or else data not found in attributes(hash), not an issue as the data can be optional
211
+ elsif !attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
213
+ end
205
214
  end
206
-
207
- self
215
+ new(transformed_hash)
208
216
  end
209
217
 
210
218
  # Deserializes the data based on type
211
219
  # @param string type Data type
212
220
  # @param string value Value to be deserialized
213
221
  # @return [Object] Deserialized data
214
- def _deserialize(type, value)
222
+ def self._deserialize(type, value)
215
223
  case type.to_sym
216
- when :DateTime
217
- DateTime.parse(value)
224
+ when :Time
225
+ Time.parse(value)
218
226
  when :Date
219
227
  Date.parse(value)
220
228
  when :String
@@ -244,7 +252,9 @@ module PulpContainerClient
244
252
  end
245
253
  end
246
254
  else # model
247
- PulpContainerClient.const_get(type).build_from_hash(value)
255
+ # models (e.g. Pet) or oneOf
256
+ klass = PulpContainerClient.const_get(type)
257
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
258
  end
249
259
  end
250
260
 
@@ -270,7 +280,7 @@ module PulpContainerClient
270
280
  is_nullable = self.class.openapi_nullable.include?(attr)
271
281
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
282
  end
273
-
283
+
274
284
  hash[param] = _to_hash(value)
275
285
  end
276
286
  hash
@@ -293,5 +303,7 @@ module PulpContainerClient
293
303
  value
294
304
  end
295
305
  end
306
+
296
307
  end
308
+
297
309
  end