pulp_container_client 2.22.1 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
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 +86 -74
  99. data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
  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 +88 -74
  103. data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
  104. data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
  105. data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
  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 +83 -73
  108. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
  109. data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
  110. data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
  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 +81 -65
  137. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
  138. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
  139. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
  140. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
  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 +20 -25
  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 +21 -26
  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 +15 -20
  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 +20 -25
  216. data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
  217. data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
  218. data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
  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 +105 -85
  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,16 +6,21 @@
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
  class Policy7e0Enum
17
18
  ON_DEMAND = "on_demand".freeze
18
19
 
20
+ def self.all_vars
21
+ @all_vars ||= [ON_DEMAND].freeze
22
+ end
23
+
19
24
  # Builds the enum from string
20
25
  # @param [String] The enum value in the form of the string
21
26
  # @return [String] The enum value
@@ -27,9 +32,8 @@ module PulpContainerClient
27
32
  # @param [String] The enum value in the form of the string
28
33
  # @return [String] The enum value
29
34
  def build_from_hash(value)
30
- constantValues = Policy7e0Enum.constants.select { |c| Policy7e0Enum::const_get(c) == value }
31
- raise "Invalid ENUM value #{value} for class #Policy7e0Enum" if constantValues.empty?
32
- value
35
+ return value if Policy7e0Enum.all_vars.include?(value)
36
+ raise "Invalid ENUM value #{value} for class #Policy7e0Enum"
33
37
  end
34
38
  end
35
39
  end
@@ -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
  # Serializer for adding and removing content to/from a Container repository.
@@ -25,10 +26,15 @@ module PulpContainerClient
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
31
- :'content_units' => :'Array<AnyType>'
37
+ :'content_units' => :'Array<Object>'
32
38
  }
33
39
  end
34
40
 
@@ -63,6 +69,7 @@ module PulpContainerClient
63
69
  # Show invalid properties with the reasons. Usually used together with valid?
64
70
  # @return Array for valid properties with the reasons
65
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
66
73
  invalid_properties = Array.new
67
74
  invalid_properties
68
75
  end
@@ -70,6 +77,7 @@ module PulpContainerClient
70
77
  # Check to see if the all the properties in the model are valid
71
78
  # @return true if the model is valid
72
79
  def valid?
80
+ warn '[DEPRECATED] the `valid?` method is obsolete'
73
81
  true
74
82
  end
75
83
 
@@ -97,37 +105,33 @@ module PulpContainerClient
97
105
  # @param [Hash] attributes Model attributes in the form of hash
98
106
  # @return [Object] Returns the model itself
99
107
  def self.build_from_hash(attributes)
100
- new.build_from_hash(attributes)
101
- end
102
-
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def build_from_hash(attributes)
107
108
  return nil unless attributes.is_a?(Hash)
108
- self.class.openapi_types.each_pair do |key, type|
109
- if type =~ /\AArray<(.*)>/i
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ transformed_hash = {}
111
+ openapi_types.each_pair do |key, type|
112
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
113
+ transformed_hash["#{key}"] = nil
114
+ elsif type =~ /\AArray<(.*)>/i
110
115
  # check to ensure the input is an array given that the attribute
111
116
  # is documented as an array but the input is not
112
- if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ if attributes[attribute_map[key]].is_a?(Array)
118
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
114
119
  end
115
- elsif !attributes[self.class.attribute_map[key]].nil?
116
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
- end # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ elsif !attributes[attribute_map[key]].nil?
121
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
+ end
118
123
  end
119
-
120
- self
124
+ new(transformed_hash)
121
125
  end
122
126
 
123
127
  # Deserializes the data based on type
124
128
  # @param string type Data type
125
129
  # @param string value Value to be deserialized
126
130
  # @return [Object] Deserialized data
127
- def _deserialize(type, value)
131
+ def self._deserialize(type, value)
128
132
  case type.to_sym
129
- when :DateTime
130
- DateTime.parse(value)
133
+ when :Time
134
+ Time.parse(value)
131
135
  when :Date
132
136
  Date.parse(value)
133
137
  when :String
@@ -157,7 +161,9 @@ module PulpContainerClient
157
161
  end
158
162
  end
159
163
  else # model
160
- PulpContainerClient.const_get(type).build_from_hash(value)
164
+ # models (e.g. Pet) or oneOf
165
+ klass = PulpContainerClient.const_get(type)
166
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
161
167
  end
