crc-pulp-python-client 20251021.3__py3-none-any.whl → 20260113.5__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 crc-pulp-python-client might be problematic. Click here for more details.

Files changed (24) hide show
  1. crc_pulp_python_client-20260113.5.dist-info/METADATA +8856 -0
  2. {crc_pulp_python_client-20251021.3.dist-info → crc_pulp_python_client-20260113.5.dist-info}/RECORD +23 -16
  3. pulpcore/client/pulp_python/__init__.py +8 -1
  4. pulpcore/client/pulp_python/api/__init__.py +2 -0
  5. pulpcore/client/pulp_python/api/api_integrity_provenance_api.py +407 -0
  6. pulpcore/client/pulp_python/api/api_legacy_api.py +61 -1
  7. pulpcore/client/pulp_python/api/api_simple_api.py +108 -5
  8. pulpcore/client/pulp_python/api/content_packages_api.py +66 -6
  9. pulpcore/client/pulp_python/api/content_provenance_api.py +1900 -0
  10. pulpcore/client/pulp_python/api/repositories_python_versions_api.py +279 -0
  11. pulpcore/client/pulp_python/configuration.py +3 -3
  12. pulpcore/client/pulp_python/models/__init__.py +5 -0
  13. pulpcore/client/pulp_python/models/filetype_enum.py +38 -0
  14. pulpcore/client/pulp_python/models/metadata_version_enum.py +44 -0
  15. pulpcore/client/pulp_python/models/paginatedpython_package_provenance_response_list.py +112 -0
  16. pulpcore/client/pulp_python/models/patchedpython_python_remote.py +4 -2
  17. pulpcore/client/pulp_python/models/protocol_version_enum.py +37 -0
  18. pulpcore/client/pulp_python/models/python_package_provenance_response.py +124 -0
  19. pulpcore/client/pulp_python/models/python_python_package_content_response.py +18 -3
  20. pulpcore/client/pulp_python/models/python_python_remote.py +4 -2
  21. pulpcore/client/pulp_python/models/python_python_remote_response.py +4 -2
  22. crc_pulp_python_client-20251021.3.dist-info/METADATA +0 -25
  23. {crc_pulp_python_client-20251021.3.dist-info → crc_pulp_python_client-20260113.5.dist-info}/WHEEL +0 -0
  24. {crc_pulp_python_client-20251021.3.dist-info → crc_pulp_python_client-20260113.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1900 @@
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, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr, field_validator
21
+ from typing import Dict, List, Optional, Tuple, Union
22
+ from typing_extensions import Annotated
23
+ from pulpcore.client.pulp_python.models.async_operation_response import AsyncOperationResponse
24
+ from pulpcore.client.pulp_python.models.paginatedpython_package_provenance_response_list import PaginatedpythonPackageProvenanceResponseList
25
+ from pulpcore.client.pulp_python.models.python_package_provenance_response import PythonPackageProvenanceResponse
26
+ from pulpcore.client.pulp_python.models.set_label import SetLabel
27
+ from pulpcore.client.pulp_python.models.set_label_response import SetLabelResponse
28
+ from pulpcore.client.pulp_python.models.unset_label import UnsetLabel
29
+ from pulpcore.client.pulp_python.models.unset_label_response import UnsetLabelResponse
30
+
31
+ from pulpcore.client.pulp_python.api_client import ApiClient, RequestSerialized
32
+ from pulpcore.client.pulp_python.api_response import ApiResponse
33
+ from pulpcore.client.pulp_python.rest import RESTResponseType
34
+
35
+
36
+ class ContentProvenanceApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def create(
51
+ self,
52
+ package: Annotated[StrictStr, Field(description="The package that the provenance is for.")],
53
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
54
+ repository: Annotated[Optional[StrictStr], Field(description="A URI of a repository the new content unit should be associated with.")] = None,
55
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
56
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
57
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
58
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
59
+ verify: Annotated[Optional[StrictBool], Field(description="Verify each attestation in the provenance.")] = None,
60
+ pulp_domain: StrictStr = "default",
61
+ _request_timeout: Union[
62
+ None,
63
+ Annotated[StrictFloat, Field(gt=0)],
64
+ Tuple[
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Annotated[StrictFloat, Field(gt=0)]
67
+ ]
68
+ ] = None,
69
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
70
+ _content_type: Optional[StrictStr] = None,
71
+ _headers: Optional[Dict[StrictStr, Any]] = None,
72
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
73
+ ) -> AsyncOperationResponse:
74
+ """Create a package provenance
75
+
76
+ Trigger an asynchronous task to create content,optionally create new repository version.
77
+
78
+ :param pulp_domain: (required)
79
+ :type pulp_domain: str
80
+ :param package: The package that the provenance is for. (required)
81
+ :type package: str
82
+ :param x_task_diagnostics: List of profilers to use on tasks.
83
+ :type x_task_diagnostics: List[str]
84
+ :param repository: A URI of a repository the new content unit should be associated with.
85
+ :type repository: str
86
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
87
+ :type pulp_labels: Dict[str, Optional[str]]
88
+ :param file: An uploaded file that may be turned into the content unit.
89
+ :type file: bytearray
90
+ :param upload: An uncommitted upload that may be turned into the content unit.
91
+ :type upload: str
92
+ :param file_url: A url that Pulp can download and turn into the content unit.
93
+ :type file_url: str
94
+ :param verify: Verify each attestation in the provenance.
95
+ :type verify: bool
96
+ :param _request_timeout: timeout setting for this request. If one
97
+ number provided, it will be total request
98
+ timeout. It can also be a pair (tuple) of
99
+ (connection, read) timeouts.
100
+ :type _request_timeout: int, tuple(int, int), optional
101
+ :param _request_auth: set to override the auth_settings for an a single
102
+ request; this effectively ignores the
103
+ authentication in the spec for a single request.
104
+ :type _request_auth: dict, optional
105
+ :param _content_type: force content-type for the request.
106
+ :type _content_type: str, Optional
107
+ :param _headers: set to override the headers for a single
108
+ request; this effectively ignores the headers
109
+ in the spec for a single request.
110
+ :type _headers: dict, optional
111
+ :param _host_index: set to override the host_index for a single
112
+ request; this effectively ignores the host_index
113
+ in the spec for a single request.
114
+ :type _host_index: int, optional
115
+ :return: Returns the result object.
116
+ """ # noqa: E501
117
+
118
+ _param = self._create_serialize(
119
+ pulp_domain=pulp_domain,
120
+ package=package,
121
+ x_task_diagnostics=x_task_diagnostics,
122
+ repository=repository,
123
+ pulp_labels=pulp_labels,
124
+ file=file,
125
+ upload=upload,
126
+ file_url=file_url,
127
+ verify=verify,
128
+ _request_auth=_request_auth,
129
+ _content_type=_content_type,
130
+ _headers=_headers,
131
+ _host_index=_host_index
132
+ )
133
+
134
+ _response_types_map: Dict[str, Optional[str]] = {
135
+ '202': "AsyncOperationResponse",
136
+ }
137
+ response_data = self.api_client.call_api(
138
+ *_param,
139
+ _request_timeout=_request_timeout
140
+ )
141
+ response_data.read()
142
+ return self.api_client.response_deserialize(
143
+ response_data=response_data,
144
+ response_types_map=_response_types_map,
145
+ ).data
146
+
147
+
148
+ @validate_call
149
+ def create_with_http_info(
150
+ self,
151
+ package: Annotated[StrictStr, Field(description="The package that the provenance is for.")],
152
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
153
+ repository: Annotated[Optional[StrictStr], Field(description="A URI of a repository the new content unit should be associated with.")] = None,
154
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
155
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
156
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
157
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
158
+ verify: Annotated[Optional[StrictBool], Field(description="Verify each attestation in the provenance.")] = None,
159
+ pulp_domain: StrictStr = "default",
160
+ _request_timeout: Union[
161
+ None,
162
+ Annotated[StrictFloat, Field(gt=0)],
163
+ Tuple[
164
+ Annotated[StrictFloat, Field(gt=0)],
165
+ Annotated[StrictFloat, Field(gt=0)]
166
+ ]
167
+ ] = None,
168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
169
+ _content_type: Optional[StrictStr] = None,
170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
172
+ ) -> ApiResponse[AsyncOperationResponse]:
173
+ """Create a package provenance
174
+
175
+ Trigger an asynchronous task to create content,optionally create new repository version.
176
+
177
+ :param pulp_domain: (required)
178
+ :type pulp_domain: str
179
+ :param package: The package that the provenance is for. (required)
180
+ :type package: str
181
+ :param x_task_diagnostics: List of profilers to use on tasks.
182
+ :type x_task_diagnostics: List[str]
183
+ :param repository: A URI of a repository the new content unit should be associated with.
184
+ :type repository: str
185
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
186
+ :type pulp_labels: Dict[str, Optional[str]]
187
+ :param file: An uploaded file that may be turned into the content unit.
188
+ :type file: bytearray
189
+ :param upload: An uncommitted upload that may be turned into the content unit.
190
+ :type upload: str
191
+ :param file_url: A url that Pulp can download and turn into the content unit.
192
+ :type file_url: str
193
+ :param verify: Verify each attestation in the provenance.
194
+ :type verify: bool
195
+ :param _request_timeout: timeout setting for this request. If one
196
+ number provided, it will be total request
197
+ timeout. It can also be a pair (tuple) of
198
+ (connection, read) timeouts.
199
+ :type _request_timeout: int, tuple(int, int), optional
200
+ :param _request_auth: set to override the auth_settings for an a single
201
+ request; this effectively ignores the
202
+ authentication in the spec for a single request.
203
+ :type _request_auth: dict, optional
204
+ :param _content_type: force content-type for the request.
205
+ :type _content_type: str, Optional
206
+ :param _headers: set to override the headers for a single
207
+ request; this effectively ignores the headers
208
+ in the spec for a single request.
209
+ :type _headers: dict, optional
210
+ :param _host_index: set to override the host_index for a single
211
+ request; this effectively ignores the host_index
212
+ in the spec for a single request.
213
+ :type _host_index: int, optional
214
+ :return: Returns the result object.
215
+ """ # noqa: E501
216
+
217
+ _param = self._create_serialize(
218
+ pulp_domain=pulp_domain,
219
+ package=package,
220
+ x_task_diagnostics=x_task_diagnostics,
221
+ repository=repository,
222
+ pulp_labels=pulp_labels,
223
+ file=file,
224
+ upload=upload,
225
+ file_url=file_url,
226
+ verify=verify,
227
+ _request_auth=_request_auth,
228
+ _content_type=_content_type,
229
+ _headers=_headers,
230
+ _host_index=_host_index
231
+ )
232
+
233
+ _response_types_map: Dict[str, Optional[str]] = {
234
+ '202': "AsyncOperationResponse",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ response_data.read()
241
+ return self.api_client.response_deserialize(
242
+ response_data=response_data,
243
+ response_types_map=_response_types_map,
244
+ )
245
+
246
+
247
+ @validate_call
248
+ def create_without_preload_content(
249
+ self,
250
+ package: Annotated[StrictStr, Field(description="The package that the provenance is for.")],
251
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
252
+ repository: Annotated[Optional[StrictStr], Field(description="A URI of a repository the new content unit should be associated with.")] = None,
253
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
254
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
255
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
256
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
257
+ verify: Annotated[Optional[StrictBool], Field(description="Verify each attestation in the provenance.")] = None,
258
+ pulp_domain: StrictStr = "default",
259
+ _request_timeout: Union[
260
+ None,
261
+ Annotated[StrictFloat, Field(gt=0)],
262
+ Tuple[
263
+ Annotated[StrictFloat, Field(gt=0)],
264
+ Annotated[StrictFloat, Field(gt=0)]
265
+ ]
266
+ ] = None,
267
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
268
+ _content_type: Optional[StrictStr] = None,
269
+ _headers: Optional[Dict[StrictStr, Any]] = None,
270
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
271
+ ) -> RESTResponseType:
272
+ """Create a package provenance
273
+
274
+ Trigger an asynchronous task to create content,optionally create new repository version.
275
+
276
+ :param pulp_domain: (required)
277
+ :type pulp_domain: str
278
+ :param package: The package that the provenance is for. (required)
279
+ :type package: str
280
+ :param x_task_diagnostics: List of profilers to use on tasks.
281
+ :type x_task_diagnostics: List[str]
282
+ :param repository: A URI of a repository the new content unit should be associated with.
283
+ :type repository: str
284
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
285
+ :type pulp_labels: Dict[str, Optional[str]]
286
+ :param file: An uploaded file that may be turned into the content unit.
287
+ :type file: bytearray
288
+ :param upload: An uncommitted upload that may be turned into the content unit.
289
+ :type upload: str
290
+ :param file_url: A url that Pulp can download and turn into the content unit.
291
+ :type file_url: str
292
+ :param verify: Verify each attestation in the provenance.
293
+ :type verify: bool
294
+ :param _request_timeout: timeout setting for this request. If one
295
+ number provided, it will be total request
296
+ timeout. It can also be a pair (tuple) of
297
+ (connection, read) timeouts.
298
+ :type _request_timeout: int, tuple(int, int), optional
299
+ :param _request_auth: set to override the auth_settings for an a single
300
+ request; this effectively ignores the
301
+ authentication in the spec for a single request.
302
+ :type _request_auth: dict, optional
303
+ :param _content_type: force content-type for the request.
304
+ :type _content_type: str, Optional
305
+ :param _headers: set to override the headers for a single
306
+ request; this effectively ignores the headers
307
+ in the spec for a single request.
308
+ :type _headers: dict, optional
309
+ :param _host_index: set to override the host_index for a single
310
+ request; this effectively ignores the host_index
311
+ in the spec for a single request.
312
+ :type _host_index: int, optional
313
+ :return: Returns the result object.
314
+ """ # noqa: E501
315
+
316
+ _param = self._create_serialize(
317
+ pulp_domain=pulp_domain,
318
+ package=package,
319
+ x_task_diagnostics=x_task_diagnostics,
320
+ repository=repository,
321
+ pulp_labels=pulp_labels,
322
+ file=file,
323
+ upload=upload,
324
+ file_url=file_url,
325
+ verify=verify,
326
+ _request_auth=_request_auth,
327
+ _content_type=_content_type,
328
+ _headers=_headers,
329
+ _host_index=_host_index
330
+ )
331
+
332
+ _response_types_map: Dict[str, Optional[str]] = {
333
+ '202': "AsyncOperationResponse",
334
+ }
335
+ response_data = self.api_client.call_api(
336
+ *_param,
337
+ _request_timeout=_request_timeout
338
+ )
339
+ return response_data.response
340
+
341
+
342
+ def _create_serialize(
343
+ self,
344
+ pulp_domain,
345
+ package,
346
+ x_task_diagnostics,
347
+ repository,
348
+ pulp_labels,
349
+ file,
350
+ upload,
351
+ file_url,
352
+ verify,
353
+ _request_auth,
354
+ _content_type,
355
+ _headers,
356
+ _host_index,
357
+ ) -> RequestSerialized:
358
+
359
+ _host = None
360
+
361
+ _collection_formats: Dict[str, str] = {
362
+ 'X-Task-Diagnostics': 'csv',
363
+ }
364
+
365
+ _path_params: Dict[str, str] = {}
366
+ _query_params: List[Tuple[str, str]] = []
367
+ _header_params: Dict[str, Optional[str]] = _headers or {}
368
+ _form_params: List[Tuple[str, str]] = []
369
+ _files: Dict[
370
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
371
+ ] = {}
372
+ _body_params: Optional[bytes] = None
373
+
374
+ # process the path parameters
375
+ if pulp_domain is not None:
376
+ _path_params['pulp_domain'] = pulp_domain
377
+ # process the query parameters
378
+ # process the header parameters
379
+ if x_task_diagnostics is not None:
380
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
381
+ # process the form parameters
382
+ if repository is not None:
383
+ _form_params.append(('repository', repository))
384
+ if pulp_labels is not None:
385
+ _form_params.append(('pulp_labels', pulp_labels))
386
+ if file is not None:
387
+ _files['file'] = file
388
+ if upload is not None:
389
+ _form_params.append(('upload', upload))
390
+ if file_url is not None:
391
+ _form_params.append(('file_url', file_url))
392
+ if package is not None:
393
+ _form_params.append(('package', package))
394
+ if verify is not None:
395
+ _form_params.append(('verify', verify))
396
+ # process the body parameter
397
+
398
+
399
+ # set the HTTP header `Accept`
400
+ if 'Accept' not in _header_params:
401
+ _header_params['Accept'] = self.api_client.select_header_accept(
402
+ [
403
+ 'application/json'
404
+ ]
405
+ )
406
+
407
+ # set the HTTP header `Content-Type`
408
+ if _content_type:
409
+ _header_params['Content-Type'] = _content_type
410
+ else:
411
+ _default_content_type = (
412
+ self.api_client.select_header_content_type(
413
+ [
414
+ 'multipart/form-data',
415
+ 'application/x-www-form-urlencoded'
416
+ ]
417
+ )
418
+ )
419
+ if _default_content_type is not None:
420
+ _header_params['Content-Type'] = _default_content_type
421
+
422
+ # authentication setting
423
+ _auth_settings: List[str] = [
424
+ 'json_header_remote_authentication',
425
+ 'basicAuth',
426
+ 'cookieAuth'
427
+ ]
428
+
429
+ return self.api_client.param_serialize(
430
+ method='POST',
431
+ resource_path='/api/pulp/{pulp_domain}/api/v3/content/python/provenance/',
432
+ path_params=_path_params,
433
+ query_params=_query_params,
434
+ header_params=_header_params,
435
+ body=_body_params,
436
+ post_params=_form_params,
437
+ files=_files,
438
+ auth_settings=_auth_settings,
439
+ collection_formats=_collection_formats,
440
+ _host=_host,
441
+ _request_auth=_request_auth
442
+ )
443
+
444
+
445
+
446
+
447
+ @validate_call
448
+ def list(
449
+ self,
450
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
451
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
452
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
453
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pk` - Pk * `-pk` - Pk (descending)")] = None,
454
+ orphaned_for: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.")] = None,
455
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
456
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
457
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
458
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
459
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
460
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
461
+ repository_version_added: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
462
+ repository_version_removed: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
463
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
464
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
465
+ pulp_domain: StrictStr = "default",
466
+ _request_timeout: Union[
467
+ None,
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Tuple[
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Annotated[StrictFloat, Field(gt=0)]
472
+ ]
473
+ ] = None,
474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
475
+ _content_type: Optional[StrictStr] = None,
476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
478
+ ) -> PaginatedpythonPackageProvenanceResponseList:
479
+ """List package provenances
480
+
481
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
482
+
483
+ :param pulp_domain: (required)
484
+ :type pulp_domain: str
485
+ :param x_task_diagnostics: List of profilers to use on tasks.
486
+ :type x_task_diagnostics: List[str]
487
+ :param limit: Number of results to return per page.
488
+ :type limit: int
489
+ :param offset: The initial index from which to return the results.
490
+ :type offset: int
491
+ :param ordering: Ordering * `pk` - Pk * `-pk` - Pk (descending)
492
+ :type ordering: List[str]
493
+ :param orphaned_for: Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
494
+ :type orphaned_for: float
495
+ :param prn__in: Multiple values may be separated by commas.
496
+ :type prn__in: List[str]
497
+ :param pulp_href__in: Multiple values may be separated by commas.
498
+ :type pulp_href__in: List[str]
499
+ :param pulp_id__in: Multiple values may be separated by commas.
500
+ :type pulp_id__in: List[str]
501
+ :param pulp_label_select: Filter labels by search string
502
+ :type pulp_label_select: str
503
+ :param q: Filter results by using NOT, AND and OR operations on other filters
504
+ :type q: str
505
+ :param repository_version: Repository Version referenced by HREF/PRN
506
+ :type repository_version: str
507
+ :param repository_version_added: Repository Version referenced by HREF/PRN
508
+ :type repository_version_added: str
509
+ :param repository_version_removed: Repository Version referenced by HREF/PRN
510
+ :type repository_version_removed: str
511
+ :param fields: A list of fields to include in the response.
512
+ :type fields: List[str]
513
+ :param exclude_fields: A list of fields to exclude from the response.
514
+ :type exclude_fields: List[str]
515
+ :param _request_timeout: timeout setting for this request. If one
516
+ number provided, it will be total request
517
+ timeout. It can also be a pair (tuple) of
518
+ (connection, read) timeouts.
519
+ :type _request_timeout: int, tuple(int, int), optional
520
+ :param _request_auth: set to override the auth_settings for an a single
521
+ request; this effectively ignores the
522
+ authentication in the spec for a single request.
523
+ :type _request_auth: dict, optional
524
+ :param _content_type: force content-type for the request.
525
+ :type _content_type: str, Optional
526
+ :param _headers: set to override the headers for a single
527
+ request; this effectively ignores the headers
528
+ in the spec for a single request.
529
+ :type _headers: dict, optional
530
+ :param _host_index: set to override the host_index for a single
531
+ request; this effectively ignores the host_index
532
+ in the spec for a single request.
533
+ :type _host_index: int, optional
534
+ :return: Returns the result object.
535
+ """ # noqa: E501
536
+
537
+ _param = self._list_serialize(
538
+ pulp_domain=pulp_domain,
539
+ x_task_diagnostics=x_task_diagnostics,
540
+ limit=limit,
541
+ offset=offset,
542
+ ordering=ordering,
543
+ orphaned_for=orphaned_for,
544
+ prn__in=prn__in,
545
+ pulp_href__in=pulp_href__in,
546
+ pulp_id__in=pulp_id__in,
547
+ pulp_label_select=pulp_label_select,
548
+ q=q,
549
+ repository_version=repository_version,
550
+ repository_version_added=repository_version_added,
551
+ repository_version_removed=repository_version_removed,
552
+ fields=fields,
553
+ exclude_fields=exclude_fields,
554
+ _request_auth=_request_auth,
555
+ _content_type=_content_type,
556
+ _headers=_headers,
557
+ _host_index=_host_index
558
+ )
559
+
560
+ _response_types_map: Dict[str, Optional[str]] = {
561
+ '200': "PaginatedpythonPackageProvenanceResponseList",
562
+ }
563
+ response_data = self.api_client.call_api(
564
+ *_param,
565
+ _request_timeout=_request_timeout
566
+ )
567
+ response_data.read()
568
+ return self.api_client.response_deserialize(
569
+ response_data=response_data,
570
+ response_types_map=_response_types_map,
571
+ ).data
572
+
573
+
574
+ @validate_call
575
+ def list_with_http_info(
576
+ self,
577
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
578
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
579
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
580
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pk` - Pk * `-pk` - Pk (descending)")] = None,
581
+ orphaned_for: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.")] = None,
582
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
583
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
584
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
585
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
586
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
587
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
588
+ repository_version_added: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
589
+ repository_version_removed: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
590
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
591
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
592
+ pulp_domain: StrictStr = "default",
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> ApiResponse[PaginatedpythonPackageProvenanceResponseList]:
606
+ """List package provenances
607
+
608
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
609
+
610
+ :param pulp_domain: (required)
611
+ :type pulp_domain: str
612
+ :param x_task_diagnostics: List of profilers to use on tasks.
613
+ :type x_task_diagnostics: List[str]
614
+ :param limit: Number of results to return per page.
615
+ :type limit: int
616
+ :param offset: The initial index from which to return the results.
617
+ :type offset: int
618
+ :param ordering: Ordering * `pk` - Pk * `-pk` - Pk (descending)
619
+ :type ordering: List[str]
620
+ :param orphaned_for: Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
621
+ :type orphaned_for: float
622
+ :param prn__in: Multiple values may be separated by commas.
623
+ :type prn__in: List[str]
624
+ :param pulp_href__in: Multiple values may be separated by commas.
625
+ :type pulp_href__in: List[str]
626
+ :param pulp_id__in: Multiple values may be separated by commas.
627
+ :type pulp_id__in: List[str]
628
+ :param pulp_label_select: Filter labels by search string
629
+ :type pulp_label_select: str
630
+ :param q: Filter results by using NOT, AND and OR operations on other filters
631
+ :type q: str
632
+ :param repository_version: Repository Version referenced by HREF/PRN
633
+ :type repository_version: str
634
+ :param repository_version_added: Repository Version referenced by HREF/PRN
635
+ :type repository_version_added: str
636
+ :param repository_version_removed: Repository Version referenced by HREF/PRN
637
+ :type repository_version_removed: str
638
+ :param fields: A list of fields to include in the response.
639
+ :type fields: List[str]
640
+ :param exclude_fields: A list of fields to exclude from the response.
641
+ :type exclude_fields: List[str]
642
+ :param _request_timeout: timeout setting for this request. If one
643
+ number provided, it will be total request
644
+ timeout. It can also be a pair (tuple) of
645
+ (connection, read) timeouts.
646
+ :type _request_timeout: int, tuple(int, int), optional
647
+ :param _request_auth: set to override the auth_settings for an a single
648
+ request; this effectively ignores the
649
+ authentication in the spec for a single request.
650
+ :type _request_auth: dict, optional
651
+ :param _content_type: force content-type for the request.
652
+ :type _content_type: str, Optional
653
+ :param _headers: set to override the headers for a single
654
+ request; this effectively ignores the headers
655
+ in the spec for a single request.
656
+ :type _headers: dict, optional
657
+ :param _host_index: set to override the host_index for a single
658
+ request; this effectively ignores the host_index
659
+ in the spec for a single request.
660
+ :type _host_index: int, optional
661
+ :return: Returns the result object.
662
+ """ # noqa: E501
663
+
664
+ _param = self._list_serialize(
665
+ pulp_domain=pulp_domain,
666
+ x_task_diagnostics=x_task_diagnostics,
667
+ limit=limit,
668
+ offset=offset,
669
+ ordering=ordering,
670
+ orphaned_for=orphaned_for,
671
+ prn__in=prn__in,
672
+ pulp_href__in=pulp_href__in,
673
+ pulp_id__in=pulp_id__in,
674
+ pulp_label_select=pulp_label_select,
675
+ q=q,
676
+ repository_version=repository_version,
677
+ repository_version_added=repository_version_added,
678
+ repository_version_removed=repository_version_removed,
679
+ fields=fields,
680
+ exclude_fields=exclude_fields,
681
+ _request_auth=_request_auth,
682
+ _content_type=_content_type,
683
+ _headers=_headers,
684
+ _host_index=_host_index
685
+ )
686
+
687
+ _response_types_map: Dict[str, Optional[str]] = {
688
+ '200': "PaginatedpythonPackageProvenanceResponseList",
689
+ }
690
+ response_data = self.api_client.call_api(
691
+ *_param,
692
+ _request_timeout=_request_timeout
693
+ )
694
+ response_data.read()
695
+ return self.api_client.response_deserialize(
696
+ response_data=response_data,
697
+ response_types_map=_response_types_map,
698
+ )
699
+
700
+
701
+ @validate_call
702
+ def list_without_preload_content(
703
+ self,
704
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
705
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
706
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
707
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pk` - Pk * `-pk` - Pk (descending)")] = None,
708
+ orphaned_for: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.")] = None,
709
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
710
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
711
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
712
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
713
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
714
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
715
+ repository_version_added: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
716
+ repository_version_removed: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
717
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
718
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
719
+ pulp_domain: StrictStr = "default",
720
+ _request_timeout: Union[
721
+ None,
722
+ Annotated[StrictFloat, Field(gt=0)],
723
+ Tuple[
724
+ Annotated[StrictFloat, Field(gt=0)],
725
+ Annotated[StrictFloat, Field(gt=0)]
726
+ ]
727
+ ] = None,
728
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
729
+ _content_type: Optional[StrictStr] = None,
730
+ _headers: Optional[Dict[StrictStr, Any]] = None,
731
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
732
+ ) -> RESTResponseType:
733
+ """List package provenances
734
+
735
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
736
+
737
+ :param pulp_domain: (required)
738
+ :type pulp_domain: str
739
+ :param x_task_diagnostics: List of profilers to use on tasks.
740
+ :type x_task_diagnostics: List[str]
741
+ :param limit: Number of results to return per page.
742
+ :type limit: int
743
+ :param offset: The initial index from which to return the results.
744
+ :type offset: int
745
+ :param ordering: Ordering * `pk` - Pk * `-pk` - Pk (descending)
746
+ :type ordering: List[str]
747
+ :param orphaned_for: Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
748
+ :type orphaned_for: float
749
+ :param prn__in: Multiple values may be separated by commas.
750
+ :type prn__in: List[str]
751
+ :param pulp_href__in: Multiple values may be separated by commas.
752
+ :type pulp_href__in: List[str]
753
+ :param pulp_id__in: Multiple values may be separated by commas.
754
+ :type pulp_id__in: List[str]
755
+ :param pulp_label_select: Filter labels by search string
756
+ :type pulp_label_select: str
757
+ :param q: Filter results by using NOT, AND and OR operations on other filters
758
+ :type q: str
759
+ :param repository_version: Repository Version referenced by HREF/PRN
760
+ :type repository_version: str
761
+ :param repository_version_added: Repository Version referenced by HREF/PRN
762
+ :type repository_version_added: str
763
+ :param repository_version_removed: Repository Version referenced by HREF/PRN
764
+ :type repository_version_removed: str
765
+ :param fields: A list of fields to include in the response.
766
+ :type fields: List[str]
767
+ :param exclude_fields: A list of fields to exclude from the response.
768
+ :type exclude_fields: List[str]
769
+ :param _request_timeout: timeout setting for this request. If one
770
+ number provided, it will be total request
771
+ timeout. It can also be a pair (tuple) of
772
+ (connection, read) timeouts.
773
+ :type _request_timeout: int, tuple(int, int), optional
774
+ :param _request_auth: set to override the auth_settings for an a single
775
+ request; this effectively ignores the
776
+ authentication in the spec for a single request.
777
+ :type _request_auth: dict, optional
778
+ :param _content_type: force content-type for the request.
779
+ :type _content_type: str, Optional
780
+ :param _headers: set to override the headers for a single
781
+ request; this effectively ignores the headers
782
+ in the spec for a single request.
783
+ :type _headers: dict, optional
784
+ :param _host_index: set to override the host_index for a single
785
+ request; this effectively ignores the host_index
786
+ in the spec for a single request.
787
+ :type _host_index: int, optional
788
+ :return: Returns the result object.
789
+ """ # noqa: E501
790
+
791
+ _param = self._list_serialize(
792
+ pulp_domain=pulp_domain,
793
+ x_task_diagnostics=x_task_diagnostics,
794
+ limit=limit,
795
+ offset=offset,
796
+ ordering=ordering,
797
+ orphaned_for=orphaned_for,
798
+ prn__in=prn__in,
799
+ pulp_href__in=pulp_href__in,
800
+ pulp_id__in=pulp_id__in,
801
+ pulp_label_select=pulp_label_select,
802
+ q=q,
803
+ repository_version=repository_version,
804
+ repository_version_added=repository_version_added,
805
+ repository_version_removed=repository_version_removed,
806
+ fields=fields,
807
+ exclude_fields=exclude_fields,
808
+ _request_auth=_request_auth,
809
+ _content_type=_content_type,
810
+ _headers=_headers,
811
+ _host_index=_host_index
812
+ )
813
+
814
+ _response_types_map: Dict[str, Optional[str]] = {
815
+ '200': "PaginatedpythonPackageProvenanceResponseList",
816
+ }
817
+ response_data = self.api_client.call_api(
818
+ *_param,
819
+ _request_timeout=_request_timeout
820
+ )
821
+ return response_data.response
822
+
823
+
824
+ def _list_serialize(
825
+ self,
826
+ pulp_domain,
827
+ x_task_diagnostics,
828
+ limit,
829
+ offset,
830
+ ordering,
831
+ orphaned_for,
832
+ prn__in,
833
+ pulp_href__in,
834
+ pulp_id__in,
835
+ pulp_label_select,
836
+ q,
837
+ repository_version,
838
+ repository_version_added,
839
+ repository_version_removed,
840
+ fields,
841
+ exclude_fields,
842
+ _request_auth,
843
+ _content_type,
844
+ _headers,
845
+ _host_index,
846
+ ) -> RequestSerialized:
847
+
848
+ _host = None
849
+
850
+ _collection_formats: Dict[str, str] = {
851
+ 'X-Task-Diagnostics': 'csv',
852
+ 'ordering': 'csv',
853
+ 'prn__in': 'csv',
854
+ 'pulp_href__in': 'csv',
855
+ 'pulp_id__in': 'csv',
856
+ 'fields': 'multi',
857
+ 'exclude_fields': 'multi',
858
+ }
859
+
860
+ _path_params: Dict[str, str] = {}
861
+ _query_params: List[Tuple[str, str]] = []
862
+ _header_params: Dict[str, Optional[str]] = _headers or {}
863
+ _form_params: List[Tuple[str, str]] = []
864
+ _files: Dict[
865
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
866
+ ] = {}
867
+ _body_params: Optional[bytes] = None
868
+
869
+ # process the path parameters
870
+ if pulp_domain is not None:
871
+ _path_params['pulp_domain'] = pulp_domain
872
+ # process the query parameters
873
+ if limit is not None:
874
+
875
+ _query_params.append(('limit', limit))
876
+
877
+ if offset is not None:
878
+
879
+ _query_params.append(('offset', offset))
880
+
881
+ if ordering is not None:
882
+
883
+ _query_params.append(('ordering', ordering))
884
+
885
+ if orphaned_for is not None:
886
+
887
+ _query_params.append(('orphaned_for', orphaned_for))
888
+
889
+ if prn__in is not None:
890
+
891
+ _query_params.append(('prn__in', prn__in))
892
+
893
+ if pulp_href__in is not None:
894
+
895
+ _query_params.append(('pulp_href__in', pulp_href__in))
896
+
897
+ if pulp_id__in is not None:
898
+
899
+ _query_params.append(('pulp_id__in', pulp_id__in))
900
+
901
+ if pulp_label_select is not None:
902
+
903
+ _query_params.append(('pulp_label_select', pulp_label_select))
904
+
905
+ if q is not None:
906
+
907
+ _query_params.append(('q', q))
908
+
909
+ if repository_version is not None:
910
+
911
+ _query_params.append(('repository_version', repository_version))
912
+
913
+ if repository_version_added is not None:
914
+
915
+ _query_params.append(('repository_version_added', repository_version_added))
916
+
917
+ if repository_version_removed is not None:
918
+
919
+ _query_params.append(('repository_version_removed', repository_version_removed))
920
+
921
+ if fields is not None:
922
+
923
+ _query_params.append(('fields', fields))
924
+
925
+ if exclude_fields is not None:
926
+
927
+ _query_params.append(('exclude_fields', exclude_fields))
928
+
929
+ # process the header parameters
930
+ if x_task_diagnostics is not None:
931
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
932
+ # process the form parameters
933
+ # process the body parameter
934
+
935
+
936
+ # set the HTTP header `Accept`
937
+ if 'Accept' not in _header_params:
938
+ _header_params['Accept'] = self.api_client.select_header_accept(
939
+ [
940
+ 'application/json'
941
+ ]
942
+ )
943
+
944
+
945
+ # authentication setting
946
+ _auth_settings: List[str] = [
947
+ 'json_header_remote_authentication',
948
+ 'basicAuth',
949
+ 'cookieAuth'
950
+ ]
951
+
952
+ return self.api_client.param_serialize(
953
+ method='GET',
954
+ resource_path='/api/pulp/{pulp_domain}/api/v3/content/python/provenance/',
955
+ path_params=_path_params,
956
+ query_params=_query_params,
957
+ header_params=_header_params,
958
+ body=_body_params,
959
+ post_params=_form_params,
960
+ files=_files,
961
+ auth_settings=_auth_settings,
962
+ collection_formats=_collection_formats,
963
+ _host=_host,
964
+ _request_auth=_request_auth
965
+ )
966
+
967
+
968
+
969
+
970
+ @validate_call
971
+ def read(
972
+ self,
973
+ python_package_provenance_href: StrictStr,
974
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
975
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
976
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
977
+ _request_timeout: Union[
978
+ None,
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Tuple[
981
+ Annotated[StrictFloat, Field(gt=0)],
982
+ Annotated[StrictFloat, Field(gt=0)]
983
+ ]
984
+ ] = None,
985
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
986
+ _content_type: Optional[StrictStr] = None,
987
+ _headers: Optional[Dict[StrictStr, Any]] = None,
988
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
989
+ ) -> PythonPackageProvenanceResponse:
990
+ """Inspect a package provenance
991
+
992
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
993
+
994
+ :param python_package_provenance_href: (required)
995
+ :type python_package_provenance_href: str
996
+ :param x_task_diagnostics: List of profilers to use on tasks.
997
+ :type x_task_diagnostics: List[str]
998
+ :param fields: A list of fields to include in the response.
999
+ :type fields: List[str]
1000
+ :param exclude_fields: A list of fields to exclude from the response.
1001
+ :type exclude_fields: List[str]
1002
+ :param _request_timeout: timeout setting for this request. If one
1003
+ number provided, it will be total request
1004
+ timeout. It can also be a pair (tuple) of
1005
+ (connection, read) timeouts.
1006
+ :type _request_timeout: int, tuple(int, int), optional
1007
+ :param _request_auth: set to override the auth_settings for an a single
1008
+ request; this effectively ignores the
1009
+ authentication in the spec for a single request.
1010
+ :type _request_auth: dict, optional
1011
+ :param _content_type: force content-type for the request.
1012
+ :type _content_type: str, Optional
1013
+ :param _headers: set to override the headers for a single
1014
+ request; this effectively ignores the headers
1015
+ in the spec for a single request.
1016
+ :type _headers: dict, optional
1017
+ :param _host_index: set to override the host_index for a single
1018
+ request; this effectively ignores the host_index
1019
+ in the spec for a single request.
1020
+ :type _host_index: int, optional
1021
+ :return: Returns the result object.
1022
+ """ # noqa: E501
1023
+
1024
+ _param = self._read_serialize(
1025
+ python_package_provenance_href=python_package_provenance_href,
1026
+ x_task_diagnostics=x_task_diagnostics,
1027
+ fields=fields,
1028
+ exclude_fields=exclude_fields,
1029
+ _request_auth=_request_auth,
1030
+ _content_type=_content_type,
1031
+ _headers=_headers,
1032
+ _host_index=_host_index
1033
+ )
1034
+
1035
+ _response_types_map: Dict[str, Optional[str]] = {
1036
+ '200': "PythonPackageProvenanceResponse",
1037
+ }
1038
+ response_data = self.api_client.call_api(
1039
+ *_param,
1040
+ _request_timeout=_request_timeout
1041
+ )
1042
+ response_data.read()
1043
+ return self.api_client.response_deserialize(
1044
+ response_data=response_data,
1045
+ response_types_map=_response_types_map,
1046
+ ).data
1047
+
1048
+
1049
+ @validate_call
1050
+ def read_with_http_info(
1051
+ self,
1052
+ python_package_provenance_href: StrictStr,
1053
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1054
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1055
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1056
+ _request_timeout: Union[
1057
+ None,
1058
+ Annotated[StrictFloat, Field(gt=0)],
1059
+ Tuple[
1060
+ Annotated[StrictFloat, Field(gt=0)],
1061
+ Annotated[StrictFloat, Field(gt=0)]
1062
+ ]
1063
+ ] = None,
1064
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1065
+ _content_type: Optional[StrictStr] = None,
1066
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1067
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1068
+ ) -> ApiResponse[PythonPackageProvenanceResponse]:
1069
+ """Inspect a package provenance
1070
+
1071
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
1072
+
1073
+ :param python_package_provenance_href: (required)
1074
+ :type python_package_provenance_href: str
1075
+ :param x_task_diagnostics: List of profilers to use on tasks.
1076
+ :type x_task_diagnostics: List[str]
1077
+ :param fields: A list of fields to include in the response.
1078
+ :type fields: List[str]
1079
+ :param exclude_fields: A list of fields to exclude from the response.
1080
+ :type exclude_fields: List[str]
1081
+ :param _request_timeout: timeout setting for this request. If one
1082
+ number provided, it will be total request
1083
+ timeout. It can also be a pair (tuple) of
1084
+ (connection, read) timeouts.
1085
+ :type _request_timeout: int, tuple(int, int), optional
1086
+ :param _request_auth: set to override the auth_settings for an a single
1087
+ request; this effectively ignores the
1088
+ authentication in the spec for a single request.
1089
+ :type _request_auth: dict, optional
1090
+ :param _content_type: force content-type for the request.
1091
+ :type _content_type: str, Optional
1092
+ :param _headers: set to override the headers for a single
1093
+ request; this effectively ignores the headers
1094
+ in the spec for a single request.
1095
+ :type _headers: dict, optional
1096
+ :param _host_index: set to override the host_index for a single
1097
+ request; this effectively ignores the host_index
1098
+ in the spec for a single request.
1099
+ :type _host_index: int, optional
1100
+ :return: Returns the result object.
1101
+ """ # noqa: E501
1102
+
1103
+ _param = self._read_serialize(
1104
+ python_package_provenance_href=python_package_provenance_href,
1105
+ x_task_diagnostics=x_task_diagnostics,
1106
+ fields=fields,
1107
+ exclude_fields=exclude_fields,
1108
+ _request_auth=_request_auth,
1109
+ _content_type=_content_type,
1110
+ _headers=_headers,
1111
+ _host_index=_host_index
1112
+ )
1113
+
1114
+ _response_types_map: Dict[str, Optional[str]] = {
1115
+ '200': "PythonPackageProvenanceResponse",
1116
+ }
1117
+ response_data = self.api_client.call_api(
1118
+ *_param,
1119
+ _request_timeout=_request_timeout
1120
+ )
1121
+ response_data.read()
1122
+ return self.api_client.response_deserialize(
1123
+ response_data=response_data,
1124
+ response_types_map=_response_types_map,
1125
+ )
1126
+
1127
+
1128
+ @validate_call
1129
+ def read_without_preload_content(
1130
+ self,
1131
+ python_package_provenance_href: StrictStr,
1132
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1133
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1134
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1135
+ _request_timeout: Union[
1136
+ None,
1137
+ Annotated[StrictFloat, Field(gt=0)],
1138
+ Tuple[
1139
+ Annotated[StrictFloat, Field(gt=0)],
1140
+ Annotated[StrictFloat, Field(gt=0)]
1141
+ ]
1142
+ ] = None,
1143
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1144
+ _content_type: Optional[StrictStr] = None,
1145
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1146
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1147
+ ) -> RESTResponseType:
1148
+ """Inspect a package provenance
1149
+
1150
+ PackageProvenance represents a PEP 740 provenance object for a Python package. Use ?minimal=true to get a human readable representation of the provenance.
1151
+
1152
+ :param python_package_provenance_href: (required)
1153
+ :type python_package_provenance_href: str
1154
+ :param x_task_diagnostics: List of profilers to use on tasks.
1155
+ :type x_task_diagnostics: List[str]
1156
+ :param fields: A list of fields to include in the response.
1157
+ :type fields: List[str]
1158
+ :param exclude_fields: A list of fields to exclude from the response.
1159
+ :type exclude_fields: List[str]
1160
+ :param _request_timeout: timeout setting for this request. If one
1161
+ number provided, it will be total request
1162
+ timeout. It can also be a pair (tuple) of
1163
+ (connection, read) timeouts.
1164
+ :type _request_timeout: int, tuple(int, int), optional
1165
+ :param _request_auth: set to override the auth_settings for an a single
1166
+ request; this effectively ignores the
1167
+ authentication in the spec for a single request.
1168
+ :type _request_auth: dict, optional
1169
+ :param _content_type: force content-type for the request.
1170
+ :type _content_type: str, Optional
1171
+ :param _headers: set to override the headers for a single
1172
+ request; this effectively ignores the headers
1173
+ in the spec for a single request.
1174
+ :type _headers: dict, optional
1175
+ :param _host_index: set to override the host_index for a single
1176
+ request; this effectively ignores the host_index
1177
+ in the spec for a single request.
1178
+ :type _host_index: int, optional
1179
+ :return: Returns the result object.
1180
+ """ # noqa: E501
1181
+
1182
+ _param = self._read_serialize(
1183
+ python_package_provenance_href=python_package_provenance_href,
1184
+ x_task_diagnostics=x_task_diagnostics,
1185
+ fields=fields,
1186
+ exclude_fields=exclude_fields,
1187
+ _request_auth=_request_auth,
1188
+ _content_type=_content_type,
1189
+ _headers=_headers,
1190
+ _host_index=_host_index
1191
+ )
1192
+
1193
+ _response_types_map: Dict[str, Optional[str]] = {
1194
+ '200': "PythonPackageProvenanceResponse",
1195
+ }
1196
+ response_data = self.api_client.call_api(
1197
+ *_param,
1198
+ _request_timeout=_request_timeout
1199
+ )
1200
+ return response_data.response
1201
+
1202
+
1203
+ def _read_serialize(
1204
+ self,
1205
+ python_package_provenance_href,
1206
+ x_task_diagnostics,
1207
+ fields,
1208
+ exclude_fields,
1209
+ _request_auth,
1210
+ _content_type,
1211
+ _headers,
1212
+ _host_index,
1213
+ ) -> RequestSerialized:
1214
+
1215
+ _host = None
1216
+
1217
+ _collection_formats: Dict[str, str] = {
1218
+ 'X-Task-Diagnostics': 'csv',
1219
+ 'fields': 'multi',
1220
+ 'exclude_fields': 'multi',
1221
+ }
1222
+
1223
+ _path_params: Dict[str, str] = {}
1224
+ _query_params: List[Tuple[str, str]] = []
1225
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1226
+ _form_params: List[Tuple[str, str]] = []
1227
+ _files: Dict[
1228
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1229
+ ] = {}
1230
+ _body_params: Optional[bytes] = None
1231
+
1232
+ # process the path parameters
1233
+ if python_package_provenance_href is not None:
1234
+ _path_params['python_package_provenance_href'] = python_package_provenance_href
1235
+ # process the query parameters
1236
+ if fields is not None:
1237
+
1238
+ _query_params.append(('fields', fields))
1239
+
1240
+ if exclude_fields is not None:
1241
+
1242
+ _query_params.append(('exclude_fields', exclude_fields))
1243
+
1244
+ # process the header parameters
1245
+ if x_task_diagnostics is not None:
1246
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1247
+ # process the form parameters
1248
+ # process the body parameter
1249
+
1250
+
1251
+ # set the HTTP header `Accept`
1252
+ if 'Accept' not in _header_params:
1253
+ _header_params['Accept'] = self.api_client.select_header_accept(
1254
+ [
1255
+ 'application/json'
1256
+ ]
1257
+ )
1258
+
1259
+
1260
+ # authentication setting
1261
+ _auth_settings: List[str] = [
1262
+ 'json_header_remote_authentication',
1263
+ 'basicAuth',
1264
+ 'cookieAuth'
1265
+ ]
1266
+
1267
+ return self.api_client.param_serialize(
1268
+ method='GET',
1269
+ resource_path='{python_package_provenance_href}',
1270
+ path_params=_path_params,
1271
+ query_params=_query_params,
1272
+ header_params=_header_params,
1273
+ body=_body_params,
1274
+ post_params=_form_params,
1275
+ files=_files,
1276
+ auth_settings=_auth_settings,
1277
+ collection_formats=_collection_formats,
1278
+ _host=_host,
1279
+ _request_auth=_request_auth
1280
+ )
1281
+
1282
+
1283
+
1284
+
1285
+ @validate_call
1286
+ def set_label(
1287
+ self,
1288
+ python_package_provenance_href: StrictStr,
1289
+ set_label: SetLabel,
1290
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1291
+ _request_timeout: Union[
1292
+ None,
1293
+ Annotated[StrictFloat, Field(gt=0)],
1294
+ Tuple[
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Annotated[StrictFloat, Field(gt=0)]
1297
+ ]
1298
+ ] = None,
1299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1300
+ _content_type: Optional[StrictStr] = None,
1301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1303
+ ) -> SetLabelResponse:
1304
+ """Set a label
1305
+
1306
+ Set a single pulp_label on the object to a specific value or null.
1307
+
1308
+ :param python_package_provenance_href: (required)
1309
+ :type python_package_provenance_href: str
1310
+ :param set_label: (required)
1311
+ :type set_label: SetLabel
1312
+ :param x_task_diagnostics: List of profilers to use on tasks.
1313
+ :type x_task_diagnostics: List[str]
1314
+ :param _request_timeout: timeout setting for this request. If one
1315
+ number provided, it will be total request
1316
+ timeout. It can also be a pair (tuple) of
1317
+ (connection, read) timeouts.
1318
+ :type _request_timeout: int, tuple(int, int), optional
1319
+ :param _request_auth: set to override the auth_settings for an a single
1320
+ request; this effectively ignores the
1321
+ authentication in the spec for a single request.
1322
+ :type _request_auth: dict, optional
1323
+ :param _content_type: force content-type for the request.
1324
+ :type _content_type: str, Optional
1325
+ :param _headers: set to override the headers for a single
1326
+ request; this effectively ignores the headers
1327
+ in the spec for a single request.
1328
+ :type _headers: dict, optional
1329
+ :param _host_index: set to override the host_index for a single
1330
+ request; this effectively ignores the host_index
1331
+ in the spec for a single request.
1332
+ :type _host_index: int, optional
1333
+ :return: Returns the result object.
1334
+ """ # noqa: E501
1335
+
1336
+ _param = self._set_label_serialize(
1337
+ python_package_provenance_href=python_package_provenance_href,
1338
+ set_label=set_label,
1339
+ x_task_diagnostics=x_task_diagnostics,
1340
+ _request_auth=_request_auth,
1341
+ _content_type=_content_type,
1342
+ _headers=_headers,
1343
+ _host_index=_host_index
1344
+ )
1345
+
1346
+ _response_types_map: Dict[str, Optional[str]] = {
1347
+ '201': "SetLabelResponse",
1348
+ }
1349
+ response_data = self.api_client.call_api(
1350
+ *_param,
1351
+ _request_timeout=_request_timeout
1352
+ )
1353
+ response_data.read()
1354
+ return self.api_client.response_deserialize(
1355
+ response_data=response_data,
1356
+ response_types_map=_response_types_map,
1357
+ ).data
1358
+
1359
+
1360
+ @validate_call
1361
+ def set_label_with_http_info(
1362
+ self,
1363
+ python_package_provenance_href: StrictStr,
1364
+ set_label: SetLabel,
1365
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1366
+ _request_timeout: Union[
1367
+ None,
1368
+ Annotated[StrictFloat, Field(gt=0)],
1369
+ Tuple[
1370
+ Annotated[StrictFloat, Field(gt=0)],
1371
+ Annotated[StrictFloat, Field(gt=0)]
1372
+ ]
1373
+ ] = None,
1374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1375
+ _content_type: Optional[StrictStr] = None,
1376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1378
+ ) -> ApiResponse[SetLabelResponse]:
1379
+ """Set a label
1380
+
1381
+ Set a single pulp_label on the object to a specific value or null.
1382
+
1383
+ :param python_package_provenance_href: (required)
1384
+ :type python_package_provenance_href: str
1385
+ :param set_label: (required)
1386
+ :type set_label: SetLabel
1387
+ :param x_task_diagnostics: List of profilers to use on tasks.
1388
+ :type x_task_diagnostics: List[str]
1389
+ :param _request_timeout: timeout setting for this request. If one
1390
+ number provided, it will be total request
1391
+ timeout. It can also be a pair (tuple) of
1392
+ (connection, read) timeouts.
1393
+ :type _request_timeout: int, tuple(int, int), optional
1394
+ :param _request_auth: set to override the auth_settings for an a single
1395
+ request; this effectively ignores the
1396
+ authentication in the spec for a single request.
1397
+ :type _request_auth: dict, optional
1398
+ :param _content_type: force content-type for the request.
1399
+ :type _content_type: str, Optional
1400
+ :param _headers: set to override the headers for a single
1401
+ request; this effectively ignores the headers
1402
+ in the spec for a single request.
1403
+ :type _headers: dict, optional
1404
+ :param _host_index: set to override the host_index for a single
1405
+ request; this effectively ignores the host_index
1406
+ in the spec for a single request.
1407
+ :type _host_index: int, optional
1408
+ :return: Returns the result object.
1409
+ """ # noqa: E501
1410
+
1411
+ _param = self._set_label_serialize(
1412
+ python_package_provenance_href=python_package_provenance_href,
1413
+ set_label=set_label,
1414
+ x_task_diagnostics=x_task_diagnostics,
1415
+ _request_auth=_request_auth,
1416
+ _content_type=_content_type,
1417
+ _headers=_headers,
1418
+ _host_index=_host_index
1419
+ )
1420
+
1421
+ _response_types_map: Dict[str, Optional[str]] = {
1422
+ '201': "SetLabelResponse",
1423
+ }
1424
+ response_data = self.api_client.call_api(
1425
+ *_param,
1426
+ _request_timeout=_request_timeout
1427
+ )
1428
+ response_data.read()
1429
+ return self.api_client.response_deserialize(
1430
+ response_data=response_data,
1431
+ response_types_map=_response_types_map,
1432
+ )
1433
+
1434
+
1435
+ @validate_call
1436
+ def set_label_without_preload_content(
1437
+ self,
1438
+ python_package_provenance_href: StrictStr,
1439
+ set_label: SetLabel,
1440
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1441
+ _request_timeout: Union[
1442
+ None,
1443
+ Annotated[StrictFloat, Field(gt=0)],
1444
+ Tuple[
1445
+ Annotated[StrictFloat, Field(gt=0)],
1446
+ Annotated[StrictFloat, Field(gt=0)]
1447
+ ]
1448
+ ] = None,
1449
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1450
+ _content_type: Optional[StrictStr] = None,
1451
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1452
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1453
+ ) -> RESTResponseType:
1454
+ """Set a label
1455
+
1456
+ Set a single pulp_label on the object to a specific value or null.
1457
+
1458
+ :param python_package_provenance_href: (required)
1459
+ :type python_package_provenance_href: str
1460
+ :param set_label: (required)
1461
+ :type set_label: SetLabel
1462
+ :param x_task_diagnostics: List of profilers to use on tasks.
1463
+ :type x_task_diagnostics: List[str]
1464
+ :param _request_timeout: timeout setting for this request. If one
1465
+ number provided, it will be total request
1466
+ timeout. It can also be a pair (tuple) of
1467
+ (connection, read) timeouts.
1468
+ :type _request_timeout: int, tuple(int, int), optional
1469
+ :param _request_auth: set to override the auth_settings for an a single
1470
+ request; this effectively ignores the
1471
+ authentication in the spec for a single request.
1472
+ :type _request_auth: dict, optional
1473
+ :param _content_type: force content-type for the request.
1474
+ :type _content_type: str, Optional
1475
+ :param _headers: set to override the headers for a single
1476
+ request; this effectively ignores the headers
1477
+ in the spec for a single request.
1478
+ :type _headers: dict, optional
1479
+ :param _host_index: set to override the host_index for a single
1480
+ request; this effectively ignores the host_index
1481
+ in the spec for a single request.
1482
+ :type _host_index: int, optional
1483
+ :return: Returns the result object.
1484
+ """ # noqa: E501
1485
+
1486
+ _param = self._set_label_serialize(
1487
+ python_package_provenance_href=python_package_provenance_href,
1488
+ set_label=set_label,
1489
+ x_task_diagnostics=x_task_diagnostics,
1490
+ _request_auth=_request_auth,
1491
+ _content_type=_content_type,
1492
+ _headers=_headers,
1493
+ _host_index=_host_index
1494
+ )
1495
+
1496
+ _response_types_map: Dict[str, Optional[str]] = {
1497
+ '201': "SetLabelResponse",
1498
+ }
1499
+ response_data = self.api_client.call_api(
1500
+ *_param,
1501
+ _request_timeout=_request_timeout
1502
+ )
1503
+ return response_data.response
1504
+
1505
+
1506
+ def _set_label_serialize(
1507
+ self,
1508
+ python_package_provenance_href,
1509
+ set_label,
1510
+ x_task_diagnostics,
1511
+ _request_auth,
1512
+ _content_type,
1513
+ _headers,
1514
+ _host_index,
1515
+ ) -> RequestSerialized:
1516
+
1517
+ _host = None
1518
+
1519
+ _collection_formats: Dict[str, str] = {
1520
+ 'X-Task-Diagnostics': 'csv',
1521
+ }
1522
+
1523
+ _path_params: Dict[str, str] = {}
1524
+ _query_params: List[Tuple[str, str]] = []
1525
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1526
+ _form_params: List[Tuple[str, str]] = []
1527
+ _files: Dict[
1528
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1529
+ ] = {}
1530
+ _body_params: Optional[bytes] = None
1531
+
1532
+ # process the path parameters
1533
+ if python_package_provenance_href is not None:
1534
+ _path_params['python_package_provenance_href'] = python_package_provenance_href
1535
+ # process the query parameters
1536
+ # process the header parameters
1537
+ if x_task_diagnostics is not None:
1538
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1539
+ # process the form parameters
1540
+ # process the body parameter
1541
+ if set_label is not None:
1542
+ _body_params = set_label
1543
+
1544
+
1545
+ # set the HTTP header `Accept`
1546
+ if 'Accept' not in _header_params:
1547
+ _header_params['Accept'] = self.api_client.select_header_accept(
1548
+ [
1549
+ 'application/json'
1550
+ ]
1551
+ )
1552
+
1553
+ # set the HTTP header `Content-Type`
1554
+ if _content_type:
1555
+ _header_params['Content-Type'] = _content_type
1556
+ else:
1557
+ _default_content_type = (
1558
+ self.api_client.select_header_content_type(
1559
+ [
1560
+ 'application/json',
1561
+ 'application/x-www-form-urlencoded',
1562
+ 'multipart/form-data'
1563
+ ]
1564
+ )
1565
+ )
1566
+ if _default_content_type is not None:
1567
+ _header_params['Content-Type'] = _default_content_type
1568
+
1569
+ # authentication setting
1570
+ _auth_settings: List[str] = [
1571
+ 'json_header_remote_authentication',
1572
+ 'basicAuth',
1573
+ 'cookieAuth'
1574
+ ]
1575
+
1576
+ return self.api_client.param_serialize(
1577
+ method='POST',
1578
+ resource_path='{python_package_provenance_href}set_label/',
1579
+ path_params=_path_params,
1580
+ query_params=_query_params,
1581
+ header_params=_header_params,
1582
+ body=_body_params,
1583
+ post_params=_form_params,
1584
+ files=_files,
1585
+ auth_settings=_auth_settings,
1586
+ collection_formats=_collection_formats,
1587
+ _host=_host,
1588
+ _request_auth=_request_auth
1589
+ )
1590
+
1591
+
1592
+
1593
+
1594
+ @validate_call
1595
+ def unset_label(
1596
+ self,
1597
+ python_package_provenance_href: StrictStr,
1598
+ unset_label: UnsetLabel,
1599
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1600
+ _request_timeout: Union[
1601
+ None,
1602
+ Annotated[StrictFloat, Field(gt=0)],
1603
+ Tuple[
1604
+ Annotated[StrictFloat, Field(gt=0)],
1605
+ Annotated[StrictFloat, Field(gt=0)]
1606
+ ]
1607
+ ] = None,
1608
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1609
+ _content_type: Optional[StrictStr] = None,
1610
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1611
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1612
+ ) -> UnsetLabelResponse:
1613
+ """Unset a label
1614
+
1615
+ Unset a single pulp_label on the object.
1616
+
1617
+ :param python_package_provenance_href: (required)
1618
+ :type python_package_provenance_href: str
1619
+ :param unset_label: (required)
1620
+ :type unset_label: UnsetLabel
1621
+ :param x_task_diagnostics: List of profilers to use on tasks.
1622
+ :type x_task_diagnostics: List[str]
1623
+ :param _request_timeout: timeout setting for this request. If one
1624
+ number provided, it will be total request
1625
+ timeout. It can also be a pair (tuple) of
1626
+ (connection, read) timeouts.
1627
+ :type _request_timeout: int, tuple(int, int), optional
1628
+ :param _request_auth: set to override the auth_settings for an a single
1629
+ request; this effectively ignores the
1630
+ authentication in the spec for a single request.
1631
+ :type _request_auth: dict, optional
1632
+ :param _content_type: force content-type for the request.
1633
+ :type _content_type: str, Optional
1634
+ :param _headers: set to override the headers for a single
1635
+ request; this effectively ignores the headers
1636
+ in the spec for a single request.
1637
+ :type _headers: dict, optional
1638
+ :param _host_index: set to override the host_index for a single
1639
+ request; this effectively ignores the host_index
1640
+ in the spec for a single request.
1641
+ :type _host_index: int, optional
1642
+ :return: Returns the result object.
1643
+ """ # noqa: E501
1644
+
1645
+ _param = self._unset_label_serialize(
1646
+ python_package_provenance_href=python_package_provenance_href,
1647
+ unset_label=unset_label,
1648
+ x_task_diagnostics=x_task_diagnostics,
1649
+ _request_auth=_request_auth,
1650
+ _content_type=_content_type,
1651
+ _headers=_headers,
1652
+ _host_index=_host_index
1653
+ )
1654
+
1655
+ _response_types_map: Dict[str, Optional[str]] = {
1656
+ '201': "UnsetLabelResponse",
1657
+ }
1658
+ response_data = self.api_client.call_api(
1659
+ *_param,
1660
+ _request_timeout=_request_timeout
1661
+ )
1662
+ response_data.read()
1663
+ return self.api_client.response_deserialize(
1664
+ response_data=response_data,
1665
+ response_types_map=_response_types_map,
1666
+ ).data
1667
+
1668
+
1669
+ @validate_call
1670
+ def unset_label_with_http_info(
1671
+ self,
1672
+ python_package_provenance_href: StrictStr,
1673
+ unset_label: UnsetLabel,
1674
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1675
+ _request_timeout: Union[
1676
+ None,
1677
+ Annotated[StrictFloat, Field(gt=0)],
1678
+ Tuple[
1679
+ Annotated[StrictFloat, Field(gt=0)],
1680
+ Annotated[StrictFloat, Field(gt=0)]
1681
+ ]
1682
+ ] = None,
1683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1684
+ _content_type: Optional[StrictStr] = None,
1685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1687
+ ) -> ApiResponse[UnsetLabelResponse]:
1688
+ """Unset a label
1689
+
1690
+ Unset a single pulp_label on the object.
1691
+
1692
+ :param python_package_provenance_href: (required)
1693
+ :type python_package_provenance_href: str
1694
+ :param unset_label: (required)
1695
+ :type unset_label: UnsetLabel
1696
+ :param x_task_diagnostics: List of profilers to use on tasks.
1697
+ :type x_task_diagnostics: List[str]
1698
+ :param _request_timeout: timeout setting for this request. If one
1699
+ number provided, it will be total request
1700
+ timeout. It can also be a pair (tuple) of
1701
+ (connection, read) timeouts.
1702
+ :type _request_timeout: int, tuple(int, int), optional
1703
+ :param _request_auth: set to override the auth_settings for an a single
1704
+ request; this effectively ignores the
1705
+ authentication in the spec for a single request.
1706
+ :type _request_auth: dict, optional
1707
+ :param _content_type: force content-type for the request.
1708
+ :type _content_type: str, Optional
1709
+ :param _headers: set to override the headers for a single
1710
+ request; this effectively ignores the headers
1711
+ in the spec for a single request.
1712
+ :type _headers: dict, optional
1713
+ :param _host_index: set to override the host_index for a single
1714
+ request; this effectively ignores the host_index
1715
+ in the spec for a single request.
1716
+ :type _host_index: int, optional
1717
+ :return: Returns the result object.
1718
+ """ # noqa: E501
1719
+
1720
+ _param = self._unset_label_serialize(
1721
+ python_package_provenance_href=python_package_provenance_href,
1722
+ unset_label=unset_label,
1723
+ x_task_diagnostics=x_task_diagnostics,
1724
+ _request_auth=_request_auth,
1725
+ _content_type=_content_type,
1726
+ _headers=_headers,
1727
+ _host_index=_host_index
1728
+ )
1729
+
1730
+ _response_types_map: Dict[str, Optional[str]] = {
1731
+ '201': "UnsetLabelResponse",
1732
+ }
1733
+ response_data = self.api_client.call_api(
1734
+ *_param,
1735
+ _request_timeout=_request_timeout
1736
+ )
1737
+ response_data.read()
1738
+ return self.api_client.response_deserialize(
1739
+ response_data=response_data,
1740
+ response_types_map=_response_types_map,
1741
+ )
1742
+
1743
+
1744
+ @validate_call
1745
+ def unset_label_without_preload_content(
1746
+ self,
1747
+ python_package_provenance_href: StrictStr,
1748
+ unset_label: UnsetLabel,
1749
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1750
+ _request_timeout: Union[
1751
+ None,
1752
+ Annotated[StrictFloat, Field(gt=0)],
1753
+ Tuple[
1754
+ Annotated[StrictFloat, Field(gt=0)],
1755
+ Annotated[StrictFloat, Field(gt=0)]
1756
+ ]
1757
+ ] = None,
1758
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1759
+ _content_type: Optional[StrictStr] = None,
1760
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1761
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1762
+ ) -> RESTResponseType:
1763
+ """Unset a label
1764
+
1765
+ Unset a single pulp_label on the object.
1766
+
1767
+ :param python_package_provenance_href: (required)
1768
+ :type python_package_provenance_href: str
1769
+ :param unset_label: (required)
1770
+ :type unset_label: UnsetLabel
1771
+ :param x_task_diagnostics: List of profilers to use on tasks.
1772
+ :type x_task_diagnostics: List[str]
1773
+ :param _request_timeout: timeout setting for this request. If one
1774
+ number provided, it will be total request
1775
+ timeout. It can also be a pair (tuple) of
1776
+ (connection, read) timeouts.
1777
+ :type _request_timeout: int, tuple(int, int), optional
1778
+ :param _request_auth: set to override the auth_settings for an a single
1779
+ request; this effectively ignores the
1780
+ authentication in the spec for a single request.
1781
+ :type _request_auth: dict, optional
1782
+ :param _content_type: force content-type for the request.
1783
+ :type _content_type: str, Optional
1784
+ :param _headers: set to override the headers for a single
1785
+ request; this effectively ignores the headers
1786
+ in the spec for a single request.
1787
+ :type _headers: dict, optional
1788
+ :param _host_index: set to override the host_index for a single
1789
+ request; this effectively ignores the host_index
1790
+ in the spec for a single request.
1791
+ :type _host_index: int, optional
1792
+ :return: Returns the result object.
1793
+ """ # noqa: E501
1794
+
1795
+ _param = self._unset_label_serialize(
1796
+ python_package_provenance_href=python_package_provenance_href,
1797
+ unset_label=unset_label,
1798
+ x_task_diagnostics=x_task_diagnostics,
1799
+ _request_auth=_request_auth,
1800
+ _content_type=_content_type,
1801
+ _headers=_headers,
1802
+ _host_index=_host_index
1803
+ )
1804
+
1805
+ _response_types_map: Dict[str, Optional[str]] = {
1806
+ '201': "UnsetLabelResponse",
1807
+ }
1808
+ response_data = self.api_client.call_api(
1809
+ *_param,
1810
+ _request_timeout=_request_timeout
1811
+ )
1812
+ return response_data.response
1813
+
1814
+
1815
+ def _unset_label_serialize(
1816
+ self,
1817
+ python_package_provenance_href,
1818
+ unset_label,
1819
+ x_task_diagnostics,
1820
+ _request_auth,
1821
+ _content_type,
1822
+ _headers,
1823
+ _host_index,
1824
+ ) -> RequestSerialized:
1825
+
1826
+ _host = None
1827
+
1828
+ _collection_formats: Dict[str, str] = {
1829
+ 'X-Task-Diagnostics': 'csv',
1830
+ }
1831
+
1832
+ _path_params: Dict[str, str] = {}
1833
+ _query_params: List[Tuple[str, str]] = []
1834
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1835
+ _form_params: List[Tuple[str, str]] = []
1836
+ _files: Dict[
1837
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1838
+ ] = {}
1839
+ _body_params: Optional[bytes] = None
1840
+
1841
+ # process the path parameters
1842
+ if python_package_provenance_href is not None:
1843
+ _path_params['python_package_provenance_href'] = python_package_provenance_href
1844
+ # process the query parameters
1845
+ # process the header parameters
1846
+ if x_task_diagnostics is not None:
1847
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1848
+ # process the form parameters
1849
+ # process the body parameter
1850
+ if unset_label is not None:
1851
+ _body_params = unset_label
1852
+
1853
+
1854
+ # set the HTTP header `Accept`
1855
+ if 'Accept' not in _header_params:
1856
+ _header_params['Accept'] = self.api_client.select_header_accept(
1857
+ [
1858
+ 'application/json'
1859
+ ]
1860
+ )
1861
+
1862
+ # set the HTTP header `Content-Type`
1863
+ if _content_type:
1864
+ _header_params['Content-Type'] = _content_type
1865
+ else:
1866
+ _default_content_type = (
1867
+ self.api_client.select_header_content_type(
1868
+ [
1869
+ 'application/json',
1870
+ 'application/x-www-form-urlencoded',
1871
+ 'multipart/form-data'
1872
+ ]
1873
+ )
1874
+ )
1875
+ if _default_content_type is not None:
1876
+ _header_params['Content-Type'] = _default_content_type
1877
+
1878
+ # authentication setting
1879
+ _auth_settings: List[str] = [
1880
+ 'json_header_remote_authentication',
1881
+ 'basicAuth',
1882
+ 'cookieAuth'
1883
+ ]
1884
+
1885
+ return self.api_client.param_serialize(
1886
+ method='POST',
1887
+ resource_path='{python_package_provenance_href}unset_label/',
1888
+ path_params=_path_params,
1889
+ query_params=_query_params,
1890
+ header_params=_header_params,
1891
+ body=_body_params,
1892
+ post_params=_form_params,
1893
+ files=_files,
1894
+ auth_settings=_auth_settings,
1895
+ collection_formats=_collection_formats,
1896
+ _host=_host,
1897
+ _request_auth=_request_auth
1898
+ )
1899
+
1900
+