pulpcore-client 3.84.0__py3-none-any.whl → 3.85.0__py3-none-any.whl

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.

Potentially problematic release.


This version of pulpcore-client might be problematic. Click here for more details.

Files changed (83) hide show
  1. pulpcore/client/pulpcore/__init__.py +4 -1
  2. pulpcore/client/pulpcore/api/__init__.py +1 -0
  3. pulpcore/client/pulpcore/api/vuln_report_api.py +959 -0
  4. pulpcore/client/pulpcore/api_client.py +1 -1
  5. pulpcore/client/pulpcore/configuration.py +1 -1
  6. pulpcore/client/pulpcore/models/__init__.py +2 -0
  7. pulpcore/client/pulpcore/models/artifact_distribution_response.py +17 -17
  8. pulpcore/client/pulpcore/models/filesystem_export_response.py +0 -2
  9. pulpcore/client/pulpcore/models/generic_remote_response.py +1 -3
  10. pulpcore/client/pulpcore/models/group_role_response.py +0 -2
  11. pulpcore/client/pulpcore/models/multiple_artifact_content_response.py +5 -1
  12. pulpcore/client/pulpcore/models/nested_open_pgp_public_subkey_response.py +0 -2
  13. pulpcore/client/pulpcore/models/nested_open_pgp_signature.py +1 -1
  14. pulpcore/client/pulpcore/models/nested_open_pgp_signature_response.py +2 -3
  15. pulpcore/client/pulpcore/models/nested_open_pgp_user_attribute_response.py +0 -2
  16. pulpcore/client/pulpcore/models/nested_open_pgp_user_id_response.py +0 -2
  17. pulpcore/client/pulpcore/models/open_pgp_keyring.py +2 -2
  18. pulpcore/client/pulpcore/models/open_pgp_keyring_response.py +2 -3
  19. pulpcore/client/pulpcore/models/open_pgp_public_key_response.py +4 -6
  20. pulpcore/client/pulpcore/models/open_pgp_public_subkey_response.py +4 -2
  21. pulpcore/client/pulpcore/models/open_pgp_signature_response.py +6 -3
  22. pulpcore/client/pulpcore/models/open_pgp_user_attribute_response.py +4 -2
  23. pulpcore/client/pulpcore/models/open_pgp_user_id_response.py +4 -2
  24. pulpcore/client/pulpcore/models/orphans_cleanup.py +2 -3
  25. pulpcore/client/pulpcore/models/paginated_access_policy_response_list.py +0 -10
  26. pulpcore/client/pulpcore/models/paginated_artifact_distribution_response_list.py +0 -10
  27. pulpcore/client/pulpcore/models/paginated_artifact_response_list.py +0 -10
  28. pulpcore/client/pulpcore/models/paginated_composite_content_guard_response_list.py +0 -10
  29. pulpcore/client/pulpcore/models/paginated_content_guard_response_list.py +0 -10
  30. pulpcore/client/pulpcore/models/paginated_content_redirect_content_guard_response_list.py +0 -10
  31. pulpcore/client/pulpcore/models/paginated_distribution_response_list.py +0 -10
  32. pulpcore/client/pulpcore/models/paginated_domain_response_list.py +0 -10
  33. pulpcore/client/pulpcore/models/paginated_filesystem_export_response_list.py +0 -10
  34. pulpcore/client/pulpcore/models/paginated_filesystem_exporter_response_list.py +0 -10
  35. pulpcore/client/pulpcore/models/paginated_generic_remote_response_list.py +0 -10
  36. pulpcore/client/pulpcore/models/paginated_group_response_list.py +0 -10
  37. pulpcore/client/pulpcore/models/paginated_group_role_response_list.py +0 -10
  38. pulpcore/client/pulpcore/models/paginated_group_user_response_list.py +0 -10
  39. pulpcore/client/pulpcore/models/paginated_header_content_guard_response_list.py +0 -10
  40. pulpcore/client/pulpcore/models/paginated_import_response_list.py +0 -10
  41. pulpcore/client/pulpcore/models/paginated_multiple_artifact_content_response_list.py +0 -10
  42. pulpcore/client/pulpcore/models/paginated_open_pgp_distribution_response_list.py +0 -10
  43. pulpcore/client/pulpcore/models/paginated_open_pgp_keyring_response_list.py +0 -10
  44. pulpcore/client/pulpcore/models/paginated_open_pgp_public_key_response_list.py +0 -10
  45. pulpcore/client/pulpcore/models/paginated_open_pgp_public_subkey_response_list.py +0 -10
  46. pulpcore/client/pulpcore/models/paginated_open_pgp_signature_response_list.py +0 -10
  47. pulpcore/client/pulpcore/models/paginated_open_pgp_user_attribute_response_list.py +0 -10
  48. pulpcore/client/pulpcore/models/paginated_open_pgp_user_id_response_list.py +0 -10
  49. pulpcore/client/pulpcore/models/paginated_publication_response_list.py +0 -10
  50. pulpcore/client/pulpcore/models/paginated_pulp_export_response_list.py +0 -10
  51. pulpcore/client/pulpcore/models/paginated_pulp_exporter_response_list.py +0 -10
  52. pulpcore/client/pulpcore/models/paginated_pulp_importer_response_list.py +0 -10
  53. pulpcore/client/pulpcore/models/paginated_rbac_content_guard_response_list.py +0 -10
  54. pulpcore/client/pulpcore/models/paginated_repository_response_list.py +0 -10
  55. pulpcore/client/pulpcore/models/paginated_repository_version_response_list.py +0 -10
  56. pulpcore/client/pulpcore/models/paginated_role_response_list.py +0 -10
  57. pulpcore/client/pulpcore/models/paginated_signing_service_response_list.py +0 -10
  58. pulpcore/client/pulpcore/models/paginated_task_group_response_list.py +0 -10
  59. pulpcore/client/pulpcore/models/paginated_task_response_list.py +0 -10
  60. pulpcore/client/pulpcore/models/paginated_task_schedule_response_list.py +0 -10
  61. pulpcore/client/pulpcore/models/paginated_upload_response_list.py +0 -10
  62. pulpcore/client/pulpcore/models/paginated_upstream_pulp_response_list.py +0 -10
  63. pulpcore/client/pulpcore/models/paginated_user_response_list.py +0 -10
  64. pulpcore/client/pulpcore/models/paginated_user_role_response_list.py +0 -10
  65. pulpcore/client/pulpcore/models/paginated_vulnerability_report_response_list.py +102 -0
  66. pulpcore/client/pulpcore/models/paginated_worker_response_list.py +0 -10
  67. pulpcore/client/pulpcore/models/patched_open_pgp_keyring.py +2 -2
  68. pulpcore/client/pulpcore/models/pulp_export_response.py +0 -2
  69. pulpcore/client/pulpcore/models/rbac_content_guard_response.py +0 -4
  70. pulpcore/client/pulpcore/models/repository_response.py +2 -3
  71. pulpcore/client/pulpcore/models/repository_version_response.py +6 -2
  72. pulpcore/client/pulpcore/models/storage_response.py +4 -5
  73. pulpcore/client/pulpcore/models/task_group_response.py +0 -4
  74. pulpcore/client/pulpcore/models/task_response.py +0 -8
  75. pulpcore/client/pulpcore/models/upload_detail_response.py +0 -2
  76. pulpcore/client/pulpcore/models/upstream_pulp_response.py +0 -2
  77. pulpcore/client/pulpcore/models/user_response.py +0 -4
  78. pulpcore/client/pulpcore/models/user_role_response.py +0 -2
  79. pulpcore/client/pulpcore/models/vulnerability_report_response.py +116 -0
  80. {pulpcore_client-3.84.0.dist-info → pulpcore_client-3.85.0.dist-info}/METADATA +1 -1
  81. {pulpcore_client-3.84.0.dist-info → pulpcore_client-3.85.0.dist-info}/RECORD +83 -80
  82. {pulpcore_client-3.84.0.dist-info → pulpcore_client-3.85.0.dist-info}/WHEEL +0 -0
  83. {pulpcore_client-3.84.0.dist-info → pulpcore_client-3.85.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,959 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictInt, StrictStr
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from pulpcore.client.pulpcore.models.paginated_vulnerability_report_response_list import PaginatedVulnerabilityReportResponseList
24
+ from pulpcore.client.pulpcore.models.vulnerability_report_response import VulnerabilityReportResponse
25
+
26
+ from pulpcore.client.pulpcore.api_client import ApiClient, RequestSerialized
27
+ from pulpcore.client.pulpcore.api_response import ApiResponse
28
+ from pulpcore.client.pulpcore.rest import RESTResponseType
29
+
30
+
31
+ class VulnReportApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def delete(
46
+ self,
47
+ vulnerability_report_href: StrictStr,
48
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> None:
62
+ """Delete a vulnerability report
63
+
64
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
65
+
66
+ :param vulnerability_report_href: (required)
67
+ :type vulnerability_report_href: str
68
+ :param x_task_diagnostics: List of profilers to use on tasks.
69
+ :type x_task_diagnostics: List[str]
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._delete_serialize(
93
+ vulnerability_report_href=vulnerability_report_href,
94
+ x_task_diagnostics=x_task_diagnostics,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '204': None,
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def delete_with_http_info(
117
+ self,
118
+ vulnerability_report_href: StrictStr,
119
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[None]:
133
+ """Delete a vulnerability report
134
+
135
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
136
+
137
+ :param vulnerability_report_href: (required)
138
+ :type vulnerability_report_href: str
139
+ :param x_task_diagnostics: List of profilers to use on tasks.
140
+ :type x_task_diagnostics: List[str]
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._delete_serialize(
164
+ vulnerability_report_href=vulnerability_report_href,
165
+ x_task_diagnostics=x_task_diagnostics,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '204': None,
174
+ }
175
+ response_data = self.api_client.call_api(
176
+ *_param,
177
+ _request_timeout=_request_timeout
178
+ )
179
+ response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+
186
+ @validate_call
187
+ def delete_without_preload_content(
188
+ self,
189
+ vulnerability_report_href: StrictStr,
190
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Annotated[StrictFloat, Field(gt=0)]
197
+ ]
198
+ ] = None,
199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
200
+ _content_type: Optional[StrictStr] = None,
201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
203
+ ) -> RESTResponseType:
204
+ """Delete a vulnerability report
205
+
206
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
207
+
208
+ :param vulnerability_report_href: (required)
209
+ :type vulnerability_report_href: str
210
+ :param x_task_diagnostics: List of profilers to use on tasks.
211
+ :type x_task_diagnostics: List[str]
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._delete_serialize(
235
+ vulnerability_report_href=vulnerability_report_href,
236
+ x_task_diagnostics=x_task_diagnostics,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '204': None,
245
+ }
246
+ response_data = self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _delete_serialize(
254
+ self,
255
+ vulnerability_report_href,
256
+ x_task_diagnostics,
257
+ _request_auth,
258
+ _content_type,
259
+ _headers,
260
+ _host_index,
261
+ ) -> RequestSerialized:
262
+
263
+ _host = None
264
+
265
+ _collection_formats: Dict[str, str] = {
266
+ 'X-Task-Diagnostics': 'csv',
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ if vulnerability_report_href is not None:
280
+ _path_params['vulnerability_report_href'] = vulnerability_report_href
281
+ # process the query parameters
282
+ # process the header parameters
283
+ if x_task_diagnostics is not None:
284
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
285
+ # process the form parameters
286
+ # process the body parameter
287
+
288
+
289
+
290
+
291
+ # authentication setting
292
+ _auth_settings: List[str] = [
293
+ 'basicAuth',
294
+ 'cookieAuth'
295
+ ]
296
+
297
+ return self.api_client.param_serialize(
298
+ method='DELETE',
299
+ resource_path='{vulnerability_report_href}',
300
+ path_params=_path_params,
301
+ query_params=_query_params,
302
+ header_params=_header_params,
303
+ body=_body_params,
304
+ post_params=_form_params,
305
+ files=_files,
306
+ auth_settings=_auth_settings,
307
+ collection_formats=_collection_formats,
308
+ _host=_host,
309
+ _request_auth=_request_auth
310
+ )
311
+
312
+
313
+
314
+
315
+ @validate_call
316
+ def list(
317
+ self,
318
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
319
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
320
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
321
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
322
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
323
+ _request_timeout: Union[
324
+ None,
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Tuple[
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Annotated[StrictFloat, Field(gt=0)]
329
+ ]
330
+ ] = None,
331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
332
+ _content_type: Optional[StrictStr] = None,
333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
335
+ ) -> PaginatedVulnerabilityReportResponseList:
336
+ """List vulnerability reports
337
+
338
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
339
+
340
+ :param x_task_diagnostics: List of profilers to use on tasks.
341
+ :type x_task_diagnostics: List[str]
342
+ :param limit: Number of results to return per page.
343
+ :type limit: int
344
+ :param offset: The initial index from which to return the results.
345
+ :type offset: int
346
+ :param fields: A list of fields to include in the response.
347
+ :type fields: List[str]
348
+ :param exclude_fields: A list of fields to exclude from the response.
349
+ :type exclude_fields: List[str]
350
+ :param _request_timeout: timeout setting for this request. If one
351
+ number provided, it will be total request
352
+ timeout. It can also be a pair (tuple) of
353
+ (connection, read) timeouts.
354
+ :type _request_timeout: int, tuple(int, int), optional
355
+ :param _request_auth: set to override the auth_settings for an a single
356
+ request; this effectively ignores the
357
+ authentication in the spec for a single request.
358
+ :type _request_auth: dict, optional
359
+ :param _content_type: force content-type for the request.
360
+ :type _content_type: str, Optional
361
+ :param _headers: set to override the headers for a single
362
+ request; this effectively ignores the headers
363
+ in the spec for a single request.
364
+ :type _headers: dict, optional
365
+ :param _host_index: set to override the host_index for a single
366
+ request; this effectively ignores the host_index
367
+ in the spec for a single request.
368
+ :type _host_index: int, optional
369
+ :return: Returns the result object.
370
+ """ # noqa: E501
371
+
372
+ _param = self._list_serialize(
373
+ x_task_diagnostics=x_task_diagnostics,
374
+ limit=limit,
375
+ offset=offset,
376
+ fields=fields,
377
+ exclude_fields=exclude_fields,
378
+ _request_auth=_request_auth,
379
+ _content_type=_content_type,
380
+ _headers=_headers,
381
+ _host_index=_host_index
382
+ )
383
+
384
+ _response_types_map: Dict[str, Optional[str]] = {
385
+ '200': "PaginatedVulnerabilityReportResponseList",
386
+ }
387
+ response_data = self.api_client.call_api(
388
+ *_param,
389
+ _request_timeout=_request_timeout
390
+ )
391
+ response_data.read()
392
+ return self.api_client.response_deserialize(
393
+ response_data=response_data,
394
+ response_types_map=_response_types_map,
395
+ ).data
396
+
397
+
398
+ @validate_call
399
+ def list_with_http_info(
400
+ self,
401
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
402
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
403
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
404
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
405
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
406
+ _request_timeout: Union[
407
+ None,
408
+ Annotated[StrictFloat, Field(gt=0)],
409
+ Tuple[
410
+ Annotated[StrictFloat, Field(gt=0)],
411
+ Annotated[StrictFloat, Field(gt=0)]
412
+ ]
413
+ ] = None,
414
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
415
+ _content_type: Optional[StrictStr] = None,
416
+ _headers: Optional[Dict[StrictStr, Any]] = None,
417
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
418
+ ) -> ApiResponse[PaginatedVulnerabilityReportResponseList]:
419
+ """List vulnerability reports
420
+
421
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
422
+
423
+ :param x_task_diagnostics: List of profilers to use on tasks.
424
+ :type x_task_diagnostics: List[str]
425
+ :param limit: Number of results to return per page.
426
+ :type limit: int
427
+ :param offset: The initial index from which to return the results.
428
+ :type offset: int
429
+ :param fields: A list of fields to include in the response.
430
+ :type fields: List[str]
431
+ :param exclude_fields: A list of fields to exclude from the response.
432
+ :type exclude_fields: List[str]
433
+ :param _request_timeout: timeout setting for this request. If one
434
+ number provided, it will be total request
435
+ timeout. It can also be a pair (tuple) of
436
+ (connection, read) timeouts.
437
+ :type _request_timeout: int, tuple(int, int), optional
438
+ :param _request_auth: set to override the auth_settings for an a single
439
+ request; this effectively ignores the
440
+ authentication in the spec for a single request.
441
+ :type _request_auth: dict, optional
442
+ :param _content_type: force content-type for the request.
443
+ :type _content_type: str, Optional
444
+ :param _headers: set to override the headers for a single
445
+ request; this effectively ignores the headers
446
+ in the spec for a single request.
447
+ :type _headers: dict, optional
448
+ :param _host_index: set to override the host_index for a single
449
+ request; this effectively ignores the host_index
450
+ in the spec for a single request.
451
+ :type _host_index: int, optional
452
+ :return: Returns the result object.
453
+ """ # noqa: E501
454
+
455
+ _param = self._list_serialize(
456
+ x_task_diagnostics=x_task_diagnostics,
457
+ limit=limit,
458
+ offset=offset,
459
+ fields=fields,
460
+ exclude_fields=exclude_fields,
461
+ _request_auth=_request_auth,
462
+ _content_type=_content_type,
463
+ _headers=_headers,
464
+ _host_index=_host_index
465
+ )
466
+
467
+ _response_types_map: Dict[str, Optional[str]] = {
468
+ '200': "PaginatedVulnerabilityReportResponseList",
469
+ }
470
+ response_data = self.api_client.call_api(
471
+ *_param,
472
+ _request_timeout=_request_timeout
473
+ )
474
+ response_data.read()
475
+ return self.api_client.response_deserialize(
476
+ response_data=response_data,
477
+ response_types_map=_response_types_map,
478
+ )
479
+
480
+
481
+ @validate_call
482
+ def list_without_preload_content(
483
+ self,
484
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
485
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
486
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
487
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
488
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
489
+ _request_timeout: Union[
490
+ None,
491
+ Annotated[StrictFloat, Field(gt=0)],
492
+ Tuple[
493
+ Annotated[StrictFloat, Field(gt=0)],
494
+ Annotated[StrictFloat, Field(gt=0)]
495
+ ]
496
+ ] = None,
497
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
498
+ _content_type: Optional[StrictStr] = None,
499
+ _headers: Optional[Dict[StrictStr, Any]] = None,
500
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
501
+ ) -> RESTResponseType:
502
+ """List vulnerability reports
503
+
504
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
505
+
506
+ :param x_task_diagnostics: List of profilers to use on tasks.
507
+ :type x_task_diagnostics: List[str]
508
+ :param limit: Number of results to return per page.
509
+ :type limit: int
510
+ :param offset: The initial index from which to return the results.
511
+ :type offset: int
512
+ :param fields: A list of fields to include in the response.
513
+ :type fields: List[str]
514
+ :param exclude_fields: A list of fields to exclude from the response.
515
+ :type exclude_fields: List[str]
516
+ :param _request_timeout: timeout setting for this request. If one
517
+ number provided, it will be total request
518
+ timeout. It can also be a pair (tuple) of
519
+ (connection, read) timeouts.
520
+ :type _request_timeout: int, tuple(int, int), optional
521
+ :param _request_auth: set to override the auth_settings for an a single
522
+ request; this effectively ignores the
523
+ authentication in the spec for a single request.
524
+ :type _request_auth: dict, optional
525
+ :param _content_type: force content-type for the request.
526
+ :type _content_type: str, Optional
527
+ :param _headers: set to override the headers for a single
528
+ request; this effectively ignores the headers
529
+ in the spec for a single request.
530
+ :type _headers: dict, optional
531
+ :param _host_index: set to override the host_index for a single
532
+ request; this effectively ignores the host_index
533
+ in the spec for a single request.
534
+ :type _host_index: int, optional
535
+ :return: Returns the result object.
536
+ """ # noqa: E501
537
+
538
+ _param = self._list_serialize(
539
+ x_task_diagnostics=x_task_diagnostics,
540
+ limit=limit,
541
+ offset=offset,
542
+ fields=fields,
543
+ exclude_fields=exclude_fields,
544
+ _request_auth=_request_auth,
545
+ _content_type=_content_type,
546
+ _headers=_headers,
547
+ _host_index=_host_index
548
+ )
549
+
550
+ _response_types_map: Dict[str, Optional[str]] = {
551
+ '200': "PaginatedVulnerabilityReportResponseList",
552
+ }
553
+ response_data = self.api_client.call_api(
554
+ *_param,
555
+ _request_timeout=_request_timeout
556
+ )
557
+ return response_data.response
558
+
559
+
560
+ def _list_serialize(
561
+ self,
562
+ x_task_diagnostics,
563
+ limit,
564
+ offset,
565
+ fields,
566
+ exclude_fields,
567
+ _request_auth,
568
+ _content_type,
569
+ _headers,
570
+ _host_index,
571
+ ) -> RequestSerialized:
572
+
573
+ _host = None
574
+
575
+ _collection_formats: Dict[str, str] = {
576
+ 'X-Task-Diagnostics': 'csv',
577
+ 'fields': 'multi',
578
+ 'exclude_fields': 'multi',
579
+ }
580
+
581
+ _path_params: Dict[str, str] = {}
582
+ _query_params: List[Tuple[str, str]] = []
583
+ _header_params: Dict[str, Optional[str]] = _headers or {}
584
+ _form_params: List[Tuple[str, str]] = []
585
+ _files: Dict[
586
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
587
+ ] = {}
588
+ _body_params: Optional[bytes] = None
589
+
590
+ # process the path parameters
591
+ # process the query parameters
592
+ if limit is not None:
593
+
594
+ _query_params.append(('limit', limit))
595
+
596
+ if offset is not None:
597
+
598
+ _query_params.append(('offset', offset))
599
+
600
+ if fields is not None:
601
+
602
+ _query_params.append(('fields', fields))
603
+
604
+ if exclude_fields is not None:
605
+
606
+ _query_params.append(('exclude_fields', exclude_fields))
607
+
608
+ # process the header parameters
609
+ if x_task_diagnostics is not None:
610
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
611
+ # process the form parameters
612
+ # process the body parameter
613
+
614
+
615
+ # set the HTTP header `Accept`
616
+ if 'Accept' not in _header_params:
617
+ _header_params['Accept'] = self.api_client.select_header_accept(
618
+ [
619
+ 'application/json'
620
+ ]
621
+ )
622
+
623
+
624
+ # authentication setting
625
+ _auth_settings: List[str] = [
626
+ 'basicAuth',
627
+ 'cookieAuth'
628
+ ]
629
+
630
+ return self.api_client.param_serialize(
631
+ method='GET',
632
+ resource_path='/pulp/api/v3/vuln_report/',
633
+ path_params=_path_params,
634
+ query_params=_query_params,
635
+ header_params=_header_params,
636
+ body=_body_params,
637
+ post_params=_form_params,
638
+ files=_files,
639
+ auth_settings=_auth_settings,
640
+ collection_formats=_collection_formats,
641
+ _host=_host,
642
+ _request_auth=_request_auth
643
+ )
644
+
645
+
646
+
647
+
648
+ @validate_call
649
+ def read(
650
+ self,
651
+ vulnerability_report_href: StrictStr,
652
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
653
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
654
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
655
+ _request_timeout: Union[
656
+ None,
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Tuple[
659
+ Annotated[StrictFloat, Field(gt=0)],
660
+ Annotated[StrictFloat, Field(gt=0)]
661
+ ]
662
+ ] = None,
663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
664
+ _content_type: Optional[StrictStr] = None,
665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
667
+ ) -> VulnerabilityReportResponse:
668
+ """Inspect a vulnerability report
669
+
670
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
671
+
672
+ :param vulnerability_report_href: (required)
673
+ :type vulnerability_report_href: str
674
+ :param x_task_diagnostics: List of profilers to use on tasks.
675
+ :type x_task_diagnostics: List[str]
676
+ :param fields: A list of fields to include in the response.
677
+ :type fields: List[str]
678
+ :param exclude_fields: A list of fields to exclude from the response.
679
+ :type exclude_fields: List[str]
680
+ :param _request_timeout: timeout setting for this request. If one
681
+ number provided, it will be total request
682
+ timeout. It can also be a pair (tuple) of
683
+ (connection, read) timeouts.
684
+ :type _request_timeout: int, tuple(int, int), optional
685
+ :param _request_auth: set to override the auth_settings for an a single
686
+ request; this effectively ignores the
687
+ authentication in the spec for a single request.
688
+ :type _request_auth: dict, optional
689
+ :param _content_type: force content-type for the request.
690
+ :type _content_type: str, Optional
691
+ :param _headers: set to override the headers for a single
692
+ request; this effectively ignores the headers
693
+ in the spec for a single request.
694
+ :type _headers: dict, optional
695
+ :param _host_index: set to override the host_index for a single
696
+ request; this effectively ignores the host_index
697
+ in the spec for a single request.
698
+ :type _host_index: int, optional
699
+ :return: Returns the result object.
700
+ """ # noqa: E501
701
+
702
+ _param = self._read_serialize(
703
+ vulnerability_report_href=vulnerability_report_href,
704
+ x_task_diagnostics=x_task_diagnostics,
705
+ fields=fields,
706
+ exclude_fields=exclude_fields,
707
+ _request_auth=_request_auth,
708
+ _content_type=_content_type,
709
+ _headers=_headers,
710
+ _host_index=_host_index
711
+ )
712
+
713
+ _response_types_map: Dict[str, Optional[str]] = {
714
+ '200': "VulnerabilityReportResponse",
715
+ }
716
+ response_data = self.api_client.call_api(
717
+ *_param,
718
+ _request_timeout=_request_timeout
719
+ )
720
+ response_data.read()
721
+ return self.api_client.response_deserialize(
722
+ response_data=response_data,
723
+ response_types_map=_response_types_map,
724
+ ).data
725
+
726
+
727
+ @validate_call
728
+ def read_with_http_info(
729
+ self,
730
+ vulnerability_report_href: StrictStr,
731
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
732
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
733
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
734
+ _request_timeout: Union[
735
+ None,
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Tuple[
738
+ Annotated[StrictFloat, Field(gt=0)],
739
+ Annotated[StrictFloat, Field(gt=0)]
740
+ ]
741
+ ] = None,
742
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
743
+ _content_type: Optional[StrictStr] = None,
744
+ _headers: Optional[Dict[StrictStr, Any]] = None,
745
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
746
+ ) -> ApiResponse[VulnerabilityReportResponse]:
747
+ """Inspect a vulnerability report
748
+
749
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
750
+
751
+ :param vulnerability_report_href: (required)
752
+ :type vulnerability_report_href: str
753
+ :param x_task_diagnostics: List of profilers to use on tasks.
754
+ :type x_task_diagnostics: List[str]
755
+ :param fields: A list of fields to include in the response.
756
+ :type fields: List[str]
757
+ :param exclude_fields: A list of fields to exclude from the response.
758
+ :type exclude_fields: List[str]
759
+ :param _request_timeout: timeout setting for this request. If one
760
+ number provided, it will be total request
761
+ timeout. It can also be a pair (tuple) of
762
+ (connection, read) timeouts.
763
+ :type _request_timeout: int, tuple(int, int), optional
764
+ :param _request_auth: set to override the auth_settings for an a single
765
+ request; this effectively ignores the
766
+ authentication in the spec for a single request.
767
+ :type _request_auth: dict, optional
768
+ :param _content_type: force content-type for the request.
769
+ :type _content_type: str, Optional
770
+ :param _headers: set to override the headers for a single
771
+ request; this effectively ignores the headers
772
+ in the spec for a single request.
773
+ :type _headers: dict, optional
774
+ :param _host_index: set to override the host_index for a single
775
+ request; this effectively ignores the host_index
776
+ in the spec for a single request.
777
+ :type _host_index: int, optional
778
+ :return: Returns the result object.
779
+ """ # noqa: E501
780
+
781
+ _param = self._read_serialize(
782
+ vulnerability_report_href=vulnerability_report_href,
783
+ x_task_diagnostics=x_task_diagnostics,
784
+ fields=fields,
785
+ exclude_fields=exclude_fields,
786
+ _request_auth=_request_auth,
787
+ _content_type=_content_type,
788
+ _headers=_headers,
789
+ _host_index=_host_index
790
+ )
791
+
792
+ _response_types_map: Dict[str, Optional[str]] = {
793
+ '200': "VulnerabilityReportResponse",
794
+ }
795
+ response_data = self.api_client.call_api(
796
+ *_param,
797
+ _request_timeout=_request_timeout
798
+ )
799
+ response_data.read()
800
+ return self.api_client.response_deserialize(
801
+ response_data=response_data,
802
+ response_types_map=_response_types_map,
803
+ )
804
+
805
+
806
+ @validate_call
807
+ def read_without_preload_content(
808
+ self,
809
+ vulnerability_report_href: StrictStr,
810
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
811
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
812
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
813
+ _request_timeout: Union[
814
+ None,
815
+ Annotated[StrictFloat, Field(gt=0)],
816
+ Tuple[
817
+ Annotated[StrictFloat, Field(gt=0)],
818
+ Annotated[StrictFloat, Field(gt=0)]
819
+ ]
820
+ ] = None,
821
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
822
+ _content_type: Optional[StrictStr] = None,
823
+ _headers: Optional[Dict[StrictStr, Any]] = None,
824
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
825
+ ) -> RESTResponseType:
826
+ """Inspect a vulnerability report
827
+
828
+ A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
829
+
830
+ :param vulnerability_report_href: (required)
831
+ :type vulnerability_report_href: str
832
+ :param x_task_diagnostics: List of profilers to use on tasks.
833
+ :type x_task_diagnostics: List[str]
834
+ :param fields: A list of fields to include in the response.
835
+ :type fields: List[str]
836
+ :param exclude_fields: A list of fields to exclude from the response.
837
+ :type exclude_fields: List[str]
838
+ :param _request_timeout: timeout setting for this request. If one
839
+ number provided, it will be total request
840
+ timeout. It can also be a pair (tuple) of
841
+ (connection, read) timeouts.
842
+ :type _request_timeout: int, tuple(int, int), optional
843
+ :param _request_auth: set to override the auth_settings for an a single
844
+ request; this effectively ignores the
845
+ authentication in the spec for a single request.
846
+ :type _request_auth: dict, optional
847
+ :param _content_type: force content-type for the request.
848
+ :type _content_type: str, Optional
849
+ :param _headers: set to override the headers for a single
850
+ request; this effectively ignores the headers
851
+ in the spec for a single request.
852
+ :type _headers: dict, optional
853
+ :param _host_index: set to override the host_index for a single
854
+ request; this effectively ignores the host_index
855
+ in the spec for a single request.
856
+ :type _host_index: int, optional
857
+ :return: Returns the result object.
858
+ """ # noqa: E501
859
+
860
+ _param = self._read_serialize(
861
+ vulnerability_report_href=vulnerability_report_href,
862
+ x_task_diagnostics=x_task_diagnostics,
863
+ fields=fields,
864
+ exclude_fields=exclude_fields,
865
+ _request_auth=_request_auth,
866
+ _content_type=_content_type,
867
+ _headers=_headers,
868
+ _host_index=_host_index
869
+ )
870
+
871
+ _response_types_map: Dict[str, Optional[str]] = {
872
+ '200': "VulnerabilityReportResponse",
873
+ }
874
+ response_data = self.api_client.call_api(
875
+ *_param,
876
+ _request_timeout=_request_timeout
877
+ )
878
+ return response_data.response
879
+
880
+
881
+ def _read_serialize(
882
+ self,
883
+ vulnerability_report_href,
884
+ x_task_diagnostics,
885
+ fields,
886
+ exclude_fields,
887
+ _request_auth,
888
+ _content_type,
889
+ _headers,
890
+ _host_index,
891
+ ) -> RequestSerialized:
892
+
893
+ _host = None
894
+
895
+ _collection_formats: Dict[str, str] = {
896
+ 'X-Task-Diagnostics': 'csv',
897
+ 'fields': 'multi',
898
+ 'exclude_fields': 'multi',
899
+ }
900
+
901
+ _path_params: Dict[str, str] = {}
902
+ _query_params: List[Tuple[str, str]] = []
903
+ _header_params: Dict[str, Optional[str]] = _headers or {}
904
+ _form_params: List[Tuple[str, str]] = []
905
+ _files: Dict[
906
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
907
+ ] = {}
908
+ _body_params: Optional[bytes] = None
909
+
910
+ # process the path parameters
911
+ if vulnerability_report_href is not None:
912
+ _path_params['vulnerability_report_href'] = vulnerability_report_href
913
+ # process the query parameters
914
+ if fields is not None:
915
+
916
+ _query_params.append(('fields', fields))
917
+
918
+ if exclude_fields is not None:
919
+
920
+ _query_params.append(('exclude_fields', exclude_fields))
921
+
922
+ # process the header parameters
923
+ if x_task_diagnostics is not None:
924
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
925
+ # process the form parameters
926
+ # process the body parameter
927
+
928
+
929
+ # set the HTTP header `Accept`
930
+ if 'Accept' not in _header_params:
931
+ _header_params['Accept'] = self.api_client.select_header_accept(
932
+ [
933
+ 'application/json'
934
+ ]
935
+ )
936
+
937
+
938
+ # authentication setting
939
+ _auth_settings: List[str] = [
940
+ 'basicAuth',
941
+ 'cookieAuth'
942
+ ]
943
+
944
+ return self.api_client.param_serialize(
945
+ method='GET',
946
+ resource_path='{vulnerability_report_href}',
947
+ path_params=_path_params,
948
+ query_params=_query_params,
949
+ header_params=_header_params,
950
+ body=_body_params,
951
+ post_params=_form_params,
952
+ files=_files,
953
+ auth_settings=_auth_settings,
954
+ collection_formats=_collection_formats,
955
+ _host=_host,
956
+ _request_auth=_request_auth
957
+ )
958
+
959
+