pulpcore_client 3.19.1 → 3.20.0

Sign up to get free protection for your applications and to get access to all the features.
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,649 @@
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 PatchedRemote
18
+ # A unique name for this remote.
19
+ attr_accessor :name
20
+
21
+ # The URL of an external content source.
22
+ attr_accessor :url
23
+
24
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
25
+ attr_accessor :ca_cert
26
+
27
+ # A PEM encoded client certificate used for authentication.
28
+ attr_accessor :client_cert
29
+
30
+ # A PEM encoded private key used for authentication.
31
+ attr_accessor :client_key
32
+
33
+ # If True, TLS peer validation must be performed.
34
+ attr_accessor :tls_validation
35
+
36
+ # The proxy URL. Format: scheme://host:port
37
+ attr_accessor :proxy_url
38
+
39
+ # The username to authenticte to the proxy.
40
+ attr_accessor :proxy_username
41
+
42
+ # The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.
43
+ attr_accessor :proxy_password
44
+
45
+ # The username to be used for authentication when syncing.
46
+ attr_accessor :username
47
+
48
+ # The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
49
+ attr_accessor :password
50
+
51
+ attr_accessor :pulp_labels
52
+
53
+ # Total number of simultaneous connections. If not set then the default value will be used.
54
+ attr_accessor :download_concurrency
55
+
56
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
57
+ attr_accessor :max_retries
58
+
59
+ # The policy to use when downloading content.
60
+ attr_accessor :policy
61
+
62
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
63
+ attr_accessor :total_timeout
64
+
65
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
66
+ attr_accessor :connect_timeout
67
+
68
+ # 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.
69
+ attr_accessor :sock_connect_timeout
70
+
71
+ # 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.
72
+ attr_accessor :sock_read_timeout
73
+
74
+ # Headers for aiohttp.Clientsession
75
+ attr_accessor :headers
76
+
77
+ # Limits requests per second for each concurrent downloader
78
+ attr_accessor :rate_limit
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'name' => :'name',
84
+ :'url' => :'url',
85
+ :'ca_cert' => :'ca_cert',
86
+ :'client_cert' => :'client_cert',
87
+ :'client_key' => :'client_key',
88
+ :'tls_validation' => :'tls_validation',
89
+ :'proxy_url' => :'proxy_url',
90
+ :'proxy_username' => :'proxy_username',
91
+ :'proxy_password' => :'proxy_password',
92
+ :'username' => :'username',
93
+ :'password' => :'password',
94
+ :'pulp_labels' => :'pulp_labels',
95
+ :'download_concurrency' => :'download_concurrency',
96
+ :'max_retries' => :'max_retries',
97
+ :'policy' => :'policy',
98
+ :'total_timeout' => :'total_timeout',
99
+ :'connect_timeout' => :'connect_timeout',
100
+ :'sock_connect_timeout' => :'sock_connect_timeout',
101
+ :'sock_read_timeout' => :'sock_read_timeout',
102
+ :'headers' => :'headers',
103
+ :'rate_limit' => :'rate_limit'
104
+ }
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.openapi_types
109
+ {
110
+ :'name' => :'String',
111
+ :'url' => :'String',
112
+ :'ca_cert' => :'String',
113
+ :'client_cert' => :'String',
114
+ :'client_key' => :'String',
115
+ :'tls_validation' => :'Boolean',
116
+ :'proxy_url' => :'String',
117
+ :'proxy_username' => :'String',
118
+ :'proxy_password' => :'String',
119
+ :'username' => :'String',
120
+ :'password' => :'String',
121
+ :'pulp_labels' => :'Object',
122
+ :'download_concurrency' => :'Integer',
123
+ :'max_retries' => :'Integer',
124
+ :'policy' => :'PolicyEnum',
125
+ :'total_timeout' => :'Float',
126
+ :'connect_timeout' => :'Float',
127
+ :'sock_connect_timeout' => :'Float',
128
+ :'sock_read_timeout' => :'Float',
129
+ :'headers' => :'Array<Object>',
130
+ :'rate_limit' => :'Integer'
131
+ }
132
+ end
133
+
134
+ # List of attributes with nullable: true
135
+ def self.openapi_nullable
136
+ Set.new([
137
+ :'ca_cert',
138
+ :'client_cert',
139
+ :'client_key',
140
+ :'proxy_url',
141
+ :'proxy_username',
142
+ :'proxy_password',
143
+ :'username',
144
+ :'password',
145
+ :'download_concurrency',
146
+ :'max_retries',
147
+ :'total_timeout',
148
+ :'connect_timeout',
149
+ :'sock_connect_timeout',
150
+ :'sock_read_timeout',
151
+ :'rate_limit'
152
+ ])
153
+ end
154
+
155
+ # Initializes the object
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ def initialize(attributes = {})
158
+ if (!attributes.is_a?(Hash))
159
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PatchedRemote` initialize method"
160
+ end
161
+
162
+ # check to see if the attribute exists and convert string to symbol for hash key
163
+ attributes = attributes.each_with_object({}) { |(k, v), h|
164
+ if (!self.class.attribute_map.key?(k.to_sym))
165
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PatchedRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
166
+ end
167
+ h[k.to_sym] = v
168
+ }
169
+
170
+ if attributes.key?(:'name')
171
+ self.name = attributes[:'name']
172
+ end
173
+
174
+ if attributes.key?(:'url')
175
+ self.url = attributes[:'url']
176
+ end
177
+
178
+ if attributes.key?(:'ca_cert')
179
+ self.ca_cert = attributes[:'ca_cert']
180
+ end
181
+
182
+ if attributes.key?(:'client_cert')
183
+ self.client_cert = attributes[:'client_cert']
184
+ end
185
+
186
+ if attributes.key?(:'client_key')
187
+ self.client_key = attributes[:'client_key']
188
+ end
189
+
190
+ if attributes.key?(:'tls_validation')
191
+ self.tls_validation = attributes[:'tls_validation']
192
+ end
193
+
194
+ if attributes.key?(:'proxy_url')
195
+ self.proxy_url = attributes[:'proxy_url']
196
+ end
197
+
198
+ if attributes.key?(:'proxy_username')
199
+ self.proxy_username = attributes[:'proxy_username']
200
+ end
201
+
202
+ if attributes.key?(:'proxy_password')
203
+ self.proxy_password = attributes[:'proxy_password']
204
+ end
205
+
206
+ if attributes.key?(:'username')
207
+ self.username = attributes[:'username']
208
+ end
209
+
210
+ if attributes.key?(:'password')
211
+ self.password = attributes[:'password']
212
+ end
213
+
214
+ if attributes.key?(:'pulp_labels')
215
+ self.pulp_labels = attributes[:'pulp_labels']
216
+ end
217
+
218
+ if attributes.key?(:'download_concurrency')
219
+ self.download_concurrency = attributes[:'download_concurrency']
220
+ end
221
+
222
+ if attributes.key?(:'max_retries')
223
+ self.max_retries = attributes[:'max_retries']
224
+ end
225
+
226
+ if attributes.key?(:'policy')
227
+ self.policy = attributes[:'policy']
228
+ end
229
+
230
+ if attributes.key?(:'total_timeout')
231
+ self.total_timeout = attributes[:'total_timeout']
232
+ end
233
+
234
+ if attributes.key?(:'connect_timeout')
235
+ self.connect_timeout = attributes[:'connect_timeout']
236
+ end
237
+
238
+ if attributes.key?(:'sock_connect_timeout')
239
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
240
+ end
241
+
242
+ if attributes.key?(:'sock_read_timeout')
243
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
244
+ end
245
+
246
+ if attributes.key?(:'headers')
247
+ if (value = attributes[:'headers']).is_a?(Array)
248
+ self.headers = value
249
+ end
250
+ end
251
+
252
+ if attributes.key?(:'rate_limit')
253
+ self.rate_limit = attributes[:'rate_limit']
254
+ end
255
+ end
256
+
257
+ # Show invalid properties with the reasons. Usually used together with valid?
258
+ # @return Array for valid properties with the reasons
259
+ def list_invalid_properties
260
+ invalid_properties = Array.new
261
+ if !@name.nil? && @name.to_s.length < 1
262
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
263
+ end
264
+
265
+ if !@url.nil? && @url.to_s.length < 1
266
+ invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
267
+ end
268
+
269
+ if !@ca_cert.nil? && @ca_cert.to_s.length < 1
270
+ invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
271
+ end
272
+
273
+ if !@client_cert.nil? && @client_cert.to_s.length < 1
274
+ invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
275
+ end
276
+
277
+ if !@client_key.nil? && @client_key.to_s.length < 1
278
+ invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
279
+ end
280
+
281
+ if !@proxy_url.nil? && @proxy_url.to_s.length < 1
282
+ invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
283
+ end
284
+
285
+ if !@proxy_username.nil? && @proxy_username.to_s.length < 1
286
+ invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
287
+ end
288
+
289
+ if !@proxy_password.nil? && @proxy_password.to_s.length < 1
290
+ invalid_properties.push('invalid value for "proxy_password", the character length must be great than or equal to 1.')
291
+ end
292
+
293
+ if !@username.nil? && @username.to_s.length < 1
294
+ invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
295
+ end
296
+
297
+ if !@password.nil? && @password.to_s.length < 1
298
+ invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
299
+ end
300
+
301
+ if !@download_concurrency.nil? && @download_concurrency < 1
302
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
303
+ end
304
+
305
+ if !@total_timeout.nil? && @total_timeout < 0.0
306
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
307
+ end
308
+
309
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
310
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
311
+ end
312
+
313
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
314
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
315
+ end
316
+
317
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
318
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
319
+ end
320
+
321
+ invalid_properties
322
+ end
323
+
324
+ # Check to see if the all the properties in the model are valid
325
+ # @return true if the model is valid
326
+ def valid?
327
+ return false if !@name.nil? && @name.to_s.length < 1
328
+ return false if !@url.nil? && @url.to_s.length < 1
329
+ return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
330
+ return false if !@client_cert.nil? && @client_cert.to_s.length < 1
331
+ return false if !@client_key.nil? && @client_key.to_s.length < 1
332
+ return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
333
+ return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
334
+ return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
335
+ return false if !@username.nil? && @username.to_s.length < 1
336
+ return false if !@password.nil? && @password.to_s.length < 1
337
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
338
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
339
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
340
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
341
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
342
+ true
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] name Value to be assigned
347
+ def name=(name)
348
+ if !name.nil? && name.to_s.length < 1
349
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
350
+ end
351
+
352
+ @name = name
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] url Value to be assigned
357
+ def url=(url)
358
+ if !url.nil? && url.to_s.length < 1
359
+ fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
360
+ end
361
+
362
+ @url = url
363
+ end
364
+
365
+ # Custom attribute writer method with validation
366
+ # @param [Object] ca_cert Value to be assigned
367
+ def ca_cert=(ca_cert)
368
+ if !ca_cert.nil? && ca_cert.to_s.length < 1
369
+ fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
370
+ end
371
+
372
+ @ca_cert = ca_cert
373
+ end
374
+
375
+ # Custom attribute writer method with validation
376
+ # @param [Object] client_cert Value to be assigned
377
+ def client_cert=(client_cert)
378
+ if !client_cert.nil? && client_cert.to_s.length < 1
379
+ fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
380
+ end
381
+
382
+ @client_cert = client_cert
383
+ end
384
+
385
+ # Custom attribute writer method with validation
386
+ # @param [Object] client_key Value to be assigned
387
+ def client_key=(client_key)
388
+ if !client_key.nil? && client_key.to_s.length < 1
389
+ fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
390
+ end
391
+
392
+ @client_key = client_key
393
+ end
394
+
395
+ # Custom attribute writer method with validation
396
+ # @param [Object] proxy_url Value to be assigned
397
+ def proxy_url=(proxy_url)
398
+ if !proxy_url.nil? && proxy_url.to_s.length < 1
399
+ fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
400
+ end
401
+
402
+ @proxy_url = proxy_url
403
+ end
404
+
405
+ # Custom attribute writer method with validation
406
+ # @param [Object] proxy_username Value to be assigned
407
+ def proxy_username=(proxy_username)
408
+ if !proxy_username.nil? && proxy_username.to_s.length < 1
409
+ fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
410
+ end
411
+
412
+ @proxy_username = proxy_username
413
+ end
414
+
415
+ # Custom attribute writer method with validation
416
+ # @param [Object] proxy_password Value to be assigned
417
+ def proxy_password=(proxy_password)
418
+ if !proxy_password.nil? && proxy_password.to_s.length < 1
419
+ fail ArgumentError, 'invalid value for "proxy_password", the character length must be great than or equal to 1.'
420
+ end
421
+
422
+ @proxy_password = proxy_password
423
+ end
424
+
425
+ # Custom attribute writer method with validation
426
+ # @param [Object] username Value to be assigned
427
+ def username=(username)
428
+ if !username.nil? && username.to_s.length < 1
429
+ fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
430
+ end
431
+
432
+ @username = username
433
+ end
434
+
435
+ # Custom attribute writer method with validation
436
+ # @param [Object] password Value to be assigned
437
+ def password=(password)
438
+ if !password.nil? && password.to_s.length < 1
439
+ fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
440
+ end
441
+
442
+ @password = password
443
+ end
444
+
445
+ # Custom attribute writer method with validation
446
+ # @param [Object] download_concurrency Value to be assigned
447
+ def download_concurrency=(download_concurrency)
448
+ if !download_concurrency.nil? && download_concurrency < 1
449
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
450
+ end
451
+
452
+ @download_concurrency = download_concurrency
453
+ end
454
+
455
+ # Custom attribute writer method with validation
456
+ # @param [Object] total_timeout Value to be assigned
457
+ def total_timeout=(total_timeout)
458
+ if !total_timeout.nil? && total_timeout < 0.0
459
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
460
+ end
461
+
462
+ @total_timeout = total_timeout
463
+ end
464
+
465
+ # Custom attribute writer method with validation
466
+ # @param [Object] connect_timeout Value to be assigned
467
+ def connect_timeout=(connect_timeout)
468
+ if !connect_timeout.nil? && connect_timeout < 0.0
469
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
470
+ end
471
+
472
+ @connect_timeout = connect_timeout
473
+ end
474
+
475
+ # Custom attribute writer method with validation
476
+ # @param [Object] sock_connect_timeout Value to be assigned
477
+ def sock_connect_timeout=(sock_connect_timeout)
478
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
479
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
480
+ end
481
+
482
+ @sock_connect_timeout = sock_connect_timeout
483
+ end
484
+
485
+ # Custom attribute writer method with validation
486
+ # @param [Object] sock_read_timeout Value to be assigned
487
+ def sock_read_timeout=(sock_read_timeout)
488
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
489
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
490
+ end
491
+
492
+ @sock_read_timeout = sock_read_timeout
493
+ end
494
+
495
+ # Checks equality by comparing each attribute.
496
+ # @param [Object] Object to be compared
497
+ def ==(o)
498
+ return true if self.equal?(o)
499
+ self.class == o.class &&
500
+ name == o.name &&
501
+ url == o.url &&
502
+ ca_cert == o.ca_cert &&
503
+ client_cert == o.client_cert &&
504
+ client_key == o.client_key &&
505
+ tls_validation == o.tls_validation &&
506
+ proxy_url == o.proxy_url &&
507
+ proxy_username == o.proxy_username &&
508
+ proxy_password == o.proxy_password &&
509
+ username == o.username &&
510
+ password == o.password &&
511
+ pulp_labels == o.pulp_labels &&
512
+ download_concurrency == o.download_concurrency &&
513
+ max_retries == o.max_retries &&
514
+ policy == o.policy &&
515
+ total_timeout == o.total_timeout &&
516
+ connect_timeout == o.connect_timeout &&
517
+ sock_connect_timeout == o.sock_connect_timeout &&
518
+ sock_read_timeout == o.sock_read_timeout &&
519
+ headers == o.headers &&
520
+ rate_limit == o.rate_limit
521
+ end
522
+
523
+ # @see the `==` method
524
+ # @param [Object] Object to be compared
525
+ def eql?(o)
526
+ self == o
527
+ end
528
+
529
+ # Calculates hash code according to all attributes.
530
+ # @return [Integer] Hash code
531
+ def hash
532
+ [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit].hash
533
+ end
534
+
535
+ # Builds the object from hash
536
+ # @param [Hash] attributes Model attributes in the form of hash
537
+ # @return [Object] Returns the model itself
538
+ def self.build_from_hash(attributes)
539
+ new.build_from_hash(attributes)
540
+ end
541
+
542
+ # Builds the object from hash
543
+ # @param [Hash] attributes Model attributes in the form of hash
544
+ # @return [Object] Returns the model itself
545
+ def build_from_hash(attributes)
546
+ return nil unless attributes.is_a?(Hash)
547
+ self.class.openapi_types.each_pair do |key, type|
548
+ if type =~ /\AArray<(.*)>/i
549
+ # check to ensure the input is an array given that the attribute
550
+ # is documented as an array but the input is not
551
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
552
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
553
+ end
554
+ elsif !attributes[self.class.attribute_map[key]].nil?
555
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
556
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
557
+ end
558
+
559
+ self
560
+ end
561
+
562
+ # Deserializes the data based on type
563
+ # @param string type Data type
564
+ # @param string value Value to be deserialized
565
+ # @return [Object] Deserialized data
566
+ def _deserialize(type, value)
567
+ case type.to_sym
568
+ when :DateTime
569
+ DateTime.parse(value)
570
+ when :Date
571
+ Date.parse(value)
572
+ when :String
573
+ value.to_s
574
+ when :Integer
575
+ value.to_i
576
+ when :Float
577
+ value.to_f
578
+ when :Boolean
579
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
580
+ true
581
+ else
582
+ false
583
+ end
584
+ when :Object
585
+ # generic object (usually a Hash), return directly
586
+ value
587
+ when /\AArray<(?<inner_type>.+)>\z/
588
+ inner_type = Regexp.last_match[:inner_type]
589
+ value.map { |v| _deserialize(inner_type, v) }
590
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
591
+ k_type = Regexp.last_match[:k_type]
592
+ v_type = Regexp.last_match[:v_type]
593
+ {}.tap do |hash|
594
+ value.each do |k, v|
595
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
596
+ end
597
+ end
598
+ else # model
599
+ PulpcoreClient.const_get(type).build_from_hash(value)
600
+ end
601
+ end
602
+
603
+ # Returns the string representation of the object
604
+ # @return [String] String presentation of the object
605
+ def to_s
606
+ to_hash.to_s
607
+ end
608
+
609
+ # to_body is an alias to to_hash (backward compatibility)
610
+ # @return [Hash] Returns the object in the form of hash
611
+ def to_body
612
+ to_hash
613
+ end
614
+
615
+ # Returns the object in the form of hash
616
+ # @return [Hash] Returns the object in the form of hash
617
+ def to_hash
618
+ hash = {}
619
+ self.class.attribute_map.each_pair do |attr, param|
620
+ value = self.send(attr)
621
+ if value.nil?
622
+ is_nullable = self.class.openapi_nullable.include?(attr)
623
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
624
+ end
625
+
626
+ hash[param] = _to_hash(value)
627
+ end
628
+ hash
629
+ end
630
+
631
+ # Outputs non-array value in the form of hash
632
+ # For object, use to_hash. Otherwise, just return the value
633
+ # @param [Object] value Any valid value
634
+ # @return [Hash] Returns the value in the form of hash
635
+ def _to_hash(value)
636
+ if value.is_a?(Array)
637
+ value.compact.map { |v| _to_hash(v) }
638
+ elsif value.is_a?(Hash)
639
+ {}.tap do |hash|
640
+ value.each { |k, v| hash[k] = _to_hash(v) }
641
+ end
642
+ elsif value.respond_to? :to_hash
643
+ value.to_hash
644
+ else
645
+ value
646
+ end
647
+ end
648
+ end
649
+ end