162
168
  end
163
169
 
@@ -183,7 +189,7 @@ module PulpContainerClient
183
189
  is_nullable = self.class.openapi_nullable.include?(attr)
184
190
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
191
  end
186
-
192
+
187
193
  hash[param] = _to_hash(value)
188
194
  end
189
195
  hash
@@ -206,5 +212,7 @@ module PulpContainerClient
206
212
  value
207
213
  end
208
214
  end
215
+
209
216
  end
217
+
210
218
  end
@@ -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 parsing and validating data associated with the image removal.
@@ -25,6 +26,11 @@ module PulpContainerClient
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
@@ -55,12 +61,15 @@ module PulpContainerClient
55
61
 
56
62
  if attributes.key?(:'digest')
57
63
  self.digest = attributes[:'digest']
64
+ else
65
+ self.digest = nil
58
66
  end
59
67
  end
60
68
 
61
69
  # Show invalid properties with the reasons. Usually used together with valid?
62
70
  # @return Array for valid properties with the reasons
63
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
64
73
  invalid_properties = Array.new
65
74
  if @digest.nil?
66
75
  invalid_properties.push('invalid value for "digest", digest cannot be nil.')
@@ -76,6 +85,7 @@ module PulpContainerClient
76
85
  # Check to see if the all the properties in the model are valid
77
86
  # @return true if the model is valid
78
87
  def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
89
  return false if @digest.nil?
80
90
  return false if @digest.to_s.length < 1
81
91
  true
@@ -119,37 +129,33 @@ module PulpContainerClient
119
129
  # @param [Hash] attributes Model attributes in the form of hash
120
130
  # @return [Object] Returns the model itself
121
131
  def self.build_from_hash(attributes)
122
- new.build_from_hash(attributes)
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def build_from_hash(attributes)
129
132
  return nil unless attributes.is_a?(Hash)
130
- self.class.openapi_types.each_pair do |key, type|
131
- if type =~ /\AArray<(.*)>/i
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
132
139
  # check to ensure the input is an array given that the attribute
133
140
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
143
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
- end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
140
147
  end
141
-
142
- self
148
+ new(transformed_hash)
143
149
  end
144
150
 
145
151
  # Deserializes the data based on type
146
152
  # @param string type Data type
147
153
  # @param string value Value to be deserialized
148
154
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
155
+ def self._deserialize(type, value)
150
156
  case type.to_sym
151
- when :DateTime
152
- DateTime.parse(value)
157
+ when :Time
158
+ Time.parse(value)
153
159
  when :Date
154
160
  Date.parse(value)
155
161
  when :String
@@ -179,7 +185,9 @@ module PulpContainerClient
179
185
  end
180
186
  end
181
187
  else # model
182
- PulpContainerClient.const_get(type).build_from_hash(value)
188
+ # models (e.g. Pet) or oneOf
189
+ klass = PulpContainerClient.const_get(type)
190
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
191
  end
184
192
  end
185
193
 
@@ -205,7 +213,7 @@ module PulpContainerClient
205
213
  is_nullable = self.class.openapi_nullable.include?(attr)
206
214
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
215
  end
208
-
216
+
209
217
  hash[param] = _to_hash(value)
210
218
  end
211
219
  hash
@@ -228,5 +236,7 @@ module PulpContainerClient
228
236
  value
229
237
  end
230
238
  end
239
+
231
240
  end
241
+
232
242
  end
@@ -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 parsing and validating data associated with the signatures removal.
@@ -25,6 +26,11 @@ module PulpContainerClient
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
@@ -55,12 +61,15 @@ module PulpContainerClient
55
61
 
56
62
  if attributes.key?(:'signed_with_key_id')
57
63
  self.signed_with_key_id = attributes[:'signed_with_key_id']
64
+ else
65
+ self.signed_with_key_id = nil
58
66
  end
59
67
  end
60
68
 
61
69
  # Show invalid properties with the reasons. Usually used together with valid?
62
70
  # @return Array for valid properties with the reasons
63
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
64
73
  invalid_properties = Array.new
65
74
  if @signed_with_key_id.nil?
66
75
  invalid_properties.push('invalid value for "signed_with_key_id", signed_with_key_id cannot be nil.')
