crc-pulp-file-client 20250819.1__py3-none-any.whl → 20260113.4__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.
Files changed (120) hide show
  1. crc_pulp_file_client-20260113.4.dist-info/METADATA +8160 -0
  2. crc_pulp_file_client-20260113.4.dist-info/RECORD +62 -0
  3. crc_pulp_file_client-20260113.4.dist-info/top_level.txt +1 -0
  4. pulpcore/client/pulp_file/__init__.py +80 -0
  5. pulpcore/client/pulp_file/api/__init__.py +11 -0
  6. {services-pulp_file-client → pulpcore/client/pulp_file}/api/acs_file_api.py +30 -24
  7. {services-pulp_file-client → pulpcore/client/pulp_file}/api/content_files_api.py +394 -10
  8. {services-pulp_file-client → pulpcore/client/pulp_file}/api/distributions_file_api.py +33 -27
  9. {services-pulp_file-client → pulpcore/client/pulp_file}/api/publications_file_api.py +12 -12
  10. {services-pulp_file-client → pulpcore/client/pulp_file}/api/remotes_file_api.py +33 -27
  11. {services-pulp_file-client → pulpcore/client/pulp_file}/api/repositories_file_api.py +35 -29
  12. {services-pulp_file-client → pulpcore/client/pulp_file}/api/repositories_file_versions_api.py +8 -8
  13. {services-pulp_file-client → pulpcore/client/pulp_file}/api_client.py +7 -7
  14. {crc-pulp_file-client → pulpcore/client/pulp_file}/configuration.py +6 -6
  15. pulpcore/client/pulp_file/models/__init__.py +57 -0
  16. services-pulp_file-client/models/file_file_content_response.py → pulpcore/client/pulp_file/models/file_content_upload_response.py +8 -4
  17. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_content_response.py +5 -1
  18. {services-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote.py +1 -1
  19. {services-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote_response.py +2 -2
  20. {services-pulp_file-client → pulpcore/client/pulp_file}/models/object_roles_response.py +1 -1
  21. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginated_repository_version_response_list.py +1 -1
  22. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_alternate_content_source_response_list.py +1 -1
  23. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_content_response_list.py +1 -1
  24. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_distribution_response_list.py +1 -1
  25. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_publication_response_list.py +1 -1
  26. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_remote_response_list.py +1 -1
  27. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_repository_response_list.py +1 -1
  28. {services-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_remote.py +1 -1
  29. {services-pulp_file-client → pulpcore/client/pulp_file}/models/repository_version_response.py +7 -3
  30. {services-pulp_file-client → pulpcore/client/pulp_file}/rest.py +1 -1
  31. crc-pulp_file-client/api/__init__.py +0 -11
  32. crc-pulp_file-client/api/acs_file_api.py +0 -3689
  33. crc-pulp_file-client/api/content_files_api.py +0 -2088
  34. crc-pulp_file-client/api/distributions_file_api.py +0 -4186
  35. crc-pulp_file-client/api/publications_file_api.py +0 -2881
  36. crc-pulp_file-client/api/remotes_file_api.py +0 -4214
  37. crc-pulp_file-client/api/repositories_file_api.py +0 -4856
  38. crc-pulp_file-client/api/repositories_file_versions_api.py +0 -1670
  39. crc-pulp_file-client/api_client.py +0 -798
  40. crc-pulp_file-client/models/__init__.py +0 -56
  41. crc-pulp_file-client/models/file_file_remote.py +0 -205
  42. crc-pulp_file-client/models/file_file_remote_response.py +0 -199
  43. crc-pulp_file-client/models/object_roles_response.py +0 -96
  44. crc-pulp_file-client/models/paginated_repository_version_response_list.py +0 -112
  45. crc-pulp_file-client/models/paginatedfile_file_alternate_content_source_response_list.py +0 -112
  46. crc-pulp_file-client/models/paginatedfile_file_content_response_list.py +0 -112
  47. crc-pulp_file-client/models/paginatedfile_file_distribution_response_list.py +0 -112
  48. crc-pulp_file-client/models/paginatedfile_file_publication_response_list.py +0 -112
  49. crc-pulp_file-client/models/paginatedfile_file_remote_response_list.py +0 -112
  50. crc-pulp_file-client/models/paginatedfile_file_repository_response_list.py +0 -112
  51. crc-pulp_file-client/models/patchedfile_file_remote.py +0 -205
  52. crc-pulp_file-client/models/repository_version_response.py +0 -121
  53. crc-pulp_file-client/rest.py +0 -258
  54. crc_pulp_file_client-20250819.1.dist-info/METADATA +0 -25
  55. crc_pulp_file_client-20250819.1.dist-info/RECORD +0 -114
  56. crc_pulp_file_client-20250819.1.dist-info/top_level.txt +0 -2
  57. services-pulp_file-client/api/__init__.py +0 -11
  58. services-pulp_file-client/api_response.py +0 -21
  59. services-pulp_file-client/configuration.py +0 -628
  60. services-pulp_file-client/exceptions.py +0 -200
  61. services-pulp_file-client/models/__init__.py +0 -56
  62. services-pulp_file-client/models/async_operation_response.py +0 -88
  63. services-pulp_file-client/models/content_summary_response.py +0 -92
  64. services-pulp_file-client/models/file_file_alternate_content_source.py +0 -101
  65. services-pulp_file-client/models/file_file_alternate_content_source_response.py +0 -116
  66. services-pulp_file-client/models/file_file_distribution.py +0 -118
  67. services-pulp_file-client/models/file_file_distribution_response.py +0 -142
  68. services-pulp_file-client/models/file_file_publication.py +0 -100
  69. services-pulp_file-client/models/file_file_publication_response.py +0 -120
  70. services-pulp_file-client/models/file_file_remote_response_hidden_fields_inner.py +0 -90
  71. services-pulp_file-client/models/file_file_repository.py +0 -121
  72. services-pulp_file-client/models/file_file_repository_response.py +0 -146
  73. services-pulp_file-client/models/my_permissions_response.py +0 -88
  74. services-pulp_file-client/models/nested_role.py +0 -93
  75. services-pulp_file-client/models/nested_role_response.py +0 -92
  76. services-pulp_file-client/models/patchedfile_file_alternate_content_source.py +0 -101
  77. services-pulp_file-client/models/patchedfile_file_distribution.py +0 -118
  78. services-pulp_file-client/models/patchedfile_file_repository.py +0 -121
  79. services-pulp_file-client/models/policy_enum.py +0 -39
  80. services-pulp_file-client/models/repair.py +0 -88
  81. services-pulp_file-client/models/repository_add_remove_content.py +0 -93
  82. services-pulp_file-client/models/repository_sync_url.py +0 -90
  83. services-pulp_file-client/models/set_label.py +0 -103
  84. services-pulp_file-client/models/set_label_response.py +0 -103
  85. services-pulp_file-client/models/task_group_operation_response.py +0 -88
  86. services-pulp_file-client/models/unset_label.py +0 -96
  87. services-pulp_file-client/models/unset_label_response.py +0 -100
  88. services-pulp_file-client/py.typed +0 -0
  89. {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20260113.4.dist-info}/WHEEL +0 -0
  90. {crc-pulp_file-client → pulpcore}/__init__.py +0 -0
  91. {services-pulp_file-client → pulpcore/client}/__init__.py +0 -0
  92. {crc-pulp_file-client → pulpcore/client/pulp_file}/api_response.py +0 -0
  93. {crc-pulp_file-client → pulpcore/client/pulp_file}/exceptions.py +0 -0
  94. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/async_operation_response.py +0 -0
  95. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/content_summary_response.py +0 -0
  96. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_alternate_content_source.py +0 -0
  97. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_alternate_content_source_response.py +0 -0
  98. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_distribution.py +0 -0
  99. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_distribution_response.py +0 -0
  100. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_publication.py +0 -0
  101. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_publication_response.py +0 -0
  102. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote_response_hidden_fields_inner.py +0 -0
  103. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_repository.py +0 -0
  104. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_repository_response.py +0 -0
  105. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/my_permissions_response.py +0 -0
  106. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/nested_role.py +0 -0
  107. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/nested_role_response.py +0 -0
  108. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_alternate_content_source.py +0 -0
  109. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_distribution.py +0 -0
  110. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_repository.py +0 -0
  111. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/policy_enum.py +0 -0
  112. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repair.py +0 -0
  113. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repository_add_remove_content.py +0 -0
  114. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repository_sync_url.py +0 -0
  115. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/set_label.py +0 -0
  116. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/set_label_response.py +0 -0
  117. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/task_group_operation_response.py +0 -0
  118. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/unset_label.py +0 -0
  119. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/unset_label_response.py +0 -0
  120. {crc-pulp_file-client → pulpcore/client/pulp_file}/py.typed +0 -0
@@ -1,3689 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
- import warnings
16
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
- from typing import Any, Dict, List, Optional, Tuple, Union
18
- from typing_extensions import Annotated
19
-
20
- from pydantic import Field, StrictInt, StrictStr, field_validator
21
- from typing import List, Optional
22
- from typing_extensions import Annotated
23
- from crc-pulp_file-client.models.async_operation_response import AsyncOperationResponse
24
- from crc-pulp_file-client.models.file_file_alternate_content_source import FileFileAlternateContentSource
25
- from crc-pulp_file-client.models.file_file_alternate_content_source_response import FileFileAlternateContentSourceResponse
26
- from crc-pulp_file-client.models.my_permissions_response import MyPermissionsResponse
27
- from crc-pulp_file-client.models.nested_role import NestedRole
28
- from crc-pulp_file-client.models.nested_role_response import NestedRoleResponse
29
- from crc-pulp_file-client.models.object_roles_response import ObjectRolesResponse
30
- from crc-pulp_file-client.models.paginatedfile_file_alternate_content_source_response_list import PaginatedfileFileAlternateContentSourceResponseList
31
- from crc-pulp_file-client.models.patchedfile_file_alternate_content_source import PatchedfileFileAlternateContentSource
32
- from crc-pulp_file-client.models.task_group_operation_response import TaskGroupOperationResponse
33
-
34
- from crc-pulp_file-client.api_client import ApiClient, RequestSerialized
35
- from crc-pulp_file-client.api_response import ApiResponse
36
- from crc-pulp_file-client.rest import RESTResponseType
37
-
38
-
39
- class AcsFileApi:
40
- """NOTE: This class is auto generated by OpenAPI Generator
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
- """
45
-
46
- def __init__(self, api_client=None) -> None:
47
- if api_client is None:
48
- api_client = ApiClient.get_default()
49
- self.api_client = api_client
50
-
51
-
52
- @validate_call
53
- def add_role(
54
- self,
55
- file_file_alternate_content_source_href: StrictStr,
56
- nested_role: NestedRole,
57
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
58
- _request_timeout: Union[
59
- None,
60
- Annotated[StrictFloat, Field(gt=0)],
61
- Tuple[
62
- Annotated[StrictFloat, Field(gt=0)],
63
- Annotated[StrictFloat, Field(gt=0)]
64
- ]
65
- ] = None,
66
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
- _content_type: Optional[StrictStr] = None,
68
- _headers: Optional[Dict[StrictStr, Any]] = None,
69
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
- ) -> NestedRoleResponse:
71
- """Add a role
72
-
73
- Add a role for this object to users/groups.
74
-
75
- :param file_file_alternate_content_source_href: (required)
76
- :type file_file_alternate_content_source_href: str
77
- :param nested_role: (required)
78
- :type nested_role: NestedRole
79
- :param x_task_diagnostics: List of profilers to use on tasks.
80
- :type x_task_diagnostics: List[str]
81
- :param _request_timeout: timeout setting for this request. If one
82
- number provided, it will be total request
83
- timeout. It can also be a pair (tuple) of
84
- (connection, read) timeouts.
85
- :type _request_timeout: int, tuple(int, int), optional
86
- :param _request_auth: set to override the auth_settings for an a single
87
- request; this effectively ignores the
88
- authentication in the spec for a single request.
89
- :type _request_auth: dict, optional
90
- :param _content_type: force content-type for the request.
91
- :type _content_type: str, Optional
92
- :param _headers: set to override the headers for a single
93
- request; this effectively ignores the headers
94
- in the spec for a single request.
95
- :type _headers: dict, optional
96
- :param _host_index: set to override the host_index for a single
97
- request; this effectively ignores the host_index
98
- in the spec for a single request.
99
- :type _host_index: int, optional
100
- :return: Returns the result object.
101
- """ # noqa: E501
102
-
103
- _param = self._add_role_serialize(
104
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
105
- nested_role=nested_role,
106
- x_task_diagnostics=x_task_diagnostics,
107
- _request_auth=_request_auth,
108
- _content_type=_content_type,
109
- _headers=_headers,
110
- _host_index=_host_index
111
- )
112
-
113
- _response_types_map: Dict[str, Optional[str]] = {
114
- '201': "NestedRoleResponse",
115
- }
116
- response_data = self.api_client.call_api(
117
- *_param,
118
- _request_timeout=_request_timeout
119
- )
120
- response_data.read()
121
- return self.api_client.response_deserialize(
122
- response_data=response_data,
123
- response_types_map=_response_types_map,
124
- ).data
125
-
126
-
127
- @validate_call
128
- def add_role_with_http_info(
129
- self,
130
- file_file_alternate_content_source_href: StrictStr,
131
- nested_role: NestedRole,
132
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
133
- _request_timeout: Union[
134
- None,
135
- Annotated[StrictFloat, Field(gt=0)],
136
- Tuple[
137
- Annotated[StrictFloat, Field(gt=0)],
138
- Annotated[StrictFloat, Field(gt=0)]
139
- ]
140
- ] = None,
141
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
142
- _content_type: Optional[StrictStr] = None,
143
- _headers: Optional[Dict[StrictStr, Any]] = None,
144
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
145
- ) -> ApiResponse[NestedRoleResponse]:
146
- """Add a role
147
-
148
- Add a role for this object to users/groups.
149
-
150
- :param file_file_alternate_content_source_href: (required)
151
- :type file_file_alternate_content_source_href: str
152
- :param nested_role: (required)
153
- :type nested_role: NestedRole
154
- :param x_task_diagnostics: List of profilers to use on tasks.
155
- :type x_task_diagnostics: List[str]
156
- :param _request_timeout: timeout setting for this request. If one
157
- number provided, it will be total request
158
- timeout. It can also be a pair (tuple) of
159
- (connection, read) timeouts.
160
- :type _request_timeout: int, tuple(int, int), optional
161
- :param _request_auth: set to override the auth_settings for an a single
162
- request; this effectively ignores the
163
- authentication in the spec for a single request.
164
- :type _request_auth: dict, optional
165
- :param _content_type: force content-type for the request.
166
- :type _content_type: str, Optional
167
- :param _headers: set to override the headers for a single
168
- request; this effectively ignores the headers
169
- in the spec for a single request.
170
- :type _headers: dict, optional
171
- :param _host_index: set to override the host_index for a single
172
- request; this effectively ignores the host_index
173
- in the spec for a single request.
174
- :type _host_index: int, optional
175
- :return: Returns the result object.
176
- """ # noqa: E501
177
-
178
- _param = self._add_role_serialize(
179
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
180
- nested_role=nested_role,
181
- x_task_diagnostics=x_task_diagnostics,
182
- _request_auth=_request_auth,
183
- _content_type=_content_type,
184
- _headers=_headers,
185
- _host_index=_host_index
186
- )
187
-
188
- _response_types_map: Dict[str, Optional[str]] = {
189
- '201': "NestedRoleResponse",
190
- }
191
- response_data = self.api_client.call_api(
192
- *_param,
193
- _request_timeout=_request_timeout
194
- )
195
- response_data.read()
196
- return self.api_client.response_deserialize(
197
- response_data=response_data,
198
- response_types_map=_response_types_map,
199
- )
200
-
201
-
202
- @validate_call
203
- def add_role_without_preload_content(
204
- self,
205
- file_file_alternate_content_source_href: StrictStr,
206
- nested_role: NestedRole,
207
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
208
- _request_timeout: Union[
209
- None,
210
- Annotated[StrictFloat, Field(gt=0)],
211
- Tuple[
212
- Annotated[StrictFloat, Field(gt=0)],
213
- Annotated[StrictFloat, Field(gt=0)]
214
- ]
215
- ] = None,
216
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
217
- _content_type: Optional[StrictStr] = None,
218
- _headers: Optional[Dict[StrictStr, Any]] = None,
219
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
220
- ) -> RESTResponseType:
221
- """Add a role
222
-
223
- Add a role for this object to users/groups.
224
-
225
- :param file_file_alternate_content_source_href: (required)
226
- :type file_file_alternate_content_source_href: str
227
- :param nested_role: (required)
228
- :type nested_role: NestedRole
229
- :param x_task_diagnostics: List of profilers to use on tasks.
230
- :type x_task_diagnostics: List[str]
231
- :param _request_timeout: timeout setting for this request. If one
232
- number provided, it will be total request
233
- timeout. It can also be a pair (tuple) of
234
- (connection, read) timeouts.
235
- :type _request_timeout: int, tuple(int, int), optional
236
- :param _request_auth: set to override the auth_settings for an a single
237
- request; this effectively ignores the
238
- authentication in the spec for a single request.
239
- :type _request_auth: dict, optional
240
- :param _content_type: force content-type for the request.
241
- :type _content_type: str, Optional
242
- :param _headers: set to override the headers for a single
243
- request; this effectively ignores the headers
244
- in the spec for a single request.
245
- :type _headers: dict, optional
246
- :param _host_index: set to override the host_index for a single
247
- request; this effectively ignores the host_index
248
- in the spec for a single request.
249
- :type _host_index: int, optional
250
- :return: Returns the result object.
251
- """ # noqa: E501
252
-
253
- _param = self._add_role_serialize(
254
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
255
- nested_role=nested_role,
256
- x_task_diagnostics=x_task_diagnostics,
257
- _request_auth=_request_auth,
258
- _content_type=_content_type,
259
- _headers=_headers,
260
- _host_index=_host_index
261
- )
262
-
263
- _response_types_map: Dict[str, Optional[str]] = {
264
- '201': "NestedRoleResponse",
265
- }
266
- response_data = self.api_client.call_api(
267
- *_param,
268
- _request_timeout=_request_timeout
269
- )
270
- return response_data.response
271
-
272
-
273
- def _add_role_serialize(
274
- self,
275
- file_file_alternate_content_source_href,
276
- nested_role,
277
- x_task_diagnostics,
278
- _request_auth,
279
- _content_type,
280
- _headers,
281
- _host_index,
282
- ) -> RequestSerialized:
283
-
284
- _host = None
285
-
286
- _collection_formats: Dict[str, str] = {
287
- 'X-Task-Diagnostics': 'csv',
288
- }
289
-
290
- _path_params: Dict[str, str] = {}
291
- _query_params: List[Tuple[str, str]] = []
292
- _header_params: Dict[str, Optional[str]] = _headers or {}
293
- _form_params: List[Tuple[str, str]] = []
294
- _files: Dict[
295
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
296
- ] = {}
297
- _body_params: Optional[bytes] = None
298
-
299
- # process the path parameters
300
- if file_file_alternate_content_source_href is not None:
301
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
302
- # process the query parameters
303
- # process the header parameters
304
- if x_task_diagnostics is not None:
305
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
306
- # process the form parameters
307
- # process the body parameter
308
- if nested_role is not None:
309
- _body_params = nested_role
310
-
311
-
312
- # set the HTTP header `Accept`
313
- if 'Accept' not in _header_params:
314
- _header_params['Accept'] = self.api_client.select_header_accept(
315
- [
316
- 'application/json'
317
- ]
318
- )
319
-
320
- # set the HTTP header `Content-Type`
321
- if _content_type:
322
- _header_params['Content-Type'] = _content_type
323
- else:
324
- _default_content_type = (
325
- self.api_client.select_header_content_type(
326
- [
327
- 'application/json',
328
- 'application/x-www-form-urlencoded',
329
- 'multipart/form-data'
330
- ]
331
- )
332
- )
333
- if _default_content_type is not None:
334
- _header_params['Content-Type'] = _default_content_type
335
-
336
- # authentication setting
337
- _auth_settings: List[str] = [
338
- 'json_header_remote_authentication',
339
- 'basicAuth',
340
- 'cookieAuth'
341
- ]
342
-
343
- return self.api_client.param_serialize(
344
- method='POST',
345
- resource_path='{file_file_alternate_content_source_href}add_role/',
346
- path_params=_path_params,
347
- query_params=_query_params,
348
- header_params=_header_params,
349
- body=_body_params,
350
- post_params=_form_params,
351
- files=_files,
352
- auth_settings=_auth_settings,
353
- collection_formats=_collection_formats,
354
- _host=_host,
355
- _request_auth=_request_auth
356
- )
357
-
358
-
359
-
360
-
361
- @validate_call
362
- def create(
363
- self,
364
- file_file_alternate_content_source: FileFileAlternateContentSource,
365
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
366
- pulp_domain: StrictStr = "default",
367
- _request_timeout: Union[
368
- None,
369
- Annotated[StrictFloat, Field(gt=0)],
370
- Tuple[
371
- Annotated[StrictFloat, Field(gt=0)],
372
- Annotated[StrictFloat, Field(gt=0)]
373
- ]
374
- ] = None,
375
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
376
- _content_type: Optional[StrictStr] = None,
377
- _headers: Optional[Dict[StrictStr, Any]] = None,
378
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
379
- ) -> FileFileAlternateContentSourceResponse:
380
- """Create a file alternate content source
381
-
382
- Alternate Content Source ViewSet for File
383
-
384
- :param pulp_domain: (required)
385
- :type pulp_domain: str
386
- :param file_file_alternate_content_source: (required)
387
- :type file_file_alternate_content_source: FileFileAlternateContentSource
388
- :param x_task_diagnostics: List of profilers to use on tasks.
389
- :type x_task_diagnostics: List[str]
390
- :param _request_timeout: timeout setting for this request. If one
391
- number provided, it will be total request
392
- timeout. It can also be a pair (tuple) of
393
- (connection, read) timeouts.
394
- :type _request_timeout: int, tuple(int, int), optional
395
- :param _request_auth: set to override the auth_settings for an a single
396
- request; this effectively ignores the
397
- authentication in the spec for a single request.
398
- :type _request_auth: dict, optional
399
- :param _content_type: force content-type for the request.
400
- :type _content_type: str, Optional
401
- :param _headers: set to override the headers for a single
402
- request; this effectively ignores the headers
403
- in the spec for a single request.
404
- :type _headers: dict, optional
405
- :param _host_index: set to override the host_index for a single
406
- request; this effectively ignores the host_index
407
- in the spec for a single request.
408
- :type _host_index: int, optional
409
- :return: Returns the result object.
410
- """ # noqa: E501
411
-
412
- _param = self._create_serialize(
413
- pulp_domain=pulp_domain,
414
- file_file_alternate_content_source=file_file_alternate_content_source,
415
- x_task_diagnostics=x_task_diagnostics,
416
- _request_auth=_request_auth,
417
- _content_type=_content_type,
418
- _headers=_headers,
419
- _host_index=_host_index
420
- )
421
-
422
- _response_types_map: Dict[str, Optional[str]] = {
423
- '201': "FileFileAlternateContentSourceResponse",
424
- }
425
- response_data = self.api_client.call_api(
426
- *_param,
427
- _request_timeout=_request_timeout
428
- )
429
- response_data.read()
430
- return self.api_client.response_deserialize(
431
- response_data=response_data,
432
- response_types_map=_response_types_map,
433
- ).data
434
-
435
-
436
- @validate_call
437
- def create_with_http_info(
438
- self,
439
- file_file_alternate_content_source: FileFileAlternateContentSource,
440
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
441
- pulp_domain: StrictStr = "default",
442
- _request_timeout: Union[
443
- None,
444
- Annotated[StrictFloat, Field(gt=0)],
445
- Tuple[
446
- Annotated[StrictFloat, Field(gt=0)],
447
- Annotated[StrictFloat, Field(gt=0)]
448
- ]
449
- ] = None,
450
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
451
- _content_type: Optional[StrictStr] = None,
452
- _headers: Optional[Dict[StrictStr, Any]] = None,
453
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
454
- ) -> ApiResponse[FileFileAlternateContentSourceResponse]:
455
- """Create a file alternate content source
456
-
457
- Alternate Content Source ViewSet for File
458
-
459
- :param pulp_domain: (required)
460
- :type pulp_domain: str
461
- :param file_file_alternate_content_source: (required)
462
- :type file_file_alternate_content_source: FileFileAlternateContentSource
463
- :param x_task_diagnostics: List of profilers to use on tasks.
464
- :type x_task_diagnostics: List[str]
465
- :param _request_timeout: timeout setting for this request. If one
466
- number provided, it will be total request
467
- timeout. It can also be a pair (tuple) of
468
- (connection, read) timeouts.
469
- :type _request_timeout: int, tuple(int, int), optional
470
- :param _request_auth: set to override the auth_settings for an a single
471
- request; this effectively ignores the
472
- authentication in the spec for a single request.
473
- :type _request_auth: dict, optional
474
- :param _content_type: force content-type for the request.
475
- :type _content_type: str, Optional
476
- :param _headers: set to override the headers for a single
477
- request; this effectively ignores the headers
478
- in the spec for a single request.
479
- :type _headers: dict, optional
480
- :param _host_index: set to override the host_index for a single
481
- request; this effectively ignores the host_index
482
- in the spec for a single request.
483
- :type _host_index: int, optional
484
- :return: Returns the result object.
485
- """ # noqa: E501
486
-
487
- _param = self._create_serialize(
488
- pulp_domain=pulp_domain,
489
- file_file_alternate_content_source=file_file_alternate_content_source,
490
- x_task_diagnostics=x_task_diagnostics,
491
- _request_auth=_request_auth,
492
- _content_type=_content_type,
493
- _headers=_headers,
494
- _host_index=_host_index
495
- )
496
-
497
- _response_types_map: Dict[str, Optional[str]] = {
498
- '201': "FileFileAlternateContentSourceResponse",
499
- }
500
- response_data = self.api_client.call_api(
501
- *_param,
502
- _request_timeout=_request_timeout
503
- )
504
- response_data.read()
505
- return self.api_client.response_deserialize(
506
- response_data=response_data,
507
- response_types_map=_response_types_map,
508
- )
509
-
510
-
511
- @validate_call
512
- def create_without_preload_content(
513
- self,
514
- file_file_alternate_content_source: FileFileAlternateContentSource,
515
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
516
- pulp_domain: StrictStr = "default",
517
- _request_timeout: Union[
518
- None,
519
- Annotated[StrictFloat, Field(gt=0)],
520
- Tuple[
521
- Annotated[StrictFloat, Field(gt=0)],
522
- Annotated[StrictFloat, Field(gt=0)]
523
- ]
524
- ] = None,
525
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
526
- _content_type: Optional[StrictStr] = None,
527
- _headers: Optional[Dict[StrictStr, Any]] = None,
528
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
529
- ) -> RESTResponseType:
530
- """Create a file alternate content source
531
-
532
- Alternate Content Source ViewSet for File
533
-
534
- :param pulp_domain: (required)
535
- :type pulp_domain: str
536
- :param file_file_alternate_content_source: (required)
537
- :type file_file_alternate_content_source: FileFileAlternateContentSource
538
- :param x_task_diagnostics: List of profilers to use on tasks.
539
- :type x_task_diagnostics: List[str]
540
- :param _request_timeout: timeout setting for this request. If one
541
- number provided, it will be total request
542
- timeout. It can also be a pair (tuple) of
543
- (connection, read) timeouts.
544
- :type _request_timeout: int, tuple(int, int), optional
545
- :param _request_auth: set to override the auth_settings for an a single
546
- request; this effectively ignores the
547
- authentication in the spec for a single request.
548
- :type _request_auth: dict, optional
549
- :param _content_type: force content-type for the request.
550
- :type _content_type: str, Optional
551
- :param _headers: set to override the headers for a single
552
- request; this effectively ignores the headers
553
- in the spec for a single request.
554
- :type _headers: dict, optional
555
- :param _host_index: set to override the host_index for a single
556
- request; this effectively ignores the host_index
557
- in the spec for a single request.
558
- :type _host_index: int, optional
559
- :return: Returns the result object.
560
- """ # noqa: E501
561
-
562
- _param = self._create_serialize(
563
- pulp_domain=pulp_domain,
564
- file_file_alternate_content_source=file_file_alternate_content_source,
565
- x_task_diagnostics=x_task_diagnostics,
566
- _request_auth=_request_auth,
567
- _content_type=_content_type,
568
- _headers=_headers,
569
- _host_index=_host_index
570
- )
571
-
572
- _response_types_map: Dict[str, Optional[str]] = {
573
- '201': "FileFileAlternateContentSourceResponse",
574
- }
575
- response_data = self.api_client.call_api(
576
- *_param,
577
- _request_timeout=_request_timeout
578
- )
579
- return response_data.response
580
-
581
-
582
- def _create_serialize(
583
- self,
584
- pulp_domain,
585
- file_file_alternate_content_source,
586
- x_task_diagnostics,
587
- _request_auth,
588
- _content_type,
589
- _headers,
590
- _host_index,
591
- ) -> RequestSerialized:
592
-
593
- _host = None
594
-
595
- _collection_formats: Dict[str, str] = {
596
- 'X-Task-Diagnostics': 'csv',
597
- }
598
-
599
- _path_params: Dict[str, str] = {}
600
- _query_params: List[Tuple[str, str]] = []
601
- _header_params: Dict[str, Optional[str]] = _headers or {}
602
- _form_params: List[Tuple[str, str]] = []
603
- _files: Dict[
604
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
605
- ] = {}
606
- _body_params: Optional[bytes] = None
607
-
608
- # process the path parameters
609
- if pulp_domain is not None:
610
- _path_params['pulp_domain'] = pulp_domain
611
- # process the query parameters
612
- # process the header parameters
613
- if x_task_diagnostics is not None:
614
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
615
- # process the form parameters
616
- # process the body parameter
617
- if file_file_alternate_content_source is not None:
618
- _body_params = file_file_alternate_content_source
619
-
620
-
621
- # set the HTTP header `Accept`
622
- if 'Accept' not in _header_params:
623
- _header_params['Accept'] = self.api_client.select_header_accept(
624
- [
625
- 'application/json'
626
- ]
627
- )
628
-
629
- # set the HTTP header `Content-Type`
630
- if _content_type:
631
- _header_params['Content-Type'] = _content_type
632
- else:
633
- _default_content_type = (
634
- self.api_client.select_header_content_type(
635
- [
636
- 'application/json',
637
- 'application/x-www-form-urlencoded',
638
- 'multipart/form-data'
639
- ]
640
- )
641
- )
642
- if _default_content_type is not None:
643
- _header_params['Content-Type'] = _default_content_type
644
-
645
- # authentication setting
646
- _auth_settings: List[str] = [
647
- 'json_header_remote_authentication',
648
- 'basicAuth',
649
- 'cookieAuth'
650
- ]
651
-
652
- return self.api_client.param_serialize(
653
- method='POST',
654
- resource_path='/api/pulp/{pulp_domain}/api/v3/acs/file/file/',
655
- path_params=_path_params,
656
- query_params=_query_params,
657
- header_params=_header_params,
658
- body=_body_params,
659
- post_params=_form_params,
660
- files=_files,
661
- auth_settings=_auth_settings,
662
- collection_formats=_collection_formats,
663
- _host=_host,
664
- _request_auth=_request_auth
665
- )
666
-
667
-
668
-
669
-
670
- @validate_call
671
- def delete(
672
- self,
673
- file_file_alternate_content_source_href: StrictStr,
674
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
675
- _request_timeout: Union[
676
- None,
677
- Annotated[StrictFloat, Field(gt=0)],
678
- Tuple[
679
- Annotated[StrictFloat, Field(gt=0)],
680
- Annotated[StrictFloat, Field(gt=0)]
681
- ]
682
- ] = None,
683
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
684
- _content_type: Optional[StrictStr] = None,
685
- _headers: Optional[Dict[StrictStr, Any]] = None,
686
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
687
- ) -> AsyncOperationResponse:
688
- """Delete a file alternate content source
689
-
690
- Trigger an asynchronous delete ACS task
691
-
692
- :param file_file_alternate_content_source_href: (required)
693
- :type file_file_alternate_content_source_href: str
694
- :param x_task_diagnostics: List of profilers to use on tasks.
695
- :type x_task_diagnostics: List[str]
696
- :param _request_timeout: timeout setting for this request. If one
697
- number provided, it will be total request
698
- timeout. It can also be a pair (tuple) of
699
- (connection, read) timeouts.
700
- :type _request_timeout: int, tuple(int, int), optional
701
- :param _request_auth: set to override the auth_settings for an a single
702
- request; this effectively ignores the
703
- authentication in the spec for a single request.
704
- :type _request_auth: dict, optional
705
- :param _content_type: force content-type for the request.
706
- :type _content_type: str, Optional
707
- :param _headers: set to override the headers for a single
708
- request; this effectively ignores the headers
709
- in the spec for a single request.
710
- :type _headers: dict, optional
711
- :param _host_index: set to override the host_index for a single
712
- request; this effectively ignores the host_index
713
- in the spec for a single request.
714
- :type _host_index: int, optional
715
- :return: Returns the result object.
716
- """ # noqa: E501
717
-
718
- _param = self._delete_serialize(
719
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
720
- x_task_diagnostics=x_task_diagnostics,
721
- _request_auth=_request_auth,
722
- _content_type=_content_type,
723
- _headers=_headers,
724
- _host_index=_host_index
725
- )
726
-
727
- _response_types_map: Dict[str, Optional[str]] = {
728
- '202': "AsyncOperationResponse",
729
- }
730
- response_data = self.api_client.call_api(
731
- *_param,
732
- _request_timeout=_request_timeout
733
- )
734
- response_data.read()
735
- return self.api_client.response_deserialize(
736
- response_data=response_data,
737
- response_types_map=_response_types_map,
738
- ).data
739
-
740
-
741
- @validate_call
742
- def delete_with_http_info(
743
- self,
744
- file_file_alternate_content_source_href: StrictStr,
745
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
746
- _request_timeout: Union[
747
- None,
748
- Annotated[StrictFloat, Field(gt=0)],
749
- Tuple[
750
- Annotated[StrictFloat, Field(gt=0)],
751
- Annotated[StrictFloat, Field(gt=0)]
752
- ]
753
- ] = None,
754
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
755
- _content_type: Optional[StrictStr] = None,
756
- _headers: Optional[Dict[StrictStr, Any]] = None,
757
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
758
- ) -> ApiResponse[AsyncOperationResponse]:
759
- """Delete a file alternate content source
760
-
761
- Trigger an asynchronous delete ACS task
762
-
763
- :param file_file_alternate_content_source_href: (required)
764
- :type file_file_alternate_content_source_href: str
765
- :param x_task_diagnostics: List of profilers to use on tasks.
766
- :type x_task_diagnostics: List[str]
767
- :param _request_timeout: timeout setting for this request. If one
768
- number provided, it will be total request
769
- timeout. It can also be a pair (tuple) of
770
- (connection, read) timeouts.
771
- :type _request_timeout: int, tuple(int, int), optional
772
- :param _request_auth: set to override the auth_settings for an a single
773
- request; this effectively ignores the
774
- authentication in the spec for a single request.
775
- :type _request_auth: dict, optional
776
- :param _content_type: force content-type for the request.
777
- :type _content_type: str, Optional
778
- :param _headers: set to override the headers for a single
779
- request; this effectively ignores the headers
780
- in the spec for a single request.
781
- :type _headers: dict, optional
782
- :param _host_index: set to override the host_index for a single
783
- request; this effectively ignores the host_index
784
- in the spec for a single request.
785
- :type _host_index: int, optional
786
- :return: Returns the result object.
787
- """ # noqa: E501
788
-
789
- _param = self._delete_serialize(
790
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
791
- x_task_diagnostics=x_task_diagnostics,
792
- _request_auth=_request_auth,
793
- _content_type=_content_type,
794
- _headers=_headers,
795
- _host_index=_host_index
796
- )
797
-
798
- _response_types_map: Dict[str, Optional[str]] = {
799
- '202': "AsyncOperationResponse",
800
- }
801
- response_data = self.api_client.call_api(
802
- *_param,
803
- _request_timeout=_request_timeout
804
- )
805
- response_data.read()
806
- return self.api_client.response_deserialize(
807
- response_data=response_data,
808
- response_types_map=_response_types_map,
809
- )
810
-
811
-
812
- @validate_call
813
- def delete_without_preload_content(
814
- self,
815
- file_file_alternate_content_source_href: StrictStr,
816
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
817
- _request_timeout: Union[
818
- None,
819
- Annotated[StrictFloat, Field(gt=0)],
820
- Tuple[
821
- Annotated[StrictFloat, Field(gt=0)],
822
- Annotated[StrictFloat, Field(gt=0)]
823
- ]
824
- ] = None,
825
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
826
- _content_type: Optional[StrictStr] = None,
827
- _headers: Optional[Dict[StrictStr, Any]] = None,
828
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
829
- ) -> RESTResponseType:
830
- """Delete a file alternate content source
831
-
832
- Trigger an asynchronous delete ACS task
833
-
834
- :param file_file_alternate_content_source_href: (required)
835
- :type file_file_alternate_content_source_href: str
836
- :param x_task_diagnostics: List of profilers to use on tasks.
837
- :type x_task_diagnostics: List[str]
838
- :param _request_timeout: timeout setting for this request. If one
839
- number provided, it will be total request
840
- timeout. It can also be a pair (tuple) of
841
- (connection, read) timeouts.
842
- :type _request_timeout: int, tuple(int, int), optional
843
- :param _request_auth: set to override the auth_settings for an a single
844
- request; this effectively ignores the
845
- authentication in the spec for a single request.
846
- :type _request_auth: dict, optional
847
- :param _content_type: force content-type for the request.
848
- :type _content_type: str, Optional
849
- :param _headers: set to override the headers for a single
850
- request; this effectively ignores the headers
851
- in the spec for a single request.
852
- :type _headers: dict, optional
853
- :param _host_index: set to override the host_index for a single
854
- request; this effectively ignores the host_index
855
- in the spec for a single request.
856
- :type _host_index: int, optional
857
- :return: Returns the result object.
858
- """ # noqa: E501
859
-
860
- _param = self._delete_serialize(
861
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
862
- x_task_diagnostics=x_task_diagnostics,
863
- _request_auth=_request_auth,
864
- _content_type=_content_type,
865
- _headers=_headers,
866
- _host_index=_host_index
867
- )
868
-
869
- _response_types_map: Dict[str, Optional[str]] = {
870
- '202': "AsyncOperationResponse",
871
- }
872
- response_data = self.api_client.call_api(
873
- *_param,
874
- _request_timeout=_request_timeout
875
- )
876
- return response_data.response
877
-
878
-
879
- def _delete_serialize(
880
- self,
881
- file_file_alternate_content_source_href,
882
- x_task_diagnostics,
883
- _request_auth,
884
- _content_type,
885
- _headers,
886
- _host_index,
887
- ) -> RequestSerialized:
888
-
889
- _host = None
890
-
891
- _collection_formats: Dict[str, str] = {
892
- 'X-Task-Diagnostics': 'csv',
893
- }
894
-
895
- _path_params: Dict[str, str] = {}
896
- _query_params: List[Tuple[str, str]] = []
897
- _header_params: Dict[str, Optional[str]] = _headers or {}
898
- _form_params: List[Tuple[str, str]] = []
899
- _files: Dict[
900
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
901
- ] = {}
902
- _body_params: Optional[bytes] = None
903
-
904
- # process the path parameters
905
- if file_file_alternate_content_source_href is not None:
906
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
907
- # process the query parameters
908
- # process the header parameters
909
- if x_task_diagnostics is not None:
910
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
911
- # process the form parameters
912
- # process the body parameter
913
-
914
-
915
- # set the HTTP header `Accept`
916
- if 'Accept' not in _header_params:
917
- _header_params['Accept'] = self.api_client.select_header_accept(
918
- [
919
- 'application/json'
920
- ]
921
- )
922
-
923
-
924
- # authentication setting
925
- _auth_settings: List[str] = [
926
- 'json_header_remote_authentication',
927
- 'basicAuth',
928
- 'cookieAuth'
929
- ]
930
-
931
- return self.api_client.param_serialize(
932
- method='DELETE',
933
- resource_path='{file_file_alternate_content_source_href}',
934
- path_params=_path_params,
935
- query_params=_query_params,
936
- header_params=_header_params,
937
- body=_body_params,
938
- post_params=_form_params,
939
- files=_files,
940
- auth_settings=_auth_settings,
941
- collection_formats=_collection_formats,
942
- _host=_host,
943
- _request_auth=_request_auth
944
- )
945
-
946
-
947
-
948
-
949
- @validate_call
950
- def list(
951
- self,
952
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
953
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
954
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
955
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
956
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
957
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
958
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
959
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
960
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
961
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
962
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
963
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
964
- 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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
965
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
966
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
967
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
968
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
969
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
970
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
971
- pulp_domain: StrictStr = "default",
972
- _request_timeout: Union[
973
- None,
974
- Annotated[StrictFloat, Field(gt=0)],
975
- Tuple[
976
- Annotated[StrictFloat, Field(gt=0)],
977
- Annotated[StrictFloat, Field(gt=0)]
978
- ]
979
- ] = None,
980
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
981
- _content_type: Optional[StrictStr] = None,
982
- _headers: Optional[Dict[StrictStr, Any]] = None,
983
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
984
- ) -> PaginatedfileFileAlternateContentSourceResponseList:
985
- """List file alternate content sources
986
-
987
- Alternate Content Source ViewSet for File
988
-
989
- :param pulp_domain: (required)
990
- :type pulp_domain: str
991
- :param x_task_diagnostics: List of profilers to use on tasks.
992
- :type x_task_diagnostics: List[str]
993
- :param limit: Number of results to return per page.
994
- :type limit: int
995
- :param name: Filter results where name matches value
996
- :type name: str
997
- :param name__contains: Filter results where name contains value
998
- :type name__contains: str
999
- :param name__icontains: Filter results where name contains value
1000
- :type name__icontains: str
1001
- :param name__iexact: Filter results where name matches value
1002
- :type name__iexact: str
1003
- :param name__in: Filter results where name is in a comma-separated list of values
1004
- :type name__in: List[str]
1005
- :param name__iregex: Filter results where name matches regex value
1006
- :type name__iregex: str
1007
- :param name__istartswith: Filter results where name starts with value
1008
- :type name__istartswith: str
1009
- :param name__regex: Filter results where name matches regex value
1010
- :type name__regex: str
1011
- :param name__startswith: Filter results where name starts with value
1012
- :type name__startswith: str
1013
- :param offset: The initial index from which to return the results.
1014
- :type offset: int
1015
- :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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)
1016
- :type ordering: List[str]
1017
- :param prn__in: Multiple values may be separated by commas.
1018
- :type prn__in: List[str]
1019
- :param pulp_href__in: Multiple values may be separated by commas.
1020
- :type pulp_href__in: List[str]
1021
- :param pulp_id__in: Multiple values may be separated by commas.
1022
- :type pulp_id__in: List[str]
1023
- :param q: Filter results by using NOT, AND and OR operations on other filters
1024
- :type q: str
1025
- :param fields: A list of fields to include in the response.
1026
- :type fields: List[str]
1027
- :param exclude_fields: A list of fields to exclude from the response.
1028
- :type exclude_fields: List[str]
1029
- :param _request_timeout: timeout setting for this request. If one
1030
- number provided, it will be total request
1031
- timeout. It can also be a pair (tuple) of
1032
- (connection, read) timeouts.
1033
- :type _request_timeout: int, tuple(int, int), optional
1034
- :param _request_auth: set to override the auth_settings for an a single
1035
- request; this effectively ignores the
1036
- authentication in the spec for a single request.
1037
- :type _request_auth: dict, optional
1038
- :param _content_type: force content-type for the request.
1039
- :type _content_type: str, Optional
1040
- :param _headers: set to override the headers for a single
1041
- request; this effectively ignores the headers
1042
- in the spec for a single request.
1043
- :type _headers: dict, optional
1044
- :param _host_index: set to override the host_index for a single
1045
- request; this effectively ignores the host_index
1046
- in the spec for a single request.
1047
- :type _host_index: int, optional
1048
- :return: Returns the result object.
1049
- """ # noqa: E501
1050
-
1051
- _param = self._list_serialize(
1052
- pulp_domain=pulp_domain,
1053
- x_task_diagnostics=x_task_diagnostics,
1054
- limit=limit,
1055
- name=name,
1056
- name__contains=name__contains,
1057
- name__icontains=name__icontains,
1058
- name__iexact=name__iexact,
1059
- name__in=name__in,
1060
- name__iregex=name__iregex,
1061
- name__istartswith=name__istartswith,
1062
- name__regex=name__regex,
1063
- name__startswith=name__startswith,
1064
- offset=offset,
1065
- ordering=ordering,
1066
- prn__in=prn__in,
1067
- pulp_href__in=pulp_href__in,
1068
- pulp_id__in=pulp_id__in,
1069
- q=q,
1070
- fields=fields,
1071
- exclude_fields=exclude_fields,
1072
- _request_auth=_request_auth,
1073
- _content_type=_content_type,
1074
- _headers=_headers,
1075
- _host_index=_host_index
1076
- )
1077
-
1078
- _response_types_map: Dict[str, Optional[str]] = {
1079
- '200': "PaginatedfileFileAlternateContentSourceResponseList",
1080
- }
1081
- response_data = self.api_client.call_api(
1082
- *_param,
1083
- _request_timeout=_request_timeout
1084
- )
1085
- response_data.read()
1086
- return self.api_client.response_deserialize(
1087
- response_data=response_data,
1088
- response_types_map=_response_types_map,
1089
- ).data
1090
-
1091
-
1092
- @validate_call
1093
- def list_with_http_info(
1094
- self,
1095
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1096
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1097
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1098
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1099
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1100
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1101
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1102
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1103
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1104
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1105
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1106
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1107
- 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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1108
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1109
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1110
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1111
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1112
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1113
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1114
- pulp_domain: StrictStr = "default",
1115
- _request_timeout: Union[
1116
- None,
1117
- Annotated[StrictFloat, Field(gt=0)],
1118
- Tuple[
1119
- Annotated[StrictFloat, Field(gt=0)],
1120
- Annotated[StrictFloat, Field(gt=0)]
1121
- ]
1122
- ] = None,
1123
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1124
- _content_type: Optional[StrictStr] = None,
1125
- _headers: Optional[Dict[StrictStr, Any]] = None,
1126
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1127
- ) -> ApiResponse[PaginatedfileFileAlternateContentSourceResponseList]:
1128
- """List file alternate content sources
1129
-
1130
- Alternate Content Source ViewSet for File
1131
-
1132
- :param pulp_domain: (required)
1133
- :type pulp_domain: str
1134
- :param x_task_diagnostics: List of profilers to use on tasks.
1135
- :type x_task_diagnostics: List[str]
1136
- :param limit: Number of results to return per page.
1137
- :type limit: int
1138
- :param name: Filter results where name matches value
1139
- :type name: str
1140
- :param name__contains: Filter results where name contains value
1141
- :type name__contains: str
1142
- :param name__icontains: Filter results where name contains value
1143
- :type name__icontains: str
1144
- :param name__iexact: Filter results where name matches value
1145
- :type name__iexact: str
1146
- :param name__in: Filter results where name is in a comma-separated list of values
1147
- :type name__in: List[str]
1148
- :param name__iregex: Filter results where name matches regex value
1149
- :type name__iregex: str
1150
- :param name__istartswith: Filter results where name starts with value
1151
- :type name__istartswith: str
1152
- :param name__regex: Filter results where name matches regex value
1153
- :type name__regex: str
1154
- :param name__startswith: Filter results where name starts with value
1155
- :type name__startswith: str
1156
- :param offset: The initial index from which to return the results.
1157
- :type offset: int
1158
- :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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)
1159
- :type ordering: List[str]
1160
- :param prn__in: Multiple values may be separated by commas.
1161
- :type prn__in: List[str]
1162
- :param pulp_href__in: Multiple values may be separated by commas.
1163
- :type pulp_href__in: List[str]
1164
- :param pulp_id__in: Multiple values may be separated by commas.
1165
- :type pulp_id__in: List[str]
1166
- :param q: Filter results by using NOT, AND and OR operations on other filters
1167
- :type q: str
1168
- :param fields: A list of fields to include in the response.
1169
- :type fields: List[str]
1170
- :param exclude_fields: A list of fields to exclude from the response.
1171
- :type exclude_fields: List[str]
1172
- :param _request_timeout: timeout setting for this request. If one
1173
- number provided, it will be total request
1174
- timeout. It can also be a pair (tuple) of
1175
- (connection, read) timeouts.
1176
- :type _request_timeout: int, tuple(int, int), optional
1177
- :param _request_auth: set to override the auth_settings for an a single
1178
- request; this effectively ignores the
1179
- authentication in the spec for a single request.
1180
- :type _request_auth: dict, optional
1181
- :param _content_type: force content-type for the request.
1182
- :type _content_type: str, Optional
1183
- :param _headers: set to override the headers for a single
1184
- request; this effectively ignores the headers
1185
- in the spec for a single request.
1186
- :type _headers: dict, optional
1187
- :param _host_index: set to override the host_index for a single
1188
- request; this effectively ignores the host_index
1189
- in the spec for a single request.
1190
- :type _host_index: int, optional
1191
- :return: Returns the result object.
1192
- """ # noqa: E501
1193
-
1194
- _param = self._list_serialize(
1195
- pulp_domain=pulp_domain,
1196
- x_task_diagnostics=x_task_diagnostics,
1197
- limit=limit,
1198
- name=name,
1199
- name__contains=name__contains,
1200
- name__icontains=name__icontains,
1201
- name__iexact=name__iexact,
1202
- name__in=name__in,
1203
- name__iregex=name__iregex,
1204
- name__istartswith=name__istartswith,
1205
- name__regex=name__regex,
1206
- name__startswith=name__startswith,
1207
- offset=offset,
1208
- ordering=ordering,
1209
- prn__in=prn__in,
1210
- pulp_href__in=pulp_href__in,
1211
- pulp_id__in=pulp_id__in,
1212
- q=q,
1213
- fields=fields,
1214
- exclude_fields=exclude_fields,
1215
- _request_auth=_request_auth,
1216
- _content_type=_content_type,
1217
- _headers=_headers,
1218
- _host_index=_host_index
1219
- )
1220
-
1221
- _response_types_map: Dict[str, Optional[str]] = {
1222
- '200': "PaginatedfileFileAlternateContentSourceResponseList",
1223
- }
1224
- response_data = self.api_client.call_api(
1225
- *_param,
1226
- _request_timeout=_request_timeout
1227
- )
1228
- response_data.read()
1229
- return self.api_client.response_deserialize(
1230
- response_data=response_data,
1231
- response_types_map=_response_types_map,
1232
- )
1233
-
1234
-
1235
- @validate_call
1236
- def list_without_preload_content(
1237
- self,
1238
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1239
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1240
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1241
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1242
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1243
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1244
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1245
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1246
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1247
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1248
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1249
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1250
- 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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1251
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1252
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1253
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1254
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1255
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1256
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1257
- pulp_domain: StrictStr = "default",
1258
- _request_timeout: Union[
1259
- None,
1260
- Annotated[StrictFloat, Field(gt=0)],
1261
- Tuple[
1262
- Annotated[StrictFloat, Field(gt=0)],
1263
- Annotated[StrictFloat, Field(gt=0)]
1264
- ]
1265
- ] = None,
1266
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1267
- _content_type: Optional[StrictStr] = None,
1268
- _headers: Optional[Dict[StrictStr, Any]] = None,
1269
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1270
- ) -> RESTResponseType:
1271
- """List file alternate content sources
1272
-
1273
- Alternate Content Source ViewSet for File
1274
-
1275
- :param pulp_domain: (required)
1276
- :type pulp_domain: str
1277
- :param x_task_diagnostics: List of profilers to use on tasks.
1278
- :type x_task_diagnostics: List[str]
1279
- :param limit: Number of results to return per page.
1280
- :type limit: int
1281
- :param name: Filter results where name matches value
1282
- :type name: str
1283
- :param name__contains: Filter results where name contains value
1284
- :type name__contains: str
1285
- :param name__icontains: Filter results where name contains value
1286
- :type name__icontains: str
1287
- :param name__iexact: Filter results where name matches value
1288
- :type name__iexact: str
1289
- :param name__in: Filter results where name is in a comma-separated list of values
1290
- :type name__in: List[str]
1291
- :param name__iregex: Filter results where name matches regex value
1292
- :type name__iregex: str
1293
- :param name__istartswith: Filter results where name starts with value
1294
- :type name__istartswith: str
1295
- :param name__regex: Filter results where name matches regex value
1296
- :type name__regex: str
1297
- :param name__startswith: Filter results where name starts with value
1298
- :type name__startswith: str
1299
- :param offset: The initial index from which to return the results.
1300
- :type offset: int
1301
- :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) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)
1302
- :type ordering: List[str]
1303
- :param prn__in: Multiple values may be separated by commas.
1304
- :type prn__in: List[str]
1305
- :param pulp_href__in: Multiple values may be separated by commas.
1306
- :type pulp_href__in: List[str]
1307
- :param pulp_id__in: Multiple values may be separated by commas.
1308
- :type pulp_id__in: List[str]
1309
- :param q: Filter results by using NOT, AND and OR operations on other filters
1310
- :type q: str
1311
- :param fields: A list of fields to include in the response.
1312
- :type fields: List[str]
1313
- :param exclude_fields: A list of fields to exclude from the response.
1314
- :type exclude_fields: List[str]
1315
- :param _request_timeout: timeout setting for this request. If one
1316
- number provided, it will be total request
1317
- timeout. It can also be a pair (tuple) of
1318
- (connection, read) timeouts.
1319
- :type _request_timeout: int, tuple(int, int), optional
1320
- :param _request_auth: set to override the auth_settings for an a single
1321
- request; this effectively ignores the
1322
- authentication in the spec for a single request.
1323
- :type _request_auth: dict, optional
1324
- :param _content_type: force content-type for the request.
1325
- :type _content_type: str, Optional
1326
- :param _headers: set to override the headers for a single
1327
- request; this effectively ignores the headers
1328
- in the spec for a single request.
1329
- :type _headers: dict, optional
1330
- :param _host_index: set to override the host_index for a single
1331
- request; this effectively ignores the host_index
1332
- in the spec for a single request.
1333
- :type _host_index: int, optional
1334
- :return: Returns the result object.
1335
- """ # noqa: E501
1336
-
1337
- _param = self._list_serialize(
1338
- pulp_domain=pulp_domain,
1339
- x_task_diagnostics=x_task_diagnostics,
1340
- limit=limit,
1341
- name=name,
1342
- name__contains=name__contains,
1343
- name__icontains=name__icontains,
1344
- name__iexact=name__iexact,
1345
- name__in=name__in,
1346
- name__iregex=name__iregex,
1347
- name__istartswith=name__istartswith,
1348
- name__regex=name__regex,
1349
- name__startswith=name__startswith,
1350
- offset=offset,
1351
- ordering=ordering,
1352
- prn__in=prn__in,
1353
- pulp_href__in=pulp_href__in,
1354
- pulp_id__in=pulp_id__in,
1355
- q=q,
1356
- fields=fields,
1357
- exclude_fields=exclude_fields,
1358
- _request_auth=_request_auth,
1359
- _content_type=_content_type,
1360
- _headers=_headers,
1361
- _host_index=_host_index
1362
- )
1363
-
1364
- _response_types_map: Dict[str, Optional[str]] = {
1365
- '200': "PaginatedfileFileAlternateContentSourceResponseList",
1366
- }
1367
- response_data = self.api_client.call_api(
1368
- *_param,
1369
- _request_timeout=_request_timeout
1370
- )
1371
- return response_data.response
1372
-
1373
-
1374
- def _list_serialize(
1375
- self,
1376
- pulp_domain,
1377
- x_task_diagnostics,
1378
- limit,
1379
- name,
1380
- name__contains,
1381
- name__icontains,
1382
- name__iexact,
1383
- name__in,
1384
- name__iregex,
1385
- name__istartswith,
1386
- name__regex,
1387
- name__startswith,
1388
- offset,
1389
- ordering,
1390
- prn__in,
1391
- pulp_href__in,
1392
- pulp_id__in,
1393
- q,
1394
- fields,
1395
- exclude_fields,
1396
- _request_auth,
1397
- _content_type,
1398
- _headers,
1399
- _host_index,
1400
- ) -> RequestSerialized:
1401
-
1402
- _host = None
1403
-
1404
- _collection_formats: Dict[str, str] = {
1405
- 'X-Task-Diagnostics': 'csv',
1406
- 'name__in': 'csv',
1407
- 'ordering': 'csv',
1408
- 'prn__in': 'csv',
1409
- 'pulp_href__in': 'csv',
1410
- 'pulp_id__in': 'csv',
1411
- 'fields': 'multi',
1412
- 'exclude_fields': 'multi',
1413
- }
1414
-
1415
- _path_params: Dict[str, str] = {}
1416
- _query_params: List[Tuple[str, str]] = []
1417
- _header_params: Dict[str, Optional[str]] = _headers or {}
1418
- _form_params: List[Tuple[str, str]] = []
1419
- _files: Dict[
1420
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1421
- ] = {}
1422
- _body_params: Optional[bytes] = None
1423
-
1424
- # process the path parameters
1425
- if pulp_domain is not None:
1426
- _path_params['pulp_domain'] = pulp_domain
1427
- # process the query parameters
1428
- if limit is not None:
1429
-
1430
- _query_params.append(('limit', limit))
1431
-
1432
- if name is not None:
1433
-
1434
- _query_params.append(('name', name))
1435
-
1436
- if name__contains is not None:
1437
-
1438
- _query_params.append(('name__contains', name__contains))
1439
-
1440
- if name__icontains is not None:
1441
-
1442
- _query_params.append(('name__icontains', name__icontains))
1443
-
1444
- if name__iexact is not None:
1445
-
1446
- _query_params.append(('name__iexact', name__iexact))
1447
-
1448
- if name__in is not None:
1449
-
1450
- _query_params.append(('name__in', name__in))
1451
-
1452
- if name__iregex is not None:
1453
-
1454
- _query_params.append(('name__iregex', name__iregex))
1455
-
1456
- if name__istartswith is not None:
1457
-
1458
- _query_params.append(('name__istartswith', name__istartswith))
1459
-
1460
- if name__regex is not None:
1461
-
1462
- _query_params.append(('name__regex', name__regex))
1463
-
1464
- if name__startswith is not None:
1465
-
1466
- _query_params.append(('name__startswith', name__startswith))
1467
-
1468
- if offset is not None:
1469
-
1470
- _query_params.append(('offset', offset))
1471
-
1472
- if ordering is not None:
1473
-
1474
- _query_params.append(('ordering', ordering))
1475
-
1476
- if prn__in is not None:
1477
-
1478
- _query_params.append(('prn__in', prn__in))
1479
-
1480
- if pulp_href__in is not None:
1481
-
1482
- _query_params.append(('pulp_href__in', pulp_href__in))
1483
-
1484
- if pulp_id__in is not None:
1485
-
1486
- _query_params.append(('pulp_id__in', pulp_id__in))
1487
-
1488
- if q is not None:
1489
-
1490
- _query_params.append(('q', q))
1491
-
1492
- if fields is not None:
1493
-
1494
- _query_params.append(('fields', fields))
1495
-
1496
- if exclude_fields is not None:
1497
-
1498
- _query_params.append(('exclude_fields', exclude_fields))
1499
-
1500
- # process the header parameters
1501
- if x_task_diagnostics is not None:
1502
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1503
- # process the form parameters
1504
- # process the body parameter
1505
-
1506
-
1507
- # set the HTTP header `Accept`
1508
- if 'Accept' not in _header_params:
1509
- _header_params['Accept'] = self.api_client.select_header_accept(
1510
- [
1511
- 'application/json'
1512
- ]
1513
- )
1514
-
1515
-
1516
- # authentication setting
1517
- _auth_settings: List[str] = [
1518
- 'json_header_remote_authentication',
1519
- 'basicAuth',
1520
- 'cookieAuth'
1521
- ]
1522
-
1523
- return self.api_client.param_serialize(
1524
- method='GET',
1525
- resource_path='/api/pulp/{pulp_domain}/api/v3/acs/file/file/',
1526
- path_params=_path_params,
1527
- query_params=_query_params,
1528
- header_params=_header_params,
1529
- body=_body_params,
1530
- post_params=_form_params,
1531
- files=_files,
1532
- auth_settings=_auth_settings,
1533
- collection_formats=_collection_formats,
1534
- _host=_host,
1535
- _request_auth=_request_auth
1536
- )
1537
-
1538
-
1539
-
1540
-
1541
- @validate_call
1542
- def list_roles(
1543
- self,
1544
- file_file_alternate_content_source_href: StrictStr,
1545
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1546
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1547
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1548
- _request_timeout: Union[
1549
- None,
1550
- Annotated[StrictFloat, Field(gt=0)],
1551
- Tuple[
1552
- Annotated[StrictFloat, Field(gt=0)],
1553
- Annotated[StrictFloat, Field(gt=0)]
1554
- ]
1555
- ] = None,
1556
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1557
- _content_type: Optional[StrictStr] = None,
1558
- _headers: Optional[Dict[StrictStr, Any]] = None,
1559
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1560
- ) -> ObjectRolesResponse:
1561
- """List roles
1562
-
1563
- List roles assigned to this object.
1564
-
1565
- :param file_file_alternate_content_source_href: (required)
1566
- :type file_file_alternate_content_source_href: str
1567
- :param x_task_diagnostics: List of profilers to use on tasks.
1568
- :type x_task_diagnostics: List[str]
1569
- :param fields: A list of fields to include in the response.
1570
- :type fields: List[str]
1571
- :param exclude_fields: A list of fields to exclude from the response.
1572
- :type exclude_fields: List[str]
1573
- :param _request_timeout: timeout setting for this request. If one
1574
- number provided, it will be total request
1575
- timeout. It can also be a pair (tuple) of
1576
- (connection, read) timeouts.
1577
- :type _request_timeout: int, tuple(int, int), optional
1578
- :param _request_auth: set to override the auth_settings for an a single
1579
- request; this effectively ignores the
1580
- authentication in the spec for a single request.
1581
- :type _request_auth: dict, optional
1582
- :param _content_type: force content-type for the request.
1583
- :type _content_type: str, Optional
1584
- :param _headers: set to override the headers for a single
1585
- request; this effectively ignores the headers
1586
- in the spec for a single request.
1587
- :type _headers: dict, optional
1588
- :param _host_index: set to override the host_index for a single
1589
- request; this effectively ignores the host_index
1590
- in the spec for a single request.
1591
- :type _host_index: int, optional
1592
- :return: Returns the result object.
1593
- """ # noqa: E501
1594
-
1595
- _param = self._list_roles_serialize(
1596
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
1597
- x_task_diagnostics=x_task_diagnostics,
1598
- fields=fields,
1599
- exclude_fields=exclude_fields,
1600
- _request_auth=_request_auth,
1601
- _content_type=_content_type,
1602
- _headers=_headers,
1603
- _host_index=_host_index
1604
- )
1605
-
1606
- _response_types_map: Dict[str, Optional[str]] = {
1607
- '200': "ObjectRolesResponse",
1608
- }
1609
- response_data = self.api_client.call_api(
1610
- *_param,
1611
- _request_timeout=_request_timeout
1612
- )
1613
- response_data.read()
1614
- return self.api_client.response_deserialize(
1615
- response_data=response_data,
1616
- response_types_map=_response_types_map,
1617
- ).data
1618
-
1619
-
1620
- @validate_call
1621
- def list_roles_with_http_info(
1622
- self,
1623
- file_file_alternate_content_source_href: StrictStr,
1624
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1625
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1626
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1627
- _request_timeout: Union[
1628
- None,
1629
- Annotated[StrictFloat, Field(gt=0)],
1630
- Tuple[
1631
- Annotated[StrictFloat, Field(gt=0)],
1632
- Annotated[StrictFloat, Field(gt=0)]
1633
- ]
1634
- ] = None,
1635
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1636
- _content_type: Optional[StrictStr] = None,
1637
- _headers: Optional[Dict[StrictStr, Any]] = None,
1638
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1639
- ) -> ApiResponse[ObjectRolesResponse]:
1640
- """List roles
1641
-
1642
- List roles assigned to this object.
1643
-
1644
- :param file_file_alternate_content_source_href: (required)
1645
- :type file_file_alternate_content_source_href: str
1646
- :param x_task_diagnostics: List of profilers to use on tasks.
1647
- :type x_task_diagnostics: List[str]
1648
- :param fields: A list of fields to include in the response.
1649
- :type fields: List[str]
1650
- :param exclude_fields: A list of fields to exclude from the response.
1651
- :type exclude_fields: List[str]
1652
- :param _request_timeout: timeout setting for this request. If one
1653
- number provided, it will be total request
1654
- timeout. It can also be a pair (tuple) of
1655
- (connection, read) timeouts.
1656
- :type _request_timeout: int, tuple(int, int), optional
1657
- :param _request_auth: set to override the auth_settings for an a single
1658
- request; this effectively ignores the
1659
- authentication in the spec for a single request.
1660
- :type _request_auth: dict, optional
1661
- :param _content_type: force content-type for the request.
1662
- :type _content_type: str, Optional
1663
- :param _headers: set to override the headers for a single
1664
- request; this effectively ignores the headers
1665
- in the spec for a single request.
1666
- :type _headers: dict, optional
1667
- :param _host_index: set to override the host_index for a single
1668
- request; this effectively ignores the host_index
1669
- in the spec for a single request.
1670
- :type _host_index: int, optional
1671
- :return: Returns the result object.
1672
- """ # noqa: E501
1673
-
1674
- _param = self._list_roles_serialize(
1675
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
1676
- x_task_diagnostics=x_task_diagnostics,
1677
- fields=fields,
1678
- exclude_fields=exclude_fields,
1679
- _request_auth=_request_auth,
1680
- _content_type=_content_type,
1681
- _headers=_headers,
1682
- _host_index=_host_index
1683
- )
1684
-
1685
- _response_types_map: Dict[str, Optional[str]] = {
1686
- '200': "ObjectRolesResponse",
1687
- }
1688
- response_data = self.api_client.call_api(
1689
- *_param,
1690
- _request_timeout=_request_timeout
1691
- )
1692
- response_data.read()
1693
- return self.api_client.response_deserialize(
1694
- response_data=response_data,
1695
- response_types_map=_response_types_map,
1696
- )
1697
-
1698
-
1699
- @validate_call
1700
- def list_roles_without_preload_content(
1701
- self,
1702
- file_file_alternate_content_source_href: StrictStr,
1703
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1704
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1705
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1706
- _request_timeout: Union[
1707
- None,
1708
- Annotated[StrictFloat, Field(gt=0)],
1709
- Tuple[
1710
- Annotated[StrictFloat, Field(gt=0)],
1711
- Annotated[StrictFloat, Field(gt=0)]
1712
- ]
1713
- ] = None,
1714
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1715
- _content_type: Optional[StrictStr] = None,
1716
- _headers: Optional[Dict[StrictStr, Any]] = None,
1717
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1718
- ) -> RESTResponseType:
1719
- """List roles
1720
-
1721
- List roles assigned to this object.
1722
-
1723
- :param file_file_alternate_content_source_href: (required)
1724
- :type file_file_alternate_content_source_href: str
1725
- :param x_task_diagnostics: List of profilers to use on tasks.
1726
- :type x_task_diagnostics: List[str]
1727
- :param fields: A list of fields to include in the response.
1728
- :type fields: List[str]
1729
- :param exclude_fields: A list of fields to exclude from the response.
1730
- :type exclude_fields: List[str]
1731
- :param _request_timeout: timeout setting for this request. If one
1732
- number provided, it will be total request
1733
- timeout. It can also be a pair (tuple) of
1734
- (connection, read) timeouts.
1735
- :type _request_timeout: int, tuple(int, int), optional
1736
- :param _request_auth: set to override the auth_settings for an a single
1737
- request; this effectively ignores the
1738
- authentication in the spec for a single request.
1739
- :type _request_auth: dict, optional
1740
- :param _content_type: force content-type for the request.
1741
- :type _content_type: str, Optional
1742
- :param _headers: set to override the headers for a single
1743
- request; this effectively ignores the headers
1744
- in the spec for a single request.
1745
- :type _headers: dict, optional
1746
- :param _host_index: set to override the host_index for a single
1747
- request; this effectively ignores the host_index
1748
- in the spec for a single request.
1749
- :type _host_index: int, optional
1750
- :return: Returns the result object.
1751
- """ # noqa: E501
1752
-
1753
- _param = self._list_roles_serialize(
1754
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
1755
- x_task_diagnostics=x_task_diagnostics,
1756
- fields=fields,
1757
- exclude_fields=exclude_fields,
1758
- _request_auth=_request_auth,
1759
- _content_type=_content_type,
1760
- _headers=_headers,
1761
- _host_index=_host_index
1762
- )
1763
-
1764
- _response_types_map: Dict[str, Optional[str]] = {
1765
- '200': "ObjectRolesResponse",
1766
- }
1767
- response_data = self.api_client.call_api(
1768
- *_param,
1769
- _request_timeout=_request_timeout
1770
- )
1771
- return response_data.response
1772
-
1773
-
1774
- def _list_roles_serialize(
1775
- self,
1776
- file_file_alternate_content_source_href,
1777
- x_task_diagnostics,
1778
- fields,
1779
- exclude_fields,
1780
- _request_auth,
1781
- _content_type,
1782
- _headers,
1783
- _host_index,
1784
- ) -> RequestSerialized:
1785
-
1786
- _host = None
1787
-
1788
- _collection_formats: Dict[str, str] = {
1789
- 'X-Task-Diagnostics': 'csv',
1790
- 'fields': 'multi',
1791
- 'exclude_fields': 'multi',
1792
- }
1793
-
1794
- _path_params: Dict[str, str] = {}
1795
- _query_params: List[Tuple[str, str]] = []
1796
- _header_params: Dict[str, Optional[str]] = _headers or {}
1797
- _form_params: List[Tuple[str, str]] = []
1798
- _files: Dict[
1799
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1800
- ] = {}
1801
- _body_params: Optional[bytes] = None
1802
-
1803
- # process the path parameters
1804
- if file_file_alternate_content_source_href is not None:
1805
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
1806
- # process the query parameters
1807
- if fields is not None:
1808
-
1809
- _query_params.append(('fields', fields))
1810
-
1811
- if exclude_fields is not None:
1812
-
1813
- _query_params.append(('exclude_fields', exclude_fields))
1814
-
1815
- # process the header parameters
1816
- if x_task_diagnostics is not None:
1817
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1818
- # process the form parameters
1819
- # process the body parameter
1820
-
1821
-
1822
- # set the HTTP header `Accept`
1823
- if 'Accept' not in _header_params:
1824
- _header_params['Accept'] = self.api_client.select_header_accept(
1825
- [
1826
- 'application/json'
1827
- ]
1828
- )
1829
-
1830
-
1831
- # authentication setting
1832
- _auth_settings: List[str] = [
1833
- 'json_header_remote_authentication',
1834
- 'basicAuth',
1835
- 'cookieAuth'
1836
- ]
1837
-
1838
- return self.api_client.param_serialize(
1839
- method='GET',
1840
- resource_path='{file_file_alternate_content_source_href}list_roles/',
1841
- path_params=_path_params,
1842
- query_params=_query_params,
1843
- header_params=_header_params,
1844
- body=_body_params,
1845
- post_params=_form_params,
1846
- files=_files,
1847
- auth_settings=_auth_settings,
1848
- collection_formats=_collection_formats,
1849
- _host=_host,
1850
- _request_auth=_request_auth
1851
- )
1852
-
1853
-
1854
-
1855
-
1856
- @validate_call
1857
- def my_permissions(
1858
- self,
1859
- file_file_alternate_content_source_href: StrictStr,
1860
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1861
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1862
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1863
- _request_timeout: Union[
1864
- None,
1865
- Annotated[StrictFloat, Field(gt=0)],
1866
- Tuple[
1867
- Annotated[StrictFloat, Field(gt=0)],
1868
- Annotated[StrictFloat, Field(gt=0)]
1869
- ]
1870
- ] = None,
1871
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1872
- _content_type: Optional[StrictStr] = None,
1873
- _headers: Optional[Dict[StrictStr, Any]] = None,
1874
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1875
- ) -> MyPermissionsResponse:
1876
- """List user permissions
1877
-
1878
- List permissions available to the current user on this object.
1879
-
1880
- :param file_file_alternate_content_source_href: (required)
1881
- :type file_file_alternate_content_source_href: str
1882
- :param x_task_diagnostics: List of profilers to use on tasks.
1883
- :type x_task_diagnostics: List[str]
1884
- :param fields: A list of fields to include in the response.
1885
- :type fields: List[str]
1886
- :param exclude_fields: A list of fields to exclude from the response.
1887
- :type exclude_fields: List[str]
1888
- :param _request_timeout: timeout setting for this request. If one
1889
- number provided, it will be total request
1890
- timeout. It can also be a pair (tuple) of
1891
- (connection, read) timeouts.
1892
- :type _request_timeout: int, tuple(int, int), optional
1893
- :param _request_auth: set to override the auth_settings for an a single
1894
- request; this effectively ignores the
1895
- authentication in the spec for a single request.
1896
- :type _request_auth: dict, optional
1897
- :param _content_type: force content-type for the request.
1898
- :type _content_type: str, Optional
1899
- :param _headers: set to override the headers for a single
1900
- request; this effectively ignores the headers
1901
- in the spec for a single request.
1902
- :type _headers: dict, optional
1903
- :param _host_index: set to override the host_index for a single
1904
- request; this effectively ignores the host_index
1905
- in the spec for a single request.
1906
- :type _host_index: int, optional
1907
- :return: Returns the result object.
1908
- """ # noqa: E501
1909
-
1910
- _param = self._my_permissions_serialize(
1911
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
1912
- x_task_diagnostics=x_task_diagnostics,
1913
- fields=fields,
1914
- exclude_fields=exclude_fields,
1915
- _request_auth=_request_auth,
1916
- _content_type=_content_type,
1917
- _headers=_headers,
1918
- _host_index=_host_index
1919
- )
1920
-
1921
- _response_types_map: Dict[str, Optional[str]] = {
1922
- '200': "MyPermissionsResponse",
1923
- }
1924
- response_data = self.api_client.call_api(
1925
- *_param,
1926
- _request_timeout=_request_timeout
1927
- )
1928
- response_data.read()
1929
- return self.api_client.response_deserialize(
1930
- response_data=response_data,
1931
- response_types_map=_response_types_map,
1932
- ).data
1933
-
1934
-
1935
- @validate_call
1936
- def my_permissions_with_http_info(
1937
- self,
1938
- file_file_alternate_content_source_href: StrictStr,
1939
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1940
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1941
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1942
- _request_timeout: Union[
1943
- None,
1944
- Annotated[StrictFloat, Field(gt=0)],
1945
- Tuple[
1946
- Annotated[StrictFloat, Field(gt=0)],
1947
- Annotated[StrictFloat, Field(gt=0)]
1948
- ]
1949
- ] = None,
1950
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1951
- _content_type: Optional[StrictStr] = None,
1952
- _headers: Optional[Dict[StrictStr, Any]] = None,
1953
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1954
- ) -> ApiResponse[MyPermissionsResponse]:
1955
- """List user permissions
1956
-
1957
- List permissions available to the current user on this object.
1958
-
1959
- :param file_file_alternate_content_source_href: (required)
1960
- :type file_file_alternate_content_source_href: str
1961
- :param x_task_diagnostics: List of profilers to use on tasks.
1962
- :type x_task_diagnostics: List[str]
1963
- :param fields: A list of fields to include in the response.
1964
- :type fields: List[str]
1965
- :param exclude_fields: A list of fields to exclude from the response.
1966
- :type exclude_fields: List[str]
1967
- :param _request_timeout: timeout setting for this request. If one
1968
- number provided, it will be total request
1969
- timeout. It can also be a pair (tuple) of
1970
- (connection, read) timeouts.
1971
- :type _request_timeout: int, tuple(int, int), optional
1972
- :param _request_auth: set to override the auth_settings for an a single
1973
- request; this effectively ignores the
1974
- authentication in the spec for a single request.
1975
- :type _request_auth: dict, optional
1976
- :param _content_type: force content-type for the request.
1977
- :type _content_type: str, Optional
1978
- :param _headers: set to override the headers for a single
1979
- request; this effectively ignores the headers
1980
- in the spec for a single request.
1981
- :type _headers: dict, optional
1982
- :param _host_index: set to override the host_index for a single
1983
- request; this effectively ignores the host_index
1984
- in the spec for a single request.
1985
- :type _host_index: int, optional
1986
- :return: Returns the result object.
1987
- """ # noqa: E501
1988
-
1989
- _param = self._my_permissions_serialize(
1990
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
1991
- x_task_diagnostics=x_task_diagnostics,
1992
- fields=fields,
1993
- exclude_fields=exclude_fields,
1994
- _request_auth=_request_auth,
1995
- _content_type=_content_type,
1996
- _headers=_headers,
1997
- _host_index=_host_index
1998
- )
1999
-
2000
- _response_types_map: Dict[str, Optional[str]] = {
2001
- '200': "MyPermissionsResponse",
2002
- }
2003
- response_data = self.api_client.call_api(
2004
- *_param,
2005
- _request_timeout=_request_timeout
2006
- )
2007
- response_data.read()
2008
- return self.api_client.response_deserialize(
2009
- response_data=response_data,
2010
- response_types_map=_response_types_map,
2011
- )
2012
-
2013
-
2014
- @validate_call
2015
- def my_permissions_without_preload_content(
2016
- self,
2017
- file_file_alternate_content_source_href: StrictStr,
2018
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2019
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2020
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2021
- _request_timeout: Union[
2022
- None,
2023
- Annotated[StrictFloat, Field(gt=0)],
2024
- Tuple[
2025
- Annotated[StrictFloat, Field(gt=0)],
2026
- Annotated[StrictFloat, Field(gt=0)]
2027
- ]
2028
- ] = None,
2029
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2030
- _content_type: Optional[StrictStr] = None,
2031
- _headers: Optional[Dict[StrictStr, Any]] = None,
2032
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2033
- ) -> RESTResponseType:
2034
- """List user permissions
2035
-
2036
- List permissions available to the current user on this object.
2037
-
2038
- :param file_file_alternate_content_source_href: (required)
2039
- :type file_file_alternate_content_source_href: str
2040
- :param x_task_diagnostics: List of profilers to use on tasks.
2041
- :type x_task_diagnostics: List[str]
2042
- :param fields: A list of fields to include in the response.
2043
- :type fields: List[str]
2044
- :param exclude_fields: A list of fields to exclude from the response.
2045
- :type exclude_fields: List[str]
2046
- :param _request_timeout: timeout setting for this request. If one
2047
- number provided, it will be total request
2048
- timeout. It can also be a pair (tuple) of
2049
- (connection, read) timeouts.
2050
- :type _request_timeout: int, tuple(int, int), optional
2051
- :param _request_auth: set to override the auth_settings for an a single
2052
- request; this effectively ignores the
2053
- authentication in the spec for a single request.
2054
- :type _request_auth: dict, optional
2055
- :param _content_type: force content-type for the request.
2056
- :type _content_type: str, Optional
2057
- :param _headers: set to override the headers for a single
2058
- request; this effectively ignores the headers
2059
- in the spec for a single request.
2060
- :type _headers: dict, optional
2061
- :param _host_index: set to override the host_index for a single
2062
- request; this effectively ignores the host_index
2063
- in the spec for a single request.
2064
- :type _host_index: int, optional
2065
- :return: Returns the result object.
2066
- """ # noqa: E501
2067
-
2068
- _param = self._my_permissions_serialize(
2069
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2070
- x_task_diagnostics=x_task_diagnostics,
2071
- fields=fields,
2072
- exclude_fields=exclude_fields,
2073
- _request_auth=_request_auth,
2074
- _content_type=_content_type,
2075
- _headers=_headers,
2076
- _host_index=_host_index
2077
- )
2078
-
2079
- _response_types_map: Dict[str, Optional[str]] = {
2080
- '200': "MyPermissionsResponse",
2081
- }
2082
- response_data = self.api_client.call_api(
2083
- *_param,
2084
- _request_timeout=_request_timeout
2085
- )
2086
- return response_data.response
2087
-
2088
-
2089
- def _my_permissions_serialize(
2090
- self,
2091
- file_file_alternate_content_source_href,
2092
- x_task_diagnostics,
2093
- fields,
2094
- exclude_fields,
2095
- _request_auth,
2096
- _content_type,
2097
- _headers,
2098
- _host_index,
2099
- ) -> RequestSerialized:
2100
-
2101
- _host = None
2102
-
2103
- _collection_formats: Dict[str, str] = {
2104
- 'X-Task-Diagnostics': 'csv',
2105
- 'fields': 'multi',
2106
- 'exclude_fields': 'multi',
2107
- }
2108
-
2109
- _path_params: Dict[str, str] = {}
2110
- _query_params: List[Tuple[str, str]] = []
2111
- _header_params: Dict[str, Optional[str]] = _headers or {}
2112
- _form_params: List[Tuple[str, str]] = []
2113
- _files: Dict[
2114
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2115
- ] = {}
2116
- _body_params: Optional[bytes] = None
2117
-
2118
- # process the path parameters
2119
- if file_file_alternate_content_source_href is not None:
2120
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
2121
- # process the query parameters
2122
- if fields is not None:
2123
-
2124
- _query_params.append(('fields', fields))
2125
-
2126
- if exclude_fields is not None:
2127
-
2128
- _query_params.append(('exclude_fields', exclude_fields))
2129
-
2130
- # process the header parameters
2131
- if x_task_diagnostics is not None:
2132
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2133
- # process the form parameters
2134
- # process the body parameter
2135
-
2136
-
2137
- # set the HTTP header `Accept`
2138
- if 'Accept' not in _header_params:
2139
- _header_params['Accept'] = self.api_client.select_header_accept(
2140
- [
2141
- 'application/json'
2142
- ]
2143
- )
2144
-
2145
-
2146
- # authentication setting
2147
- _auth_settings: List[str] = [
2148
- 'json_header_remote_authentication',
2149
- 'basicAuth',
2150
- 'cookieAuth'
2151
- ]
2152
-
2153
- return self.api_client.param_serialize(
2154
- method='GET',
2155
- resource_path='{file_file_alternate_content_source_href}my_permissions/',
2156
- path_params=_path_params,
2157
- query_params=_query_params,
2158
- header_params=_header_params,
2159
- body=_body_params,
2160
- post_params=_form_params,
2161
- files=_files,
2162
- auth_settings=_auth_settings,
2163
- collection_formats=_collection_formats,
2164
- _host=_host,
2165
- _request_auth=_request_auth
2166
- )
2167
-
2168
-
2169
-
2170
-
2171
- @validate_call
2172
- def partial_update(
2173
- self,
2174
- file_file_alternate_content_source_href: StrictStr,
2175
- patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource,
2176
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2177
- _request_timeout: Union[
2178
- None,
2179
- Annotated[StrictFloat, Field(gt=0)],
2180
- Tuple[
2181
- Annotated[StrictFloat, Field(gt=0)],
2182
- Annotated[StrictFloat, Field(gt=0)]
2183
- ]
2184
- ] = None,
2185
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2186
- _content_type: Optional[StrictStr] = None,
2187
- _headers: Optional[Dict[StrictStr, Any]] = None,
2188
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2189
- ) -> AsyncOperationResponse:
2190
- """Update a file alternate content source
2191
-
2192
- Trigger an asynchronous partial update task
2193
-
2194
- :param file_file_alternate_content_source_href: (required)
2195
- :type file_file_alternate_content_source_href: str
2196
- :param patchedfile_file_alternate_content_source: (required)
2197
- :type patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource
2198
- :param x_task_diagnostics: List of profilers to use on tasks.
2199
- :type x_task_diagnostics: List[str]
2200
- :param _request_timeout: timeout setting for this request. If one
2201
- number provided, it will be total request
2202
- timeout. It can also be a pair (tuple) of
2203
- (connection, read) timeouts.
2204
- :type _request_timeout: int, tuple(int, int), optional
2205
- :param _request_auth: set to override the auth_settings for an a single
2206
- request; this effectively ignores the
2207
- authentication in the spec for a single request.
2208
- :type _request_auth: dict, optional
2209
- :param _content_type: force content-type for the request.
2210
- :type _content_type: str, Optional
2211
- :param _headers: set to override the headers for a single
2212
- request; this effectively ignores the headers
2213
- in the spec for a single request.
2214
- :type _headers: dict, optional
2215
- :param _host_index: set to override the host_index for a single
2216
- request; this effectively ignores the host_index
2217
- in the spec for a single request.
2218
- :type _host_index: int, optional
2219
- :return: Returns the result object.
2220
- """ # noqa: E501
2221
-
2222
- _param = self._partial_update_serialize(
2223
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2224
- patchedfile_file_alternate_content_source=patchedfile_file_alternate_content_source,
2225
- x_task_diagnostics=x_task_diagnostics,
2226
- _request_auth=_request_auth,
2227
- _content_type=_content_type,
2228
- _headers=_headers,
2229
- _host_index=_host_index
2230
- )
2231
-
2232
- _response_types_map: Dict[str, Optional[str]] = {
2233
- '202': "AsyncOperationResponse",
2234
- }
2235
- response_data = self.api_client.call_api(
2236
- *_param,
2237
- _request_timeout=_request_timeout
2238
- )
2239
- response_data.read()
2240
- return self.api_client.response_deserialize(
2241
- response_data=response_data,
2242
- response_types_map=_response_types_map,
2243
- ).data
2244
-
2245
-
2246
- @validate_call
2247
- def partial_update_with_http_info(
2248
- self,
2249
- file_file_alternate_content_source_href: StrictStr,
2250
- patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource,
2251
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2252
- _request_timeout: Union[
2253
- None,
2254
- Annotated[StrictFloat, Field(gt=0)],
2255
- Tuple[
2256
- Annotated[StrictFloat, Field(gt=0)],
2257
- Annotated[StrictFloat, Field(gt=0)]
2258
- ]
2259
- ] = None,
2260
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2261
- _content_type: Optional[StrictStr] = None,
2262
- _headers: Optional[Dict[StrictStr, Any]] = None,
2263
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2264
- ) -> ApiResponse[AsyncOperationResponse]:
2265
- """Update a file alternate content source
2266
-
2267
- Trigger an asynchronous partial update task
2268
-
2269
- :param file_file_alternate_content_source_href: (required)
2270
- :type file_file_alternate_content_source_href: str
2271
- :param patchedfile_file_alternate_content_source: (required)
2272
- :type patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource
2273
- :param x_task_diagnostics: List of profilers to use on tasks.
2274
- :type x_task_diagnostics: List[str]
2275
- :param _request_timeout: timeout setting for this request. If one
2276
- number provided, it will be total request
2277
- timeout. It can also be a pair (tuple) of
2278
- (connection, read) timeouts.
2279
- :type _request_timeout: int, tuple(int, int), optional
2280
- :param _request_auth: set to override the auth_settings for an a single
2281
- request; this effectively ignores the
2282
- authentication in the spec for a single request.
2283
- :type _request_auth: dict, optional
2284
- :param _content_type: force content-type for the request.
2285
- :type _content_type: str, Optional
2286
- :param _headers: set to override the headers for a single
2287
- request; this effectively ignores the headers
2288
- in the spec for a single request.
2289
- :type _headers: dict, optional
2290
- :param _host_index: set to override the host_index for a single
2291
- request; this effectively ignores the host_index
2292
- in the spec for a single request.
2293
- :type _host_index: int, optional
2294
- :return: Returns the result object.
2295
- """ # noqa: E501
2296
-
2297
- _param = self._partial_update_serialize(
2298
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2299
- patchedfile_file_alternate_content_source=patchedfile_file_alternate_content_source,
2300
- x_task_diagnostics=x_task_diagnostics,
2301
- _request_auth=_request_auth,
2302
- _content_type=_content_type,
2303
- _headers=_headers,
2304
- _host_index=_host_index
2305
- )
2306
-
2307
- _response_types_map: Dict[str, Optional[str]] = {
2308
- '202': "AsyncOperationResponse",
2309
- }
2310
- response_data = self.api_client.call_api(
2311
- *_param,
2312
- _request_timeout=_request_timeout
2313
- )
2314
- response_data.read()
2315
- return self.api_client.response_deserialize(
2316
- response_data=response_data,
2317
- response_types_map=_response_types_map,
2318
- )
2319
-
2320
-
2321
- @validate_call
2322
- def partial_update_without_preload_content(
2323
- self,
2324
- file_file_alternate_content_source_href: StrictStr,
2325
- patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource,
2326
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2327
- _request_timeout: Union[
2328
- None,
2329
- Annotated[StrictFloat, Field(gt=0)],
2330
- Tuple[
2331
- Annotated[StrictFloat, Field(gt=0)],
2332
- Annotated[StrictFloat, Field(gt=0)]
2333
- ]
2334
- ] = None,
2335
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2336
- _content_type: Optional[StrictStr] = None,
2337
- _headers: Optional[Dict[StrictStr, Any]] = None,
2338
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2339
- ) -> RESTResponseType:
2340
- """Update a file alternate content source
2341
-
2342
- Trigger an asynchronous partial update task
2343
-
2344
- :param file_file_alternate_content_source_href: (required)
2345
- :type file_file_alternate_content_source_href: str
2346
- :param patchedfile_file_alternate_content_source: (required)
2347
- :type patchedfile_file_alternate_content_source: PatchedfileFileAlternateContentSource
2348
- :param x_task_diagnostics: List of profilers to use on tasks.
2349
- :type x_task_diagnostics: List[str]
2350
- :param _request_timeout: timeout setting for this request. If one
2351
- number provided, it will be total request
2352
- timeout. It can also be a pair (tuple) of
2353
- (connection, read) timeouts.
2354
- :type _request_timeout: int, tuple(int, int), optional
2355
- :param _request_auth: set to override the auth_settings for an a single
2356
- request; this effectively ignores the
2357
- authentication in the spec for a single request.
2358
- :type _request_auth: dict, optional
2359
- :param _content_type: force content-type for the request.
2360
- :type _content_type: str, Optional
2361
- :param _headers: set to override the headers for a single
2362
- request; this effectively ignores the headers
2363
- in the spec for a single request.
2364
- :type _headers: dict, optional
2365
- :param _host_index: set to override the host_index for a single
2366
- request; this effectively ignores the host_index
2367
- in the spec for a single request.
2368
- :type _host_index: int, optional
2369
- :return: Returns the result object.
2370
- """ # noqa: E501
2371
-
2372
- _param = self._partial_update_serialize(
2373
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2374
- patchedfile_file_alternate_content_source=patchedfile_file_alternate_content_source,
2375
- x_task_diagnostics=x_task_diagnostics,
2376
- _request_auth=_request_auth,
2377
- _content_type=_content_type,
2378
- _headers=_headers,
2379
- _host_index=_host_index
2380
- )
2381
-
2382
- _response_types_map: Dict[str, Optional[str]] = {
2383
- '202': "AsyncOperationResponse",
2384
- }
2385
- response_data = self.api_client.call_api(
2386
- *_param,
2387
- _request_timeout=_request_timeout
2388
- )
2389
- return response_data.response
2390
-
2391
-
2392
- def _partial_update_serialize(
2393
- self,
2394
- file_file_alternate_content_source_href,
2395
- patchedfile_file_alternate_content_source,
2396
- x_task_diagnostics,
2397
- _request_auth,
2398
- _content_type,
2399
- _headers,
2400
- _host_index,
2401
- ) -> RequestSerialized:
2402
-
2403
- _host = None
2404
-
2405
- _collection_formats: Dict[str, str] = {
2406
- 'X-Task-Diagnostics': 'csv',
2407
- }
2408
-
2409
- _path_params: Dict[str, str] = {}
2410
- _query_params: List[Tuple[str, str]] = []
2411
- _header_params: Dict[str, Optional[str]] = _headers or {}
2412
- _form_params: List[Tuple[str, str]] = []
2413
- _files: Dict[
2414
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2415
- ] = {}
2416
- _body_params: Optional[bytes] = None
2417
-
2418
- # process the path parameters
2419
- if file_file_alternate_content_source_href is not None:
2420
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
2421
- # process the query parameters
2422
- # process the header parameters
2423
- if x_task_diagnostics is not None:
2424
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2425
- # process the form parameters
2426
- # process the body parameter
2427
- if patchedfile_file_alternate_content_source is not None:
2428
- _body_params = patchedfile_file_alternate_content_source
2429
-
2430
-
2431
- # set the HTTP header `Accept`
2432
- if 'Accept' not in _header_params:
2433
- _header_params['Accept'] = self.api_client.select_header_accept(
2434
- [
2435
- 'application/json'
2436
- ]
2437
- )
2438
-
2439
- # set the HTTP header `Content-Type`
2440
- if _content_type:
2441
- _header_params['Content-Type'] = _content_type
2442
- else:
2443
- _default_content_type = (
2444
- self.api_client.select_header_content_type(
2445
- [
2446
- 'application/json',
2447
- 'application/x-www-form-urlencoded',
2448
- 'multipart/form-data'
2449
- ]
2450
- )
2451
- )
2452
- if _default_content_type is not None:
2453
- _header_params['Content-Type'] = _default_content_type
2454
-
2455
- # authentication setting
2456
- _auth_settings: List[str] = [
2457
- 'json_header_remote_authentication',
2458
- 'basicAuth',
2459
- 'cookieAuth'
2460
- ]
2461
-
2462
- return self.api_client.param_serialize(
2463
- method='PATCH',
2464
- resource_path='{file_file_alternate_content_source_href}',
2465
- path_params=_path_params,
2466
- query_params=_query_params,
2467
- header_params=_header_params,
2468
- body=_body_params,
2469
- post_params=_form_params,
2470
- files=_files,
2471
- auth_settings=_auth_settings,
2472
- collection_formats=_collection_formats,
2473
- _host=_host,
2474
- _request_auth=_request_auth
2475
- )
2476
-
2477
-
2478
-
2479
-
2480
- @validate_call
2481
- def read(
2482
- self,
2483
- file_file_alternate_content_source_href: StrictStr,
2484
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2485
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2486
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2487
- _request_timeout: Union[
2488
- None,
2489
- Annotated[StrictFloat, Field(gt=0)],
2490
- Tuple[
2491
- Annotated[StrictFloat, Field(gt=0)],
2492
- Annotated[StrictFloat, Field(gt=0)]
2493
- ]
2494
- ] = None,
2495
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2496
- _content_type: Optional[StrictStr] = None,
2497
- _headers: Optional[Dict[StrictStr, Any]] = None,
2498
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2499
- ) -> FileFileAlternateContentSourceResponse:
2500
- """Inspect a file alternate content source
2501
-
2502
- Alternate Content Source ViewSet for File
2503
-
2504
- :param file_file_alternate_content_source_href: (required)
2505
- :type file_file_alternate_content_source_href: str
2506
- :param x_task_diagnostics: List of profilers to use on tasks.
2507
- :type x_task_diagnostics: List[str]
2508
- :param fields: A list of fields to include in the response.
2509
- :type fields: List[str]
2510
- :param exclude_fields: A list of fields to exclude from the response.
2511
- :type exclude_fields: List[str]
2512
- :param _request_timeout: timeout setting for this request. If one
2513
- number provided, it will be total request
2514
- timeout. It can also be a pair (tuple) of
2515
- (connection, read) timeouts.
2516
- :type _request_timeout: int, tuple(int, int), optional
2517
- :param _request_auth: set to override the auth_settings for an a single
2518
- request; this effectively ignores the
2519
- authentication in the spec for a single request.
2520
- :type _request_auth: dict, optional
2521
- :param _content_type: force content-type for the request.
2522
- :type _content_type: str, Optional
2523
- :param _headers: set to override the headers for a single
2524
- request; this effectively ignores the headers
2525
- in the spec for a single request.
2526
- :type _headers: dict, optional
2527
- :param _host_index: set to override the host_index for a single
2528
- request; this effectively ignores the host_index
2529
- in the spec for a single request.
2530
- :type _host_index: int, optional
2531
- :return: Returns the result object.
2532
- """ # noqa: E501
2533
-
2534
- _param = self._read_serialize(
2535
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2536
- x_task_diagnostics=x_task_diagnostics,
2537
- fields=fields,
2538
- exclude_fields=exclude_fields,
2539
- _request_auth=_request_auth,
2540
- _content_type=_content_type,
2541
- _headers=_headers,
2542
- _host_index=_host_index
2543
- )
2544
-
2545
- _response_types_map: Dict[str, Optional[str]] = {
2546
- '200': "FileFileAlternateContentSourceResponse",
2547
- }
2548
- response_data = self.api_client.call_api(
2549
- *_param,
2550
- _request_timeout=_request_timeout
2551
- )
2552
- response_data.read()
2553
- return self.api_client.response_deserialize(
2554
- response_data=response_data,
2555
- response_types_map=_response_types_map,
2556
- ).data
2557
-
2558
-
2559
- @validate_call
2560
- def read_with_http_info(
2561
- self,
2562
- file_file_alternate_content_source_href: StrictStr,
2563
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2564
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2565
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2566
- _request_timeout: Union[
2567
- None,
2568
- Annotated[StrictFloat, Field(gt=0)],
2569
- Tuple[
2570
- Annotated[StrictFloat, Field(gt=0)],
2571
- Annotated[StrictFloat, Field(gt=0)]
2572
- ]
2573
- ] = None,
2574
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2575
- _content_type: Optional[StrictStr] = None,
2576
- _headers: Optional[Dict[StrictStr, Any]] = None,
2577
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2578
- ) -> ApiResponse[FileFileAlternateContentSourceResponse]:
2579
- """Inspect a file alternate content source
2580
-
2581
- Alternate Content Source ViewSet for File
2582
-
2583
- :param file_file_alternate_content_source_href: (required)
2584
- :type file_file_alternate_content_source_href: str
2585
- :param x_task_diagnostics: List of profilers to use on tasks.
2586
- :type x_task_diagnostics: List[str]
2587
- :param fields: A list of fields to include in the response.
2588
- :type fields: List[str]
2589
- :param exclude_fields: A list of fields to exclude from the response.
2590
- :type exclude_fields: List[str]
2591
- :param _request_timeout: timeout setting for this request. If one
2592
- number provided, it will be total request
2593
- timeout. It can also be a pair (tuple) of
2594
- (connection, read) timeouts.
2595
- :type _request_timeout: int, tuple(int, int), optional
2596
- :param _request_auth: set to override the auth_settings for an a single
2597
- request; this effectively ignores the
2598
- authentication in the spec for a single request.
2599
- :type _request_auth: dict, optional
2600
- :param _content_type: force content-type for the request.
2601
- :type _content_type: str, Optional
2602
- :param _headers: set to override the headers for a single
2603
- request; this effectively ignores the headers
2604
- in the spec for a single request.
2605
- :type _headers: dict, optional
2606
- :param _host_index: set to override the host_index for a single
2607
- request; this effectively ignores the host_index
2608
- in the spec for a single request.
2609
- :type _host_index: int, optional
2610
- :return: Returns the result object.
2611
- """ # noqa: E501
2612
-
2613
- _param = self._read_serialize(
2614
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2615
- x_task_diagnostics=x_task_diagnostics,
2616
- fields=fields,
2617
- exclude_fields=exclude_fields,
2618
- _request_auth=_request_auth,
2619
- _content_type=_content_type,
2620
- _headers=_headers,
2621
- _host_index=_host_index
2622
- )
2623
-
2624
- _response_types_map: Dict[str, Optional[str]] = {
2625
- '200': "FileFileAlternateContentSourceResponse",
2626
- }
2627
- response_data = self.api_client.call_api(
2628
- *_param,
2629
- _request_timeout=_request_timeout
2630
- )
2631
- response_data.read()
2632
- return self.api_client.response_deserialize(
2633
- response_data=response_data,
2634
- response_types_map=_response_types_map,
2635
- )
2636
-
2637
-
2638
- @validate_call
2639
- def read_without_preload_content(
2640
- self,
2641
- file_file_alternate_content_source_href: StrictStr,
2642
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2643
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2644
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2645
- _request_timeout: Union[
2646
- None,
2647
- Annotated[StrictFloat, Field(gt=0)],
2648
- Tuple[
2649
- Annotated[StrictFloat, Field(gt=0)],
2650
- Annotated[StrictFloat, Field(gt=0)]
2651
- ]
2652
- ] = None,
2653
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2654
- _content_type: Optional[StrictStr] = None,
2655
- _headers: Optional[Dict[StrictStr, Any]] = None,
2656
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2657
- ) -> RESTResponseType:
2658
- """Inspect a file alternate content source
2659
-
2660
- Alternate Content Source ViewSet for File
2661
-
2662
- :param file_file_alternate_content_source_href: (required)
2663
- :type file_file_alternate_content_source_href: str
2664
- :param x_task_diagnostics: List of profilers to use on tasks.
2665
- :type x_task_diagnostics: List[str]
2666
- :param fields: A list of fields to include in the response.
2667
- :type fields: List[str]
2668
- :param exclude_fields: A list of fields to exclude from the response.
2669
- :type exclude_fields: List[str]
2670
- :param _request_timeout: timeout setting for this request. If one
2671
- number provided, it will be total request
2672
- timeout. It can also be a pair (tuple) of
2673
- (connection, read) timeouts.
2674
- :type _request_timeout: int, tuple(int, int), optional
2675
- :param _request_auth: set to override the auth_settings for an a single
2676
- request; this effectively ignores the
2677
- authentication in the spec for a single request.
2678
- :type _request_auth: dict, optional
2679
- :param _content_type: force content-type for the request.
2680
- :type _content_type: str, Optional
2681
- :param _headers: set to override the headers for a single
2682
- request; this effectively ignores the headers
2683
- in the spec for a single request.
2684
- :type _headers: dict, optional
2685
- :param _host_index: set to override the host_index for a single
2686
- request; this effectively ignores the host_index
2687
- in the spec for a single request.
2688
- :type _host_index: int, optional
2689
- :return: Returns the result object.
2690
- """ # noqa: E501
2691
-
2692
- _param = self._read_serialize(
2693
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2694
- x_task_diagnostics=x_task_diagnostics,
2695
- fields=fields,
2696
- exclude_fields=exclude_fields,
2697
- _request_auth=_request_auth,
2698
- _content_type=_content_type,
2699
- _headers=_headers,
2700
- _host_index=_host_index
2701
- )
2702
-
2703
- _response_types_map: Dict[str, Optional[str]] = {
2704
- '200': "FileFileAlternateContentSourceResponse",
2705
- }
2706
- response_data = self.api_client.call_api(
2707
- *_param,
2708
- _request_timeout=_request_timeout
2709
- )
2710
- return response_data.response
2711
-
2712
-
2713
- def _read_serialize(
2714
- self,
2715
- file_file_alternate_content_source_href,
2716
- x_task_diagnostics,
2717
- fields,
2718
- exclude_fields,
2719
- _request_auth,
2720
- _content_type,
2721
- _headers,
2722
- _host_index,
2723
- ) -> RequestSerialized:
2724
-
2725
- _host = None
2726
-
2727
- _collection_formats: Dict[str, str] = {
2728
- 'X-Task-Diagnostics': 'csv',
2729
- 'fields': 'multi',
2730
- 'exclude_fields': 'multi',
2731
- }
2732
-
2733
- _path_params: Dict[str, str] = {}
2734
- _query_params: List[Tuple[str, str]] = []
2735
- _header_params: Dict[str, Optional[str]] = _headers or {}
2736
- _form_params: List[Tuple[str, str]] = []
2737
- _files: Dict[
2738
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2739
- ] = {}
2740
- _body_params: Optional[bytes] = None
2741
-
2742
- # process the path parameters
2743
- if file_file_alternate_content_source_href is not None:
2744
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
2745
- # process the query parameters
2746
- if fields is not None:
2747
-
2748
- _query_params.append(('fields', fields))
2749
-
2750
- if exclude_fields is not None:
2751
-
2752
- _query_params.append(('exclude_fields', exclude_fields))
2753
-
2754
- # process the header parameters
2755
- if x_task_diagnostics is not None:
2756
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2757
- # process the form parameters
2758
- # process the body parameter
2759
-
2760
-
2761
- # set the HTTP header `Accept`
2762
- if 'Accept' not in _header_params:
2763
- _header_params['Accept'] = self.api_client.select_header_accept(
2764
- [
2765
- 'application/json'
2766
- ]
2767
- )
2768
-
2769
-
2770
- # authentication setting
2771
- _auth_settings: List[str] = [
2772
- 'json_header_remote_authentication',
2773
- 'basicAuth',
2774
- 'cookieAuth'
2775
- ]
2776
-
2777
- return self.api_client.param_serialize(
2778
- method='GET',
2779
- resource_path='{file_file_alternate_content_source_href}',
2780
- path_params=_path_params,
2781
- query_params=_query_params,
2782
- header_params=_header_params,
2783
- body=_body_params,
2784
- post_params=_form_params,
2785
- files=_files,
2786
- auth_settings=_auth_settings,
2787
- collection_formats=_collection_formats,
2788
- _host=_host,
2789
- _request_auth=_request_auth
2790
- )
2791
-
2792
-
2793
-
2794
-
2795
- @validate_call
2796
- def refresh(
2797
- self,
2798
- file_file_alternate_content_source_href: StrictStr,
2799
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2800
- _request_timeout: Union[
2801
- None,
2802
- Annotated[StrictFloat, Field(gt=0)],
2803
- Tuple[
2804
- Annotated[StrictFloat, Field(gt=0)],
2805
- Annotated[StrictFloat, Field(gt=0)]
2806
- ]
2807
- ] = None,
2808
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2809
- _content_type: Optional[StrictStr] = None,
2810
- _headers: Optional[Dict[StrictStr, Any]] = None,
2811
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2812
- ) -> TaskGroupOperationResponse:
2813
- """Refresh metadata
2814
-
2815
- Trigger an asynchronous task to create Alternate Content Source content.
2816
-
2817
- :param file_file_alternate_content_source_href: (required)
2818
- :type file_file_alternate_content_source_href: str
2819
- :param x_task_diagnostics: List of profilers to use on tasks.
2820
- :type x_task_diagnostics: List[str]
2821
- :param _request_timeout: timeout setting for this request. If one
2822
- number provided, it will be total request
2823
- timeout. It can also be a pair (tuple) of
2824
- (connection, read) timeouts.
2825
- :type _request_timeout: int, tuple(int, int), optional
2826
- :param _request_auth: set to override the auth_settings for an a single
2827
- request; this effectively ignores the
2828
- authentication in the spec for a single request.
2829
- :type _request_auth: dict, optional
2830
- :param _content_type: force content-type for the request.
2831
- :type _content_type: str, Optional
2832
- :param _headers: set to override the headers for a single
2833
- request; this effectively ignores the headers
2834
- in the spec for a single request.
2835
- :type _headers: dict, optional
2836
- :param _host_index: set to override the host_index for a single
2837
- request; this effectively ignores the host_index
2838
- in the spec for a single request.
2839
- :type _host_index: int, optional
2840
- :return: Returns the result object.
2841
- """ # noqa: E501
2842
-
2843
- _param = self._refresh_serialize(
2844
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2845
- x_task_diagnostics=x_task_diagnostics,
2846
- _request_auth=_request_auth,
2847
- _content_type=_content_type,
2848
- _headers=_headers,
2849
- _host_index=_host_index
2850
- )
2851
-
2852
- _response_types_map: Dict[str, Optional[str]] = {
2853
- '202': "TaskGroupOperationResponse",
2854
- }
2855
- response_data = self.api_client.call_api(
2856
- *_param,
2857
- _request_timeout=_request_timeout
2858
- )
2859
- response_data.read()
2860
- return self.api_client.response_deserialize(
2861
- response_data=response_data,
2862
- response_types_map=_response_types_map,
2863
- ).data
2864
-
2865
-
2866
- @validate_call
2867
- def refresh_with_http_info(
2868
- self,
2869
- file_file_alternate_content_source_href: StrictStr,
2870
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2871
- _request_timeout: Union[
2872
- None,
2873
- Annotated[StrictFloat, Field(gt=0)],
2874
- Tuple[
2875
- Annotated[StrictFloat, Field(gt=0)],
2876
- Annotated[StrictFloat, Field(gt=0)]
2877
- ]
2878
- ] = None,
2879
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2880
- _content_type: Optional[StrictStr] = None,
2881
- _headers: Optional[Dict[StrictStr, Any]] = None,
2882
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2883
- ) -> ApiResponse[TaskGroupOperationResponse]:
2884
- """Refresh metadata
2885
-
2886
- Trigger an asynchronous task to create Alternate Content Source content.
2887
-
2888
- :param file_file_alternate_content_source_href: (required)
2889
- :type file_file_alternate_content_source_href: str
2890
- :param x_task_diagnostics: List of profilers to use on tasks.
2891
- :type x_task_diagnostics: List[str]
2892
- :param _request_timeout: timeout setting for this request. If one
2893
- number provided, it will be total request
2894
- timeout. It can also be a pair (tuple) of
2895
- (connection, read) timeouts.
2896
- :type _request_timeout: int, tuple(int, int), optional
2897
- :param _request_auth: set to override the auth_settings for an a single
2898
- request; this effectively ignores the
2899
- authentication in the spec for a single request.
2900
- :type _request_auth: dict, optional
2901
- :param _content_type: force content-type for the request.
2902
- :type _content_type: str, Optional
2903
- :param _headers: set to override the headers for a single
2904
- request; this effectively ignores the headers
2905
- in the spec for a single request.
2906
- :type _headers: dict, optional
2907
- :param _host_index: set to override the host_index for a single
2908
- request; this effectively ignores the host_index
2909
- in the spec for a single request.
2910
- :type _host_index: int, optional
2911
- :return: Returns the result object.
2912
- """ # noqa: E501
2913
-
2914
- _param = self._refresh_serialize(
2915
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2916
- x_task_diagnostics=x_task_diagnostics,
2917
- _request_auth=_request_auth,
2918
- _content_type=_content_type,
2919
- _headers=_headers,
2920
- _host_index=_host_index
2921
- )
2922
-
2923
- _response_types_map: Dict[str, Optional[str]] = {
2924
- '202': "TaskGroupOperationResponse",
2925
- }
2926
- response_data = self.api_client.call_api(
2927
- *_param,
2928
- _request_timeout=_request_timeout
2929
- )
2930
- response_data.read()
2931
- return self.api_client.response_deserialize(
2932
- response_data=response_data,
2933
- response_types_map=_response_types_map,
2934
- )
2935
-
2936
-
2937
- @validate_call
2938
- def refresh_without_preload_content(
2939
- self,
2940
- file_file_alternate_content_source_href: StrictStr,
2941
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2942
- _request_timeout: Union[
2943
- None,
2944
- Annotated[StrictFloat, Field(gt=0)],
2945
- Tuple[
2946
- Annotated[StrictFloat, Field(gt=0)],
2947
- Annotated[StrictFloat, Field(gt=0)]
2948
- ]
2949
- ] = None,
2950
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2951
- _content_type: Optional[StrictStr] = None,
2952
- _headers: Optional[Dict[StrictStr, Any]] = None,
2953
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2954
- ) -> RESTResponseType:
2955
- """Refresh metadata
2956
-
2957
- Trigger an asynchronous task to create Alternate Content Source content.
2958
-
2959
- :param file_file_alternate_content_source_href: (required)
2960
- :type file_file_alternate_content_source_href: str
2961
- :param x_task_diagnostics: List of profilers to use on tasks.
2962
- :type x_task_diagnostics: List[str]
2963
- :param _request_timeout: timeout setting for this request. If one
2964
- number provided, it will be total request
2965
- timeout. It can also be a pair (tuple) of
2966
- (connection, read) timeouts.
2967
- :type _request_timeout: int, tuple(int, int), optional
2968
- :param _request_auth: set to override the auth_settings for an a single
2969
- request; this effectively ignores the
2970
- authentication in the spec for a single request.
2971
- :type _request_auth: dict, optional
2972
- :param _content_type: force content-type for the request.
2973
- :type _content_type: str, Optional
2974
- :param _headers: set to override the headers for a single
2975
- request; this effectively ignores the headers
2976
- in the spec for a single request.
2977
- :type _headers: dict, optional
2978
- :param _host_index: set to override the host_index for a single
2979
- request; this effectively ignores the host_index
2980
- in the spec for a single request.
2981
- :type _host_index: int, optional
2982
- :return: Returns the result object.
2983
- """ # noqa: E501
2984
-
2985
- _param = self._refresh_serialize(
2986
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
2987
- x_task_diagnostics=x_task_diagnostics,
2988
- _request_auth=_request_auth,
2989
- _content_type=_content_type,
2990
- _headers=_headers,
2991
- _host_index=_host_index
2992
- )
2993
-
2994
- _response_types_map: Dict[str, Optional[str]] = {
2995
- '202': "TaskGroupOperationResponse",
2996
- }
2997
- response_data = self.api_client.call_api(
2998
- *_param,
2999
- _request_timeout=_request_timeout
3000
- )
3001
- return response_data.response
3002
-
3003
-
3004
- def _refresh_serialize(
3005
- self,
3006
- file_file_alternate_content_source_href,
3007
- x_task_diagnostics,
3008
- _request_auth,
3009
- _content_type,
3010
- _headers,
3011
- _host_index,
3012
- ) -> RequestSerialized:
3013
-
3014
- _host = None
3015
-
3016
- _collection_formats: Dict[str, str] = {
3017
- 'X-Task-Diagnostics': 'csv',
3018
- }
3019
-
3020
- _path_params: Dict[str, str] = {}
3021
- _query_params: List[Tuple[str, str]] = []
3022
- _header_params: Dict[str, Optional[str]] = _headers or {}
3023
- _form_params: List[Tuple[str, str]] = []
3024
- _files: Dict[
3025
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3026
- ] = {}
3027
- _body_params: Optional[bytes] = None
3028
-
3029
- # process the path parameters
3030
- if file_file_alternate_content_source_href is not None:
3031
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
3032
- # process the query parameters
3033
- # process the header parameters
3034
- if x_task_diagnostics is not None:
3035
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3036
- # process the form parameters
3037
- # process the body parameter
3038
-
3039
-
3040
- # set the HTTP header `Accept`
3041
- if 'Accept' not in _header_params:
3042
- _header_params['Accept'] = self.api_client.select_header_accept(
3043
- [
3044
- 'application/json'
3045
- ]
3046
- )
3047
-
3048
-
3049
- # authentication setting
3050
- _auth_settings: List[str] = [
3051
- 'json_header_remote_authentication',
3052
- 'basicAuth',
3053
- 'cookieAuth'
3054
- ]
3055
-
3056
- return self.api_client.param_serialize(
3057
- method='POST',
3058
- resource_path='{file_file_alternate_content_source_href}refresh/',
3059
- path_params=_path_params,
3060
- query_params=_query_params,
3061
- header_params=_header_params,
3062
- body=_body_params,
3063
- post_params=_form_params,
3064
- files=_files,
3065
- auth_settings=_auth_settings,
3066
- collection_formats=_collection_formats,
3067
- _host=_host,
3068
- _request_auth=_request_auth
3069
- )
3070
-
3071
-
3072
-
3073
-
3074
- @validate_call
3075
- def remove_role(
3076
- self,
3077
- file_file_alternate_content_source_href: StrictStr,
3078
- nested_role: NestedRole,
3079
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3080
- _request_timeout: Union[
3081
- None,
3082
- Annotated[StrictFloat, Field(gt=0)],
3083
- Tuple[
3084
- Annotated[StrictFloat, Field(gt=0)],
3085
- Annotated[StrictFloat, Field(gt=0)]
3086
- ]
3087
- ] = None,
3088
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3089
- _content_type: Optional[StrictStr] = None,
3090
- _headers: Optional[Dict[StrictStr, Any]] = None,
3091
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3092
- ) -> NestedRoleResponse:
3093
- """Remove a role
3094
-
3095
- Remove a role for this object from users/groups.
3096
-
3097
- :param file_file_alternate_content_source_href: (required)
3098
- :type file_file_alternate_content_source_href: str
3099
- :param nested_role: (required)
3100
- :type nested_role: NestedRole
3101
- :param x_task_diagnostics: List of profilers to use on tasks.
3102
- :type x_task_diagnostics: List[str]
3103
- :param _request_timeout: timeout setting for this request. If one
3104
- number provided, it will be total request
3105
- timeout. It can also be a pair (tuple) of
3106
- (connection, read) timeouts.
3107
- :type _request_timeout: int, tuple(int, int), optional
3108
- :param _request_auth: set to override the auth_settings for an a single
3109
- request; this effectively ignores the
3110
- authentication in the spec for a single request.
3111
- :type _request_auth: dict, optional
3112
- :param _content_type: force content-type for the request.
3113
- :type _content_type: str, Optional
3114
- :param _headers: set to override the headers for a single
3115
- request; this effectively ignores the headers
3116
- in the spec for a single request.
3117
- :type _headers: dict, optional
3118
- :param _host_index: set to override the host_index for a single
3119
- request; this effectively ignores the host_index
3120
- in the spec for a single request.
3121
- :type _host_index: int, optional
3122
- :return: Returns the result object.
3123
- """ # noqa: E501
3124
-
3125
- _param = self._remove_role_serialize(
3126
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3127
- nested_role=nested_role,
3128
- x_task_diagnostics=x_task_diagnostics,
3129
- _request_auth=_request_auth,
3130
- _content_type=_content_type,
3131
- _headers=_headers,
3132
- _host_index=_host_index
3133
- )
3134
-
3135
- _response_types_map: Dict[str, Optional[str]] = {
3136
- '201': "NestedRoleResponse",
3137
- }
3138
- response_data = self.api_client.call_api(
3139
- *_param,
3140
- _request_timeout=_request_timeout
3141
- )
3142
- response_data.read()
3143
- return self.api_client.response_deserialize(
3144
- response_data=response_data,
3145
- response_types_map=_response_types_map,
3146
- ).data
3147
-
3148
-
3149
- @validate_call
3150
- def remove_role_with_http_info(
3151
- self,
3152
- file_file_alternate_content_source_href: StrictStr,
3153
- nested_role: NestedRole,
3154
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3155
- _request_timeout: Union[
3156
- None,
3157
- Annotated[StrictFloat, Field(gt=0)],
3158
- Tuple[
3159
- Annotated[StrictFloat, Field(gt=0)],
3160
- Annotated[StrictFloat, Field(gt=0)]
3161
- ]
3162
- ] = None,
3163
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3164
- _content_type: Optional[StrictStr] = None,
3165
- _headers: Optional[Dict[StrictStr, Any]] = None,
3166
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3167
- ) -> ApiResponse[NestedRoleResponse]:
3168
- """Remove a role
3169
-
3170
- Remove a role for this object from users/groups.
3171
-
3172
- :param file_file_alternate_content_source_href: (required)
3173
- :type file_file_alternate_content_source_href: str
3174
- :param nested_role: (required)
3175
- :type nested_role: NestedRole
3176
- :param x_task_diagnostics: List of profilers to use on tasks.
3177
- :type x_task_diagnostics: List[str]
3178
- :param _request_timeout: timeout setting for this request. If one
3179
- number provided, it will be total request
3180
- timeout. It can also be a pair (tuple) of
3181
- (connection, read) timeouts.
3182
- :type _request_timeout: int, tuple(int, int), optional
3183
- :param _request_auth: set to override the auth_settings for an a single
3184
- request; this effectively ignores the
3185
- authentication in the spec for a single request.
3186
- :type _request_auth: dict, optional
3187
- :param _content_type: force content-type for the request.
3188
- :type _content_type: str, Optional
3189
- :param _headers: set to override the headers for a single
3190
- request; this effectively ignores the headers
3191
- in the spec for a single request.
3192
- :type _headers: dict, optional
3193
- :param _host_index: set to override the host_index for a single
3194
- request; this effectively ignores the host_index
3195
- in the spec for a single request.
3196
- :type _host_index: int, optional
3197
- :return: Returns the result object.
3198
- """ # noqa: E501
3199
-
3200
- _param = self._remove_role_serialize(
3201
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3202
- nested_role=nested_role,
3203
- x_task_diagnostics=x_task_diagnostics,
3204
- _request_auth=_request_auth,
3205
- _content_type=_content_type,
3206
- _headers=_headers,
3207
- _host_index=_host_index
3208
- )
3209
-
3210
- _response_types_map: Dict[str, Optional[str]] = {
3211
- '201': "NestedRoleResponse",
3212
- }
3213
- response_data = self.api_client.call_api(
3214
- *_param,
3215
- _request_timeout=_request_timeout
3216
- )
3217
- response_data.read()
3218
- return self.api_client.response_deserialize(
3219
- response_data=response_data,
3220
- response_types_map=_response_types_map,
3221
- )
3222
-
3223
-
3224
- @validate_call
3225
- def remove_role_without_preload_content(
3226
- self,
3227
- file_file_alternate_content_source_href: StrictStr,
3228
- nested_role: NestedRole,
3229
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3230
- _request_timeout: Union[
3231
- None,
3232
- Annotated[StrictFloat, Field(gt=0)],
3233
- Tuple[
3234
- Annotated[StrictFloat, Field(gt=0)],
3235
- Annotated[StrictFloat, Field(gt=0)]
3236
- ]
3237
- ] = None,
3238
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3239
- _content_type: Optional[StrictStr] = None,
3240
- _headers: Optional[Dict[StrictStr, Any]] = None,
3241
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3242
- ) -> RESTResponseType:
3243
- """Remove a role
3244
-
3245
- Remove a role for this object from users/groups.
3246
-
3247
- :param file_file_alternate_content_source_href: (required)
3248
- :type file_file_alternate_content_source_href: str
3249
- :param nested_role: (required)
3250
- :type nested_role: NestedRole
3251
- :param x_task_diagnostics: List of profilers to use on tasks.
3252
- :type x_task_diagnostics: List[str]
3253
- :param _request_timeout: timeout setting for this request. If one
3254
- number provided, it will be total request
3255
- timeout. It can also be a pair (tuple) of
3256
- (connection, read) timeouts.
3257
- :type _request_timeout: int, tuple(int, int), optional
3258
- :param _request_auth: set to override the auth_settings for an a single
3259
- request; this effectively ignores the
3260
- authentication in the spec for a single request.
3261
- :type _request_auth: dict, optional
3262
- :param _content_type: force content-type for the request.
3263
- :type _content_type: str, Optional
3264
- :param _headers: set to override the headers for a single
3265
- request; this effectively ignores the headers
3266
- in the spec for a single request.
3267
- :type _headers: dict, optional
3268
- :param _host_index: set to override the host_index for a single
3269
- request; this effectively ignores the host_index
3270
- in the spec for a single request.
3271
- :type _host_index: int, optional
3272
- :return: Returns the result object.
3273
- """ # noqa: E501
3274
-
3275
- _param = self._remove_role_serialize(
3276
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3277
- nested_role=nested_role,
3278
- x_task_diagnostics=x_task_diagnostics,
3279
- _request_auth=_request_auth,
3280
- _content_type=_content_type,
3281
- _headers=_headers,
3282
- _host_index=_host_index
3283
- )
3284
-
3285
- _response_types_map: Dict[str, Optional[str]] = {
3286
- '201': "NestedRoleResponse",
3287
- }
3288
- response_data = self.api_client.call_api(
3289
- *_param,
3290
- _request_timeout=_request_timeout
3291
- )
3292
- return response_data.response
3293
-
3294
-
3295
- def _remove_role_serialize(
3296
- self,
3297
- file_file_alternate_content_source_href,
3298
- nested_role,
3299
- x_task_diagnostics,
3300
- _request_auth,
3301
- _content_type,
3302
- _headers,
3303
- _host_index,
3304
- ) -> RequestSerialized:
3305
-
3306
- _host = None
3307
-
3308
- _collection_formats: Dict[str, str] = {
3309
- 'X-Task-Diagnostics': 'csv',
3310
- }
3311
-
3312
- _path_params: Dict[str, str] = {}
3313
- _query_params: List[Tuple[str, str]] = []
3314
- _header_params: Dict[str, Optional[str]] = _headers or {}
3315
- _form_params: List[Tuple[str, str]] = []
3316
- _files: Dict[
3317
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3318
- ] = {}
3319
- _body_params: Optional[bytes] = None
3320
-
3321
- # process the path parameters
3322
- if file_file_alternate_content_source_href is not None:
3323
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
3324
- # process the query parameters
3325
- # process the header parameters
3326
- if x_task_diagnostics is not None:
3327
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3328
- # process the form parameters
3329
- # process the body parameter
3330
- if nested_role is not None:
3331
- _body_params = nested_role
3332
-
3333
-
3334
- # set the HTTP header `Accept`
3335
- if 'Accept' not in _header_params:
3336
- _header_params['Accept'] = self.api_client.select_header_accept(
3337
- [
3338
- 'application/json'
3339
- ]
3340
- )
3341
-
3342
- # set the HTTP header `Content-Type`
3343
- if _content_type:
3344
- _header_params['Content-Type'] = _content_type
3345
- else:
3346
- _default_content_type = (
3347
- self.api_client.select_header_content_type(
3348
- [
3349
- 'application/json',
3350
- 'application/x-www-form-urlencoded',
3351
- 'multipart/form-data'
3352
- ]
3353
- )
3354
- )
3355
- if _default_content_type is not None:
3356
- _header_params['Content-Type'] = _default_content_type
3357
-
3358
- # authentication setting
3359
- _auth_settings: List[str] = [
3360
- 'json_header_remote_authentication',
3361
- 'basicAuth',
3362
- 'cookieAuth'
3363
- ]
3364
-
3365
- return self.api_client.param_serialize(
3366
- method='POST',
3367
- resource_path='{file_file_alternate_content_source_href}remove_role/',
3368
- path_params=_path_params,
3369
- query_params=_query_params,
3370
- header_params=_header_params,
3371
- body=_body_params,
3372
- post_params=_form_params,
3373
- files=_files,
3374
- auth_settings=_auth_settings,
3375
- collection_formats=_collection_formats,
3376
- _host=_host,
3377
- _request_auth=_request_auth
3378
- )
3379
-
3380
-
3381
-
3382
-
3383
- @validate_call
3384
- def update(
3385
- self,
3386
- file_file_alternate_content_source_href: StrictStr,
3387
- file_file_alternate_content_source: FileFileAlternateContentSource,
3388
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3389
- _request_timeout: Union[
3390
- None,
3391
- Annotated[StrictFloat, Field(gt=0)],
3392
- Tuple[
3393
- Annotated[StrictFloat, Field(gt=0)],
3394
- Annotated[StrictFloat, Field(gt=0)]
3395
- ]
3396
- ] = None,
3397
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3398
- _content_type: Optional[StrictStr] = None,
3399
- _headers: Optional[Dict[StrictStr, Any]] = None,
3400
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3401
- ) -> AsyncOperationResponse:
3402
- """Update a file alternate content source
3403
-
3404
- Trigger an asynchronous update task
3405
-
3406
- :param file_file_alternate_content_source_href: (required)
3407
- :type file_file_alternate_content_source_href: str
3408
- :param file_file_alternate_content_source: (required)
3409
- :type file_file_alternate_content_source: FileFileAlternateContentSource
3410
- :param x_task_diagnostics: List of profilers to use on tasks.
3411
- :type x_task_diagnostics: List[str]
3412
- :param _request_timeout: timeout setting for this request. If one
3413
- number provided, it will be total request
3414
- timeout. It can also be a pair (tuple) of
3415
- (connection, read) timeouts.
3416
- :type _request_timeout: int, tuple(int, int), optional
3417
- :param _request_auth: set to override the auth_settings for an a single
3418
- request; this effectively ignores the
3419
- authentication in the spec for a single request.
3420
- :type _request_auth: dict, optional
3421
- :param _content_type: force content-type for the request.
3422
- :type _content_type: str, Optional
3423
- :param _headers: set to override the headers for a single
3424
- request; this effectively ignores the headers
3425
- in the spec for a single request.
3426
- :type _headers: dict, optional
3427
- :param _host_index: set to override the host_index for a single
3428
- request; this effectively ignores the host_index
3429
- in the spec for a single request.
3430
- :type _host_index: int, optional
3431
- :return: Returns the result object.
3432
- """ # noqa: E501
3433
-
3434
- _param = self._update_serialize(
3435
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3436
- file_file_alternate_content_source=file_file_alternate_content_source,
3437
- x_task_diagnostics=x_task_diagnostics,
3438
- _request_auth=_request_auth,
3439
- _content_type=_content_type,
3440
- _headers=_headers,
3441
- _host_index=_host_index
3442
- )
3443
-
3444
- _response_types_map: Dict[str, Optional[str]] = {
3445
- '202': "AsyncOperationResponse",
3446
- }
3447
- response_data = self.api_client.call_api(
3448
- *_param,
3449
- _request_timeout=_request_timeout
3450
- )
3451
- response_data.read()
3452
- return self.api_client.response_deserialize(
3453
- response_data=response_data,
3454
- response_types_map=_response_types_map,
3455
- ).data
3456
-
3457
-
3458
- @validate_call
3459
- def update_with_http_info(
3460
- self,
3461
- file_file_alternate_content_source_href: StrictStr,
3462
- file_file_alternate_content_source: FileFileAlternateContentSource,
3463
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3464
- _request_timeout: Union[
3465
- None,
3466
- Annotated[StrictFloat, Field(gt=0)],
3467
- Tuple[
3468
- Annotated[StrictFloat, Field(gt=0)],
3469
- Annotated[StrictFloat, Field(gt=0)]
3470
- ]
3471
- ] = None,
3472
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3473
- _content_type: Optional[StrictStr] = None,
3474
- _headers: Optional[Dict[StrictStr, Any]] = None,
3475
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3476
- ) -> ApiResponse[AsyncOperationResponse]:
3477
- """Update a file alternate content source
3478
-
3479
- Trigger an asynchronous update task
3480
-
3481
- :param file_file_alternate_content_source_href: (required)
3482
- :type file_file_alternate_content_source_href: str
3483
- :param file_file_alternate_content_source: (required)
3484
- :type file_file_alternate_content_source: FileFileAlternateContentSource
3485
- :param x_task_diagnostics: List of profilers to use on tasks.
3486
- :type x_task_diagnostics: List[str]
3487
- :param _request_timeout: timeout setting for this request. If one
3488
- number provided, it will be total request
3489
- timeout. It can also be a pair (tuple) of
3490
- (connection, read) timeouts.
3491
- :type _request_timeout: int, tuple(int, int), optional
3492
- :param _request_auth: set to override the auth_settings for an a single
3493
- request; this effectively ignores the
3494
- authentication in the spec for a single request.
3495
- :type _request_auth: dict, optional
3496
- :param _content_type: force content-type for the request.
3497
- :type _content_type: str, Optional
3498
- :param _headers: set to override the headers for a single
3499
- request; this effectively ignores the headers
3500
- in the spec for a single request.
3501
- :type _headers: dict, optional
3502
- :param _host_index: set to override the host_index for a single
3503
- request; this effectively ignores the host_index
3504
- in the spec for a single request.
3505
- :type _host_index: int, optional
3506
- :return: Returns the result object.
3507
- """ # noqa: E501
3508
-
3509
- _param = self._update_serialize(
3510
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3511
- file_file_alternate_content_source=file_file_alternate_content_source,
3512
- x_task_diagnostics=x_task_diagnostics,
3513
- _request_auth=_request_auth,
3514
- _content_type=_content_type,
3515
- _headers=_headers,
3516
- _host_index=_host_index
3517
- )
3518
-
3519
- _response_types_map: Dict[str, Optional[str]] = {
3520
- '202': "AsyncOperationResponse",
3521
- }
3522
- response_data = self.api_client.call_api(
3523
- *_param,
3524
- _request_timeout=_request_timeout
3525
- )
3526
- response_data.read()
3527
- return self.api_client.response_deserialize(
3528
- response_data=response_data,
3529
- response_types_map=_response_types_map,
3530
- )
3531
-
3532
-
3533
- @validate_call
3534
- def update_without_preload_content(
3535
- self,
3536
- file_file_alternate_content_source_href: StrictStr,
3537
- file_file_alternate_content_source: FileFileAlternateContentSource,
3538
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3539
- _request_timeout: Union[
3540
- None,
3541
- Annotated[StrictFloat, Field(gt=0)],
3542
- Tuple[
3543
- Annotated[StrictFloat, Field(gt=0)],
3544
- Annotated[StrictFloat, Field(gt=0)]
3545
- ]
3546
- ] = None,
3547
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3548
- _content_type: Optional[StrictStr] = None,
3549
- _headers: Optional[Dict[StrictStr, Any]] = None,
3550
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3551
- ) -> RESTResponseType:
3552
- """Update a file alternate content source
3553
-
3554
- Trigger an asynchronous update task
3555
-
3556
- :param file_file_alternate_content_source_href: (required)
3557
- :type file_file_alternate_content_source_href: str
3558
- :param file_file_alternate_content_source: (required)
3559
- :type file_file_alternate_content_source: FileFileAlternateContentSource
3560
- :param x_task_diagnostics: List of profilers to use on tasks.
3561
- :type x_task_diagnostics: List[str]
3562
- :param _request_timeout: timeout setting for this request. If one
3563
- number provided, it will be total request
3564
- timeout. It can also be a pair (tuple) of
3565
- (connection, read) timeouts.
3566
- :type _request_timeout: int, tuple(int, int), optional
3567
- :param _request_auth: set to override the auth_settings for an a single
3568
- request; this effectively ignores the
3569
- authentication in the spec for a single request.
3570
- :type _request_auth: dict, optional
3571
- :param _content_type: force content-type for the request.
3572
- :type _content_type: str, Optional
3573
- :param _headers: set to override the headers for a single
3574
- request; this effectively ignores the headers
3575
- in the spec for a single request.
3576
- :type _headers: dict, optional
3577
- :param _host_index: set to override the host_index for a single
3578
- request; this effectively ignores the host_index
3579
- in the spec for a single request.
3580
- :type _host_index: int, optional
3581
- :return: Returns the result object.
3582
- """ # noqa: E501
3583
-
3584
- _param = self._update_serialize(
3585
- file_file_alternate_content_source_href=file_file_alternate_content_source_href,
3586
- file_file_alternate_content_source=file_file_alternate_content_source,
3587
- x_task_diagnostics=x_task_diagnostics,
3588
- _request_auth=_request_auth,
3589
- _content_type=_content_type,
3590
- _headers=_headers,
3591
- _host_index=_host_index
3592
- )
3593
-
3594
- _response_types_map: Dict[str, Optional[str]] = {
3595
- '202': "AsyncOperationResponse",
3596
- }
3597
- response_data = self.api_client.call_api(
3598
- *_param,
3599
- _request_timeout=_request_timeout
3600
- )
3601
- return response_data.response
3602
-
3603
-
3604
- def _update_serialize(
3605
- self,
3606
- file_file_alternate_content_source_href,
3607
- file_file_alternate_content_source,
3608
- x_task_diagnostics,
3609
- _request_auth,
3610
- _content_type,
3611
- _headers,
3612
- _host_index,
3613
- ) -> RequestSerialized:
3614
-
3615
- _host = None
3616
-
3617
- _collection_formats: Dict[str, str] = {
3618
- 'X-Task-Diagnostics': 'csv',
3619
- }
3620
-
3621
- _path_params: Dict[str, str] = {}
3622
- _query_params: List[Tuple[str, str]] = []
3623
- _header_params: Dict[str, Optional[str]] = _headers or {}
3624
- _form_params: List[Tuple[str, str]] = []
3625
- _files: Dict[
3626
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3627
- ] = {}
3628
- _body_params: Optional[bytes] = None
3629
-
3630
- # process the path parameters
3631
- if file_file_alternate_content_source_href is not None:
3632
- _path_params['file_file_alternate_content_source_href'] = file_file_alternate_content_source_href
3633
- # process the query parameters
3634
- # process the header parameters
3635
- if x_task_diagnostics is not None:
3636
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3637
- # process the form parameters
3638
- # process the body parameter
3639
- if file_file_alternate_content_source is not None:
3640
- _body_params = file_file_alternate_content_source
3641
-
3642
-
3643
- # set the HTTP header `Accept`
3644
- if 'Accept' not in _header_params:
3645
- _header_params['Accept'] = self.api_client.select_header_accept(
3646
- [
3647
- 'application/json'
3648
- ]
3649
- )
3650
-
3651
- # set the HTTP header `Content-Type`
3652
- if _content_type:
3653
- _header_params['Content-Type'] = _content_type
3654
- else:
3655
- _default_content_type = (
3656
- self.api_client.select_header_content_type(
3657
- [
3658
- 'application/json',
3659
- 'application/x-www-form-urlencoded',
3660
- 'multipart/form-data'
3661
- ]
3662
- )
3663
- )
3664
- if _default_content_type is not None:
3665
- _header_params['Content-Type'] = _default_content_type
3666
-
3667
- # authentication setting
3668
- _auth_settings: List[str] = [
3669
- 'json_header_remote_authentication',
3670
- 'basicAuth',
3671
- 'cookieAuth'
3672
- ]
3673
-
3674
- return self.api_client.param_serialize(
3675
- method='PUT',
3676
- resource_path='{file_file_alternate_content_source_href}',
3677
- path_params=_path_params,
3678
- query_params=_query_params,
3679
- header_params=_header_params,
3680
- body=_body_params,
3681
- post_params=_form_params,
3682
- files=_files,
3683
- auth_settings=_auth_settings,
3684
- collection_formats=_collection_formats,
3685
- _host=_host,
3686
- _request_auth=_request_auth
3687
- )
3688
-
3689
-