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
@@ -19,12 +19,76 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Create a content
23
+ # Content viewset that supports POST and GET by default.
24
+ # @param multiple_artifact_content [MultipleArtifactContent]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [MultipleArtifactContentResponse]
27
+ def create(multiple_artifact_content, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(multiple_artifact_content, opts)
29
+ data
30
+ end
31
+
32
+ # Create a content
33
+ # Content viewset that supports POST and GET by default.
34
+ # @param multiple_artifact_content [MultipleArtifactContent]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(MultipleArtifactContentResponse, Integer, Hash)>] MultipleArtifactContentResponse data, response status code and response headers
37
+ def create_with_http_info(multiple_artifact_content, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ContentApi.create ...'
40
+ end
41
+ # verify the required parameter 'multiple_artifact_content' is set
42
+ if @api_client.config.client_side_validation && multiple_artifact_content.nil?
43
+ fail ArgumentError, "Missing the required parameter 'multiple_artifact_content' when calling ContentApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(multiple_artifact_content)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'MultipleArtifactContentResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: ContentApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
22
86
  # List content
23
- # Endpoint to list all content.
87
+ # Content viewset that supports POST and GET by default.
24
88
  # @param [Hash] opts the optional parameters
25
89
  # @option opts [Integer] :limit Number of results to return per page.
26
90
  # @option opts [Integer] :offset The initial index from which to return the results.
27
- # @option opts [String] :ordering Which field to use when ordering the results.
91
+ # @option opts [Array<String>] :ordering Ordering
28
92
  # @option opts [String] :repository_version Repository Version referenced by HREF
29
93
  # @option opts [String] :repository_version_added Repository Version referenced by HREF
30
94
  # @option opts [String] :repository_version_removed Repository Version referenced by HREF
@@ -37,11 +101,11 @@ module PulpcoreClient
37
101
  end
38
102
 
39
103
  # List content
40
- # Endpoint to list all content.
104
+ # Content viewset that supports POST and GET by default.
41
105
  # @param [Hash] opts the optional parameters
42
106
  # @option opts [Integer] :limit Number of results to return per page.
43
107
  # @option opts [Integer] :offset The initial index from which to return the results.
44
- # @option opts [String] :ordering Which field to use when ordering the results.
108
+ # @option opts [Array<String>] :ordering Ordering
45
109
  # @option opts [String] :repository_version Repository Version referenced by HREF
46
110
  # @option opts [String] :repository_version_added Repository Version referenced by HREF
47
111
  # @option opts [String] :repository_version_removed Repository Version referenced by HREF
@@ -52,6 +116,10 @@ module PulpcoreClient
52
116
  if @api_client.config.debugging
53
117
  @api_client.config.logger.debug 'Calling API: ContentApi.list ...'
54
118
  end
119
+ allowable_values = ["-pk", "pk"]
120
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
121
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
122
+ end
55
123
  # resource path
56
124
  local_var_path = '/pulp/api/v3/content/'
57
125
 
@@ -59,7 +127,7 @@ module PulpcoreClient
59
127
  query_params = opts[:query_params] || {}
60
128
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
61
129
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
62
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
130
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
63
131
  query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
64
132
  query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
65
133
  query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
@@ -98,5 +166,73 @@ module PulpcoreClient
98
166
  end
99
167
  return data, status_code, headers
100
168
  end
169
+
170
+ # Inspect a content
171
+ # Content viewset that supports POST and GET by default.
172
+ # @param content_href [String]
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :fields A list of fields to include in the response.
175
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
176
+ # @return [MultipleArtifactContentResponse]
177
+ def read(content_href, opts = {})
178
+ data, _status_code, _headers = read_with_http_info(content_href, opts)
179
+ data
180
+ end
181
+
182
+ # Inspect a content
183
+ # Content viewset that supports POST and GET by default.
184
+ # @param content_href [String]
185
+ # @param [Hash] opts the optional parameters
186
+ # @option opts [String] :fields A list of fields to include in the response.
187
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
188
+ # @return [Array<(MultipleArtifactContentResponse, Integer, Hash)>] MultipleArtifactContentResponse data, response status code and response headers
189
+ def read_with_http_info(content_href, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: ContentApi.read ...'
192
+ end
193
+ # verify the required parameter 'content_href' is set
194
+ if @api_client.config.client_side_validation && content_href.nil?
195
+ fail ArgumentError, "Missing the required parameter 'content_href' when calling ContentApi.read"
196
+ end
197
+ # resource path
198
+ local_var_path = '{content_href}'.sub('{' + 'content_href' + '}', CGI.escape(content_href.to_s).gsub('%2F', '/'))
199
+
200
+ # query parameters
201
+ query_params = opts[:query_params] || {}
202
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
203
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:body]
215
+
216
+ # return_type
217
+ return_type = opts[:return_type] || 'MultipleArtifactContentResponse'
218
+
219
+ # auth_names
220
+ auth_names = opts[:auth_names] || ['basicAuth']
221
+
222
+ new_options = opts.merge(
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: ContentApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
101
237
  end
102
238
  end
@@ -19,8 +19,132 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Create a content guard
23
+ # A viewset for contentguards.
24
+ # @param content_guard [ContentGuard]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ContentGuardResponse]
27
+ def create(content_guard, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(content_guard, opts)
29
+ data
30
+ end
31
+
32
+ # Create a content guard
33
+ # A viewset for contentguards.
34
+ # @param content_guard [ContentGuard]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
37
+ def create_with_http_info(content_guard, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ContentguardsApi.create ...'
40
+ end
41
+ # verify the required parameter 'content_guard' is set
42
+ if @api_client.config.client_side_validation && content_guard.nil?
43
+ fail ArgumentError, "Missing the required parameter 'content_guard' when calling ContentguardsApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/contentguards/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(content_guard)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'ContentGuardResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: ContentguardsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a content guard
87
+ # A viewset for contentguards.
88
+ # @param content_guard_href [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [nil]
91
+ def delete(content_guard_href, opts = {})
92
+ delete_with_http_info(content_guard_href, opts)
93
+ nil
94
+ end
95
+
96
+ # Delete a content guard
97
+ # A viewset for contentguards.
98
+ # @param content_guard_href [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def delete_with_http_info(content_guard_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: ContentguardsApi.delete ...'
104
+ end
105
+ # verify the required parameter 'content_guard_href' is set
106
+ if @api_client.config.client_side_validation && content_guard_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:body]
123
+
124
+ # return_type
125
+ return_type = opts[:return_type]
126
+
127
+ # auth_names
128
+ auth_names = opts[:auth_names] || ['basicAuth']
129
+
130
+ new_options = opts.merge(
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: ContentguardsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
22
146
  # List content guards
23
- # Endpoint to list all contentguards.
147
+ # A viewset for contentguards.
24
148
  # @param [Hash] opts the optional parameters
25
149
  # @option opts [Integer] :limit Number of results to return per page.
26
150
  # @option opts [String] :name
@@ -29,7 +153,7 @@ module PulpcoreClient
29
153
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
30
154
  # @option opts [String] :name__startswith Filter results where name starts with value
31
155
  # @option opts [Integer] :offset The initial index from which to return the results.
32
- # @option opts [String] :ordering Which field to use when ordering the results.
156
+ # @option opts [Array<String>] :ordering Ordering
33
157
  # @option opts [String] :fields A list of fields to include in the response.
34
158
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
35
159
  # @return [PaginatedContentGuardResponseList]
@@ -39,7 +163,7 @@ module PulpcoreClient
39
163
  end
40
164
 
41
165
  # List content guards
42
- # Endpoint to list all contentguards.
166
+ # A viewset for contentguards.
43
167
  # @param [Hash] opts the optional parameters
44
168
  # @option opts [Integer] :limit Number of results to return per page.
45
169
  # @option opts [String] :name
@@ -48,7 +172,7 @@ module PulpcoreClient
48
172
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
49
173
  # @option opts [String] :name__startswith Filter results where name starts with value
50
174
  # @option opts [Integer] :offset The initial index from which to return the results.
51
- # @option opts [String] :ordering Which field to use when ordering the results.
175
+ # @option opts [Array<String>] :ordering Ordering
52
176
  # @option opts [String] :fields A list of fields to include in the response.
53
177
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
54
178
  # @return [Array<(PaginatedContentGuardResponseList, Integer, Hash)>] PaginatedContentGuardResponseList data, response status code and response headers
@@ -56,6 +180,10 @@ module PulpcoreClient
56
180
  if @api_client.config.debugging
57
181
  @api_client.config.logger.debug 'Calling API: ContentguardsApi.list ...'
58
182
  end
183
+ allowable_values = ["-basedistribution", "-certguard_rhsmcertguard", "-certguard_x509certguard", "-core_contentredirectcontentguard", "-core_rbaccontentguard", "-description", "-distribution", "-group_roles", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-user_roles", "basedistribution", "certguard_rhsmcertguard", "certguard_x509certguard", "core_contentredirectcontentguard", "core_rbaccontentguard", "description", "distribution", "group_roles", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "user_roles"]
184
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
185
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
186
+ end
59
187
  # resource path
60
188
  local_var_path = '/pulp/api/v3/contentguards/'
61
189
 
@@ -68,7 +196,7 @@ module PulpcoreClient
68
196
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
69
197
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
70
198
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
71
- query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
199
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
72
200
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
73
201
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
74
202
 
@@ -104,5 +232,213 @@ module PulpcoreClient
104
232
  end
105
233
  return data, status_code, headers
106
234
  end
235
+
236
+ # Update a content guard
237
+ # A viewset for contentguards.
238
+ # @param content_guard_href [String]
239
+ # @param patched_content_guard [PatchedContentGuard]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [ContentGuardResponse]
242
+ def partial_update(content_guard_href, patched_content_guard, opts = {})
243
+ data, _status_code, _headers = partial_update_with_http_info(content_guard_href, patched_content_guard, opts)
244
+ data
245
+ end
246
+
247
+ # Update a content guard
248
+ # A viewset for contentguards.
249
+ # @param content_guard_href [String]
250
+ # @param patched_content_guard [PatchedContentGuard]
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
253
+ def partial_update_with_http_info(content_guard_href, patched_content_guard, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: ContentguardsApi.partial_update ...'
256
+ end
257
+ # verify the required parameter 'content_guard_href' is set
258
+ if @api_client.config.client_side_validation && content_guard_href.nil?
259
+ fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.partial_update"
260
+ end
261
+ # verify the required parameter 'patched_content_guard' is set
262
+ if @api_client.config.client_side_validation && patched_content_guard.nil?
263
+ fail ArgumentError, "Missing the required parameter 'patched_content_guard' when calling ContentguardsApi.partial_update"
264
+ end
265
+ # resource path
266
+ local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
267
+
268
+ # query parameters
269
+ query_params = opts[:query_params] || {}
270
+
271
+ # header parameters
272
+ header_params = opts[:header_params] || {}
273
+ # HTTP header 'Accept' (if needed)
274
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
275
+ # HTTP header 'Content-Type'
276
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:body] || @api_client.object_to_http_body(patched_content_guard)
283
+
284
+ # return_type
285
+ return_type = opts[:return_type] || 'ContentGuardResponse'
286
+
287
+ # auth_names
288
+ auth_names = opts[:auth_names] || ['basicAuth']
289
+
290
+ new_options = opts.merge(
291
+ :header_params => header_params,
292
+ :query_params => query_params,
293
+ :form_params => form_params,
294
+ :body => post_body,
295
+ :auth_names => auth_names,
296
+ :return_type => return_type
297
+ )
298
+
299
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: ContentguardsApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+
306
+ # Inspect a content guard
307
+ # A viewset for contentguards.
308
+ # @param content_guard_href [String]
309
+ # @param [Hash] opts the optional parameters
310
+ # @option opts [String] :fields A list of fields to include in the response.
311
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
312
+ # @return [ContentGuardResponse]
313
+ def read(content_guard_href, opts = {})
314
+ data, _status_code, _headers = read_with_http_info(content_guard_href, opts)
315
+ data
316
+ end
317
+
318
+ # Inspect a content guard
319
+ # A viewset for contentguards.
320
+ # @param content_guard_href [String]
321
+ # @param [Hash] opts the optional parameters
322
+ # @option opts [String] :fields A list of fields to include in the response.
323
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
324
+ # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
325
+ def read_with_http_info(content_guard_href, opts = {})
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug 'Calling API: ContentguardsApi.read ...'
328
+ end
329
+ # verify the required parameter 'content_guard_href' is set
330
+ if @api_client.config.client_side_validation && content_guard_href.nil?
331
+ fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.read"
332
+ end
333
+ # resource path
334
+ local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
335
+
336
+ # query parameters
337
+ query_params = opts[:query_params] || {}
338
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
339
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
340
+
341
+ # header parameters
342
+ header_params = opts[:header_params] || {}
343
+ # HTTP header 'Accept' (if needed)
344
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
345
+
346
+ # form parameters
347
+ form_params = opts[:form_params] || {}
348
+
349
+ # http body (model)
350
+ post_body = opts[:body]
351
+
352
+ # return_type
353
+ return_type = opts[:return_type] || 'ContentGuardResponse'
354
+
355
+ # auth_names
356
+ auth_names = opts[:auth_names] || ['basicAuth']
357
+
358
+ new_options = opts.merge(
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type
365
+ )
366
+
367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: ContentguardsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+
374
+ # Update a content guard
375
+ # A viewset for contentguards.
376
+ # @param content_guard_href [String]
377
+ # @param content_guard [ContentGuard]
378
+ # @param [Hash] opts the optional parameters
379
+ # @return [ContentGuardResponse]
380
+ def update(content_guard_href, content_guard, opts = {})
381
+ data, _status_code, _headers = update_with_http_info(content_guard_href, content_guard, opts)
382
+ data
383
+ end
384
+
385
+ # Update a content guard
386
+ # A viewset for contentguards.
387
+ # @param content_guard_href [String]
388
+ # @param content_guard [ContentGuard]
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
391
+ def update_with_http_info(content_guard_href, content_guard, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: ContentguardsApi.update ...'
394
+ end
395
+ # verify the required parameter 'content_guard_href' is set
396
+ if @api_client.config.client_side_validation && content_guard_href.nil?
397
+ fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.update"
398
+ end
399
+ # verify the required parameter 'content_guard' is set
400
+ if @api_client.config.client_side_validation && content_guard.nil?
401
+ fail ArgumentError, "Missing the required parameter 'content_guard' when calling ContentguardsApi.update"
402
+ end
403
+ # resource path
404
+ local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
405
+
406
+ # query parameters
407
+ query_params = opts[:query_params] || {}
408
+
409
+ # header parameters
410
+ header_params = opts[:header_params] || {}
411
+ # HTTP header 'Accept' (if needed)
412
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
413
+ # HTTP header 'Content-Type'
414
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
415
+
416
+ # form parameters
417
+ form_params = opts[:form_params] || {}
418
+
419
+ # http body (model)
420
+ post_body = opts[:body] || @api_client.object_to_http_body(content_guard)
421
+
422
+ # return_type
423
+ return_type = opts[:return_type] || 'ContentGuardResponse'
424
+
425
+ # auth_names
426
+ auth_names = opts[:auth_names] || ['basicAuth']
427
+
428
+ new_options = opts.merge(
429
+ :header_params => header_params,
430
+ :query_params => query_params,
431
+ :form_params => form_params,
432
+ :body => post_body,
433
+ :auth_names => auth_names,
434
+ :return_type => return_type
435
+ )
436
+
437
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug "API called: ContentguardsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ end
441
+ return data, status_code, headers
442
+ end
107
443
  end
108
444
  end