pulpcore_client 3.19.1 → 3.20.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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +93 -16
  3. data/docs/AccessPoliciesApi.md +2 -2
  4. data/docs/AccessPolicy.md +3 -1
  5. data/docs/AccessPolicyResponse.md +3 -1
  6. data/docs/AcsApi.md +417 -0
  7. data/docs/AlternateContentSource.md +23 -0
  8. data/docs/AlternateContentSourceResponse.md +27 -0
  9. data/docs/ArtifactsApi.md +2 -2
  10. data/docs/ContentApi.md +117 -3
  11. data/docs/ContentGuard.md +19 -0
  12. data/docs/ContentguardsApi.md +282 -3
  13. data/docs/ContentguardsContentRedirectApi.md +230 -2
  14. data/docs/ContentguardsRbacApi.md +2 -2
  15. data/docs/Distribution.md +25 -0
  16. data/docs/DistributionsApi.md +283 -3
  17. data/docs/Export.md +17 -0
  18. data/docs/ExportResponse.md +25 -0
  19. data/docs/Exporter.md +17 -0
  20. data/docs/ExporterResponse.md +21 -0
  21. data/docs/ExportersApi.md +362 -0
  22. data/docs/{GroupsModelPermissionsApi.md → ExportersExportsApi.md} +46 -48
  23. data/docs/ExportersFilesystemApi.md +2 -2
  24. data/docs/ExportersFilesystemExportsApi.md +0 -2
  25. data/docs/ExportersPulpApi.md +2 -2
  26. data/docs/ExportersPulpExportsApi.md +0 -2
  27. data/docs/GroupRole.md +1 -1
  28. data/docs/GroupRoleResponse.md +6 -2
  29. data/docs/GroupsApi.md +2 -2
  30. data/docs/GroupsRolesApi.md +2 -2
  31. data/docs/GroupsUsersApi.md +0 -2
  32. data/docs/Import.md +19 -0
  33. data/docs/Importer.md +17 -0
  34. data/docs/ImporterResponse.md +21 -0
  35. data/docs/ImportersApi.md +361 -0
  36. data/docs/{GroupsObjectPermissionsApi.md → ImportersImportsApi.md} +46 -48
  37. data/docs/ImportersPulpApi.md +2 -2
  38. data/docs/ImportersPulpImportsApi.md +0 -2
  39. data/docs/MultipleArtifactContent.md +17 -0
  40. data/docs/OrphansCleanup.md +1 -1
  41. data/docs/PaginatedAlternateContentSourceResponseList.md +23 -0
  42. data/docs/{PaginatedPermissionResponseList.md → PaginatedExportResponseList.md} +3 -3
  43. data/docs/PaginatedExporterResponseList.md +23 -0
  44. data/docs/PaginatedImporterResponseList.md +23 -0
  45. data/docs/PaginatedRemoteResponseList.md +23 -0
  46. data/docs/PatchedAccessPolicy.md +3 -1
  47. data/docs/PatchedAlternateContentSource.md +23 -0
  48. data/docs/PatchedContentGuard.md +19 -0
  49. data/docs/PatchedDistribution.md +25 -0
  50. data/docs/PatchedExporter.md +17 -0
  51. data/docs/PatchedImporter.md +17 -0
  52. data/docs/PatchedRemote.md +57 -0
  53. data/docs/PatchedRepository.md +25 -0
  54. data/docs/PolicyEnum.md +16 -0
  55. data/docs/PublicationsApi.md +117 -2
  56. data/docs/Remote.md +57 -0
  57. data/docs/RemoteResponse.md +53 -0
  58. data/docs/RemotesApi.md +376 -0
  59. data/docs/RepositoriesApi.md +283 -3
  60. data/docs/RepositoriesVersionsApi.md +271 -0
  61. data/docs/Repository.md +25 -0
  62. data/docs/RepositoryVersionsApi.md +2 -0
  63. data/docs/RolesApi.md +6 -2
  64. data/docs/SigningServicesApi.md +0 -2
  65. data/docs/TaskGroupsApi.md +2 -2
  66. data/docs/TaskSchedulesApi.md +2 -2
  67. data/docs/TasksApi.md +2 -2
  68. data/docs/UploadsApi.md +0 -2
  69. data/docs/UserRole.md +1 -1
  70. data/docs/UserRoleResponse.md +6 -2
  71. data/docs/UsersApi.md +2 -61
  72. data/docs/UsersRolesApi.md +2 -2
  73. data/docs/VersionResponse.md +3 -1
  74. data/docs/WorkersApi.md +2 -2
  75. data/lib/pulpcore_client/api/access_policies_api.rb +7 -3
  76. data/lib/pulpcore_client/api/acs_api.rb +514 -0
  77. data/lib/pulpcore_client/api/artifacts_api.rb +7 -3
  78. data/lib/pulpcore_client/api/content_api.rb +141 -5
  79. data/lib/pulpcore_client/api/contentguards_api.rb +341 -5
  80. data/lib/pulpcore_client/api/contentguards_content_redirect_api.rb +275 -3
  81. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +7 -3
  82. data/lib/pulpcore_client/api/distributions_api.rb +343 -5
  83. data/lib/pulpcore_client/api/exporters_api.rb +446 -0
  84. data/lib/pulpcore_client/api/{groups_model_permissions_api.rb → exporters_exports_api.rb} +76 -79
  85. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +7 -3
  86. data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +0 -3
  87. data/lib/pulpcore_client/api/exporters_pulp_api.rb +7 -3
  88. data/lib/pulpcore_client/api/exporters_pulp_exports_api.rb +0 -3
  89. data/lib/pulpcore_client/api/groups_api.rb +7 -3
  90. data/lib/pulpcore_client/api/groups_roles_api.rb +7 -3
  91. data/lib/pulpcore_client/api/groups_users_api.rb +0 -3
  92. data/lib/pulpcore_client/api/importers_api.rb +444 -0
  93. data/lib/pulpcore_client/api/{groups_object_permissions_api.rb → importers_imports_api.rb} +76 -79
  94. data/lib/pulpcore_client/api/importers_pulp_api.rb +7 -3
  95. data/lib/pulpcore_client/api/importers_pulp_imports_api.rb +0 -3
  96. data/lib/pulpcore_client/api/publications_api.rb +138 -3
  97. data/lib/pulpcore_client/api/remotes_api.rb +467 -0
  98. data/lib/pulpcore_client/api/repositories_api.rb +343 -5
  99. data/lib/pulpcore_client/api/repositories_versions_api.rb +343 -0
  100. data/lib/pulpcore_client/api/repository_versions_api.rb +7 -0
  101. data/lib/pulpcore_client/api/roles_api.rb +13 -3
  102. data/lib/pulpcore_client/api/signing_services_api.rb +0 -3
  103. data/lib/pulpcore_client/api/task_groups_api.rb +7 -3
  104. data/lib/pulpcore_client/api/task_schedules_api.rb +7 -3
  105. data/lib/pulpcore_client/api/tasks_api.rb +7 -3
  106. data/lib/pulpcore_client/api/uploads_api.rb +0 -3
  107. data/lib/pulpcore_client/api/users_api.rb +7 -69
  108. data/lib/pulpcore_client/api/users_roles_api.rb +7 -3
  109. data/lib/pulpcore_client/api/workers_api.rb +7 -3
  110. data/lib/pulpcore_client/models/access_policy.rb +14 -4
  111. data/lib/pulpcore_client/models/access_policy_response.rb +14 -4
  112. data/lib/pulpcore_client/models/alternate_content_source.rb +270 -0
  113. data/lib/pulpcore_client/models/alternate_content_source_response.rb +270 -0
  114. data/lib/pulpcore_client/models/content_guard.rb +258 -0
  115. data/lib/pulpcore_client/models/distribution.rb +297 -0
  116. data/lib/pulpcore_client/models/export.rb +209 -0
  117. data/lib/pulpcore_client/models/export_response.rb +250 -0
  118. data/lib/pulpcore_client/models/exporter.rb +232 -0
  119. data/lib/pulpcore_client/models/{permission_response.rb → exporter_response.rb} +24 -27
  120. data/lib/pulpcore_client/models/group_role.rb +1 -1
  121. data/lib/pulpcore_client/models/group_role_response.rb +26 -6
  122. data/lib/pulpcore_client/models/import.rb +228 -0
  123. data/lib/pulpcore_client/models/importer.rb +232 -0
  124. data/lib/pulpcore_client/models/importer_response.rb +232 -0
  125. data/lib/pulpcore_client/models/multiple_artifact_content.rb +213 -0
  126. data/lib/pulpcore_client/models/orphans_cleanup.rb +0 -2
  127. data/lib/pulpcore_client/models/paginated_alternate_content_source_response_list.rb +237 -0
  128. data/lib/pulpcore_client/models/{paginated_permission_response_list.rb → paginated_export_response_list.rb} +4 -4
  129. data/lib/pulpcore_client/models/paginated_exporter_response_list.rb +237 -0
  130. data/lib/pulpcore_client/models/paginated_importer_response_list.rb +237 -0
  131. data/lib/pulpcore_client/models/paginated_remote_response_list.rb +237 -0
  132. data/lib/pulpcore_client/models/patched_access_policy.rb +14 -4
  133. data/lib/pulpcore_client/models/patched_alternate_content_source.rb +256 -0
  134. data/lib/pulpcore_client/models/patched_content_guard.rb +249 -0
  135. data/lib/pulpcore_client/models/patched_distribution.rb +279 -0
  136. data/lib/pulpcore_client/models/patched_exporter.rb +223 -0
  137. data/lib/pulpcore_client/models/patched_importer.rb +223 -0
  138. data/lib/pulpcore_client/models/patched_remote.rb +649 -0
  139. data/lib/pulpcore_client/models/patched_repository.rb +295 -0
  140. data/lib/pulpcore_client/models/policy_enum.rb +36 -0
  141. data/lib/pulpcore_client/models/remote.rb +667 -0
  142. data/lib/pulpcore_client/models/remote_response.rb +483 -0
  143. data/lib/pulpcore_client/models/repository.rb +304 -0
  144. data/lib/pulpcore_client/models/user_role.rb +1 -1
  145. data/lib/pulpcore_client/models/user_role_response.rb +26 -6
  146. data/lib/pulpcore_client/models/version_response.rb +19 -4
  147. data/lib/pulpcore_client/version.rb +1 -1
  148. data/lib/pulpcore_client.rb +35 -4
  149. data/spec/api/access_policies_api_spec.rb +1 -1
  150. data/spec/api/acs_api_spec.rb +132 -0
  151. data/spec/api/artifacts_api_spec.rb +1 -1
  152. data/spec/api/content_api_spec.rb +28 -2
  153. data/spec/api/contentguards_api_spec.rb +66 -2
  154. data/spec/api/contentguards_content_redirect_api_spec.rb +51 -1
  155. data/spec/api/contentguards_rbac_api_spec.rb +1 -1
  156. data/spec/api/distributions_api_spec.rb +66 -2
  157. data/spec/api/exporters_api_spec.rb +120 -0
  158. data/spec/api/{groups_model_permissions_api_spec.rb → exporters_exports_api_spec.rb} +22 -23
  159. data/spec/api/exporters_filesystem_api_spec.rb +1 -1
  160. data/spec/api/exporters_filesystem_exports_api_spec.rb +0 -1
  161. data/spec/api/exporters_pulp_api_spec.rb +1 -1
  162. data/spec/api/exporters_pulp_exports_api_spec.rb +0 -1
  163. data/spec/api/groups_api_spec.rb +1 -1
  164. data/spec/api/groups_roles_api_spec.rb +1 -1
  165. data/spec/api/groups_users_api_spec.rb +0 -1
  166. data/spec/api/importers_api_spec.rb +120 -0
  167. data/spec/api/{groups_object_permissions_api_spec.rb → importers_imports_api_spec.rb} +22 -23
  168. data/spec/api/importers_pulp_api_spec.rb +1 -1
  169. data/spec/api/importers_pulp_imports_api_spec.rb +0 -1
  170. data/spec/api/publications_api_spec.rb +28 -1
  171. data/spec/api/remotes_api_spec.rb +127 -0
  172. data/spec/api/repositories_api_spec.rb +66 -2
  173. data/spec/api/repositories_versions_api_spec.rb +104 -0
  174. data/spec/api/repository_versions_api_spec.rb +1 -0
  175. data/spec/api/roles_api_spec.rb +3 -1
  176. data/spec/api/signing_services_api_spec.rb +0 -1
  177. data/spec/api/task_groups_api_spec.rb +1 -1
  178. data/spec/api/task_schedules_api_spec.rb +1 -1
  179. data/spec/api/tasks_api_spec.rb +1 -1
  180. data/spec/api/uploads_api_spec.rb +0 -1
  181. data/spec/api/users_api_spec.rb +1 -14
  182. data/spec/api/users_roles_api_spec.rb +1 -1
  183. data/spec/api/workers_api_spec.rb +1 -1
  184. data/spec/models/access_policy_response_spec.rb +6 -0
  185. data/spec/models/access_policy_spec.rb +6 -0
  186. data/spec/models/alternate_content_source_response_spec.rb +71 -0
  187. data/spec/models/{permission_response_spec.rb → alternate_content_source_spec.rb} +10 -10
  188. data/spec/models/content_guard_spec.rb +47 -0
  189. data/spec/models/distribution_spec.rb +65 -0
  190. data/spec/models/export_response_spec.rb +65 -0
  191. data/spec/models/export_spec.rb +41 -0
  192. data/spec/models/exporter_response_spec.rb +53 -0
  193. data/spec/models/exporter_spec.rb +41 -0
  194. data/spec/models/group_role_response_spec.rb +12 -0
  195. data/spec/models/import_spec.rb +47 -0
  196. data/spec/models/importer_response_spec.rb +53 -0
  197. data/spec/models/importer_spec.rb +41 -0
  198. data/spec/models/multiple_artifact_content_spec.rb +41 -0
  199. data/spec/models/paginated_alternate_content_source_response_list_spec.rb +59 -0
  200. data/spec/models/{paginated_permission_response_list_spec.rb → paginated_export_response_list_spec.rb} +6 -6
  201. data/spec/models/paginated_exporter_response_list_spec.rb +59 -0
  202. data/spec/models/paginated_importer_response_list_spec.rb +59 -0
  203. data/spec/models/paginated_remote_response_list_spec.rb +59 -0
  204. data/spec/models/patched_access_policy_spec.rb +6 -0
  205. data/spec/models/patched_alternate_content_source_spec.rb +59 -0
  206. data/spec/models/patched_content_guard_spec.rb +47 -0
  207. data/spec/models/patched_distribution_spec.rb +65 -0
  208. data/spec/models/patched_exporter_spec.rb +41 -0
  209. data/spec/models/patched_importer_spec.rb +41 -0
  210. data/spec/models/patched_remote_spec.rb +161 -0
  211. data/spec/models/patched_repository_spec.rb +65 -0
  212. data/spec/models/policy_enum_spec.rb +35 -0
  213. data/spec/models/remote_response_spec.rb +149 -0
  214. data/spec/models/remote_spec.rb +161 -0
  215. data/spec/models/repository_spec.rb +65 -0
  216. data/spec/models/user_role_response_spec.rb +12 -0
  217. data/spec/models/version_response_spec.rb +6 -0
  218. metadata +263 -139
  219. data/docs/PermissionResponse.md +0 -23