@@ -76,6 +85,7 @@ module PulpContainerClient
76
85
  # Check to see if the all the properties in the model are valid
77
86
  # @return true if the model is valid
78
87
  def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
89
  return false if @signed_with_key_id.nil?
80
90
  return false if @signed_with_key_id.to_s.length < 1
81
91
  true
@@ -119,37 +129,33 @@ module PulpContainerClient
119
129
  # @param [Hash] attributes Model attributes in the form of hash
120
130
  # @return [Object] Returns the model itself
121
131
  def self.build_from_hash(attributes)
122
- new.build_from_hash(attributes)
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def build_from_hash(attributes)
129
132
  return nil unless attributes.is_a?(Hash)
130
- self.class.openapi_types.each_pair do |key, type|
131
- if type =~ /\AArray<(.*)>/i
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
132
139
  # check to ensure the input is an array given that the attribute
133
140
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
143
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
- end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
140
147
  end
141
-
142
- self
148
+ new(transformed_hash)
143
149
  end
144
150
 
145
151
  # Deserializes the data based on type
146
152
  # @param string type Data type
147
153
  # @param string value Value to be deserialized
148
154
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
155
+ def self._deserialize(type, value)
150
156
  case type.to_sym
151
- when :DateTime
152
- DateTime.parse(value)
157
+ when :Time
158
+ Time.parse(value)
153
159
  when :Date
154
160
  Date.parse(value)
155
161
  when :String
@@ -179,7 +185,9 @@ module PulpContainerClient
179
185
  end
180
186
  end
181
187
  else # model
182
- PulpContainerClient.const_get(type).build_from_hash(value)
188
+ # models (e.g. Pet) or oneOf
189
+ klass = PulpContainerClient.const_get(type)
190
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
191
  end
184
192
  end
185
193
 
@@ -205,7 +213,7 @@ module PulpContainerClient
205
213
  is_nullable = self.class.openapi_nullable.include?(attr)
206
214
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
215
  end
208
-
216
+
209
217
  hash[param] = _to_hash(value)
210
218
  end
211
219
  hash
@@ -228,5 +236,7 @@ module PulpContainerClient
228
236
  value
229
237
  end
230
238
  end
239
+
231
240
  end
241
+
232
242
  end
@@ -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 parsing and validating data associated with the signatures removal.
@@ -25,6 +26,11 @@ module PulpContainerClient
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
@@ -55,12 +61,15 @@ module PulpContainerClient
55
61
 
56
62
  if attributes.key?(:'signed_with_key_id')
57
63
  self.signed_with_key_id = attributes[:'signed_with_key_id']
64
+ else
65
+ self.signed_with_key_id = nil
58
66
  end
59
67
  end
60
68
 
61
69
  # Show invalid properties with the reasons. Usually used together with valid?
62
70
  # @return Array for valid properties with the reasons
63
71
  def list_invalid_properties
72
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
64
73
  invalid_properties = Array.new
65
74
  if @signed_with_key_id.nil?
66
75
  invalid_properties.push('invalid value for "signed_with_key_id", signed_with_key_id cannot be nil.')
@@ -72,6 +81,7 @@ module PulpContainerClient
72
81
  # Check to see if the all the properties in the model are valid
73
82
  # @return true if the model is valid
74
83
  def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
85
  return false if @signed_with_key_id.nil?
76
86
  true
77
87
  end
@@ -100,37 +110,33 @@ module PulpContainerClient
100
110
  # @param [Hash] attributes Model attributes in the form of hash
101
111
  # @return [Object] Returns the model itself
102
112
  def self.build_from_hash(attributes)
103
- new.build_from_hash(attributes)
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
113
  return nil unless attributes.is_a?(Hash)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
113
120
  # check to ensure the input is an array given that the attribute
114
121
  # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
124
  end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
121
128
  end
122
-
123
- self
129
+ new(transformed_hash)
124
130
  end
125
131
 
126
132
  # Deserializes the data based on type
127
133
  # @param string type Data type
128
134
  # @param string value Value to be deserialized
129
135
  # @return [Object] Deserialized data
130
- def _deserialize(type, value)
136
+ def self._deserialize(type, value)
131
137
  case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
138
+ when :Time
139
+ Time.parse(value)
134
140
  when :Date
135
141
  Date.parse(value)
136
142
  when :String
@@ -160,7 +166,9 @@ module PulpContainerClient
160
166
  end
