crc-pulp-npm-client 20250819.1__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-npm-client might be problematic. Click here for more details.
- crc-pulp_npm-client/__init__.py +2 -0
- crc-pulp_npm-client/api/__init__.py +9 -0
- crc-pulp_npm-client/api/content_packages_api.py +1964 -0
- crc-pulp_npm-client/api/distributions_npm_api.py +2934 -0
- crc-pulp_npm-client/api/remotes_npm_api.py +2962 -0
- crc-pulp_npm-client/api/repositories_npm_api.py +3604 -0
- crc-pulp_npm-client/api/repositories_npm_versions_api.py +1670 -0
- crc-pulp_npm-client/api_client.py +798 -0
- crc-pulp_npm-client/api_response.py +21 -0
- crc-pulp_npm-client/configuration.py +628 -0
- crc-pulp_npm-client/exceptions.py +200 -0
- crc-pulp_npm-client/models/__init__.py +44 -0
- crc-pulp_npm-client/models/async_operation_response.py +88 -0
- crc-pulp_npm-client/models/content_summary_response.py +92 -0
- crc-pulp_npm-client/models/npm_npm_distribution.py +116 -0
- crc-pulp_npm-client/models/npm_npm_distribution_response.py +140 -0
- crc-pulp_npm-client/models/npm_npm_remote.py +205 -0
- crc-pulp_npm-client/models/npm_npm_remote_response.py +199 -0
- crc-pulp_npm-client/models/npm_npm_remote_response_hidden_fields_inner.py +90 -0
- crc-pulp_npm-client/models/npm_npm_repository.py +112 -0
- crc-pulp_npm-client/models/npm_npm_repository_response.py +137 -0
- crc-pulp_npm-client/models/npm_package_response.py +113 -0
- crc-pulp_npm-client/models/paginated_repository_version_response_list.py +112 -0
- crc-pulp_npm-client/models/paginatednpm_npm_distribution_response_list.py +112 -0
- crc-pulp_npm-client/models/paginatednpm_npm_remote_response_list.py +112 -0
- crc-pulp_npm-client/models/paginatednpm_npm_repository_response_list.py +112 -0
- crc-pulp_npm-client/models/paginatednpm_package_response_list.py +112 -0
- crc-pulp_npm-client/models/patchednpm_npm_distribution.py +116 -0
- crc-pulp_npm-client/models/patchednpm_npm_remote.py +205 -0
- crc-pulp_npm-client/models/patchednpm_npm_repository.py +112 -0
- crc-pulp_npm-client/models/policy_enum.py +39 -0
- crc-pulp_npm-client/models/repair.py +88 -0
- crc-pulp_npm-client/models/repository_add_remove_content.py +93 -0
- crc-pulp_npm-client/models/repository_sync_url.py +90 -0
- crc-pulp_npm-client/models/repository_version_response.py +121 -0
- crc-pulp_npm-client/models/set_label.py +103 -0
- crc-pulp_npm-client/models/set_label_response.py +103 -0
- crc-pulp_npm-client/models/unset_label.py +96 -0
- crc-pulp_npm-client/models/unset_label_response.py +100 -0
- crc-pulp_npm-client/py.typed +0 -0
- crc-pulp_npm-client/rest.py +258 -0
- crc_pulp_npm_client-20250819.1.dist-info/METADATA +25 -0
- crc_pulp_npm_client-20250819.1.dist-info/RECORD +86 -0
- crc_pulp_npm_client-20250819.1.dist-info/WHEEL +5 -0
- crc_pulp_npm_client-20250819.1.dist-info/top_level.txt +2 -0
- services-pulp_npm-client/__init__.py +2 -0
- services-pulp_npm-client/api/__init__.py +9 -0
- services-pulp_npm-client/api/content_packages_api.py +1964 -0
- services-pulp_npm-client/api/distributions_npm_api.py +2934 -0
- services-pulp_npm-client/api/remotes_npm_api.py +2962 -0
- services-pulp_npm-client/api/repositories_npm_api.py +3604 -0
- services-pulp_npm-client/api/repositories_npm_versions_api.py +1670 -0
- services-pulp_npm-client/api_client.py +798 -0
- services-pulp_npm-client/api_response.py +21 -0
- services-pulp_npm-client/configuration.py +628 -0
- services-pulp_npm-client/exceptions.py +200 -0
- services-pulp_npm-client/models/__init__.py +44 -0
- services-pulp_npm-client/models/async_operation_response.py +88 -0
- services-pulp_npm-client/models/content_summary_response.py +92 -0
- services-pulp_npm-client/models/npm_npm_distribution.py +116 -0
- services-pulp_npm-client/models/npm_npm_distribution_response.py +140 -0
- services-pulp_npm-client/models/npm_npm_remote.py +205 -0
- services-pulp_npm-client/models/npm_npm_remote_response.py +199 -0
- services-pulp_npm-client/models/npm_npm_remote_response_hidden_fields_inner.py +90 -0
- services-pulp_npm-client/models/npm_npm_repository.py +112 -0
- services-pulp_npm-client/models/npm_npm_repository_response.py +137 -0
- services-pulp_npm-client/models/npm_package_response.py +113 -0
- services-pulp_npm-client/models/paginated_repository_version_response_list.py +112 -0
- services-pulp_npm-client/models/paginatednpm_npm_distribution_response_list.py +112 -0
- services-pulp_npm-client/models/paginatednpm_npm_remote_response_list.py +112 -0
- services-pulp_npm-client/models/paginatednpm_npm_repository_response_list.py +112 -0
- services-pulp_npm-client/models/paginatednpm_package_response_list.py +112 -0
- services-pulp_npm-client/models/patchednpm_npm_distribution.py +116 -0
- services-pulp_npm-client/models/patchednpm_npm_remote.py +205 -0
- services-pulp_npm-client/models/patchednpm_npm_repository.py +112 -0
- services-pulp_npm-client/models/policy_enum.py +39 -0
- services-pulp_npm-client/models/repair.py +88 -0
- services-pulp_npm-client/models/repository_add_remove_content.py +93 -0
- services-pulp_npm-client/models/repository_sync_url.py +90 -0
- services-pulp_npm-client/models/repository_version_response.py +121 -0
- services-pulp_npm-client/models/set_label.py +103 -0
- services-pulp_npm-client/models/set_label_response.py +103 -0
- services-pulp_npm-client/models/unset_label.py +96 -0
- services-pulp_npm-client/models/unset_label_response.py +100 -0
- services-pulp_npm-client/py.typed +0 -0
- services-pulp_npm-client/rest.py +258 -0
|
@@ -0,0 +1,2934 @@
|
|
|
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, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from services-pulp_npm-client.models.async_operation_response import AsyncOperationResponse
|
|
24
|
+
from services-pulp_npm-client.models.npm_npm_distribution import NpmNpmDistribution
|
|
25
|
+
from services-pulp_npm-client.models.npm_npm_distribution_response import NpmNpmDistributionResponse
|
|
26
|
+
from services-pulp_npm-client.models.paginatednpm_npm_distribution_response_list import PaginatednpmNpmDistributionResponseList
|
|
27
|
+
from services-pulp_npm-client.models.patchednpm_npm_distribution import PatchednpmNpmDistribution
|
|
28
|
+
from services-pulp_npm-client.models.set_label import SetLabel
|
|
29
|
+
from services-pulp_npm-client.models.set_label_response import SetLabelResponse
|
|
30
|
+
from services-pulp_npm-client.models.unset_label import UnsetLabel
|
|
31
|
+
from services-pulp_npm-client.models.unset_label_response import UnsetLabelResponse
|
|
32
|
+
|
|
33
|
+
from services-pulp_npm-client.api_client import ApiClient, RequestSerialized
|
|
34
|
+
from services-pulp_npm-client.api_response import ApiResponse
|
|
35
|
+
from services-pulp_npm-client.rest import RESTResponseType
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DistributionsNpmApi:
|
|
39
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
40
|
+
Ref: https://openapi-generator.tech
|
|
41
|
+
|
|
42
|
+
Do not edit the class manually.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, api_client=None) -> None:
|
|
46
|
+
if api_client is None:
|
|
47
|
+
api_client = ApiClient.get_default()
|
|
48
|
+
self.api_client = api_client
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@validate_call
|
|
52
|
+
def create(
|
|
53
|
+
self,
|
|
54
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
55
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
56
|
+
pulp_domain: StrictStr = "default",
|
|
57
|
+
_request_timeout: Union[
|
|
58
|
+
None,
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Tuple[
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
+
]
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> AsyncOperationResponse:
|
|
70
|
+
"""Create a npm distribution
|
|
71
|
+
|
|
72
|
+
Trigger an asynchronous create task
|
|
73
|
+
|
|
74
|
+
:param pulp_domain: (required)
|
|
75
|
+
:type pulp_domain: str
|
|
76
|
+
:param npm_npm_distribution: (required)
|
|
77
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
78
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
79
|
+
:type x_task_diagnostics: List[str]
|
|
80
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
81
|
+
number provided, it will be total request
|
|
82
|
+
timeout. It can also be a pair (tuple) of
|
|
83
|
+
(connection, read) timeouts.
|
|
84
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
85
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
86
|
+
request; this effectively ignores the
|
|
87
|
+
authentication in the spec for a single request.
|
|
88
|
+
:type _request_auth: dict, optional
|
|
89
|
+
:param _content_type: force content-type for the request.
|
|
90
|
+
:type _content_type: str, Optional
|
|
91
|
+
:param _headers: set to override the headers for a single
|
|
92
|
+
request; this effectively ignores the headers
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _headers: dict, optional
|
|
95
|
+
:param _host_index: set to override the host_index for a single
|
|
96
|
+
request; this effectively ignores the host_index
|
|
97
|
+
in the spec for a single request.
|
|
98
|
+
:type _host_index: int, optional
|
|
99
|
+
:return: Returns the result object.
|
|
100
|
+
""" # noqa: E501
|
|
101
|
+
|
|
102
|
+
_param = self._create_serialize(
|
|
103
|
+
pulp_domain=pulp_domain,
|
|
104
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
105
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
106
|
+
_request_auth=_request_auth,
|
|
107
|
+
_content_type=_content_type,
|
|
108
|
+
_headers=_headers,
|
|
109
|
+
_host_index=_host_index
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
113
|
+
'202': "AsyncOperationResponse",
|
|
114
|
+
}
|
|
115
|
+
response_data = self.api_client.call_api(
|
|
116
|
+
*_param,
|
|
117
|
+
_request_timeout=_request_timeout
|
|
118
|
+
)
|
|
119
|
+
response_data.read()
|
|
120
|
+
return self.api_client.response_deserialize(
|
|
121
|
+
response_data=response_data,
|
|
122
|
+
response_types_map=_response_types_map,
|
|
123
|
+
).data
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@validate_call
|
|
127
|
+
def create_with_http_info(
|
|
128
|
+
self,
|
|
129
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
130
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
131
|
+
pulp_domain: StrictStr = "default",
|
|
132
|
+
_request_timeout: Union[
|
|
133
|
+
None,
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Tuple[
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
137
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
138
|
+
]
|
|
139
|
+
] = None,
|
|
140
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_content_type: Optional[StrictStr] = None,
|
|
142
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
143
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
144
|
+
) -> ApiResponse[AsyncOperationResponse]:
|
|
145
|
+
"""Create a npm distribution
|
|
146
|
+
|
|
147
|
+
Trigger an asynchronous create task
|
|
148
|
+
|
|
149
|
+
:param pulp_domain: (required)
|
|
150
|
+
:type pulp_domain: str
|
|
151
|
+
:param npm_npm_distribution: (required)
|
|
152
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
153
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
154
|
+
:type x_task_diagnostics: List[str]
|
|
155
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
156
|
+
number provided, it will be total request
|
|
157
|
+
timeout. It can also be a pair (tuple) of
|
|
158
|
+
(connection, read) timeouts.
|
|
159
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
160
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
161
|
+
request; this effectively ignores the
|
|
162
|
+
authentication in the spec for a single request.
|
|
163
|
+
:type _request_auth: dict, optional
|
|
164
|
+
:param _content_type: force content-type for the request.
|
|
165
|
+
:type _content_type: str, Optional
|
|
166
|
+
:param _headers: set to override the headers for a single
|
|
167
|
+
request; this effectively ignores the headers
|
|
168
|
+
in the spec for a single request.
|
|
169
|
+
:type _headers: dict, optional
|
|
170
|
+
:param _host_index: set to override the host_index for a single
|
|
171
|
+
request; this effectively ignores the host_index
|
|
172
|
+
in the spec for a single request.
|
|
173
|
+
:type _host_index: int, optional
|
|
174
|
+
:return: Returns the result object.
|
|
175
|
+
""" # noqa: E501
|
|
176
|
+
|
|
177
|
+
_param = self._create_serialize(
|
|
178
|
+
pulp_domain=pulp_domain,
|
|
179
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
180
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
181
|
+
_request_auth=_request_auth,
|
|
182
|
+
_content_type=_content_type,
|
|
183
|
+
_headers=_headers,
|
|
184
|
+
_host_index=_host_index
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
188
|
+
'202': "AsyncOperationResponse",
|
|
189
|
+
}
|
|
190
|
+
response_data = self.api_client.call_api(
|
|
191
|
+
*_param,
|
|
192
|
+
_request_timeout=_request_timeout
|
|
193
|
+
)
|
|
194
|
+
response_data.read()
|
|
195
|
+
return self.api_client.response_deserialize(
|
|
196
|
+
response_data=response_data,
|
|
197
|
+
response_types_map=_response_types_map,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@validate_call
|
|
202
|
+
def create_without_preload_content(
|
|
203
|
+
self,
|
|
204
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
205
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
206
|
+
pulp_domain: StrictStr = "default",
|
|
207
|
+
_request_timeout: Union[
|
|
208
|
+
None,
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
210
|
+
Tuple[
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
212
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
213
|
+
]
|
|
214
|
+
] = None,
|
|
215
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
216
|
+
_content_type: Optional[StrictStr] = None,
|
|
217
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
218
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
219
|
+
) -> RESTResponseType:
|
|
220
|
+
"""Create a npm distribution
|
|
221
|
+
|
|
222
|
+
Trigger an asynchronous create task
|
|
223
|
+
|
|
224
|
+
:param pulp_domain: (required)
|
|
225
|
+
:type pulp_domain: str
|
|
226
|
+
:param npm_npm_distribution: (required)
|
|
227
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
228
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
229
|
+
:type x_task_diagnostics: List[str]
|
|
230
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
231
|
+
number provided, it will be total request
|
|
232
|
+
timeout. It can also be a pair (tuple) of
|
|
233
|
+
(connection, read) timeouts.
|
|
234
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
235
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
236
|
+
request; this effectively ignores the
|
|
237
|
+
authentication in the spec for a single request.
|
|
238
|
+
:type _request_auth: dict, optional
|
|
239
|
+
:param _content_type: force content-type for the request.
|
|
240
|
+
:type _content_type: str, Optional
|
|
241
|
+
:param _headers: set to override the headers for a single
|
|
242
|
+
request; this effectively ignores the headers
|
|
243
|
+
in the spec for a single request.
|
|
244
|
+
:type _headers: dict, optional
|
|
245
|
+
:param _host_index: set to override the host_index for a single
|
|
246
|
+
request; this effectively ignores the host_index
|
|
247
|
+
in the spec for a single request.
|
|
248
|
+
:type _host_index: int, optional
|
|
249
|
+
:return: Returns the result object.
|
|
250
|
+
""" # noqa: E501
|
|
251
|
+
|
|
252
|
+
_param = self._create_serialize(
|
|
253
|
+
pulp_domain=pulp_domain,
|
|
254
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
255
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
256
|
+
_request_auth=_request_auth,
|
|
257
|
+
_content_type=_content_type,
|
|
258
|
+
_headers=_headers,
|
|
259
|
+
_host_index=_host_index
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
263
|
+
'202': "AsyncOperationResponse",
|
|
264
|
+
}
|
|
265
|
+
response_data = self.api_client.call_api(
|
|
266
|
+
*_param,
|
|
267
|
+
_request_timeout=_request_timeout
|
|
268
|
+
)
|
|
269
|
+
return response_data.response
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def _create_serialize(
|
|
273
|
+
self,
|
|
274
|
+
pulp_domain,
|
|
275
|
+
npm_npm_distribution,
|
|
276
|
+
x_task_diagnostics,
|
|
277
|
+
_request_auth,
|
|
278
|
+
_content_type,
|
|
279
|
+
_headers,
|
|
280
|
+
_host_index,
|
|
281
|
+
) -> RequestSerialized:
|
|
282
|
+
|
|
283
|
+
_host = None
|
|
284
|
+
|
|
285
|
+
_collection_formats: Dict[str, str] = {
|
|
286
|
+
'X-Task-Diagnostics': 'csv',
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
_path_params: Dict[str, str] = {}
|
|
290
|
+
_query_params: List[Tuple[str, str]] = []
|
|
291
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
292
|
+
_form_params: List[Tuple[str, str]] = []
|
|
293
|
+
_files: Dict[
|
|
294
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
295
|
+
] = {}
|
|
296
|
+
_body_params: Optional[bytes] = None
|
|
297
|
+
|
|
298
|
+
# process the path parameters
|
|
299
|
+
if pulp_domain is not None:
|
|
300
|
+
_path_params['pulp_domain'] = pulp_domain
|
|
301
|
+
# process the query parameters
|
|
302
|
+
# process the header parameters
|
|
303
|
+
if x_task_diagnostics is not None:
|
|
304
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
305
|
+
# process the form parameters
|
|
306
|
+
# process the body parameter
|
|
307
|
+
if npm_npm_distribution is not None:
|
|
308
|
+
_body_params = npm_npm_distribution
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
# set the HTTP header `Accept`
|
|
312
|
+
if 'Accept' not in _header_params:
|
|
313
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
314
|
+
[
|
|
315
|
+
'application/json'
|
|
316
|
+
]
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
# set the HTTP header `Content-Type`
|
|
320
|
+
if _content_type:
|
|
321
|
+
_header_params['Content-Type'] = _content_type
|
|
322
|
+
else:
|
|
323
|
+
_default_content_type = (
|
|
324
|
+
self.api_client.select_header_content_type(
|
|
325
|
+
[
|
|
326
|
+
'application/json',
|
|
327
|
+
'application/x-www-form-urlencoded',
|
|
328
|
+
'multipart/form-data'
|
|
329
|
+
]
|
|
330
|
+
)
|
|
331
|
+
)
|
|
332
|
+
if _default_content_type is not None:
|
|
333
|
+
_header_params['Content-Type'] = _default_content_type
|
|
334
|
+
|
|
335
|
+
# authentication setting
|
|
336
|
+
_auth_settings: List[str] = [
|
|
337
|
+
'json_header_remote_authentication',
|
|
338
|
+
'basicAuth',
|
|
339
|
+
'cookieAuth'
|
|
340
|
+
]
|
|
341
|
+
|
|
342
|
+
return self.api_client.param_serialize(
|
|
343
|
+
method='POST',
|
|
344
|
+
resource_path='/api/pulp/{pulp_domain}/api/v3/distributions/npm/npm/',
|
|
345
|
+
path_params=_path_params,
|
|
346
|
+
query_params=_query_params,
|
|
347
|
+
header_params=_header_params,
|
|
348
|
+
body=_body_params,
|
|
349
|
+
post_params=_form_params,
|
|
350
|
+
files=_files,
|
|
351
|
+
auth_settings=_auth_settings,
|
|
352
|
+
collection_formats=_collection_formats,
|
|
353
|
+
_host=_host,
|
|
354
|
+
_request_auth=_request_auth
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
@validate_call
|
|
361
|
+
def delete(
|
|
362
|
+
self,
|
|
363
|
+
npm_npm_distribution_href: StrictStr,
|
|
364
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
365
|
+
_request_timeout: Union[
|
|
366
|
+
None,
|
|
367
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
368
|
+
Tuple[
|
|
369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
370
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
371
|
+
]
|
|
372
|
+
] = None,
|
|
373
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
374
|
+
_content_type: Optional[StrictStr] = None,
|
|
375
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
376
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
377
|
+
) -> AsyncOperationResponse:
|
|
378
|
+
"""Delete a npm distribution
|
|
379
|
+
|
|
380
|
+
Trigger an asynchronous delete task
|
|
381
|
+
|
|
382
|
+
:param npm_npm_distribution_href: (required)
|
|
383
|
+
:type npm_npm_distribution_href: str
|
|
384
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
385
|
+
:type x_task_diagnostics: List[str]
|
|
386
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
387
|
+
number provided, it will be total request
|
|
388
|
+
timeout. It can also be a pair (tuple) of
|
|
389
|
+
(connection, read) timeouts.
|
|
390
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
391
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
392
|
+
request; this effectively ignores the
|
|
393
|
+
authentication in the spec for a single request.
|
|
394
|
+
:type _request_auth: dict, optional
|
|
395
|
+
:param _content_type: force content-type for the request.
|
|
396
|
+
:type _content_type: str, Optional
|
|
397
|
+
:param _headers: set to override the headers for a single
|
|
398
|
+
request; this effectively ignores the headers
|
|
399
|
+
in the spec for a single request.
|
|
400
|
+
:type _headers: dict, optional
|
|
401
|
+
:param _host_index: set to override the host_index for a single
|
|
402
|
+
request; this effectively ignores the host_index
|
|
403
|
+
in the spec for a single request.
|
|
404
|
+
:type _host_index: int, optional
|
|
405
|
+
:return: Returns the result object.
|
|
406
|
+
""" # noqa: E501
|
|
407
|
+
|
|
408
|
+
_param = self._delete_serialize(
|
|
409
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
410
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
411
|
+
_request_auth=_request_auth,
|
|
412
|
+
_content_type=_content_type,
|
|
413
|
+
_headers=_headers,
|
|
414
|
+
_host_index=_host_index
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
418
|
+
'202': "AsyncOperationResponse",
|
|
419
|
+
}
|
|
420
|
+
response_data = self.api_client.call_api(
|
|
421
|
+
*_param,
|
|
422
|
+
_request_timeout=_request_timeout
|
|
423
|
+
)
|
|
424
|
+
response_data.read()
|
|
425
|
+
return self.api_client.response_deserialize(
|
|
426
|
+
response_data=response_data,
|
|
427
|
+
response_types_map=_response_types_map,
|
|
428
|
+
).data
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
@validate_call
|
|
432
|
+
def delete_with_http_info(
|
|
433
|
+
self,
|
|
434
|
+
npm_npm_distribution_href: StrictStr,
|
|
435
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
436
|
+
_request_timeout: Union[
|
|
437
|
+
None,
|
|
438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
439
|
+
Tuple[
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
442
|
+
]
|
|
443
|
+
] = None,
|
|
444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
445
|
+
_content_type: Optional[StrictStr] = None,
|
|
446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
448
|
+
) -> ApiResponse[AsyncOperationResponse]:
|
|
449
|
+
"""Delete a npm distribution
|
|
450
|
+
|
|
451
|
+
Trigger an asynchronous delete task
|
|
452
|
+
|
|
453
|
+
:param npm_npm_distribution_href: (required)
|
|
454
|
+
:type npm_npm_distribution_href: str
|
|
455
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
456
|
+
:type x_task_diagnostics: List[str]
|
|
457
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
458
|
+
number provided, it will be total request
|
|
459
|
+
timeout. It can also be a pair (tuple) of
|
|
460
|
+
(connection, read) timeouts.
|
|
461
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
462
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
463
|
+
request; this effectively ignores the
|
|
464
|
+
authentication in the spec for a single request.
|
|
465
|
+
:type _request_auth: dict, optional
|
|
466
|
+
:param _content_type: force content-type for the request.
|
|
467
|
+
:type _content_type: str, Optional
|
|
468
|
+
:param _headers: set to override the headers for a single
|
|
469
|
+
request; this effectively ignores the headers
|
|
470
|
+
in the spec for a single request.
|
|
471
|
+
:type _headers: dict, optional
|
|
472
|
+
:param _host_index: set to override the host_index for a single
|
|
473
|
+
request; this effectively ignores the host_index
|
|
474
|
+
in the spec for a single request.
|
|
475
|
+
:type _host_index: int, optional
|
|
476
|
+
:return: Returns the result object.
|
|
477
|
+
""" # noqa: E501
|
|
478
|
+
|
|
479
|
+
_param = self._delete_serialize(
|
|
480
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
481
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
482
|
+
_request_auth=_request_auth,
|
|
483
|
+
_content_type=_content_type,
|
|
484
|
+
_headers=_headers,
|
|
485
|
+
_host_index=_host_index
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
489
|
+
'202': "AsyncOperationResponse",
|
|
490
|
+
}
|
|
491
|
+
response_data = self.api_client.call_api(
|
|
492
|
+
*_param,
|
|
493
|
+
_request_timeout=_request_timeout
|
|
494
|
+
)
|
|
495
|
+
response_data.read()
|
|
496
|
+
return self.api_client.response_deserialize(
|
|
497
|
+
response_data=response_data,
|
|
498
|
+
response_types_map=_response_types_map,
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
@validate_call
|
|
503
|
+
def delete_without_preload_content(
|
|
504
|
+
self,
|
|
505
|
+
npm_npm_distribution_href: StrictStr,
|
|
506
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
507
|
+
_request_timeout: Union[
|
|
508
|
+
None,
|
|
509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
510
|
+
Tuple[
|
|
511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
512
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
513
|
+
]
|
|
514
|
+
] = None,
|
|
515
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
516
|
+
_content_type: Optional[StrictStr] = None,
|
|
517
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
518
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
519
|
+
) -> RESTResponseType:
|
|
520
|
+
"""Delete a npm distribution
|
|
521
|
+
|
|
522
|
+
Trigger an asynchronous delete task
|
|
523
|
+
|
|
524
|
+
:param npm_npm_distribution_href: (required)
|
|
525
|
+
:type npm_npm_distribution_href: str
|
|
526
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
527
|
+
:type x_task_diagnostics: List[str]
|
|
528
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
529
|
+
number provided, it will be total request
|
|
530
|
+
timeout. It can also be a pair (tuple) of
|
|
531
|
+
(connection, read) timeouts.
|
|
532
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
533
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
534
|
+
request; this effectively ignores the
|
|
535
|
+
authentication in the spec for a single request.
|
|
536
|
+
:type _request_auth: dict, optional
|
|
537
|
+
:param _content_type: force content-type for the request.
|
|
538
|
+
:type _content_type: str, Optional
|
|
539
|
+
:param _headers: set to override the headers for a single
|
|
540
|
+
request; this effectively ignores the headers
|
|
541
|
+
in the spec for a single request.
|
|
542
|
+
:type _headers: dict, optional
|
|
543
|
+
:param _host_index: set to override the host_index for a single
|
|
544
|
+
request; this effectively ignores the host_index
|
|
545
|
+
in the spec for a single request.
|
|
546
|
+
:type _host_index: int, optional
|
|
547
|
+
:return: Returns the result object.
|
|
548
|
+
""" # noqa: E501
|
|
549
|
+
|
|
550
|
+
_param = self._delete_serialize(
|
|
551
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
552
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
553
|
+
_request_auth=_request_auth,
|
|
554
|
+
_content_type=_content_type,
|
|
555
|
+
_headers=_headers,
|
|
556
|
+
_host_index=_host_index
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
560
|
+
'202': "AsyncOperationResponse",
|
|
561
|
+
}
|
|
562
|
+
response_data = self.api_client.call_api(
|
|
563
|
+
*_param,
|
|
564
|
+
_request_timeout=_request_timeout
|
|
565
|
+
)
|
|
566
|
+
return response_data.response
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
def _delete_serialize(
|
|
570
|
+
self,
|
|
571
|
+
npm_npm_distribution_href,
|
|
572
|
+
x_task_diagnostics,
|
|
573
|
+
_request_auth,
|
|
574
|
+
_content_type,
|
|
575
|
+
_headers,
|
|
576
|
+
_host_index,
|
|
577
|
+
) -> RequestSerialized:
|
|
578
|
+
|
|
579
|
+
_host = None
|
|
580
|
+
|
|
581
|
+
_collection_formats: Dict[str, str] = {
|
|
582
|
+
'X-Task-Diagnostics': 'csv',
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
_path_params: Dict[str, str] = {}
|
|
586
|
+
_query_params: List[Tuple[str, str]] = []
|
|
587
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
588
|
+
_form_params: List[Tuple[str, str]] = []
|
|
589
|
+
_files: Dict[
|
|
590
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
591
|
+
] = {}
|
|
592
|
+
_body_params: Optional[bytes] = None
|
|
593
|
+
|
|
594
|
+
# process the path parameters
|
|
595
|
+
if npm_npm_distribution_href is not None:
|
|
596
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
597
|
+
# process the query parameters
|
|
598
|
+
# process the header parameters
|
|
599
|
+
if x_task_diagnostics is not None:
|
|
600
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
601
|
+
# process the form parameters
|
|
602
|
+
# process the body parameter
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
# set the HTTP header `Accept`
|
|
606
|
+
if 'Accept' not in _header_params:
|
|
607
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
608
|
+
[
|
|
609
|
+
'application/json'
|
|
610
|
+
]
|
|
611
|
+
)
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
# authentication setting
|
|
615
|
+
_auth_settings: List[str] = [
|
|
616
|
+
'json_header_remote_authentication',
|
|
617
|
+
'basicAuth',
|
|
618
|
+
'cookieAuth'
|
|
619
|
+
]
|
|
620
|
+
|
|
621
|
+
return self.api_client.param_serialize(
|
|
622
|
+
method='DELETE',
|
|
623
|
+
resource_path='{npm_npm_distribution_href}',
|
|
624
|
+
path_params=_path_params,
|
|
625
|
+
query_params=_query_params,
|
|
626
|
+
header_params=_header_params,
|
|
627
|
+
body=_body_params,
|
|
628
|
+
post_params=_form_params,
|
|
629
|
+
files=_files,
|
|
630
|
+
auth_settings=_auth_settings,
|
|
631
|
+
collection_formats=_collection_formats,
|
|
632
|
+
_host=_host,
|
|
633
|
+
_request_auth=_request_auth
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
@validate_call
|
|
640
|
+
def list(
|
|
641
|
+
self,
|
|
642
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
643
|
+
base_path: Annotated[Optional[StrictStr], Field(description="Filter results where base_path matches value")] = None,
|
|
644
|
+
base_path__contains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
645
|
+
base_path__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
646
|
+
base_path__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where base_path is in a comma-separated list of values")] = None,
|
|
647
|
+
checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
|
|
648
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
649
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
650
|
+
name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
651
|
+
name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
652
|
+
name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
653
|
+
name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
|
|
654
|
+
name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
655
|
+
name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
656
|
+
name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
657
|
+
name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
658
|
+
offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
|
|
659
|
+
ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
|
|
660
|
+
prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
661
|
+
pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
662
|
+
pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
663
|
+
pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
|
|
664
|
+
q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
|
|
665
|
+
repository: Annotated[Optional[StrictStr], Field(description="Filter results where repository matches value")] = None,
|
|
666
|
+
repository__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where repository is in a comma-separated list of values")] = None,
|
|
667
|
+
with_content: Annotated[Optional[StrictStr], Field(description="Filter distributions based on the content served by them")] = None,
|
|
668
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
669
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
670
|
+
pulp_domain: StrictStr = "default",
|
|
671
|
+
_request_timeout: Union[
|
|
672
|
+
None,
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Tuple[
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
677
|
+
]
|
|
678
|
+
] = None,
|
|
679
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_content_type: Optional[StrictStr] = None,
|
|
681
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
683
|
+
) -> PaginatednpmNpmDistributionResponseList:
|
|
684
|
+
"""List npm distributions
|
|
685
|
+
|
|
686
|
+
ViewSet for NPM Distributions.
|
|
687
|
+
|
|
688
|
+
:param pulp_domain: (required)
|
|
689
|
+
:type pulp_domain: str
|
|
690
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
691
|
+
:type x_task_diagnostics: List[str]
|
|
692
|
+
:param base_path: Filter results where base_path matches value
|
|
693
|
+
:type base_path: str
|
|
694
|
+
:param base_path__contains: Filter results where base_path contains value
|
|
695
|
+
:type base_path__contains: str
|
|
696
|
+
:param base_path__icontains: Filter results where base_path contains value
|
|
697
|
+
:type base_path__icontains: str
|
|
698
|
+
:param base_path__in: Filter results where base_path is in a comma-separated list of values
|
|
699
|
+
:type base_path__in: List[str]
|
|
700
|
+
:param checkpoint: Filter results where checkpoint matches value
|
|
701
|
+
:type checkpoint: bool
|
|
702
|
+
:param limit: Number of results to return per page.
|
|
703
|
+
:type limit: int
|
|
704
|
+
:param name: Filter results where name matches value
|
|
705
|
+
:type name: str
|
|
706
|
+
:param name__contains: Filter results where name contains value
|
|
707
|
+
:type name__contains: str
|
|
708
|
+
:param name__icontains: Filter results where name contains value
|
|
709
|
+
:type name__icontains: str
|
|
710
|
+
:param name__iexact: Filter results where name matches value
|
|
711
|
+
:type name__iexact: str
|
|
712
|
+
:param name__in: Filter results where name is in a comma-separated list of values
|
|
713
|
+
:type name__in: List[str]
|
|
714
|
+
:param name__iregex: Filter results where name matches regex value
|
|
715
|
+
:type name__iregex: str
|
|
716
|
+
:param name__istartswith: Filter results where name starts with value
|
|
717
|
+
:type name__istartswith: str
|
|
718
|
+
:param name__regex: Filter results where name matches regex value
|
|
719
|
+
:type name__regex: str
|
|
720
|
+
:param name__startswith: Filter results where name starts with value
|
|
721
|
+
:type name__startswith: str
|
|
722
|
+
:param offset: The initial index from which to return the results.
|
|
723
|
+
:type offset: int
|
|
724
|
+
:param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
725
|
+
:type ordering: List[str]
|
|
726
|
+
:param prn__in: Multiple values may be separated by commas.
|
|
727
|
+
:type prn__in: List[str]
|
|
728
|
+
:param pulp_href__in: Multiple values may be separated by commas.
|
|
729
|
+
:type pulp_href__in: List[str]
|
|
730
|
+
:param pulp_id__in: Multiple values may be separated by commas.
|
|
731
|
+
:type pulp_id__in: List[str]
|
|
732
|
+
:param pulp_label_select: Filter labels by search string
|
|
733
|
+
:type pulp_label_select: str
|
|
734
|
+
:param q: Filter results by using NOT, AND and OR operations on other filters
|
|
735
|
+
:type q: str
|
|
736
|
+
:param repository: Filter results where repository matches value
|
|
737
|
+
:type repository: str
|
|
738
|
+
:param repository__in: Filter results where repository is in a comma-separated list of values
|
|
739
|
+
:type repository__in: List[str]
|
|
740
|
+
:param with_content: Filter distributions based on the content served by them
|
|
741
|
+
:type with_content: str
|
|
742
|
+
:param fields: A list of fields to include in the response.
|
|
743
|
+
:type fields: List[str]
|
|
744
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
745
|
+
:type exclude_fields: List[str]
|
|
746
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
747
|
+
number provided, it will be total request
|
|
748
|
+
timeout. It can also be a pair (tuple) of
|
|
749
|
+
(connection, read) timeouts.
|
|
750
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
751
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
752
|
+
request; this effectively ignores the
|
|
753
|
+
authentication in the spec for a single request.
|
|
754
|
+
:type _request_auth: dict, optional
|
|
755
|
+
:param _content_type: force content-type for the request.
|
|
756
|
+
:type _content_type: str, Optional
|
|
757
|
+
:param _headers: set to override the headers for a single
|
|
758
|
+
request; this effectively ignores the headers
|
|
759
|
+
in the spec for a single request.
|
|
760
|
+
:type _headers: dict, optional
|
|
761
|
+
:param _host_index: set to override the host_index for a single
|
|
762
|
+
request; this effectively ignores the host_index
|
|
763
|
+
in the spec for a single request.
|
|
764
|
+
:type _host_index: int, optional
|
|
765
|
+
:return: Returns the result object.
|
|
766
|
+
""" # noqa: E501
|
|
767
|
+
|
|
768
|
+
_param = self._list_serialize(
|
|
769
|
+
pulp_domain=pulp_domain,
|
|
770
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
771
|
+
base_path=base_path,
|
|
772
|
+
base_path__contains=base_path__contains,
|
|
773
|
+
base_path__icontains=base_path__icontains,
|
|
774
|
+
base_path__in=base_path__in,
|
|
775
|
+
checkpoint=checkpoint,
|
|
776
|
+
limit=limit,
|
|
777
|
+
name=name,
|
|
778
|
+
name__contains=name__contains,
|
|
779
|
+
name__icontains=name__icontains,
|
|
780
|
+
name__iexact=name__iexact,
|
|
781
|
+
name__in=name__in,
|
|
782
|
+
name__iregex=name__iregex,
|
|
783
|
+
name__istartswith=name__istartswith,
|
|
784
|
+
name__regex=name__regex,
|
|
785
|
+
name__startswith=name__startswith,
|
|
786
|
+
offset=offset,
|
|
787
|
+
ordering=ordering,
|
|
788
|
+
prn__in=prn__in,
|
|
789
|
+
pulp_href__in=pulp_href__in,
|
|
790
|
+
pulp_id__in=pulp_id__in,
|
|
791
|
+
pulp_label_select=pulp_label_select,
|
|
792
|
+
q=q,
|
|
793
|
+
repository=repository,
|
|
794
|
+
repository__in=repository__in,
|
|
795
|
+
with_content=with_content,
|
|
796
|
+
fields=fields,
|
|
797
|
+
exclude_fields=exclude_fields,
|
|
798
|
+
_request_auth=_request_auth,
|
|
799
|
+
_content_type=_content_type,
|
|
800
|
+
_headers=_headers,
|
|
801
|
+
_host_index=_host_index
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
805
|
+
'200': "PaginatednpmNpmDistributionResponseList",
|
|
806
|
+
}
|
|
807
|
+
response_data = self.api_client.call_api(
|
|
808
|
+
*_param,
|
|
809
|
+
_request_timeout=_request_timeout
|
|
810
|
+
)
|
|
811
|
+
response_data.read()
|
|
812
|
+
return self.api_client.response_deserialize(
|
|
813
|
+
response_data=response_data,
|
|
814
|
+
response_types_map=_response_types_map,
|
|
815
|
+
).data
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
@validate_call
|
|
819
|
+
def list_with_http_info(
|
|
820
|
+
self,
|
|
821
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
822
|
+
base_path: Annotated[Optional[StrictStr], Field(description="Filter results where base_path matches value")] = None,
|
|
823
|
+
base_path__contains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
824
|
+
base_path__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
825
|
+
base_path__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where base_path is in a comma-separated list of values")] = None,
|
|
826
|
+
checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
|
|
827
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
828
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
829
|
+
name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
830
|
+
name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
831
|
+
name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
832
|
+
name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
|
|
833
|
+
name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
834
|
+
name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
835
|
+
name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
836
|
+
name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
837
|
+
offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
|
|
838
|
+
ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
|
|
839
|
+
prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
840
|
+
pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
841
|
+
pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
842
|
+
pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
|
|
843
|
+
q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
|
|
844
|
+
repository: Annotated[Optional[StrictStr], Field(description="Filter results where repository matches value")] = None,
|
|
845
|
+
repository__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where repository is in a comma-separated list of values")] = None,
|
|
846
|
+
with_content: Annotated[Optional[StrictStr], Field(description="Filter distributions based on the content served by them")] = None,
|
|
847
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
848
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
849
|
+
pulp_domain: StrictStr = "default",
|
|
850
|
+
_request_timeout: Union[
|
|
851
|
+
None,
|
|
852
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
853
|
+
Tuple[
|
|
854
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
855
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
856
|
+
]
|
|
857
|
+
] = None,
|
|
858
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
859
|
+
_content_type: Optional[StrictStr] = None,
|
|
860
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
861
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
862
|
+
) -> ApiResponse[PaginatednpmNpmDistributionResponseList]:
|
|
863
|
+
"""List npm distributions
|
|
864
|
+
|
|
865
|
+
ViewSet for NPM Distributions.
|
|
866
|
+
|
|
867
|
+
:param pulp_domain: (required)
|
|
868
|
+
:type pulp_domain: str
|
|
869
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
870
|
+
:type x_task_diagnostics: List[str]
|
|
871
|
+
:param base_path: Filter results where base_path matches value
|
|
872
|
+
:type base_path: str
|
|
873
|
+
:param base_path__contains: Filter results where base_path contains value
|
|
874
|
+
:type base_path__contains: str
|
|
875
|
+
:param base_path__icontains: Filter results where base_path contains value
|
|
876
|
+
:type base_path__icontains: str
|
|
877
|
+
:param base_path__in: Filter results where base_path is in a comma-separated list of values
|
|
878
|
+
:type base_path__in: List[str]
|
|
879
|
+
:param checkpoint: Filter results where checkpoint matches value
|
|
880
|
+
:type checkpoint: bool
|
|
881
|
+
:param limit: Number of results to return per page.
|
|
882
|
+
:type limit: int
|
|
883
|
+
:param name: Filter results where name matches value
|
|
884
|
+
:type name: str
|
|
885
|
+
:param name__contains: Filter results where name contains value
|
|
886
|
+
:type name__contains: str
|
|
887
|
+
:param name__icontains: Filter results where name contains value
|
|
888
|
+
:type name__icontains: str
|
|
889
|
+
:param name__iexact: Filter results where name matches value
|
|
890
|
+
:type name__iexact: str
|
|
891
|
+
:param name__in: Filter results where name is in a comma-separated list of values
|
|
892
|
+
:type name__in: List[str]
|
|
893
|
+
:param name__iregex: Filter results where name matches regex value
|
|
894
|
+
:type name__iregex: str
|
|
895
|
+
:param name__istartswith: Filter results where name starts with value
|
|
896
|
+
:type name__istartswith: str
|
|
897
|
+
:param name__regex: Filter results where name matches regex value
|
|
898
|
+
:type name__regex: str
|
|
899
|
+
:param name__startswith: Filter results where name starts with value
|
|
900
|
+
:type name__startswith: str
|
|
901
|
+
:param offset: The initial index from which to return the results.
|
|
902
|
+
:type offset: int
|
|
903
|
+
:param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
904
|
+
:type ordering: List[str]
|
|
905
|
+
:param prn__in: Multiple values may be separated by commas.
|
|
906
|
+
:type prn__in: List[str]
|
|
907
|
+
:param pulp_href__in: Multiple values may be separated by commas.
|
|
908
|
+
:type pulp_href__in: List[str]
|
|
909
|
+
:param pulp_id__in: Multiple values may be separated by commas.
|
|
910
|
+
:type pulp_id__in: List[str]
|
|
911
|
+
:param pulp_label_select: Filter labels by search string
|
|
912
|
+
:type pulp_label_select: str
|
|
913
|
+
:param q: Filter results by using NOT, AND and OR operations on other filters
|
|
914
|
+
:type q: str
|
|
915
|
+
:param repository: Filter results where repository matches value
|
|
916
|
+
:type repository: str
|
|
917
|
+
:param repository__in: Filter results where repository is in a comma-separated list of values
|
|
918
|
+
:type repository__in: List[str]
|
|
919
|
+
:param with_content: Filter distributions based on the content served by them
|
|
920
|
+
:type with_content: str
|
|
921
|
+
:param fields: A list of fields to include in the response.
|
|
922
|
+
:type fields: List[str]
|
|
923
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
924
|
+
:type exclude_fields: List[str]
|
|
925
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
926
|
+
number provided, it will be total request
|
|
927
|
+
timeout. It can also be a pair (tuple) of
|
|
928
|
+
(connection, read) timeouts.
|
|
929
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
930
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
931
|
+
request; this effectively ignores the
|
|
932
|
+
authentication in the spec for a single request.
|
|
933
|
+
:type _request_auth: dict, optional
|
|
934
|
+
:param _content_type: force content-type for the request.
|
|
935
|
+
:type _content_type: str, Optional
|
|
936
|
+
:param _headers: set to override the headers for a single
|
|
937
|
+
request; this effectively ignores the headers
|
|
938
|
+
in the spec for a single request.
|
|
939
|
+
:type _headers: dict, optional
|
|
940
|
+
:param _host_index: set to override the host_index for a single
|
|
941
|
+
request; this effectively ignores the host_index
|
|
942
|
+
in the spec for a single request.
|
|
943
|
+
:type _host_index: int, optional
|
|
944
|
+
:return: Returns the result object.
|
|
945
|
+
""" # noqa: E501
|
|
946
|
+
|
|
947
|
+
_param = self._list_serialize(
|
|
948
|
+
pulp_domain=pulp_domain,
|
|
949
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
950
|
+
base_path=base_path,
|
|
951
|
+
base_path__contains=base_path__contains,
|
|
952
|
+
base_path__icontains=base_path__icontains,
|
|
953
|
+
base_path__in=base_path__in,
|
|
954
|
+
checkpoint=checkpoint,
|
|
955
|
+
limit=limit,
|
|
956
|
+
name=name,
|
|
957
|
+
name__contains=name__contains,
|
|
958
|
+
name__icontains=name__icontains,
|
|
959
|
+
name__iexact=name__iexact,
|
|
960
|
+
name__in=name__in,
|
|
961
|
+
name__iregex=name__iregex,
|
|
962
|
+
name__istartswith=name__istartswith,
|
|
963
|
+
name__regex=name__regex,
|
|
964
|
+
name__startswith=name__startswith,
|
|
965
|
+
offset=offset,
|
|
966
|
+
ordering=ordering,
|
|
967
|
+
prn__in=prn__in,
|
|
968
|
+
pulp_href__in=pulp_href__in,
|
|
969
|
+
pulp_id__in=pulp_id__in,
|
|
970
|
+
pulp_label_select=pulp_label_select,
|
|
971
|
+
q=q,
|
|
972
|
+
repository=repository,
|
|
973
|
+
repository__in=repository__in,
|
|
974
|
+
with_content=with_content,
|
|
975
|
+
fields=fields,
|
|
976
|
+
exclude_fields=exclude_fields,
|
|
977
|
+
_request_auth=_request_auth,
|
|
978
|
+
_content_type=_content_type,
|
|
979
|
+
_headers=_headers,
|
|
980
|
+
_host_index=_host_index
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
984
|
+
'200': "PaginatednpmNpmDistributionResponseList",
|
|
985
|
+
}
|
|
986
|
+
response_data = self.api_client.call_api(
|
|
987
|
+
*_param,
|
|
988
|
+
_request_timeout=_request_timeout
|
|
989
|
+
)
|
|
990
|
+
response_data.read()
|
|
991
|
+
return self.api_client.response_deserialize(
|
|
992
|
+
response_data=response_data,
|
|
993
|
+
response_types_map=_response_types_map,
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
@validate_call
|
|
998
|
+
def list_without_preload_content(
|
|
999
|
+
self,
|
|
1000
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1001
|
+
base_path: Annotated[Optional[StrictStr], Field(description="Filter results where base_path matches value")] = None,
|
|
1002
|
+
base_path__contains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
1003
|
+
base_path__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where base_path contains value")] = None,
|
|
1004
|
+
base_path__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where base_path is in a comma-separated list of values")] = None,
|
|
1005
|
+
checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
|
|
1006
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
|
|
1007
|
+
name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
1008
|
+
name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
1009
|
+
name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
|
|
1010
|
+
name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
|
|
1011
|
+
name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
|
|
1012
|
+
name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
1013
|
+
name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
1014
|
+
name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
|
|
1015
|
+
name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
|
|
1016
|
+
offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
|
|
1017
|
+
ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
|
|
1018
|
+
prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
1019
|
+
pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
1020
|
+
pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
|
|
1021
|
+
pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
|
|
1022
|
+
q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
|
|
1023
|
+
repository: Annotated[Optional[StrictStr], Field(description="Filter results where repository matches value")] = None,
|
|
1024
|
+
repository__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where repository is in a comma-separated list of values")] = None,
|
|
1025
|
+
with_content: Annotated[Optional[StrictStr], Field(description="Filter distributions based on the content served by them")] = None,
|
|
1026
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
1027
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
1028
|
+
pulp_domain: StrictStr = "default",
|
|
1029
|
+
_request_timeout: Union[
|
|
1030
|
+
None,
|
|
1031
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1032
|
+
Tuple[
|
|
1033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1034
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1035
|
+
]
|
|
1036
|
+
] = None,
|
|
1037
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1038
|
+
_content_type: Optional[StrictStr] = None,
|
|
1039
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1040
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1041
|
+
) -> RESTResponseType:
|
|
1042
|
+
"""List npm distributions
|
|
1043
|
+
|
|
1044
|
+
ViewSet for NPM Distributions.
|
|
1045
|
+
|
|
1046
|
+
:param pulp_domain: (required)
|
|
1047
|
+
:type pulp_domain: str
|
|
1048
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1049
|
+
:type x_task_diagnostics: List[str]
|
|
1050
|
+
:param base_path: Filter results where base_path matches value
|
|
1051
|
+
:type base_path: str
|
|
1052
|
+
:param base_path__contains: Filter results where base_path contains value
|
|
1053
|
+
:type base_path__contains: str
|
|
1054
|
+
:param base_path__icontains: Filter results where base_path contains value
|
|
1055
|
+
:type base_path__icontains: str
|
|
1056
|
+
:param base_path__in: Filter results where base_path is in a comma-separated list of values
|
|
1057
|
+
:type base_path__in: List[str]
|
|
1058
|
+
:param checkpoint: Filter results where checkpoint matches value
|
|
1059
|
+
:type checkpoint: bool
|
|
1060
|
+
:param limit: Number of results to return per page.
|
|
1061
|
+
:type limit: int
|
|
1062
|
+
:param name: Filter results where name matches value
|
|
1063
|
+
:type name: str
|
|
1064
|
+
:param name__contains: Filter results where name contains value
|
|
1065
|
+
:type name__contains: str
|
|
1066
|
+
:param name__icontains: Filter results where name contains value
|
|
1067
|
+
:type name__icontains: str
|
|
1068
|
+
:param name__iexact: Filter results where name matches value
|
|
1069
|
+
:type name__iexact: str
|
|
1070
|
+
:param name__in: Filter results where name is in a comma-separated list of values
|
|
1071
|
+
:type name__in: List[str]
|
|
1072
|
+
:param name__iregex: Filter results where name matches regex value
|
|
1073
|
+
:type name__iregex: str
|
|
1074
|
+
:param name__istartswith: Filter results where name starts with value
|
|
1075
|
+
:type name__istartswith: str
|
|
1076
|
+
:param name__regex: Filter results where name matches regex value
|
|
1077
|
+
:type name__regex: str
|
|
1078
|
+
:param name__startswith: Filter results where name starts with value
|
|
1079
|
+
:type name__startswith: str
|
|
1080
|
+
:param offset: The initial index from which to return the results.
|
|
1081
|
+
:type offset: int
|
|
1082
|
+
:param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
1083
|
+
:type ordering: List[str]
|
|
1084
|
+
:param prn__in: Multiple values may be separated by commas.
|
|
1085
|
+
:type prn__in: List[str]
|
|
1086
|
+
:param pulp_href__in: Multiple values may be separated by commas.
|
|
1087
|
+
:type pulp_href__in: List[str]
|
|
1088
|
+
:param pulp_id__in: Multiple values may be separated by commas.
|
|
1089
|
+
:type pulp_id__in: List[str]
|
|
1090
|
+
:param pulp_label_select: Filter labels by search string
|
|
1091
|
+
:type pulp_label_select: str
|
|
1092
|
+
:param q: Filter results by using NOT, AND and OR operations on other filters
|
|
1093
|
+
:type q: str
|
|
1094
|
+
:param repository: Filter results where repository matches value
|
|
1095
|
+
:type repository: str
|
|
1096
|
+
:param repository__in: Filter results where repository is in a comma-separated list of values
|
|
1097
|
+
:type repository__in: List[str]
|
|
1098
|
+
:param with_content: Filter distributions based on the content served by them
|
|
1099
|
+
:type with_content: str
|
|
1100
|
+
:param fields: A list of fields to include in the response.
|
|
1101
|
+
:type fields: List[str]
|
|
1102
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
1103
|
+
:type exclude_fields: List[str]
|
|
1104
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1105
|
+
number provided, it will be total request
|
|
1106
|
+
timeout. It can also be a pair (tuple) of
|
|
1107
|
+
(connection, read) timeouts.
|
|
1108
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1109
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1110
|
+
request; this effectively ignores the
|
|
1111
|
+
authentication in the spec for a single request.
|
|
1112
|
+
:type _request_auth: dict, optional
|
|
1113
|
+
:param _content_type: force content-type for the request.
|
|
1114
|
+
:type _content_type: str, Optional
|
|
1115
|
+
:param _headers: set to override the headers for a single
|
|
1116
|
+
request; this effectively ignores the headers
|
|
1117
|
+
in the spec for a single request.
|
|
1118
|
+
:type _headers: dict, optional
|
|
1119
|
+
:param _host_index: set to override the host_index for a single
|
|
1120
|
+
request; this effectively ignores the host_index
|
|
1121
|
+
in the spec for a single request.
|
|
1122
|
+
:type _host_index: int, optional
|
|
1123
|
+
:return: Returns the result object.
|
|
1124
|
+
""" # noqa: E501
|
|
1125
|
+
|
|
1126
|
+
_param = self._list_serialize(
|
|
1127
|
+
pulp_domain=pulp_domain,
|
|
1128
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1129
|
+
base_path=base_path,
|
|
1130
|
+
base_path__contains=base_path__contains,
|
|
1131
|
+
base_path__icontains=base_path__icontains,
|
|
1132
|
+
base_path__in=base_path__in,
|
|
1133
|
+
checkpoint=checkpoint,
|
|
1134
|
+
limit=limit,
|
|
1135
|
+
name=name,
|
|
1136
|
+
name__contains=name__contains,
|
|
1137
|
+
name__icontains=name__icontains,
|
|
1138
|
+
name__iexact=name__iexact,
|
|
1139
|
+
name__in=name__in,
|
|
1140
|
+
name__iregex=name__iregex,
|
|
1141
|
+
name__istartswith=name__istartswith,
|
|
1142
|
+
name__regex=name__regex,
|
|
1143
|
+
name__startswith=name__startswith,
|
|
1144
|
+
offset=offset,
|
|
1145
|
+
ordering=ordering,
|
|
1146
|
+
prn__in=prn__in,
|
|
1147
|
+
pulp_href__in=pulp_href__in,
|
|
1148
|
+
pulp_id__in=pulp_id__in,
|
|
1149
|
+
pulp_label_select=pulp_label_select,
|
|
1150
|
+
q=q,
|
|
1151
|
+
repository=repository,
|
|
1152
|
+
repository__in=repository__in,
|
|
1153
|
+
with_content=with_content,
|
|
1154
|
+
fields=fields,
|
|
1155
|
+
exclude_fields=exclude_fields,
|
|
1156
|
+
_request_auth=_request_auth,
|
|
1157
|
+
_content_type=_content_type,
|
|
1158
|
+
_headers=_headers,
|
|
1159
|
+
_host_index=_host_index
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1163
|
+
'200': "PaginatednpmNpmDistributionResponseList",
|
|
1164
|
+
}
|
|
1165
|
+
response_data = self.api_client.call_api(
|
|
1166
|
+
*_param,
|
|
1167
|
+
_request_timeout=_request_timeout
|
|
1168
|
+
)
|
|
1169
|
+
return response_data.response
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
def _list_serialize(
|
|
1173
|
+
self,
|
|
1174
|
+
pulp_domain,
|
|
1175
|
+
x_task_diagnostics,
|
|
1176
|
+
base_path,
|
|
1177
|
+
base_path__contains,
|
|
1178
|
+
base_path__icontains,
|
|
1179
|
+
base_path__in,
|
|
1180
|
+
checkpoint,
|
|
1181
|
+
limit,
|
|
1182
|
+
name,
|
|
1183
|
+
name__contains,
|
|
1184
|
+
name__icontains,
|
|
1185
|
+
name__iexact,
|
|
1186
|
+
name__in,
|
|
1187
|
+
name__iregex,
|
|
1188
|
+
name__istartswith,
|
|
1189
|
+
name__regex,
|
|
1190
|
+
name__startswith,
|
|
1191
|
+
offset,
|
|
1192
|
+
ordering,
|
|
1193
|
+
prn__in,
|
|
1194
|
+
pulp_href__in,
|
|
1195
|
+
pulp_id__in,
|
|
1196
|
+
pulp_label_select,
|
|
1197
|
+
q,
|
|
1198
|
+
repository,
|
|
1199
|
+
repository__in,
|
|
1200
|
+
with_content,
|
|
1201
|
+
fields,
|
|
1202
|
+
exclude_fields,
|
|
1203
|
+
_request_auth,
|
|
1204
|
+
_content_type,
|
|
1205
|
+
_headers,
|
|
1206
|
+
_host_index,
|
|
1207
|
+
) -> RequestSerialized:
|
|
1208
|
+
|
|
1209
|
+
_host = None
|
|
1210
|
+
|
|
1211
|
+
_collection_formats: Dict[str, str] = {
|
|
1212
|
+
'X-Task-Diagnostics': 'csv',
|
|
1213
|
+
'base_path__in': 'csv',
|
|
1214
|
+
'name__in': 'csv',
|
|
1215
|
+
'ordering': 'csv',
|
|
1216
|
+
'prn__in': 'csv',
|
|
1217
|
+
'pulp_href__in': 'csv',
|
|
1218
|
+
'pulp_id__in': 'csv',
|
|
1219
|
+
'repository__in': 'csv',
|
|
1220
|
+
'fields': 'multi',
|
|
1221
|
+
'exclude_fields': 'multi',
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
_path_params: Dict[str, str] = {}
|
|
1225
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1226
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1227
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1228
|
+
_files: Dict[
|
|
1229
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1230
|
+
] = {}
|
|
1231
|
+
_body_params: Optional[bytes] = None
|
|
1232
|
+
|
|
1233
|
+
# process the path parameters
|
|
1234
|
+
if pulp_domain is not None:
|
|
1235
|
+
_path_params['pulp_domain'] = pulp_domain
|
|
1236
|
+
# process the query parameters
|
|
1237
|
+
if base_path is not None:
|
|
1238
|
+
|
|
1239
|
+
_query_params.append(('base_path', base_path))
|
|
1240
|
+
|
|
1241
|
+
if base_path__contains is not None:
|
|
1242
|
+
|
|
1243
|
+
_query_params.append(('base_path__contains', base_path__contains))
|
|
1244
|
+
|
|
1245
|
+
if base_path__icontains is not None:
|
|
1246
|
+
|
|
1247
|
+
_query_params.append(('base_path__icontains', base_path__icontains))
|
|
1248
|
+
|
|
1249
|
+
if base_path__in is not None:
|
|
1250
|
+
|
|
1251
|
+
_query_params.append(('base_path__in', base_path__in))
|
|
1252
|
+
|
|
1253
|
+
if checkpoint is not None:
|
|
1254
|
+
|
|
1255
|
+
_query_params.append(('checkpoint', checkpoint))
|
|
1256
|
+
|
|
1257
|
+
if limit is not None:
|
|
1258
|
+
|
|
1259
|
+
_query_params.append(('limit', limit))
|
|
1260
|
+
|
|
1261
|
+
if name is not None:
|
|
1262
|
+
|
|
1263
|
+
_query_params.append(('name', name))
|
|
1264
|
+
|
|
1265
|
+
if name__contains is not None:
|
|
1266
|
+
|
|
1267
|
+
_query_params.append(('name__contains', name__contains))
|
|
1268
|
+
|
|
1269
|
+
if name__icontains is not None:
|
|
1270
|
+
|
|
1271
|
+
_query_params.append(('name__icontains', name__icontains))
|
|
1272
|
+
|
|
1273
|
+
if name__iexact is not None:
|
|
1274
|
+
|
|
1275
|
+
_query_params.append(('name__iexact', name__iexact))
|
|
1276
|
+
|
|
1277
|
+
if name__in is not None:
|
|
1278
|
+
|
|
1279
|
+
_query_params.append(('name__in', name__in))
|
|
1280
|
+
|
|
1281
|
+
if name__iregex is not None:
|
|
1282
|
+
|
|
1283
|
+
_query_params.append(('name__iregex', name__iregex))
|
|
1284
|
+
|
|
1285
|
+
if name__istartswith is not None:
|
|
1286
|
+
|
|
1287
|
+
_query_params.append(('name__istartswith', name__istartswith))
|
|
1288
|
+
|
|
1289
|
+
if name__regex is not None:
|
|
1290
|
+
|
|
1291
|
+
_query_params.append(('name__regex', name__regex))
|
|
1292
|
+
|
|
1293
|
+
if name__startswith is not None:
|
|
1294
|
+
|
|
1295
|
+
_query_params.append(('name__startswith', name__startswith))
|
|
1296
|
+
|
|
1297
|
+
if offset is not None:
|
|
1298
|
+
|
|
1299
|
+
_query_params.append(('offset', offset))
|
|
1300
|
+
|
|
1301
|
+
if ordering is not None:
|
|
1302
|
+
|
|
1303
|
+
_query_params.append(('ordering', ordering))
|
|
1304
|
+
|
|
1305
|
+
if prn__in is not None:
|
|
1306
|
+
|
|
1307
|
+
_query_params.append(('prn__in', prn__in))
|
|
1308
|
+
|
|
1309
|
+
if pulp_href__in is not None:
|
|
1310
|
+
|
|
1311
|
+
_query_params.append(('pulp_href__in', pulp_href__in))
|
|
1312
|
+
|
|
1313
|
+
if pulp_id__in is not None:
|
|
1314
|
+
|
|
1315
|
+
_query_params.append(('pulp_id__in', pulp_id__in))
|
|
1316
|
+
|
|
1317
|
+
if pulp_label_select is not None:
|
|
1318
|
+
|
|
1319
|
+
_query_params.append(('pulp_label_select', pulp_label_select))
|
|
1320
|
+
|
|
1321
|
+
if q is not None:
|
|
1322
|
+
|
|
1323
|
+
_query_params.append(('q', q))
|
|
1324
|
+
|
|
1325
|
+
if repository is not None:
|
|
1326
|
+
|
|
1327
|
+
_query_params.append(('repository', repository))
|
|
1328
|
+
|
|
1329
|
+
if repository__in is not None:
|
|
1330
|
+
|
|
1331
|
+
_query_params.append(('repository__in', repository__in))
|
|
1332
|
+
|
|
1333
|
+
if with_content is not None:
|
|
1334
|
+
|
|
1335
|
+
_query_params.append(('with_content', with_content))
|
|
1336
|
+
|
|
1337
|
+
if fields is not None:
|
|
1338
|
+
|
|
1339
|
+
_query_params.append(('fields', fields))
|
|
1340
|
+
|
|
1341
|
+
if exclude_fields is not None:
|
|
1342
|
+
|
|
1343
|
+
_query_params.append(('exclude_fields', exclude_fields))
|
|
1344
|
+
|
|
1345
|
+
# process the header parameters
|
|
1346
|
+
if x_task_diagnostics is not None:
|
|
1347
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
1348
|
+
# process the form parameters
|
|
1349
|
+
# process the body parameter
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
# set the HTTP header `Accept`
|
|
1353
|
+
if 'Accept' not in _header_params:
|
|
1354
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1355
|
+
[
|
|
1356
|
+
'application/json'
|
|
1357
|
+
]
|
|
1358
|
+
)
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
# authentication setting
|
|
1362
|
+
_auth_settings: List[str] = [
|
|
1363
|
+
'json_header_remote_authentication',
|
|
1364
|
+
'basicAuth',
|
|
1365
|
+
'cookieAuth'
|
|
1366
|
+
]
|
|
1367
|
+
|
|
1368
|
+
return self.api_client.param_serialize(
|
|
1369
|
+
method='GET',
|
|
1370
|
+
resource_path='/api/pulp/{pulp_domain}/api/v3/distributions/npm/npm/',
|
|
1371
|
+
path_params=_path_params,
|
|
1372
|
+
query_params=_query_params,
|
|
1373
|
+
header_params=_header_params,
|
|
1374
|
+
body=_body_params,
|
|
1375
|
+
post_params=_form_params,
|
|
1376
|
+
files=_files,
|
|
1377
|
+
auth_settings=_auth_settings,
|
|
1378
|
+
collection_formats=_collection_formats,
|
|
1379
|
+
_host=_host,
|
|
1380
|
+
_request_auth=_request_auth
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
@validate_call
|
|
1387
|
+
def partial_update(
|
|
1388
|
+
self,
|
|
1389
|
+
npm_npm_distribution_href: StrictStr,
|
|
1390
|
+
patchednpm_npm_distribution: PatchednpmNpmDistribution,
|
|
1391
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1392
|
+
_request_timeout: Union[
|
|
1393
|
+
None,
|
|
1394
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1395
|
+
Tuple[
|
|
1396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1397
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1398
|
+
]
|
|
1399
|
+
] = None,
|
|
1400
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1401
|
+
_content_type: Optional[StrictStr] = None,
|
|
1402
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1403
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1404
|
+
) -> AsyncOperationResponse:
|
|
1405
|
+
"""Update a npm distribution
|
|
1406
|
+
|
|
1407
|
+
Trigger an asynchronous partial update task
|
|
1408
|
+
|
|
1409
|
+
:param npm_npm_distribution_href: (required)
|
|
1410
|
+
:type npm_npm_distribution_href: str
|
|
1411
|
+
:param patchednpm_npm_distribution: (required)
|
|
1412
|
+
:type patchednpm_npm_distribution: PatchednpmNpmDistribution
|
|
1413
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1414
|
+
:type x_task_diagnostics: List[str]
|
|
1415
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1416
|
+
number provided, it will be total request
|
|
1417
|
+
timeout. It can also be a pair (tuple) of
|
|
1418
|
+
(connection, read) timeouts.
|
|
1419
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1420
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1421
|
+
request; this effectively ignores the
|
|
1422
|
+
authentication in the spec for a single request.
|
|
1423
|
+
:type _request_auth: dict, optional
|
|
1424
|
+
:param _content_type: force content-type for the request.
|
|
1425
|
+
:type _content_type: str, Optional
|
|
1426
|
+
:param _headers: set to override the headers for a single
|
|
1427
|
+
request; this effectively ignores the headers
|
|
1428
|
+
in the spec for a single request.
|
|
1429
|
+
:type _headers: dict, optional
|
|
1430
|
+
:param _host_index: set to override the host_index for a single
|
|
1431
|
+
request; this effectively ignores the host_index
|
|
1432
|
+
in the spec for a single request.
|
|
1433
|
+
:type _host_index: int, optional
|
|
1434
|
+
:return: Returns the result object.
|
|
1435
|
+
""" # noqa: E501
|
|
1436
|
+
|
|
1437
|
+
_param = self._partial_update_serialize(
|
|
1438
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1439
|
+
patchednpm_npm_distribution=patchednpm_npm_distribution,
|
|
1440
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1441
|
+
_request_auth=_request_auth,
|
|
1442
|
+
_content_type=_content_type,
|
|
1443
|
+
_headers=_headers,
|
|
1444
|
+
_host_index=_host_index
|
|
1445
|
+
)
|
|
1446
|
+
|
|
1447
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1448
|
+
'202': "AsyncOperationResponse",
|
|
1449
|
+
}
|
|
1450
|
+
response_data = self.api_client.call_api(
|
|
1451
|
+
*_param,
|
|
1452
|
+
_request_timeout=_request_timeout
|
|
1453
|
+
)
|
|
1454
|
+
response_data.read()
|
|
1455
|
+
return self.api_client.response_deserialize(
|
|
1456
|
+
response_data=response_data,
|
|
1457
|
+
response_types_map=_response_types_map,
|
|
1458
|
+
).data
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
@validate_call
|
|
1462
|
+
def partial_update_with_http_info(
|
|
1463
|
+
self,
|
|
1464
|
+
npm_npm_distribution_href: StrictStr,
|
|
1465
|
+
patchednpm_npm_distribution: PatchednpmNpmDistribution,
|
|
1466
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1467
|
+
_request_timeout: Union[
|
|
1468
|
+
None,
|
|
1469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1470
|
+
Tuple[
|
|
1471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1472
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1473
|
+
]
|
|
1474
|
+
] = None,
|
|
1475
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1476
|
+
_content_type: Optional[StrictStr] = None,
|
|
1477
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1478
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1479
|
+
) -> ApiResponse[AsyncOperationResponse]:
|
|
1480
|
+
"""Update a npm distribution
|
|
1481
|
+
|
|
1482
|
+
Trigger an asynchronous partial update task
|
|
1483
|
+
|
|
1484
|
+
:param npm_npm_distribution_href: (required)
|
|
1485
|
+
:type npm_npm_distribution_href: str
|
|
1486
|
+
:param patchednpm_npm_distribution: (required)
|
|
1487
|
+
:type patchednpm_npm_distribution: PatchednpmNpmDistribution
|
|
1488
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1489
|
+
:type x_task_diagnostics: List[str]
|
|
1490
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1491
|
+
number provided, it will be total request
|
|
1492
|
+
timeout. It can also be a pair (tuple) of
|
|
1493
|
+
(connection, read) timeouts.
|
|
1494
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1495
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1496
|
+
request; this effectively ignores the
|
|
1497
|
+
authentication in the spec for a single request.
|
|
1498
|
+
:type _request_auth: dict, optional
|
|
1499
|
+
:param _content_type: force content-type for the request.
|
|
1500
|
+
:type _content_type: str, Optional
|
|
1501
|
+
:param _headers: set to override the headers for a single
|
|
1502
|
+
request; this effectively ignores the headers
|
|
1503
|
+
in the spec for a single request.
|
|
1504
|
+
:type _headers: dict, optional
|
|
1505
|
+
:param _host_index: set to override the host_index for a single
|
|
1506
|
+
request; this effectively ignores the host_index
|
|
1507
|
+
in the spec for a single request.
|
|
1508
|
+
:type _host_index: int, optional
|
|
1509
|
+
:return: Returns the result object.
|
|
1510
|
+
""" # noqa: E501
|
|
1511
|
+
|
|
1512
|
+
_param = self._partial_update_serialize(
|
|
1513
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1514
|
+
patchednpm_npm_distribution=patchednpm_npm_distribution,
|
|
1515
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1516
|
+
_request_auth=_request_auth,
|
|
1517
|
+
_content_type=_content_type,
|
|
1518
|
+
_headers=_headers,
|
|
1519
|
+
_host_index=_host_index
|
|
1520
|
+
)
|
|
1521
|
+
|
|
1522
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1523
|
+
'202': "AsyncOperationResponse",
|
|
1524
|
+
}
|
|
1525
|
+
response_data = self.api_client.call_api(
|
|
1526
|
+
*_param,
|
|
1527
|
+
_request_timeout=_request_timeout
|
|
1528
|
+
)
|
|
1529
|
+
response_data.read()
|
|
1530
|
+
return self.api_client.response_deserialize(
|
|
1531
|
+
response_data=response_data,
|
|
1532
|
+
response_types_map=_response_types_map,
|
|
1533
|
+
)
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
@validate_call
|
|
1537
|
+
def partial_update_without_preload_content(
|
|
1538
|
+
self,
|
|
1539
|
+
npm_npm_distribution_href: StrictStr,
|
|
1540
|
+
patchednpm_npm_distribution: PatchednpmNpmDistribution,
|
|
1541
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1542
|
+
_request_timeout: Union[
|
|
1543
|
+
None,
|
|
1544
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1545
|
+
Tuple[
|
|
1546
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1547
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1548
|
+
]
|
|
1549
|
+
] = None,
|
|
1550
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1551
|
+
_content_type: Optional[StrictStr] = None,
|
|
1552
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1553
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1554
|
+
) -> RESTResponseType:
|
|
1555
|
+
"""Update a npm distribution
|
|
1556
|
+
|
|
1557
|
+
Trigger an asynchronous partial update task
|
|
1558
|
+
|
|
1559
|
+
:param npm_npm_distribution_href: (required)
|
|
1560
|
+
:type npm_npm_distribution_href: str
|
|
1561
|
+
:param patchednpm_npm_distribution: (required)
|
|
1562
|
+
:type patchednpm_npm_distribution: PatchednpmNpmDistribution
|
|
1563
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1564
|
+
:type x_task_diagnostics: List[str]
|
|
1565
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1566
|
+
number provided, it will be total request
|
|
1567
|
+
timeout. It can also be a pair (tuple) of
|
|
1568
|
+
(connection, read) timeouts.
|
|
1569
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1570
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1571
|
+
request; this effectively ignores the
|
|
1572
|
+
authentication in the spec for a single request.
|
|
1573
|
+
:type _request_auth: dict, optional
|
|
1574
|
+
:param _content_type: force content-type for the request.
|
|
1575
|
+
:type _content_type: str, Optional
|
|
1576
|
+
:param _headers: set to override the headers for a single
|
|
1577
|
+
request; this effectively ignores the headers
|
|
1578
|
+
in the spec for a single request.
|
|
1579
|
+
:type _headers: dict, optional
|
|
1580
|
+
:param _host_index: set to override the host_index for a single
|
|
1581
|
+
request; this effectively ignores the host_index
|
|
1582
|
+
in the spec for a single request.
|
|
1583
|
+
:type _host_index: int, optional
|
|
1584
|
+
:return: Returns the result object.
|
|
1585
|
+
""" # noqa: E501
|
|
1586
|
+
|
|
1587
|
+
_param = self._partial_update_serialize(
|
|
1588
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1589
|
+
patchednpm_npm_distribution=patchednpm_npm_distribution,
|
|
1590
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1591
|
+
_request_auth=_request_auth,
|
|
1592
|
+
_content_type=_content_type,
|
|
1593
|
+
_headers=_headers,
|
|
1594
|
+
_host_index=_host_index
|
|
1595
|
+
)
|
|
1596
|
+
|
|
1597
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1598
|
+
'202': "AsyncOperationResponse",
|
|
1599
|
+
}
|
|
1600
|
+
response_data = self.api_client.call_api(
|
|
1601
|
+
*_param,
|
|
1602
|
+
_request_timeout=_request_timeout
|
|
1603
|
+
)
|
|
1604
|
+
return response_data.response
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
def _partial_update_serialize(
|
|
1608
|
+
self,
|
|
1609
|
+
npm_npm_distribution_href,
|
|
1610
|
+
patchednpm_npm_distribution,
|
|
1611
|
+
x_task_diagnostics,
|
|
1612
|
+
_request_auth,
|
|
1613
|
+
_content_type,
|
|
1614
|
+
_headers,
|
|
1615
|
+
_host_index,
|
|
1616
|
+
) -> RequestSerialized:
|
|
1617
|
+
|
|
1618
|
+
_host = None
|
|
1619
|
+
|
|
1620
|
+
_collection_formats: Dict[str, str] = {
|
|
1621
|
+
'X-Task-Diagnostics': 'csv',
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
_path_params: Dict[str, str] = {}
|
|
1625
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1626
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1627
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1628
|
+
_files: Dict[
|
|
1629
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1630
|
+
] = {}
|
|
1631
|
+
_body_params: Optional[bytes] = None
|
|
1632
|
+
|
|
1633
|
+
# process the path parameters
|
|
1634
|
+
if npm_npm_distribution_href is not None:
|
|
1635
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
1636
|
+
# process the query parameters
|
|
1637
|
+
# process the header parameters
|
|
1638
|
+
if x_task_diagnostics is not None:
|
|
1639
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
1640
|
+
# process the form parameters
|
|
1641
|
+
# process the body parameter
|
|
1642
|
+
if patchednpm_npm_distribution is not None:
|
|
1643
|
+
_body_params = patchednpm_npm_distribution
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
# set the HTTP header `Accept`
|
|
1647
|
+
if 'Accept' not in _header_params:
|
|
1648
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1649
|
+
[
|
|
1650
|
+
'application/json'
|
|
1651
|
+
]
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
# set the HTTP header `Content-Type`
|
|
1655
|
+
if _content_type:
|
|
1656
|
+
_header_params['Content-Type'] = _content_type
|
|
1657
|
+
else:
|
|
1658
|
+
_default_content_type = (
|
|
1659
|
+
self.api_client.select_header_content_type(
|
|
1660
|
+
[
|
|
1661
|
+
'application/json',
|
|
1662
|
+
'application/x-www-form-urlencoded',
|
|
1663
|
+
'multipart/form-data'
|
|
1664
|
+
]
|
|
1665
|
+
)
|
|
1666
|
+
)
|
|
1667
|
+
if _default_content_type is not None:
|
|
1668
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1669
|
+
|
|
1670
|
+
# authentication setting
|
|
1671
|
+
_auth_settings: List[str] = [
|
|
1672
|
+
'json_header_remote_authentication',
|
|
1673
|
+
'basicAuth',
|
|
1674
|
+
'cookieAuth'
|
|
1675
|
+
]
|
|
1676
|
+
|
|
1677
|
+
return self.api_client.param_serialize(
|
|
1678
|
+
method='PATCH',
|
|
1679
|
+
resource_path='{npm_npm_distribution_href}',
|
|
1680
|
+
path_params=_path_params,
|
|
1681
|
+
query_params=_query_params,
|
|
1682
|
+
header_params=_header_params,
|
|
1683
|
+
body=_body_params,
|
|
1684
|
+
post_params=_form_params,
|
|
1685
|
+
files=_files,
|
|
1686
|
+
auth_settings=_auth_settings,
|
|
1687
|
+
collection_formats=_collection_formats,
|
|
1688
|
+
_host=_host,
|
|
1689
|
+
_request_auth=_request_auth
|
|
1690
|
+
)
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
@validate_call
|
|
1696
|
+
def read(
|
|
1697
|
+
self,
|
|
1698
|
+
npm_npm_distribution_href: StrictStr,
|
|
1699
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1700
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
1701
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
1702
|
+
_request_timeout: Union[
|
|
1703
|
+
None,
|
|
1704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1705
|
+
Tuple[
|
|
1706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1707
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1708
|
+
]
|
|
1709
|
+
] = None,
|
|
1710
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1711
|
+
_content_type: Optional[StrictStr] = None,
|
|
1712
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1713
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1714
|
+
) -> NpmNpmDistributionResponse:
|
|
1715
|
+
"""Inspect a npm distribution
|
|
1716
|
+
|
|
1717
|
+
ViewSet for NPM Distributions.
|
|
1718
|
+
|
|
1719
|
+
:param npm_npm_distribution_href: (required)
|
|
1720
|
+
:type npm_npm_distribution_href: str
|
|
1721
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1722
|
+
:type x_task_diagnostics: List[str]
|
|
1723
|
+
:param fields: A list of fields to include in the response.
|
|
1724
|
+
:type fields: List[str]
|
|
1725
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
1726
|
+
:type exclude_fields: List[str]
|
|
1727
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1728
|
+
number provided, it will be total request
|
|
1729
|
+
timeout. It can also be a pair (tuple) of
|
|
1730
|
+
(connection, read) timeouts.
|
|
1731
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1732
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1733
|
+
request; this effectively ignores the
|
|
1734
|
+
authentication in the spec for a single request.
|
|
1735
|
+
:type _request_auth: dict, optional
|
|
1736
|
+
:param _content_type: force content-type for the request.
|
|
1737
|
+
:type _content_type: str, Optional
|
|
1738
|
+
:param _headers: set to override the headers for a single
|
|
1739
|
+
request; this effectively ignores the headers
|
|
1740
|
+
in the spec for a single request.
|
|
1741
|
+
:type _headers: dict, optional
|
|
1742
|
+
:param _host_index: set to override the host_index for a single
|
|
1743
|
+
request; this effectively ignores the host_index
|
|
1744
|
+
in the spec for a single request.
|
|
1745
|
+
:type _host_index: int, optional
|
|
1746
|
+
:return: Returns the result object.
|
|
1747
|
+
""" # noqa: E501
|
|
1748
|
+
|
|
1749
|
+
_param = self._read_serialize(
|
|
1750
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1751
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1752
|
+
fields=fields,
|
|
1753
|
+
exclude_fields=exclude_fields,
|
|
1754
|
+
_request_auth=_request_auth,
|
|
1755
|
+
_content_type=_content_type,
|
|
1756
|
+
_headers=_headers,
|
|
1757
|
+
_host_index=_host_index
|
|
1758
|
+
)
|
|
1759
|
+
|
|
1760
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1761
|
+
'200': "NpmNpmDistributionResponse",
|
|
1762
|
+
}
|
|
1763
|
+
response_data = self.api_client.call_api(
|
|
1764
|
+
*_param,
|
|
1765
|
+
_request_timeout=_request_timeout
|
|
1766
|
+
)
|
|
1767
|
+
response_data.read()
|
|
1768
|
+
return self.api_client.response_deserialize(
|
|
1769
|
+
response_data=response_data,
|
|
1770
|
+
response_types_map=_response_types_map,
|
|
1771
|
+
).data
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
@validate_call
|
|
1775
|
+
def read_with_http_info(
|
|
1776
|
+
self,
|
|
1777
|
+
npm_npm_distribution_href: StrictStr,
|
|
1778
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1779
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
1780
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
1781
|
+
_request_timeout: Union[
|
|
1782
|
+
None,
|
|
1783
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1784
|
+
Tuple[
|
|
1785
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1786
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1787
|
+
]
|
|
1788
|
+
] = None,
|
|
1789
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1790
|
+
_content_type: Optional[StrictStr] = None,
|
|
1791
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1792
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1793
|
+
) -> ApiResponse[NpmNpmDistributionResponse]:
|
|
1794
|
+
"""Inspect a npm distribution
|
|
1795
|
+
|
|
1796
|
+
ViewSet for NPM Distributions.
|
|
1797
|
+
|
|
1798
|
+
:param npm_npm_distribution_href: (required)
|
|
1799
|
+
:type npm_npm_distribution_href: str
|
|
1800
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1801
|
+
:type x_task_diagnostics: List[str]
|
|
1802
|
+
:param fields: A list of fields to include in the response.
|
|
1803
|
+
:type fields: List[str]
|
|
1804
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
1805
|
+
:type exclude_fields: List[str]
|
|
1806
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1807
|
+
number provided, it will be total request
|
|
1808
|
+
timeout. It can also be a pair (tuple) of
|
|
1809
|
+
(connection, read) timeouts.
|
|
1810
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1811
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1812
|
+
request; this effectively ignores the
|
|
1813
|
+
authentication in the spec for a single request.
|
|
1814
|
+
:type _request_auth: dict, optional
|
|
1815
|
+
:param _content_type: force content-type for the request.
|
|
1816
|
+
:type _content_type: str, Optional
|
|
1817
|
+
:param _headers: set to override the headers for a single
|
|
1818
|
+
request; this effectively ignores the headers
|
|
1819
|
+
in the spec for a single request.
|
|
1820
|
+
:type _headers: dict, optional
|
|
1821
|
+
:param _host_index: set to override the host_index for a single
|
|
1822
|
+
request; this effectively ignores the host_index
|
|
1823
|
+
in the spec for a single request.
|
|
1824
|
+
:type _host_index: int, optional
|
|
1825
|
+
:return: Returns the result object.
|
|
1826
|
+
""" # noqa: E501
|
|
1827
|
+
|
|
1828
|
+
_param = self._read_serialize(
|
|
1829
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1830
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1831
|
+
fields=fields,
|
|
1832
|
+
exclude_fields=exclude_fields,
|
|
1833
|
+
_request_auth=_request_auth,
|
|
1834
|
+
_content_type=_content_type,
|
|
1835
|
+
_headers=_headers,
|
|
1836
|
+
_host_index=_host_index
|
|
1837
|
+
)
|
|
1838
|
+
|
|
1839
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1840
|
+
'200': "NpmNpmDistributionResponse",
|
|
1841
|
+
}
|
|
1842
|
+
response_data = self.api_client.call_api(
|
|
1843
|
+
*_param,
|
|
1844
|
+
_request_timeout=_request_timeout
|
|
1845
|
+
)
|
|
1846
|
+
response_data.read()
|
|
1847
|
+
return self.api_client.response_deserialize(
|
|
1848
|
+
response_data=response_data,
|
|
1849
|
+
response_types_map=_response_types_map,
|
|
1850
|
+
)
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
@validate_call
|
|
1854
|
+
def read_without_preload_content(
|
|
1855
|
+
self,
|
|
1856
|
+
npm_npm_distribution_href: StrictStr,
|
|
1857
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
1858
|
+
fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
|
|
1859
|
+
exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
|
|
1860
|
+
_request_timeout: Union[
|
|
1861
|
+
None,
|
|
1862
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1863
|
+
Tuple[
|
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1865
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1866
|
+
]
|
|
1867
|
+
] = None,
|
|
1868
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1869
|
+
_content_type: Optional[StrictStr] = None,
|
|
1870
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1871
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1872
|
+
) -> RESTResponseType:
|
|
1873
|
+
"""Inspect a npm distribution
|
|
1874
|
+
|
|
1875
|
+
ViewSet for NPM Distributions.
|
|
1876
|
+
|
|
1877
|
+
:param npm_npm_distribution_href: (required)
|
|
1878
|
+
:type npm_npm_distribution_href: str
|
|
1879
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
1880
|
+
:type x_task_diagnostics: List[str]
|
|
1881
|
+
:param fields: A list of fields to include in the response.
|
|
1882
|
+
:type fields: List[str]
|
|
1883
|
+
:param exclude_fields: A list of fields to exclude from the response.
|
|
1884
|
+
:type exclude_fields: List[str]
|
|
1885
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1886
|
+
number provided, it will be total request
|
|
1887
|
+
timeout. It can also be a pair (tuple) of
|
|
1888
|
+
(connection, read) timeouts.
|
|
1889
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1890
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1891
|
+
request; this effectively ignores the
|
|
1892
|
+
authentication in the spec for a single request.
|
|
1893
|
+
:type _request_auth: dict, optional
|
|
1894
|
+
:param _content_type: force content-type for the request.
|
|
1895
|
+
:type _content_type: str, Optional
|
|
1896
|
+
:param _headers: set to override the headers for a single
|
|
1897
|
+
request; this effectively ignores the headers
|
|
1898
|
+
in the spec for a single request.
|
|
1899
|
+
:type _headers: dict, optional
|
|
1900
|
+
:param _host_index: set to override the host_index for a single
|
|
1901
|
+
request; this effectively ignores the host_index
|
|
1902
|
+
in the spec for a single request.
|
|
1903
|
+
:type _host_index: int, optional
|
|
1904
|
+
:return: Returns the result object.
|
|
1905
|
+
""" # noqa: E501
|
|
1906
|
+
|
|
1907
|
+
_param = self._read_serialize(
|
|
1908
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
1909
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
1910
|
+
fields=fields,
|
|
1911
|
+
exclude_fields=exclude_fields,
|
|
1912
|
+
_request_auth=_request_auth,
|
|
1913
|
+
_content_type=_content_type,
|
|
1914
|
+
_headers=_headers,
|
|
1915
|
+
_host_index=_host_index
|
|
1916
|
+
)
|
|
1917
|
+
|
|
1918
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1919
|
+
'200': "NpmNpmDistributionResponse",
|
|
1920
|
+
}
|
|
1921
|
+
response_data = self.api_client.call_api(
|
|
1922
|
+
*_param,
|
|
1923
|
+
_request_timeout=_request_timeout
|
|
1924
|
+
)
|
|
1925
|
+
return response_data.response
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
def _read_serialize(
|
|
1929
|
+
self,
|
|
1930
|
+
npm_npm_distribution_href,
|
|
1931
|
+
x_task_diagnostics,
|
|
1932
|
+
fields,
|
|
1933
|
+
exclude_fields,
|
|
1934
|
+
_request_auth,
|
|
1935
|
+
_content_type,
|
|
1936
|
+
_headers,
|
|
1937
|
+
_host_index,
|
|
1938
|
+
) -> RequestSerialized:
|
|
1939
|
+
|
|
1940
|
+
_host = None
|
|
1941
|
+
|
|
1942
|
+
_collection_formats: Dict[str, str] = {
|
|
1943
|
+
'X-Task-Diagnostics': 'csv',
|
|
1944
|
+
'fields': 'multi',
|
|
1945
|
+
'exclude_fields': 'multi',
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
_path_params: Dict[str, str] = {}
|
|
1949
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1950
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1951
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1952
|
+
_files: Dict[
|
|
1953
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1954
|
+
] = {}
|
|
1955
|
+
_body_params: Optional[bytes] = None
|
|
1956
|
+
|
|
1957
|
+
# process the path parameters
|
|
1958
|
+
if npm_npm_distribution_href is not None:
|
|
1959
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
1960
|
+
# process the query parameters
|
|
1961
|
+
if fields is not None:
|
|
1962
|
+
|
|
1963
|
+
_query_params.append(('fields', fields))
|
|
1964
|
+
|
|
1965
|
+
if exclude_fields is not None:
|
|
1966
|
+
|
|
1967
|
+
_query_params.append(('exclude_fields', exclude_fields))
|
|
1968
|
+
|
|
1969
|
+
# process the header parameters
|
|
1970
|
+
if x_task_diagnostics is not None:
|
|
1971
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
1972
|
+
# process the form parameters
|
|
1973
|
+
# process the body parameter
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
# set the HTTP header `Accept`
|
|
1977
|
+
if 'Accept' not in _header_params:
|
|
1978
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1979
|
+
[
|
|
1980
|
+
'application/json'
|
|
1981
|
+
]
|
|
1982
|
+
)
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
# authentication setting
|
|
1986
|
+
_auth_settings: List[str] = [
|
|
1987
|
+
'json_header_remote_authentication',
|
|
1988
|
+
'basicAuth',
|
|
1989
|
+
'cookieAuth'
|
|
1990
|
+
]
|
|
1991
|
+
|
|
1992
|
+
return self.api_client.param_serialize(
|
|
1993
|
+
method='GET',
|
|
1994
|
+
resource_path='{npm_npm_distribution_href}',
|
|
1995
|
+
path_params=_path_params,
|
|
1996
|
+
query_params=_query_params,
|
|
1997
|
+
header_params=_header_params,
|
|
1998
|
+
body=_body_params,
|
|
1999
|
+
post_params=_form_params,
|
|
2000
|
+
files=_files,
|
|
2001
|
+
auth_settings=_auth_settings,
|
|
2002
|
+
collection_formats=_collection_formats,
|
|
2003
|
+
_host=_host,
|
|
2004
|
+
_request_auth=_request_auth
|
|
2005
|
+
)
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
@validate_call
|
|
2011
|
+
def set_label(
|
|
2012
|
+
self,
|
|
2013
|
+
npm_npm_distribution_href: StrictStr,
|
|
2014
|
+
set_label: SetLabel,
|
|
2015
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2016
|
+
_request_timeout: Union[
|
|
2017
|
+
None,
|
|
2018
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2019
|
+
Tuple[
|
|
2020
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2021
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2022
|
+
]
|
|
2023
|
+
] = None,
|
|
2024
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2025
|
+
_content_type: Optional[StrictStr] = None,
|
|
2026
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2027
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2028
|
+
) -> SetLabelResponse:
|
|
2029
|
+
"""Set a label
|
|
2030
|
+
|
|
2031
|
+
Set a single pulp_label on the object to a specific value or null.
|
|
2032
|
+
|
|
2033
|
+
:param npm_npm_distribution_href: (required)
|
|
2034
|
+
:type npm_npm_distribution_href: str
|
|
2035
|
+
:param set_label: (required)
|
|
2036
|
+
:type set_label: SetLabel
|
|
2037
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2038
|
+
:type x_task_diagnostics: List[str]
|
|
2039
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2040
|
+
number provided, it will be total request
|
|
2041
|
+
timeout. It can also be a pair (tuple) of
|
|
2042
|
+
(connection, read) timeouts.
|
|
2043
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2044
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2045
|
+
request; this effectively ignores the
|
|
2046
|
+
authentication in the spec for a single request.
|
|
2047
|
+
:type _request_auth: dict, optional
|
|
2048
|
+
:param _content_type: force content-type for the request.
|
|
2049
|
+
:type _content_type: str, Optional
|
|
2050
|
+
:param _headers: set to override the headers for a single
|
|
2051
|
+
request; this effectively ignores the headers
|
|
2052
|
+
in the spec for a single request.
|
|
2053
|
+
:type _headers: dict, optional
|
|
2054
|
+
:param _host_index: set to override the host_index for a single
|
|
2055
|
+
request; this effectively ignores the host_index
|
|
2056
|
+
in the spec for a single request.
|
|
2057
|
+
:type _host_index: int, optional
|
|
2058
|
+
:return: Returns the result object.
|
|
2059
|
+
""" # noqa: E501
|
|
2060
|
+
|
|
2061
|
+
_param = self._set_label_serialize(
|
|
2062
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2063
|
+
set_label=set_label,
|
|
2064
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2065
|
+
_request_auth=_request_auth,
|
|
2066
|
+
_content_type=_content_type,
|
|
2067
|
+
_headers=_headers,
|
|
2068
|
+
_host_index=_host_index
|
|
2069
|
+
)
|
|
2070
|
+
|
|
2071
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2072
|
+
'200': "SetLabelResponse",
|
|
2073
|
+
}
|
|
2074
|
+
response_data = self.api_client.call_api(
|
|
2075
|
+
*_param,
|
|
2076
|
+
_request_timeout=_request_timeout
|
|
2077
|
+
)
|
|
2078
|
+
response_data.read()
|
|
2079
|
+
return self.api_client.response_deserialize(
|
|
2080
|
+
response_data=response_data,
|
|
2081
|
+
response_types_map=_response_types_map,
|
|
2082
|
+
).data
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
@validate_call
|
|
2086
|
+
def set_label_with_http_info(
|
|
2087
|
+
self,
|
|
2088
|
+
npm_npm_distribution_href: StrictStr,
|
|
2089
|
+
set_label: SetLabel,
|
|
2090
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2091
|
+
_request_timeout: Union[
|
|
2092
|
+
None,
|
|
2093
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2094
|
+
Tuple[
|
|
2095
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2096
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2097
|
+
]
|
|
2098
|
+
] = None,
|
|
2099
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2100
|
+
_content_type: Optional[StrictStr] = None,
|
|
2101
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2102
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2103
|
+
) -> ApiResponse[SetLabelResponse]:
|
|
2104
|
+
"""Set a label
|
|
2105
|
+
|
|
2106
|
+
Set a single pulp_label on the object to a specific value or null.
|
|
2107
|
+
|
|
2108
|
+
:param npm_npm_distribution_href: (required)
|
|
2109
|
+
:type npm_npm_distribution_href: str
|
|
2110
|
+
:param set_label: (required)
|
|
2111
|
+
:type set_label: SetLabel
|
|
2112
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2113
|
+
:type x_task_diagnostics: List[str]
|
|
2114
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2115
|
+
number provided, it will be total request
|
|
2116
|
+
timeout. It can also be a pair (tuple) of
|
|
2117
|
+
(connection, read) timeouts.
|
|
2118
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2120
|
+
request; this effectively ignores the
|
|
2121
|
+
authentication in the spec for a single request.
|
|
2122
|
+
:type _request_auth: dict, optional
|
|
2123
|
+
:param _content_type: force content-type for the request.
|
|
2124
|
+
:type _content_type: str, Optional
|
|
2125
|
+
:param _headers: set to override the headers for a single
|
|
2126
|
+
request; this effectively ignores the headers
|
|
2127
|
+
in the spec for a single request.
|
|
2128
|
+
:type _headers: dict, optional
|
|
2129
|
+
:param _host_index: set to override the host_index for a single
|
|
2130
|
+
request; this effectively ignores the host_index
|
|
2131
|
+
in the spec for a single request.
|
|
2132
|
+
:type _host_index: int, optional
|
|
2133
|
+
:return: Returns the result object.
|
|
2134
|
+
""" # noqa: E501
|
|
2135
|
+
|
|
2136
|
+
_param = self._set_label_serialize(
|
|
2137
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2138
|
+
set_label=set_label,
|
|
2139
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2140
|
+
_request_auth=_request_auth,
|
|
2141
|
+
_content_type=_content_type,
|
|
2142
|
+
_headers=_headers,
|
|
2143
|
+
_host_index=_host_index
|
|
2144
|
+
)
|
|
2145
|
+
|
|
2146
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2147
|
+
'200': "SetLabelResponse",
|
|
2148
|
+
}
|
|
2149
|
+
response_data = self.api_client.call_api(
|
|
2150
|
+
*_param,
|
|
2151
|
+
_request_timeout=_request_timeout
|
|
2152
|
+
)
|
|
2153
|
+
response_data.read()
|
|
2154
|
+
return self.api_client.response_deserialize(
|
|
2155
|
+
response_data=response_data,
|
|
2156
|
+
response_types_map=_response_types_map,
|
|
2157
|
+
)
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
@validate_call
|
|
2161
|
+
def set_label_without_preload_content(
|
|
2162
|
+
self,
|
|
2163
|
+
npm_npm_distribution_href: StrictStr,
|
|
2164
|
+
set_label: SetLabel,
|
|
2165
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2166
|
+
_request_timeout: Union[
|
|
2167
|
+
None,
|
|
2168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2169
|
+
Tuple[
|
|
2170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2171
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2172
|
+
]
|
|
2173
|
+
] = None,
|
|
2174
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2175
|
+
_content_type: Optional[StrictStr] = None,
|
|
2176
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2177
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2178
|
+
) -> RESTResponseType:
|
|
2179
|
+
"""Set a label
|
|
2180
|
+
|
|
2181
|
+
Set a single pulp_label on the object to a specific value or null.
|
|
2182
|
+
|
|
2183
|
+
:param npm_npm_distribution_href: (required)
|
|
2184
|
+
:type npm_npm_distribution_href: str
|
|
2185
|
+
:param set_label: (required)
|
|
2186
|
+
:type set_label: SetLabel
|
|
2187
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2188
|
+
:type x_task_diagnostics: List[str]
|
|
2189
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2190
|
+
number provided, it will be total request
|
|
2191
|
+
timeout. It can also be a pair (tuple) of
|
|
2192
|
+
(connection, read) timeouts.
|
|
2193
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2194
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2195
|
+
request; this effectively ignores the
|
|
2196
|
+
authentication in the spec for a single request.
|
|
2197
|
+
:type _request_auth: dict, optional
|
|
2198
|
+
:param _content_type: force content-type for the request.
|
|
2199
|
+
:type _content_type: str, Optional
|
|
2200
|
+
:param _headers: set to override the headers for a single
|
|
2201
|
+
request; this effectively ignores the headers
|
|
2202
|
+
in the spec for a single request.
|
|
2203
|
+
:type _headers: dict, optional
|
|
2204
|
+
:param _host_index: set to override the host_index for a single
|
|
2205
|
+
request; this effectively ignores the host_index
|
|
2206
|
+
in the spec for a single request.
|
|
2207
|
+
:type _host_index: int, optional
|
|
2208
|
+
:return: Returns the result object.
|
|
2209
|
+
""" # noqa: E501
|
|
2210
|
+
|
|
2211
|
+
_param = self._set_label_serialize(
|
|
2212
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2213
|
+
set_label=set_label,
|
|
2214
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2215
|
+
_request_auth=_request_auth,
|
|
2216
|
+
_content_type=_content_type,
|
|
2217
|
+
_headers=_headers,
|
|
2218
|
+
_host_index=_host_index
|
|
2219
|
+
)
|
|
2220
|
+
|
|
2221
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2222
|
+
'200': "SetLabelResponse",
|
|
2223
|
+
}
|
|
2224
|
+
response_data = self.api_client.call_api(
|
|
2225
|
+
*_param,
|
|
2226
|
+
_request_timeout=_request_timeout
|
|
2227
|
+
)
|
|
2228
|
+
return response_data.response
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
def _set_label_serialize(
|
|
2232
|
+
self,
|
|
2233
|
+
npm_npm_distribution_href,
|
|
2234
|
+
set_label,
|
|
2235
|
+
x_task_diagnostics,
|
|
2236
|
+
_request_auth,
|
|
2237
|
+
_content_type,
|
|
2238
|
+
_headers,
|
|
2239
|
+
_host_index,
|
|
2240
|
+
) -> RequestSerialized:
|
|
2241
|
+
|
|
2242
|
+
_host = None
|
|
2243
|
+
|
|
2244
|
+
_collection_formats: Dict[str, str] = {
|
|
2245
|
+
'X-Task-Diagnostics': 'csv',
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
_path_params: Dict[str, str] = {}
|
|
2249
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2250
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2251
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2252
|
+
_files: Dict[
|
|
2253
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2254
|
+
] = {}
|
|
2255
|
+
_body_params: Optional[bytes] = None
|
|
2256
|
+
|
|
2257
|
+
# process the path parameters
|
|
2258
|
+
if npm_npm_distribution_href is not None:
|
|
2259
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
2260
|
+
# process the query parameters
|
|
2261
|
+
# process the header parameters
|
|
2262
|
+
if x_task_diagnostics is not None:
|
|
2263
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
2264
|
+
# process the form parameters
|
|
2265
|
+
# process the body parameter
|
|
2266
|
+
if set_label is not None:
|
|
2267
|
+
_body_params = set_label
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
# set the HTTP header `Accept`
|
|
2271
|
+
if 'Accept' not in _header_params:
|
|
2272
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2273
|
+
[
|
|
2274
|
+
'application/json'
|
|
2275
|
+
]
|
|
2276
|
+
)
|
|
2277
|
+
|
|
2278
|
+
# set the HTTP header `Content-Type`
|
|
2279
|
+
if _content_type:
|
|
2280
|
+
_header_params['Content-Type'] = _content_type
|
|
2281
|
+
else:
|
|
2282
|
+
_default_content_type = (
|
|
2283
|
+
self.api_client.select_header_content_type(
|
|
2284
|
+
[
|
|
2285
|
+
'application/json',
|
|
2286
|
+
'application/x-www-form-urlencoded',
|
|
2287
|
+
'multipart/form-data'
|
|
2288
|
+
]
|
|
2289
|
+
)
|
|
2290
|
+
)
|
|
2291
|
+
if _default_content_type is not None:
|
|
2292
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2293
|
+
|
|
2294
|
+
# authentication setting
|
|
2295
|
+
_auth_settings: List[str] = [
|
|
2296
|
+
'json_header_remote_authentication',
|
|
2297
|
+
'basicAuth',
|
|
2298
|
+
'cookieAuth'
|
|
2299
|
+
]
|
|
2300
|
+
|
|
2301
|
+
return self.api_client.param_serialize(
|
|
2302
|
+
method='POST',
|
|
2303
|
+
resource_path='{npm_npm_distribution_href}set_label/',
|
|
2304
|
+
path_params=_path_params,
|
|
2305
|
+
query_params=_query_params,
|
|
2306
|
+
header_params=_header_params,
|
|
2307
|
+
body=_body_params,
|
|
2308
|
+
post_params=_form_params,
|
|
2309
|
+
files=_files,
|
|
2310
|
+
auth_settings=_auth_settings,
|
|
2311
|
+
collection_formats=_collection_formats,
|
|
2312
|
+
_host=_host,
|
|
2313
|
+
_request_auth=_request_auth
|
|
2314
|
+
)
|
|
2315
|
+
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
|
|
2319
|
+
@validate_call
|
|
2320
|
+
def unset_label(
|
|
2321
|
+
self,
|
|
2322
|
+
npm_npm_distribution_href: StrictStr,
|
|
2323
|
+
unset_label: UnsetLabel,
|
|
2324
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2325
|
+
_request_timeout: Union[
|
|
2326
|
+
None,
|
|
2327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2328
|
+
Tuple[
|
|
2329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2330
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2331
|
+
]
|
|
2332
|
+
] = None,
|
|
2333
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2334
|
+
_content_type: Optional[StrictStr] = None,
|
|
2335
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2336
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2337
|
+
) -> UnsetLabelResponse:
|
|
2338
|
+
"""Unset a label
|
|
2339
|
+
|
|
2340
|
+
Unset a single pulp_label on the object.
|
|
2341
|
+
|
|
2342
|
+
:param npm_npm_distribution_href: (required)
|
|
2343
|
+
:type npm_npm_distribution_href: str
|
|
2344
|
+
:param unset_label: (required)
|
|
2345
|
+
:type unset_label: UnsetLabel
|
|
2346
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2347
|
+
:type x_task_diagnostics: List[str]
|
|
2348
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2349
|
+
number provided, it will be total request
|
|
2350
|
+
timeout. It can also be a pair (tuple) of
|
|
2351
|
+
(connection, read) timeouts.
|
|
2352
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2353
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2354
|
+
request; this effectively ignores the
|
|
2355
|
+
authentication in the spec for a single request.
|
|
2356
|
+
:type _request_auth: dict, optional
|
|
2357
|
+
:param _content_type: force content-type for the request.
|
|
2358
|
+
:type _content_type: str, Optional
|
|
2359
|
+
:param _headers: set to override the headers for a single
|
|
2360
|
+
request; this effectively ignores the headers
|
|
2361
|
+
in the spec for a single request.
|
|
2362
|
+
:type _headers: dict, optional
|
|
2363
|
+
:param _host_index: set to override the host_index for a single
|
|
2364
|
+
request; this effectively ignores the host_index
|
|
2365
|
+
in the spec for a single request.
|
|
2366
|
+
:type _host_index: int, optional
|
|
2367
|
+
:return: Returns the result object.
|
|
2368
|
+
""" # noqa: E501
|
|
2369
|
+
|
|
2370
|
+
_param = self._unset_label_serialize(
|
|
2371
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2372
|
+
unset_label=unset_label,
|
|
2373
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2374
|
+
_request_auth=_request_auth,
|
|
2375
|
+
_content_type=_content_type,
|
|
2376
|
+
_headers=_headers,
|
|
2377
|
+
_host_index=_host_index
|
|
2378
|
+
)
|
|
2379
|
+
|
|
2380
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2381
|
+
'200': "UnsetLabelResponse",
|
|
2382
|
+
}
|
|
2383
|
+
response_data = self.api_client.call_api(
|
|
2384
|
+
*_param,
|
|
2385
|
+
_request_timeout=_request_timeout
|
|
2386
|
+
)
|
|
2387
|
+
response_data.read()
|
|
2388
|
+
return self.api_client.response_deserialize(
|
|
2389
|
+
response_data=response_data,
|
|
2390
|
+
response_types_map=_response_types_map,
|
|
2391
|
+
).data
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
@validate_call
|
|
2395
|
+
def unset_label_with_http_info(
|
|
2396
|
+
self,
|
|
2397
|
+
npm_npm_distribution_href: StrictStr,
|
|
2398
|
+
unset_label: UnsetLabel,
|
|
2399
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2400
|
+
_request_timeout: Union[
|
|
2401
|
+
None,
|
|
2402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2403
|
+
Tuple[
|
|
2404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2405
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2406
|
+
]
|
|
2407
|
+
] = None,
|
|
2408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2409
|
+
_content_type: Optional[StrictStr] = None,
|
|
2410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2412
|
+
) -> ApiResponse[UnsetLabelResponse]:
|
|
2413
|
+
"""Unset a label
|
|
2414
|
+
|
|
2415
|
+
Unset a single pulp_label on the object.
|
|
2416
|
+
|
|
2417
|
+
:param npm_npm_distribution_href: (required)
|
|
2418
|
+
:type npm_npm_distribution_href: str
|
|
2419
|
+
:param unset_label: (required)
|
|
2420
|
+
:type unset_label: UnsetLabel
|
|
2421
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2422
|
+
:type x_task_diagnostics: List[str]
|
|
2423
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2424
|
+
number provided, it will be total request
|
|
2425
|
+
timeout. It can also be a pair (tuple) of
|
|
2426
|
+
(connection, read) timeouts.
|
|
2427
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2429
|
+
request; this effectively ignores the
|
|
2430
|
+
authentication in the spec for a single request.
|
|
2431
|
+
:type _request_auth: dict, optional
|
|
2432
|
+
:param _content_type: force content-type for the request.
|
|
2433
|
+
:type _content_type: str, Optional
|
|
2434
|
+
:param _headers: set to override the headers for a single
|
|
2435
|
+
request; this effectively ignores the headers
|
|
2436
|
+
in the spec for a single request.
|
|
2437
|
+
:type _headers: dict, optional
|
|
2438
|
+
:param _host_index: set to override the host_index for a single
|
|
2439
|
+
request; this effectively ignores the host_index
|
|
2440
|
+
in the spec for a single request.
|
|
2441
|
+
:type _host_index: int, optional
|
|
2442
|
+
:return: Returns the result object.
|
|
2443
|
+
""" # noqa: E501
|
|
2444
|
+
|
|
2445
|
+
_param = self._unset_label_serialize(
|
|
2446
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2447
|
+
unset_label=unset_label,
|
|
2448
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2449
|
+
_request_auth=_request_auth,
|
|
2450
|
+
_content_type=_content_type,
|
|
2451
|
+
_headers=_headers,
|
|
2452
|
+
_host_index=_host_index
|
|
2453
|
+
)
|
|
2454
|
+
|
|
2455
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2456
|
+
'200': "UnsetLabelResponse",
|
|
2457
|
+
}
|
|
2458
|
+
response_data = self.api_client.call_api(
|
|
2459
|
+
*_param,
|
|
2460
|
+
_request_timeout=_request_timeout
|
|
2461
|
+
)
|
|
2462
|
+
response_data.read()
|
|
2463
|
+
return self.api_client.response_deserialize(
|
|
2464
|
+
response_data=response_data,
|
|
2465
|
+
response_types_map=_response_types_map,
|
|
2466
|
+
)
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
@validate_call
|
|
2470
|
+
def unset_label_without_preload_content(
|
|
2471
|
+
self,
|
|
2472
|
+
npm_npm_distribution_href: StrictStr,
|
|
2473
|
+
unset_label: UnsetLabel,
|
|
2474
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2475
|
+
_request_timeout: Union[
|
|
2476
|
+
None,
|
|
2477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2478
|
+
Tuple[
|
|
2479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2481
|
+
]
|
|
2482
|
+
] = None,
|
|
2483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2484
|
+
_content_type: Optional[StrictStr] = None,
|
|
2485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2487
|
+
) -> RESTResponseType:
|
|
2488
|
+
"""Unset a label
|
|
2489
|
+
|
|
2490
|
+
Unset a single pulp_label on the object.
|
|
2491
|
+
|
|
2492
|
+
:param npm_npm_distribution_href: (required)
|
|
2493
|
+
:type npm_npm_distribution_href: str
|
|
2494
|
+
:param unset_label: (required)
|
|
2495
|
+
:type unset_label: UnsetLabel
|
|
2496
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2497
|
+
:type x_task_diagnostics: List[str]
|
|
2498
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2499
|
+
number provided, it will be total request
|
|
2500
|
+
timeout. It can also be a pair (tuple) of
|
|
2501
|
+
(connection, read) timeouts.
|
|
2502
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2503
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2504
|
+
request; this effectively ignores the
|
|
2505
|
+
authentication in the spec for a single request.
|
|
2506
|
+
:type _request_auth: dict, optional
|
|
2507
|
+
:param _content_type: force content-type for the request.
|
|
2508
|
+
:type _content_type: str, Optional
|
|
2509
|
+
:param _headers: set to override the headers for a single
|
|
2510
|
+
request; this effectively ignores the headers
|
|
2511
|
+
in the spec for a single request.
|
|
2512
|
+
:type _headers: dict, optional
|
|
2513
|
+
:param _host_index: set to override the host_index for a single
|
|
2514
|
+
request; this effectively ignores the host_index
|
|
2515
|
+
in the spec for a single request.
|
|
2516
|
+
:type _host_index: int, optional
|
|
2517
|
+
:return: Returns the result object.
|
|
2518
|
+
""" # noqa: E501
|
|
2519
|
+
|
|
2520
|
+
_param = self._unset_label_serialize(
|
|
2521
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2522
|
+
unset_label=unset_label,
|
|
2523
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2524
|
+
_request_auth=_request_auth,
|
|
2525
|
+
_content_type=_content_type,
|
|
2526
|
+
_headers=_headers,
|
|
2527
|
+
_host_index=_host_index
|
|
2528
|
+
)
|
|
2529
|
+
|
|
2530
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2531
|
+
'200': "UnsetLabelResponse",
|
|
2532
|
+
}
|
|
2533
|
+
response_data = self.api_client.call_api(
|
|
2534
|
+
*_param,
|
|
2535
|
+
_request_timeout=_request_timeout
|
|
2536
|
+
)
|
|
2537
|
+
return response_data.response
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
def _unset_label_serialize(
|
|
2541
|
+
self,
|
|
2542
|
+
npm_npm_distribution_href,
|
|
2543
|
+
unset_label,
|
|
2544
|
+
x_task_diagnostics,
|
|
2545
|
+
_request_auth,
|
|
2546
|
+
_content_type,
|
|
2547
|
+
_headers,
|
|
2548
|
+
_host_index,
|
|
2549
|
+
) -> RequestSerialized:
|
|
2550
|
+
|
|
2551
|
+
_host = None
|
|
2552
|
+
|
|
2553
|
+
_collection_formats: Dict[str, str] = {
|
|
2554
|
+
'X-Task-Diagnostics': 'csv',
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
_path_params: Dict[str, str] = {}
|
|
2558
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2559
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2560
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2561
|
+
_files: Dict[
|
|
2562
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2563
|
+
] = {}
|
|
2564
|
+
_body_params: Optional[bytes] = None
|
|
2565
|
+
|
|
2566
|
+
# process the path parameters
|
|
2567
|
+
if npm_npm_distribution_href is not None:
|
|
2568
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
2569
|
+
# process the query parameters
|
|
2570
|
+
# process the header parameters
|
|
2571
|
+
if x_task_diagnostics is not None:
|
|
2572
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
2573
|
+
# process the form parameters
|
|
2574
|
+
# process the body parameter
|
|
2575
|
+
if unset_label is not None:
|
|
2576
|
+
_body_params = unset_label
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
# set the HTTP header `Accept`
|
|
2580
|
+
if 'Accept' not in _header_params:
|
|
2581
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2582
|
+
[
|
|
2583
|
+
'application/json'
|
|
2584
|
+
]
|
|
2585
|
+
)
|
|
2586
|
+
|
|
2587
|
+
# set the HTTP header `Content-Type`
|
|
2588
|
+
if _content_type:
|
|
2589
|
+
_header_params['Content-Type'] = _content_type
|
|
2590
|
+
else:
|
|
2591
|
+
_default_content_type = (
|
|
2592
|
+
self.api_client.select_header_content_type(
|
|
2593
|
+
[
|
|
2594
|
+
'application/json',
|
|
2595
|
+
'application/x-www-form-urlencoded',
|
|
2596
|
+
'multipart/form-data'
|
|
2597
|
+
]
|
|
2598
|
+
)
|
|
2599
|
+
)
|
|
2600
|
+
if _default_content_type is not None:
|
|
2601
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2602
|
+
|
|
2603
|
+
# authentication setting
|
|
2604
|
+
_auth_settings: List[str] = [
|
|
2605
|
+
'json_header_remote_authentication',
|
|
2606
|
+
'basicAuth',
|
|
2607
|
+
'cookieAuth'
|
|
2608
|
+
]
|
|
2609
|
+
|
|
2610
|
+
return self.api_client.param_serialize(
|
|
2611
|
+
method='POST',
|
|
2612
|
+
resource_path='{npm_npm_distribution_href}unset_label/',
|
|
2613
|
+
path_params=_path_params,
|
|
2614
|
+
query_params=_query_params,
|
|
2615
|
+
header_params=_header_params,
|
|
2616
|
+
body=_body_params,
|
|
2617
|
+
post_params=_form_params,
|
|
2618
|
+
files=_files,
|
|
2619
|
+
auth_settings=_auth_settings,
|
|
2620
|
+
collection_formats=_collection_formats,
|
|
2621
|
+
_host=_host,
|
|
2622
|
+
_request_auth=_request_auth
|
|
2623
|
+
)
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
|
|
2628
|
+
@validate_call
|
|
2629
|
+
def update(
|
|
2630
|
+
self,
|
|
2631
|
+
npm_npm_distribution_href: StrictStr,
|
|
2632
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
2633
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2634
|
+
_request_timeout: Union[
|
|
2635
|
+
None,
|
|
2636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2637
|
+
Tuple[
|
|
2638
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2639
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2640
|
+
]
|
|
2641
|
+
] = None,
|
|
2642
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2643
|
+
_content_type: Optional[StrictStr] = None,
|
|
2644
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2645
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2646
|
+
) -> AsyncOperationResponse:
|
|
2647
|
+
"""Update a npm distribution
|
|
2648
|
+
|
|
2649
|
+
Trigger an asynchronous update task
|
|
2650
|
+
|
|
2651
|
+
:param npm_npm_distribution_href: (required)
|
|
2652
|
+
:type npm_npm_distribution_href: str
|
|
2653
|
+
:param npm_npm_distribution: (required)
|
|
2654
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
2655
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2656
|
+
:type x_task_diagnostics: List[str]
|
|
2657
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2658
|
+
number provided, it will be total request
|
|
2659
|
+
timeout. It can also be a pair (tuple) of
|
|
2660
|
+
(connection, read) timeouts.
|
|
2661
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2662
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2663
|
+
request; this effectively ignores the
|
|
2664
|
+
authentication in the spec for a single request.
|
|
2665
|
+
:type _request_auth: dict, optional
|
|
2666
|
+
:param _content_type: force content-type for the request.
|
|
2667
|
+
:type _content_type: str, Optional
|
|
2668
|
+
:param _headers: set to override the headers for a single
|
|
2669
|
+
request; this effectively ignores the headers
|
|
2670
|
+
in the spec for a single request.
|
|
2671
|
+
:type _headers: dict, optional
|
|
2672
|
+
:param _host_index: set to override the host_index for a single
|
|
2673
|
+
request; this effectively ignores the host_index
|
|
2674
|
+
in the spec for a single request.
|
|
2675
|
+
:type _host_index: int, optional
|
|
2676
|
+
:return: Returns the result object.
|
|
2677
|
+
""" # noqa: E501
|
|
2678
|
+
|
|
2679
|
+
_param = self._update_serialize(
|
|
2680
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2681
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
2682
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2683
|
+
_request_auth=_request_auth,
|
|
2684
|
+
_content_type=_content_type,
|
|
2685
|
+
_headers=_headers,
|
|
2686
|
+
_host_index=_host_index
|
|
2687
|
+
)
|
|
2688
|
+
|
|
2689
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2690
|
+
'202': "AsyncOperationResponse",
|
|
2691
|
+
}
|
|
2692
|
+
response_data = self.api_client.call_api(
|
|
2693
|
+
*_param,
|
|
2694
|
+
_request_timeout=_request_timeout
|
|
2695
|
+
)
|
|
2696
|
+
response_data.read()
|
|
2697
|
+
return self.api_client.response_deserialize(
|
|
2698
|
+
response_data=response_data,
|
|
2699
|
+
response_types_map=_response_types_map,
|
|
2700
|
+
).data
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
@validate_call
|
|
2704
|
+
def update_with_http_info(
|
|
2705
|
+
self,
|
|
2706
|
+
npm_npm_distribution_href: StrictStr,
|
|
2707
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
2708
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2709
|
+
_request_timeout: Union[
|
|
2710
|
+
None,
|
|
2711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2712
|
+
Tuple[
|
|
2713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2714
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2715
|
+
]
|
|
2716
|
+
] = None,
|
|
2717
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2718
|
+
_content_type: Optional[StrictStr] = None,
|
|
2719
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2721
|
+
) -> ApiResponse[AsyncOperationResponse]:
|
|
2722
|
+
"""Update a npm distribution
|
|
2723
|
+
|
|
2724
|
+
Trigger an asynchronous update task
|
|
2725
|
+
|
|
2726
|
+
:param npm_npm_distribution_href: (required)
|
|
2727
|
+
:type npm_npm_distribution_href: str
|
|
2728
|
+
:param npm_npm_distribution: (required)
|
|
2729
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
2730
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2731
|
+
:type x_task_diagnostics: List[str]
|
|
2732
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2733
|
+
number provided, it will be total request
|
|
2734
|
+
timeout. It can also be a pair (tuple) of
|
|
2735
|
+
(connection, read) timeouts.
|
|
2736
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2737
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2738
|
+
request; this effectively ignores the
|
|
2739
|
+
authentication in the spec for a single request.
|
|
2740
|
+
:type _request_auth: dict, optional
|
|
2741
|
+
:param _content_type: force content-type for the request.
|
|
2742
|
+
:type _content_type: str, Optional
|
|
2743
|
+
:param _headers: set to override the headers for a single
|
|
2744
|
+
request; this effectively ignores the headers
|
|
2745
|
+
in the spec for a single request.
|
|
2746
|
+
:type _headers: dict, optional
|
|
2747
|
+
:param _host_index: set to override the host_index for a single
|
|
2748
|
+
request; this effectively ignores the host_index
|
|
2749
|
+
in the spec for a single request.
|
|
2750
|
+
:type _host_index: int, optional
|
|
2751
|
+
:return: Returns the result object.
|
|
2752
|
+
""" # noqa: E501
|
|
2753
|
+
|
|
2754
|
+
_param = self._update_serialize(
|
|
2755
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2756
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
2757
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2758
|
+
_request_auth=_request_auth,
|
|
2759
|
+
_content_type=_content_type,
|
|
2760
|
+
_headers=_headers,
|
|
2761
|
+
_host_index=_host_index
|
|
2762
|
+
)
|
|
2763
|
+
|
|
2764
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2765
|
+
'202': "AsyncOperationResponse",
|
|
2766
|
+
}
|
|
2767
|
+
response_data = self.api_client.call_api(
|
|
2768
|
+
*_param,
|
|
2769
|
+
_request_timeout=_request_timeout
|
|
2770
|
+
)
|
|
2771
|
+
response_data.read()
|
|
2772
|
+
return self.api_client.response_deserialize(
|
|
2773
|
+
response_data=response_data,
|
|
2774
|
+
response_types_map=_response_types_map,
|
|
2775
|
+
)
|
|
2776
|
+
|
|
2777
|
+
|
|
2778
|
+
@validate_call
|
|
2779
|
+
def update_without_preload_content(
|
|
2780
|
+
self,
|
|
2781
|
+
npm_npm_distribution_href: StrictStr,
|
|
2782
|
+
npm_npm_distribution: NpmNpmDistribution,
|
|
2783
|
+
x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
|
|
2784
|
+
_request_timeout: Union[
|
|
2785
|
+
None,
|
|
2786
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2787
|
+
Tuple[
|
|
2788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2789
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2790
|
+
]
|
|
2791
|
+
] = None,
|
|
2792
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2793
|
+
_content_type: Optional[StrictStr] = None,
|
|
2794
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2795
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2796
|
+
) -> RESTResponseType:
|
|
2797
|
+
"""Update a npm distribution
|
|
2798
|
+
|
|
2799
|
+
Trigger an asynchronous update task
|
|
2800
|
+
|
|
2801
|
+
:param npm_npm_distribution_href: (required)
|
|
2802
|
+
:type npm_npm_distribution_href: str
|
|
2803
|
+
:param npm_npm_distribution: (required)
|
|
2804
|
+
:type npm_npm_distribution: NpmNpmDistribution
|
|
2805
|
+
:param x_task_diagnostics: List of profilers to use on tasks.
|
|
2806
|
+
:type x_task_diagnostics: List[str]
|
|
2807
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2808
|
+
number provided, it will be total request
|
|
2809
|
+
timeout. It can also be a pair (tuple) of
|
|
2810
|
+
(connection, read) timeouts.
|
|
2811
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2812
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2813
|
+
request; this effectively ignores the
|
|
2814
|
+
authentication in the spec for a single request.
|
|
2815
|
+
:type _request_auth: dict, optional
|
|
2816
|
+
:param _content_type: force content-type for the request.
|
|
2817
|
+
:type _content_type: str, Optional
|
|
2818
|
+
:param _headers: set to override the headers for a single
|
|
2819
|
+
request; this effectively ignores the headers
|
|
2820
|
+
in the spec for a single request.
|
|
2821
|
+
:type _headers: dict, optional
|
|
2822
|
+
:param _host_index: set to override the host_index for a single
|
|
2823
|
+
request; this effectively ignores the host_index
|
|
2824
|
+
in the spec for a single request.
|
|
2825
|
+
:type _host_index: int, optional
|
|
2826
|
+
:return: Returns the result object.
|
|
2827
|
+
""" # noqa: E501
|
|
2828
|
+
|
|
2829
|
+
_param = self._update_serialize(
|
|
2830
|
+
npm_npm_distribution_href=npm_npm_distribution_href,
|
|
2831
|
+
npm_npm_distribution=npm_npm_distribution,
|
|
2832
|
+
x_task_diagnostics=x_task_diagnostics,
|
|
2833
|
+
_request_auth=_request_auth,
|
|
2834
|
+
_content_type=_content_type,
|
|
2835
|
+
_headers=_headers,
|
|
2836
|
+
_host_index=_host_index
|
|
2837
|
+
)
|
|
2838
|
+
|
|
2839
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2840
|
+
'202': "AsyncOperationResponse",
|
|
2841
|
+
}
|
|
2842
|
+
response_data = self.api_client.call_api(
|
|
2843
|
+
*_param,
|
|
2844
|
+
_request_timeout=_request_timeout
|
|
2845
|
+
)
|
|
2846
|
+
return response_data.response
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
def _update_serialize(
|
|
2850
|
+
self,
|
|
2851
|
+
npm_npm_distribution_href,
|
|
2852
|
+
npm_npm_distribution,
|
|
2853
|
+
x_task_diagnostics,
|
|
2854
|
+
_request_auth,
|
|
2855
|
+
_content_type,
|
|
2856
|
+
_headers,
|
|
2857
|
+
_host_index,
|
|
2858
|
+
) -> RequestSerialized:
|
|
2859
|
+
|
|
2860
|
+
_host = None
|
|
2861
|
+
|
|
2862
|
+
_collection_formats: Dict[str, str] = {
|
|
2863
|
+
'X-Task-Diagnostics': 'csv',
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
_path_params: Dict[str, str] = {}
|
|
2867
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2868
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2869
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2870
|
+
_files: Dict[
|
|
2871
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2872
|
+
] = {}
|
|
2873
|
+
_body_params: Optional[bytes] = None
|
|
2874
|
+
|
|
2875
|
+
# process the path parameters
|
|
2876
|
+
if npm_npm_distribution_href is not None:
|
|
2877
|
+
_path_params['npm_npm_distribution_href'] = npm_npm_distribution_href
|
|
2878
|
+
# process the query parameters
|
|
2879
|
+
# process the header parameters
|
|
2880
|
+
if x_task_diagnostics is not None:
|
|
2881
|
+
_header_params['X-Task-Diagnostics'] = x_task_diagnostics
|
|
2882
|
+
# process the form parameters
|
|
2883
|
+
# process the body parameter
|
|
2884
|
+
if npm_npm_distribution is not None:
|
|
2885
|
+
_body_params = npm_npm_distribution
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
# set the HTTP header `Accept`
|
|
2889
|
+
if 'Accept' not in _header_params:
|
|
2890
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2891
|
+
[
|
|
2892
|
+
'application/json'
|
|
2893
|
+
]
|
|
2894
|
+
)
|
|
2895
|
+
|
|
2896
|
+
# set the HTTP header `Content-Type`
|
|
2897
|
+
if _content_type:
|
|
2898
|
+
_header_params['Content-Type'] = _content_type
|
|
2899
|
+
else:
|
|
2900
|
+
_default_content_type = (
|
|
2901
|
+
self.api_client.select_header_content_type(
|
|
2902
|
+
[
|
|
2903
|
+
'application/json',
|
|
2904
|
+
'application/x-www-form-urlencoded',
|
|
2905
|
+
'multipart/form-data'
|
|
2906
|
+
]
|
|
2907
|
+
)
|
|
2908
|
+
)
|
|
2909
|
+
if _default_content_type is not None:
|
|
2910
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2911
|
+
|
|
2912
|
+
# authentication setting
|
|
2913
|
+
_auth_settings: List[str] = [
|
|
2914
|
+
'json_header_remote_authentication',
|
|
2915
|
+
'basicAuth',
|
|
2916
|
+
'cookieAuth'
|
|
2917
|
+
]
|
|
2918
|
+
|
|
2919
|
+
return self.api_client.param_serialize(
|
|
2920
|
+
method='PUT',
|
|
2921
|
+
resource_path='{npm_npm_distribution_href}',
|
|
2922
|
+
path_params=_path_params,
|
|
2923
|
+
query_params=_query_params,
|
|
2924
|
+
header_params=_header_params,
|
|
2925
|
+
body=_body_params,
|
|
2926
|
+
post_params=_form_params,
|
|
2927
|
+
files=_files,
|
|
2928
|
+
auth_settings=_auth_settings,
|
|
2929
|
+
collection_formats=_collection_formats,
|
|
2930
|
+
_host=_host,
|
|
2931
|
+
_request_auth=_request_auth
|
|
2932
|
+
)
|
|
2933
|
+
|
|
2934
|
+
|