@@ -0,0 +1,483 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ # Every remote defined by a plugin should have a Remote serializer that inherits from this class. Please import from `pulpcore.plugin.serializers` rather than from this module directly.
17
+ class RemoteResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # A unique name for this remote.
24
+ attr_accessor :name
25
+
26
+ # The URL of an external content source.
27
+ attr_accessor :url
28
+
29
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
30
+ attr_accessor :ca_cert
31
+
32
+ # A PEM encoded client certificate used for authentication.
33
+ attr_accessor :client_cert
34
+
35
+ # If True, TLS peer validation must be performed.
36
+ attr_accessor :tls_validation
37
+
38
+ # The proxy URL. Format: scheme://host:port
39
+ attr_accessor :proxy_url
40
+
41
+ attr_accessor :pulp_labels
42
+
43
+ # Timestamp of the most recent update of the remote.
44
+ attr_accessor :pulp_last_updated
45
+
46
+ # Total number of simultaneous connections. If not set then the default value will be used.
47
+ attr_accessor :download_concurrency
48
+
49
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
50
+ attr_accessor :max_retries
51
+
52
+ # The policy to use when downloading content.
53
+ attr_accessor :policy
54
+
55
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
56
+ attr_accessor :total_timeout
57
+
58
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
59
+ attr_accessor :connect_timeout
60
+
61
+ # aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
62
+ attr_accessor :sock_connect_timeout
63
+
64
+ # aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
65
+ attr_accessor :sock_read_timeout
66
+
67
+ # Headers for aiohttp.Clientsession
68
+ attr_accessor :headers
69
+
70
+ # Limits requests per second for each concurrent downloader
71
+ attr_accessor :rate_limit
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'pulp_href' => :'pulp_href',
77
+ :'pulp_created' => :'pulp_created',
78
+ :'name' => :'name',
79
+ :'url' => :'url',
80
+ :'ca_cert' => :'ca_cert',
81
+ :'client_cert' => :'client_cert',
82
+ :'tls_validation' => :'tls_validation',
83
+ :'proxy_url' => :'proxy_url',
84
+ :'pulp_labels' => :'pulp_labels',
85
+ :'pulp_last_updated' => :'pulp_last_updated',
86
+ :'download_concurrency' => :'download_concurrency',
87
+ :'max_retries' => :'max_retries',
88
+ :'policy' => :'policy',
89
+ :'total_timeout' => :'total_timeout',
90
+ :'connect_timeout' => :'connect_timeout',
91
+ :'sock_connect_timeout' => :'sock_connect_timeout',
92
+ :'sock_read_timeout' => :'sock_read_timeout',
93
+ :'headers' => :'headers',
94
+ :'rate_limit' => :'rate_limit'
95
+ }
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'pulp_href' => :'String',
102
+ :'pulp_created' => :'DateTime',
103
+ :'name' => :'String',
104
+ :'url' => :'String',
105
+ :'ca_cert' => :'String',
106
+ :'client_cert' => :'String',
107
+ :'tls_validation' => :'Boolean',
108
+ :'proxy_url' => :'String',
109
+ :'pulp_labels' => :'Object',
110
+ :'pulp_last_updated' => :'DateTime',
111
+ :'download_concurrency' => :'Integer',
112
+ :'max_retries' => :'Integer',
113
+ :'policy' => :'PolicyEnum',
114
+ :'total_timeout' => :'Float',
115
+ :'connect_timeout' => :'Float',
116
+ :'sock_connect_timeout' => :'Float',
117
+ :'sock_read_timeout' => :'Float',
118
+ :'headers' => :'Array<Object>',
119
+ :'rate_limit' => :'Integer'
120
+ }
121
+ end
122
+
123
+ # List of attributes with nullable: true
124
+ def self.openapi_nullable
125
+ Set.new([
126
+ :'ca_cert',
127
+ :'client_cert',
128
+ :'proxy_url',
129
+ :'download_concurrency',
130
+ :'max_retries',
131
+ :'total_timeout',
132
+ :'connect_timeout',
133
+ :'sock_connect_timeout',
134
+ :'sock_read_timeout',
135
+ :'rate_limit'
136
+ ])
137
+ end
138
+
139
+ # Initializes the object
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ def initialize(attributes = {})
142
+ if (!attributes.is_a?(Hash))
143
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::RemoteResponse` initialize method"
144
+ end
145
+
146
+ # check to see if the attribute exists and convert string to symbol for hash key
147
+ attributes = attributes.each_with_object({}) { |(k, v), h|
148
+ if (!self.class.attribute_map.key?(k.to_sym))
149
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::RemoteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
150
+ end
151
+ h[k.to_sym] = v
152
+ }
153
+
154
+ if attributes.key?(:'pulp_href')
155
+ self.pulp_href = attributes[:'pulp_href']
156
+ end
157
+
158
+ if attributes.key?(:'pulp_created')
159
+ self.pulp_created = attributes[:'pulp_created']
160
+ end
161
+
162
+ if attributes.key?(:'name')
163
+ self.name = attributes[:'name']
164
+ end
165
+
166
+ if attributes.key?(:'url')
167
+ self.url = attributes[:'url']
168
+ end
169
+
170
+ if attributes.key?(:'ca_cert')
171
+ self.ca_cert = attributes[:'ca_cert']
172
+ end
173
+
174
+ if attributes.key?(:'client_cert')
175
+ self.client_cert = attributes[:'client_cert']
176
+ end
177
+
178
+ if attributes.key?(:'tls_validation')
179
+ self.tls_validation = attributes[:'tls_validation']
180
+ end
181
+
182
+ if attributes.key?(:'proxy_url')
183
+ self.proxy_url = attributes[:'proxy_url']
184
+ end
185
+
186
+ if attributes.key?(:'pulp_labels')
187
+ self.pulp_labels = attributes[:'pulp_labels']
188
+ end
189
+
190
+ if attributes.key?(:'pulp_last_updated')
191
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
192
+ end
193
+
194
+ if attributes.key?(:'download_concurrency')
195
+ self.download_concurrency = attributes[:'download_concurrency']
196
+ end
197
+
198
+ if attributes.key?(:'max_retries')
199
+ self.max_retries = attributes[:'max_retries']
200
+ end
201
+
202
+ if attributes.key?(:'policy')
203
+ self.policy = attributes[:'policy']
204
+ end
205
+
206
+ if attributes.key?(:'total_timeout')
207
+ self.total_timeout = attributes[:'total_timeout']
208
+ end
209
+
210
+ if attributes.key?(:'connect_timeout')
211
+ self.connect_timeout = attributes[:'connect_timeout']
212
+ end
213
+
214
+ if attributes.key?(:'sock_connect_timeout')
215
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
216
+ end
217
+
218
+ if attributes.key?(:'sock_read_timeout')
219
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
220
+ end
221
+
222
+ if attributes.key?(:'headers')
223
+ if (value = attributes[:'headers']).is_a?(Array)
224
+ self.headers = value
225
+ end
226
+ end
227
+
228
+ if attributes.key?(:'rate_limit')
229
+ self.rate_limit = attributes[:'rate_limit']
230
+ end
231
+ end
232
+
233
+ # Show invalid properties with the reasons. Usually used together with valid?
234
+ # @return Array for valid properties with the reasons
235
+ def list_invalid_properties
236
+ invalid_properties = Array.new
237
+ if @name.nil?
238
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
239
+ end
240
+
241
+ if @url.nil?
242
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
243
+ end
244
+
245
+ if !@download_concurrency.nil? && @download_concurrency < 1
246
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
247
+ end
248
+
249
+ if !@total_timeout.nil? && @total_timeout < 0.0
250
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
251
+ end
252
+
253
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
254
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
255
+ end
256
+
257
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
258
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
259
+ end
260
+
261
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
262
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
263
+ end
264
+
265
+ invalid_properties
266
+ end
267
+
268
+ # Check to see if the all the properties in the model are valid
269
+ # @return true if the model is valid
270
+ def valid?
271
+ return false if @name.nil?
272
+ return false if @url.nil?
273
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
274
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
275
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
276
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
277
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
278
+ true
279
+ end
280
+
281
+ # Custom attribute writer method with validation
282
+ # @param [Object] download_concurrency Value to be assigned
283
+ def download_concurrency=(download_concurrency)
284
+ if !download_concurrency.nil? && download_concurrency < 1
285
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
286
+ end
287
+
288
+ @download_concurrency = download_concurrency
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] total_timeout Value to be assigned
293
+ def total_timeout=(total_timeout)
294
+ if !total_timeout.nil? && total_timeout < 0.0
295
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
296
+ end
297
+
298
+ @total_timeout = total_timeout
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] connect_timeout Value to be assigned
303
+ def connect_timeout=(connect_timeout)
304
+ if !connect_timeout.nil? && connect_timeout < 0.0
305
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
306
+ end
307
+
308
+ @connect_timeout = connect_timeout
309
+ end
310
+
311
+ # Custom attribute writer method with validation
312
+ # @param [Object] sock_connect_timeout Value to be assigned
313
+ def sock_connect_timeout=(sock_connect_timeout)
314
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
315
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
316
+ end
317
+
318
+ @sock_connect_timeout = sock_connect_timeout
319
+ end
320
+
321
+ # Custom attribute writer method with validation
322
+ # @param [Object] sock_read_timeout Value to be assigned
323
+ def sock_read_timeout=(sock_read_timeout)
324
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
325
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
326
+ end
327
+
328
+ @sock_read_timeout = sock_read_timeout
329
+ end
330
+
331
+ # Checks equality by comparing each attribute.
332
+ # @param [Object] Object to be compared
333
+ def ==(o)
334
+ return true if self.equal?(o)
335
+ self.class == o.class &&
336
+ pulp_href == o.pulp_href &&
337
+ pulp_created == o.pulp_created &&
338
+ name == o.name &&
339
+ url == o.url &&
340
+ ca_cert == o.ca_cert &&
341
+ client_cert == o.client_cert &&
342
+ tls_validation == o.tls_validation &&
343
+ proxy_url == o.proxy_url &&
344
+ pulp_labels == o.pulp_labels &&
345
+ pulp_last_updated == o.pulp_last_updated &&
346
+ download_concurrency == o.download_concurrency &&
347
+ max_retries == o.max_retries &&
348
+ policy == o.policy &&
349
+ total_timeout == o.total_timeout &&
350
+ connect_timeout == o.connect_timeout &&
351
+ sock_connect_timeout == o.sock_connect_timeout &&
352
+ sock_read_timeout == o.sock_read_timeout &&
353
+ headers == o.headers &&
354
+ rate_limit == o.rate_limit
355
+ end
356
+
357
+ # @see the `==` method
358
+ # @param [Object] Object to be compared
359
+ def eql?(o)
360
+ self == o
361
+ end
362
+
363
+ # Calculates hash code according to all attributes.
364
+ # @return [Integer] Hash code
365
+ def hash
366
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit].hash
367
+ end
368
+
369
+ # Builds the object from hash
370
+ # @param [Hash] attributes Model attributes in the form of hash
371
+ # @return [Object] Returns the model itself
372
+ def self.build_from_hash(attributes)
373
+ new.build_from_hash(attributes)
374
+ end
375
+
376
+ # Builds the object from hash
377
+ # @param [Hash] attributes Model attributes in the form of hash
378
+ # @return [Object] Returns the model itself
379
+ def build_from_hash(attributes)
380
+ return nil unless attributes.is_a?(Hash)
381
+ self.class.openapi_types.each_pair do |key, type|
382
+ if type =~ /\AArray<(.*)>/i
383
+ # check to ensure the input is an array given that the attribute
384
+ # is documented as an array but the input is not
385
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
386
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
387
+ end
388
+ elsif !attributes[self.class.attribute_map[key]].nil?
389
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
390
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
391
+ end
392
+
393
+ self
394
+ end
395
+
396
+ # Deserializes the data based on type
397
+ # @param string type Data type
398
+ # @param string value Value to be deserialized
399
+ # @return [Object] Deserialized data
400
+ def _deserialize(type, value)
401
+ case type.to_sym
402
+ when :DateTime
403
+ DateTime.parse(value)
404
+ when :Date
405
+ Date.parse(value)
406
+ when :String
407
+ value.to_s
408
+ when :Integer
409
+ value.to_i
410
+ when :Float
411
+ value.to_f
412
+ when :Boolean
413
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
414
+ true
415
+ else
416
+ false
417
+ end
418
+ when :Object
419
+ # generic object (usually a Hash), return directly
420
+ value
421
+ when /\AArray<(?<inner_type>.+)>\z/
422
+ inner_type = Regexp.last_match[:inner_type]
423
+ value.map { |v| _deserialize(inner_type, v) }
424
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
425
+ k_type = Regexp.last_match[:k_type]
426
+ v_type = Regexp.last_match[:v_type]
427
+ {}.tap do |hash|
428
+ value.each do |k, v|
429
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
430
+ end
431
+ end
432
+ else # model
433
+ PulpcoreClient.const_get(type).build_from_hash(value)
434
+ end
435
+ end
436
+
437
+ # Returns the string representation of the object
438
+ # @return [String] String presentation of the object
439
+ def to_s
440
+ to_hash.to_s
441
+ end
442
+
443
+ # to_body is an alias to to_hash (backward compatibility)
444
+ # @return [Hash] Returns the object in the form of hash
445
+ def to_body
446
+ to_hash
447
+ end
448
+
449
+ # Returns the object in the form of hash
450
+ # @return [Hash] Returns the object in the form of hash
451
+ def to_hash
452
+ hash = {}
453
+ self.class.attribute_map.each_pair do |attr, param|
454
+ value = self.send(attr)
455
+ if value.nil?
456
+ is_nullable = self.class.openapi_nullable.include?(attr)
457
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
458
+ end
459
+
460
+ hash[param] = _to_hash(value)
461
+ end
462
+ hash
463
+ end
464
+
465
+ # Outputs non-array value in the form of hash
466
+ # For object, use to_hash. Otherwise, just return the value
467
+ # @param [Object] value Any valid value
468
+ # @return [Hash] Returns the value in the form of hash
469
+ def _to_hash(value)
470
+ if value.is_a?(Array)
471
+ value.compact.map { |v| _to_hash(v) }
472
+ elsif value.is_a?(Hash)
473
+ {}.tap do |hash|
474
+ value.each { |k, v| hash[k] = _to_hash(v) }
475
+ end
476
+ elsif value.respond_to? :to_hash
477
+ value.to_hash
478
+ else
479
+ value
480
+ end
481
+ end
482
+ end
483
+ end