161
167
  end
162
168
  else # model
163
- PulpContainerClient.const_get(type).build_from_hash(value)
169
+ # models (e.g. Pet) or oneOf
170
+ klass = PulpContainerClient.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
172
  end
165
173
  end
166
174
 
@@ -186,7 +194,7 @@ module PulpContainerClient
186
194
  is_nullable = self.class.openapi_nullable.include?(attr)
187
195
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
196
  end
189
-
197
+
190
198
  hash[param] = _to_hash(value)
191
199
  end
192
200
  hash
@@ -209,5 +217,7 @@ module PulpContainerClient
209
217
  value
210
218
  end
211
219
  end
220
+
212
221
  end
222
+
213
223
  end
@@ -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
  class Repair
@@ -24,6 +25,11 @@ module PulpContainerClient
24
25
  }
25
26
  end
26
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
27
33
  # Attribute type mapping.
28
34
  def self.openapi_types
29
35
  {
@@ -62,6 +68,7 @@ module PulpContainerClient
62
68
  # Show invalid properties with the reasons. Usually used together with valid?
63
69
  # @return Array for valid properties with the reasons
64
70
  def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
65
72
  invalid_properties = Array.new
66
73
  invalid_properties
67
74
  end
@@ -69,6 +76,7 @@ module PulpContainerClient
69
76
  # Check to see if the all the properties in the model are valid
70
77
  # @return true if the model is valid
71
78
  def valid?
79
+ warn '[DEPRECATED] the `valid?` method is obsolete'
72
80
  true
73
81
  end
74
82
 
@@ -96,37 +104,33 @@ module PulpContainerClient
96
104
  # @param [Hash] attributes Model attributes in the form of hash
97
105
  # @return [Object] Returns the model itself
98
106
  def self.build_from_hash(attributes)
99
- new.build_from_hash(attributes)
100
- end
101
-
102
- # Builds the object from hash
103
- # @param [Hash] attributes Model attributes in the form of hash
104
- # @return [Object] Returns the model itself
105
- def build_from_hash(attributes)
106
107
  return nil unless attributes.is_a?(Hash)
107
- self.class.openapi_types.each_pair do |key, type|
108
- if type =~ /\AArray<(.*)>/i
108
+ attributes = attributes.transform_keys(&:to_sym)
109
+ transformed_hash = {}
110
+ openapi_types.each_pair do |key, type|
111
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
112
+ transformed_hash["#{key}"] = nil
113
+ elsif type =~ /\AArray<(.*)>/i
109
114
  # check to ensure the input is an array given that the attribute
110
115
  # is documented as an array but the input is not
111
- if attributes[self.class.attribute_map[key]].is_a?(Array)
112
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ if attributes[attribute_map[key]].is_a?(Array)
117
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
113
118
  end
114
- elsif !attributes[self.class.attribute_map[key]].nil?
115
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
- end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ elsif !attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
121
+ end
117
122
  end
118
-
119
- self
123
+ new(transformed_hash)
120
124
  end
121
125
 
122
126
  # Deserializes the data based on type
123
127
  # @param string type Data type
124
128
  # @param string value Value to be deserialized
125
129
  # @return [Object] Deserialized data
126
- def _deserialize(type, value)
130
+ def self._deserialize(type, value)
127
131
  case type.to_sym
128
- when :DateTime
129
- DateTime.parse(value)
132
+ when :Time
133
+ Time.parse(value)
130
134
  when :Date
131
135
  Date.parse(value)
132
136
  when :String
@@ -156,7 +160,9 @@ module PulpContainerClient
156
160
  end
157
161
  end
158
162
  else # model
159
- PulpContainerClient.const_get(type).build_from_hash(value)
163
+ # models (e.g. Pet) or oneOf
164
+ klass = PulpContainerClient.const_get(type)
165
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
160
166
  end
161
167
  end
162
168
 
@@ -182,7 +188,7 @@ module PulpContainerClient
182
188
  is_nullable = self.class.openapi_nullable.include?(attr)
183
189
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
190
  end
185
-
191
+
186
192
  hash[param] = _to_hash(value)
187
193
  end
188
194
  hash
@@ -205,5 +211,7 @@ module PulpContainerClient
205
211
  value
206
212
  end
207
213
  end
214
+
208
215
  end
216
+
209
217
  end