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,4856 +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, StrictBool, 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_repository import FileFileRepository
25
- from crc-pulp_file-client.models.file_file_repository_response import FileFileRepositoryResponse
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_repository_response_list import PaginatedfileFileRepositoryResponseList
31
- from crc-pulp_file-client.models.patchedfile_file_repository import PatchedfileFileRepository
32
- from crc-pulp_file-client.models.repository_add_remove_content import RepositoryAddRemoveContent
33
- from crc-pulp_file-client.models.repository_sync_url import RepositorySyncURL
34
- from crc-pulp_file-client.models.set_label import SetLabel
35
- from crc-pulp_file-client.models.set_label_response import SetLabelResponse
36
- from crc-pulp_file-client.models.unset_label import UnsetLabel
37
- from crc-pulp_file-client.models.unset_label_response import UnsetLabelResponse
38
-
39
- from crc-pulp_file-client.api_client import ApiClient, RequestSerialized
40
- from crc-pulp_file-client.api_response import ApiResponse
41
- from crc-pulp_file-client.rest import RESTResponseType
42
-
43
-
44
- class RepositoriesFileApi:
45
- """NOTE: This class is auto generated by OpenAPI Generator
46
- Ref: https://openapi-generator.tech
47
-
48
- Do not edit the class manually.
49
- """
50
-
51
- def __init__(self, api_client=None) -> None:
52
- if api_client is None:
53
- api_client = ApiClient.get_default()
54
- self.api_client = api_client
55
-
56
-
57
- @validate_call
58
- def add_role(
59
- self,
60
- file_file_repository_href: StrictStr,
61
- nested_role: NestedRole,
62
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
63
- _request_timeout: Union[
64
- None,
65
- Annotated[StrictFloat, Field(gt=0)],
66
- Tuple[
67
- Annotated[StrictFloat, Field(gt=0)],
68
- Annotated[StrictFloat, Field(gt=0)]
69
- ]
70
- ] = None,
71
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
72
- _content_type: Optional[StrictStr] = None,
73
- _headers: Optional[Dict[StrictStr, Any]] = None,
74
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
75
- ) -> NestedRoleResponse:
76
- """Add a role
77
-
78
- Add a role for this object to users/groups.
79
-
80
- :param file_file_repository_href: (required)
81
- :type file_file_repository_href: str
82
- :param nested_role: (required)
83
- :type nested_role: NestedRole
84
- :param x_task_diagnostics: List of profilers to use on tasks.
85
- :type x_task_diagnostics: List[str]
86
- :param _request_timeout: timeout setting for this request. If one
87
- number provided, it will be total request
88
- timeout. It can also be a pair (tuple) of
89
- (connection, read) timeouts.
90
- :type _request_timeout: int, tuple(int, int), optional
91
- :param _request_auth: set to override the auth_settings for an a single
92
- request; this effectively ignores the
93
- authentication in the spec for a single request.
94
- :type _request_auth: dict, optional
95
- :param _content_type: force content-type for the request.
96
- :type _content_type: str, Optional
97
- :param _headers: set to override the headers for a single
98
- request; this effectively ignores the headers
99
- in the spec for a single request.
100
- :type _headers: dict, optional
101
- :param _host_index: set to override the host_index for a single
102
- request; this effectively ignores the host_index
103
- in the spec for a single request.
104
- :type _host_index: int, optional
105
- :return: Returns the result object.
106
- """ # noqa: E501
107
-
108
- _param = self._add_role_serialize(
109
- file_file_repository_href=file_file_repository_href,
110
- nested_role=nested_role,
111
- x_task_diagnostics=x_task_diagnostics,
112
- _request_auth=_request_auth,
113
- _content_type=_content_type,
114
- _headers=_headers,
115
- _host_index=_host_index
116
- )
117
-
118
- _response_types_map: Dict[str, Optional[str]] = {
119
- '201': "NestedRoleResponse",
120
- }
121
- response_data = self.api_client.call_api(
122
- *_param,
123
- _request_timeout=_request_timeout
124
- )
125
- response_data.read()
126
- return self.api_client.response_deserialize(
127
- response_data=response_data,
128
- response_types_map=_response_types_map,
129
- ).data
130
-
131
-
132
- @validate_call
133
- def add_role_with_http_info(
134
- self,
135
- file_file_repository_href: StrictStr,
136
- nested_role: NestedRole,
137
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
138
- _request_timeout: Union[
139
- None,
140
- Annotated[StrictFloat, Field(gt=0)],
141
- Tuple[
142
- Annotated[StrictFloat, Field(gt=0)],
143
- Annotated[StrictFloat, Field(gt=0)]
144
- ]
145
- ] = None,
146
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
147
- _content_type: Optional[StrictStr] = None,
148
- _headers: Optional[Dict[StrictStr, Any]] = None,
149
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
150
- ) -> ApiResponse[NestedRoleResponse]:
151
- """Add a role
152
-
153
- Add a role for this object to users/groups.
154
-
155
- :param file_file_repository_href: (required)
156
- :type file_file_repository_href: str
157
- :param nested_role: (required)
158
- :type nested_role: NestedRole
159
- :param x_task_diagnostics: List of profilers to use on tasks.
160
- :type x_task_diagnostics: List[str]
161
- :param _request_timeout: timeout setting for this request. If one
162
- number provided, it will be total request
163
- timeout. It can also be a pair (tuple) of
164
- (connection, read) timeouts.
165
- :type _request_timeout: int, tuple(int, int), optional
166
- :param _request_auth: set to override the auth_settings for an a single
167
- request; this effectively ignores the
168
- authentication in the spec for a single request.
169
- :type _request_auth: dict, optional
170
- :param _content_type: force content-type for the request.
171
- :type _content_type: str, Optional
172
- :param _headers: set to override the headers for a single
173
- request; this effectively ignores the headers
174
- in the spec for a single request.
175
- :type _headers: dict, optional
176
- :param _host_index: set to override the host_index for a single
177
- request; this effectively ignores the host_index
178
- in the spec for a single request.
179
- :type _host_index: int, optional
180
- :return: Returns the result object.
181
- """ # noqa: E501
182
-
183
- _param = self._add_role_serialize(
184
- file_file_repository_href=file_file_repository_href,
185
- nested_role=nested_role,
186
- x_task_diagnostics=x_task_diagnostics,
187
- _request_auth=_request_auth,
188
- _content_type=_content_type,
189
- _headers=_headers,
190
- _host_index=_host_index
191
- )
192
-
193
- _response_types_map: Dict[str, Optional[str]] = {
194
- '201': "NestedRoleResponse",
195
- }
196
- response_data = self.api_client.call_api(
197
- *_param,
198
- _request_timeout=_request_timeout
199
- )
200
- response_data.read()
201
- return self.api_client.response_deserialize(
202
- response_data=response_data,
203
- response_types_map=_response_types_map,
204
- )
205
-
206
-
207
- @validate_call
208
- def add_role_without_preload_content(
209
- self,
210
- file_file_repository_href: StrictStr,
211
- nested_role: NestedRole,
212
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
213
- _request_timeout: Union[
214
- None,
215
- Annotated[StrictFloat, Field(gt=0)],
216
- Tuple[
217
- Annotated[StrictFloat, Field(gt=0)],
218
- Annotated[StrictFloat, Field(gt=0)]
219
- ]
220
- ] = None,
221
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
222
- _content_type: Optional[StrictStr] = None,
223
- _headers: Optional[Dict[StrictStr, Any]] = None,
224
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
225
- ) -> RESTResponseType:
226
- """Add a role
227
-
228
- Add a role for this object to users/groups.
229
-
230
- :param file_file_repository_href: (required)
231
- :type file_file_repository_href: str
232
- :param nested_role: (required)
233
- :type nested_role: NestedRole
234
- :param x_task_diagnostics: List of profilers to use on tasks.
235
- :type x_task_diagnostics: List[str]
236
- :param _request_timeout: timeout setting for this request. If one
237
- number provided, it will be total request
238
- timeout. It can also be a pair (tuple) of
239
- (connection, read) timeouts.
240
- :type _request_timeout: int, tuple(int, int), optional
241
- :param _request_auth: set to override the auth_settings for an a single
242
- request; this effectively ignores the
243
- authentication in the spec for a single request.
244
- :type _request_auth: dict, optional
245
- :param _content_type: force content-type for the request.
246
- :type _content_type: str, Optional
247
- :param _headers: set to override the headers for a single
248
- request; this effectively ignores the headers
249
- in the spec for a single request.
250
- :type _headers: dict, optional
251
- :param _host_index: set to override the host_index for a single
252
- request; this effectively ignores the host_index
253
- in the spec for a single request.
254
- :type _host_index: int, optional
255
- :return: Returns the result object.
256
- """ # noqa: E501
257
-
258
- _param = self._add_role_serialize(
259
- file_file_repository_href=file_file_repository_href,
260
- nested_role=nested_role,
261
- x_task_diagnostics=x_task_diagnostics,
262
- _request_auth=_request_auth,
263
- _content_type=_content_type,
264
- _headers=_headers,
265
- _host_index=_host_index
266
- )
267
-
268
- _response_types_map: Dict[str, Optional[str]] = {
269
- '201': "NestedRoleResponse",
270
- }
271
- response_data = self.api_client.call_api(
272
- *_param,
273
- _request_timeout=_request_timeout
274
- )
275
- return response_data.response
276
-
277
-
278
- def _add_role_serialize(
279
- self,
280
- file_file_repository_href,
281
- nested_role,
282
- x_task_diagnostics,
283
- _request_auth,
284
- _content_type,
285
- _headers,
286
- _host_index,
287
- ) -> RequestSerialized:
288
-
289
- _host = None
290
-
291
- _collection_formats: Dict[str, str] = {
292
- 'X-Task-Diagnostics': 'csv',
293
- }
294
-
295
- _path_params: Dict[str, str] = {}
296
- _query_params: List[Tuple[str, str]] = []
297
- _header_params: Dict[str, Optional[str]] = _headers or {}
298
- _form_params: List[Tuple[str, str]] = []
299
- _files: Dict[
300
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
301
- ] = {}
302
- _body_params: Optional[bytes] = None
303
-
304
- # process the path parameters
305
- if file_file_repository_href is not None:
306
- _path_params['file_file_repository_href'] = file_file_repository_href
307
- # process the query parameters
308
- # process the header parameters
309
- if x_task_diagnostics is not None:
310
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
311
- # process the form parameters
312
- # process the body parameter
313
- if nested_role is not None:
314
- _body_params = nested_role
315
-
316
-
317
- # set the HTTP header `Accept`
318
- if 'Accept' not in _header_params:
319
- _header_params['Accept'] = self.api_client.select_header_accept(
320
- [
321
- 'application/json'
322
- ]
323
- )
324
-
325
- # set the HTTP header `Content-Type`
326
- if _content_type:
327
- _header_params['Content-Type'] = _content_type
328
- else:
329
- _default_content_type = (
330
- self.api_client.select_header_content_type(
331
- [
332
- 'application/json',
333
- 'application/x-www-form-urlencoded',
334
- 'multipart/form-data'
335
- ]
336
- )
337
- )
338
- if _default_content_type is not None:
339
- _header_params['Content-Type'] = _default_content_type
340
-
341
- # authentication setting
342
- _auth_settings: List[str] = [
343
- 'json_header_remote_authentication',
344
- 'basicAuth',
345
- 'cookieAuth'
346
- ]
347
-
348
- return self.api_client.param_serialize(
349
- method='POST',
350
- resource_path='{file_file_repository_href}add_role/',
351
- path_params=_path_params,
352
- query_params=_query_params,
353
- header_params=_header_params,
354
- body=_body_params,
355
- post_params=_form_params,
356
- files=_files,
357
- auth_settings=_auth_settings,
358
- collection_formats=_collection_formats,
359
- _host=_host,
360
- _request_auth=_request_auth
361
- )
362
-
363
-
364
-
365
-
366
- @validate_call
367
- def create(
368
- self,
369
- file_file_repository: FileFileRepository,
370
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
371
- pulp_domain: StrictStr = "default",
372
- _request_timeout: Union[
373
- None,
374
- Annotated[StrictFloat, Field(gt=0)],
375
- Tuple[
376
- Annotated[StrictFloat, Field(gt=0)],
377
- Annotated[StrictFloat, Field(gt=0)]
378
- ]
379
- ] = None,
380
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
381
- _content_type: Optional[StrictStr] = None,
382
- _headers: Optional[Dict[StrictStr, Any]] = None,
383
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
384
- ) -> FileFileRepositoryResponse:
385
- """Create a file repository
386
-
387
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
388
-
389
- :param pulp_domain: (required)
390
- :type pulp_domain: str
391
- :param file_file_repository: (required)
392
- :type file_file_repository: FileFileRepository
393
- :param x_task_diagnostics: List of profilers to use on tasks.
394
- :type x_task_diagnostics: List[str]
395
- :param _request_timeout: timeout setting for this request. If one
396
- number provided, it will be total request
397
- timeout. It can also be a pair (tuple) of
398
- (connection, read) timeouts.
399
- :type _request_timeout: int, tuple(int, int), optional
400
- :param _request_auth: set to override the auth_settings for an a single
401
- request; this effectively ignores the
402
- authentication in the spec for a single request.
403
- :type _request_auth: dict, optional
404
- :param _content_type: force content-type for the request.
405
- :type _content_type: str, Optional
406
- :param _headers: set to override the headers for a single
407
- request; this effectively ignores the headers
408
- in the spec for a single request.
409
- :type _headers: dict, optional
410
- :param _host_index: set to override the host_index for a single
411
- request; this effectively ignores the host_index
412
- in the spec for a single request.
413
- :type _host_index: int, optional
414
- :return: Returns the result object.
415
- """ # noqa: E501
416
-
417
- _param = self._create_serialize(
418
- pulp_domain=pulp_domain,
419
- file_file_repository=file_file_repository,
420
- x_task_diagnostics=x_task_diagnostics,
421
- _request_auth=_request_auth,
422
- _content_type=_content_type,
423
- _headers=_headers,
424
- _host_index=_host_index
425
- )
426
-
427
- _response_types_map: Dict[str, Optional[str]] = {
428
- '201': "FileFileRepositoryResponse",
429
- }
430
- response_data = self.api_client.call_api(
431
- *_param,
432
- _request_timeout=_request_timeout
433
- )
434
- response_data.read()
435
- return self.api_client.response_deserialize(
436
- response_data=response_data,
437
- response_types_map=_response_types_map,
438
- ).data
439
-
440
-
441
- @validate_call
442
- def create_with_http_info(
443
- self,
444
- file_file_repository: FileFileRepository,
445
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
446
- pulp_domain: StrictStr = "default",
447
- _request_timeout: Union[
448
- None,
449
- Annotated[StrictFloat, Field(gt=0)],
450
- Tuple[
451
- Annotated[StrictFloat, Field(gt=0)],
452
- Annotated[StrictFloat, Field(gt=0)]
453
- ]
454
- ] = None,
455
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
456
- _content_type: Optional[StrictStr] = None,
457
- _headers: Optional[Dict[StrictStr, Any]] = None,
458
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
459
- ) -> ApiResponse[FileFileRepositoryResponse]:
460
- """Create a file repository
461
-
462
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
463
-
464
- :param pulp_domain: (required)
465
- :type pulp_domain: str
466
- :param file_file_repository: (required)
467
- :type file_file_repository: FileFileRepository
468
- :param x_task_diagnostics: List of profilers to use on tasks.
469
- :type x_task_diagnostics: List[str]
470
- :param _request_timeout: timeout setting for this request. If one
471
- number provided, it will be total request
472
- timeout. It can also be a pair (tuple) of
473
- (connection, read) timeouts.
474
- :type _request_timeout: int, tuple(int, int), optional
475
- :param _request_auth: set to override the auth_settings for an a single
476
- request; this effectively ignores the
477
- authentication in the spec for a single request.
478
- :type _request_auth: dict, optional
479
- :param _content_type: force content-type for the request.
480
- :type _content_type: str, Optional
481
- :param _headers: set to override the headers for a single
482
- request; this effectively ignores the headers
483
- in the spec for a single request.
484
- :type _headers: dict, optional
485
- :param _host_index: set to override the host_index for a single
486
- request; this effectively ignores the host_index
487
- in the spec for a single request.
488
- :type _host_index: int, optional
489
- :return: Returns the result object.
490
- """ # noqa: E501
491
-
492
- _param = self._create_serialize(
493
- pulp_domain=pulp_domain,
494
- file_file_repository=file_file_repository,
495
- x_task_diagnostics=x_task_diagnostics,
496
- _request_auth=_request_auth,
497
- _content_type=_content_type,
498
- _headers=_headers,
499
- _host_index=_host_index
500
- )
501
-
502
- _response_types_map: Dict[str, Optional[str]] = {
503
- '201': "FileFileRepositoryResponse",
504
- }
505
- response_data = self.api_client.call_api(
506
- *_param,
507
- _request_timeout=_request_timeout
508
- )
509
- response_data.read()
510
- return self.api_client.response_deserialize(
511
- response_data=response_data,
512
- response_types_map=_response_types_map,
513
- )
514
-
515
-
516
- @validate_call
517
- def create_without_preload_content(
518
- self,
519
- file_file_repository: FileFileRepository,
520
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
521
- pulp_domain: StrictStr = "default",
522
- _request_timeout: Union[
523
- None,
524
- Annotated[StrictFloat, Field(gt=0)],
525
- Tuple[
526
- Annotated[StrictFloat, Field(gt=0)],
527
- Annotated[StrictFloat, Field(gt=0)]
528
- ]
529
- ] = None,
530
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
531
- _content_type: Optional[StrictStr] = None,
532
- _headers: Optional[Dict[StrictStr, Any]] = None,
533
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
534
- ) -> RESTResponseType:
535
- """Create a file repository
536
-
537
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
538
-
539
- :param pulp_domain: (required)
540
- :type pulp_domain: str
541
- :param file_file_repository: (required)
542
- :type file_file_repository: FileFileRepository
543
- :param x_task_diagnostics: List of profilers to use on tasks.
544
- :type x_task_diagnostics: List[str]
545
- :param _request_timeout: timeout setting for this request. If one
546
- number provided, it will be total request
547
- timeout. It can also be a pair (tuple) of
548
- (connection, read) timeouts.
549
- :type _request_timeout: int, tuple(int, int), optional
550
- :param _request_auth: set to override the auth_settings for an a single
551
- request; this effectively ignores the
552
- authentication in the spec for a single request.
553
- :type _request_auth: dict, optional
554
- :param _content_type: force content-type for the request.
555
- :type _content_type: str, Optional
556
- :param _headers: set to override the headers for a single
557
- request; this effectively ignores the headers
558
- in the spec for a single request.
559
- :type _headers: dict, optional
560
- :param _host_index: set to override the host_index for a single
561
- request; this effectively ignores the host_index
562
- in the spec for a single request.
563
- :type _host_index: int, optional
564
- :return: Returns the result object.
565
- """ # noqa: E501
566
-
567
- _param = self._create_serialize(
568
- pulp_domain=pulp_domain,
569
- file_file_repository=file_file_repository,
570
- x_task_diagnostics=x_task_diagnostics,
571
- _request_auth=_request_auth,
572
- _content_type=_content_type,
573
- _headers=_headers,
574
- _host_index=_host_index
575
- )
576
-
577
- _response_types_map: Dict[str, Optional[str]] = {
578
- '201': "FileFileRepositoryResponse",
579
- }
580
- response_data = self.api_client.call_api(
581
- *_param,
582
- _request_timeout=_request_timeout
583
- )
584
- return response_data.response
585
-
586
-
587
- def _create_serialize(
588
- self,
589
- pulp_domain,
590
- file_file_repository,
591
- x_task_diagnostics,
592
- _request_auth,
593
- _content_type,
594
- _headers,
595
- _host_index,
596
- ) -> RequestSerialized:
597
-
598
- _host = None
599
-
600
- _collection_formats: Dict[str, str] = {
601
- 'X-Task-Diagnostics': 'csv',
602
- }
603
-
604
- _path_params: Dict[str, str] = {}
605
- _query_params: List[Tuple[str, str]] = []
606
- _header_params: Dict[str, Optional[str]] = _headers or {}
607
- _form_params: List[Tuple[str, str]] = []
608
- _files: Dict[
609
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
610
- ] = {}
611
- _body_params: Optional[bytes] = None
612
-
613
- # process the path parameters
614
- if pulp_domain is not None:
615
- _path_params['pulp_domain'] = pulp_domain
616
- # process the query parameters
617
- # process the header parameters
618
- if x_task_diagnostics is not None:
619
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
620
- # process the form parameters
621
- # process the body parameter
622
- if file_file_repository is not None:
623
- _body_params = file_file_repository
624
-
625
-
626
- # set the HTTP header `Accept`
627
- if 'Accept' not in _header_params:
628
- _header_params['Accept'] = self.api_client.select_header_accept(
629
- [
630
- 'application/json'
631
- ]
632
- )
633
-
634
- # set the HTTP header `Content-Type`
635
- if _content_type:
636
- _header_params['Content-Type'] = _content_type
637
- else:
638
- _default_content_type = (
639
- self.api_client.select_header_content_type(
640
- [
641
- 'application/json',
642
- 'application/x-www-form-urlencoded',
643
- 'multipart/form-data'
644
- ]
645
- )
646
- )
647
- if _default_content_type is not None:
648
- _header_params['Content-Type'] = _default_content_type
649
-
650
- # authentication setting
651
- _auth_settings: List[str] = [
652
- 'json_header_remote_authentication',
653
- 'basicAuth',
654
- 'cookieAuth'
655
- ]
656
-
657
- return self.api_client.param_serialize(
658
- method='POST',
659
- resource_path='/api/pulp/{pulp_domain}/api/v3/repositories/file/file/',
660
- path_params=_path_params,
661
- query_params=_query_params,
662
- header_params=_header_params,
663
- body=_body_params,
664
- post_params=_form_params,
665
- files=_files,
666
- auth_settings=_auth_settings,
667
- collection_formats=_collection_formats,
668
- _host=_host,
669
- _request_auth=_request_auth
670
- )
671
-
672
-
673
-
674
-
675
- @validate_call
676
- def delete(
677
- self,
678
- file_file_repository_href: StrictStr,
679
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
680
- _request_timeout: Union[
681
- None,
682
- Annotated[StrictFloat, Field(gt=0)],
683
- Tuple[
684
- Annotated[StrictFloat, Field(gt=0)],
685
- Annotated[StrictFloat, Field(gt=0)]
686
- ]
687
- ] = None,
688
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
- _content_type: Optional[StrictStr] = None,
690
- _headers: Optional[Dict[StrictStr, Any]] = None,
691
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
- ) -> AsyncOperationResponse:
693
- """Delete a file repository
694
-
695
- Trigger an asynchronous delete task
696
-
697
- :param file_file_repository_href: (required)
698
- :type file_file_repository_href: str
699
- :param x_task_diagnostics: List of profilers to use on tasks.
700
- :type x_task_diagnostics: List[str]
701
- :param _request_timeout: timeout setting for this request. If one
702
- number provided, it will be total request
703
- timeout. It can also be a pair (tuple) of
704
- (connection, read) timeouts.
705
- :type _request_timeout: int, tuple(int, int), optional
706
- :param _request_auth: set to override the auth_settings for an a single
707
- request; this effectively ignores the
708
- authentication in the spec for a single request.
709
- :type _request_auth: dict, optional
710
- :param _content_type: force content-type for the request.
711
- :type _content_type: str, Optional
712
- :param _headers: set to override the headers for a single
713
- request; this effectively ignores the headers
714
- in the spec for a single request.
715
- :type _headers: dict, optional
716
- :param _host_index: set to override the host_index for a single
717
- request; this effectively ignores the host_index
718
- in the spec for a single request.
719
- :type _host_index: int, optional
720
- :return: Returns the result object.
721
- """ # noqa: E501
722
-
723
- _param = self._delete_serialize(
724
- file_file_repository_href=file_file_repository_href,
725
- x_task_diagnostics=x_task_diagnostics,
726
- _request_auth=_request_auth,
727
- _content_type=_content_type,
728
- _headers=_headers,
729
- _host_index=_host_index
730
- )
731
-
732
- _response_types_map: Dict[str, Optional[str]] = {
733
- '202': "AsyncOperationResponse",
734
- }
735
- response_data = self.api_client.call_api(
736
- *_param,
737
- _request_timeout=_request_timeout
738
- )
739
- response_data.read()
740
- return self.api_client.response_deserialize(
741
- response_data=response_data,
742
- response_types_map=_response_types_map,
743
- ).data
744
-
745
-
746
- @validate_call
747
- def delete_with_http_info(
748
- self,
749
- file_file_repository_href: StrictStr,
750
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
751
- _request_timeout: Union[
752
- None,
753
- Annotated[StrictFloat, Field(gt=0)],
754
- Tuple[
755
- Annotated[StrictFloat, Field(gt=0)],
756
- Annotated[StrictFloat, Field(gt=0)]
757
- ]
758
- ] = None,
759
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
760
- _content_type: Optional[StrictStr] = None,
761
- _headers: Optional[Dict[StrictStr, Any]] = None,
762
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
763
- ) -> ApiResponse[AsyncOperationResponse]:
764
- """Delete a file repository
765
-
766
- Trigger an asynchronous delete task
767
-
768
- :param file_file_repository_href: (required)
769
- :type file_file_repository_href: str
770
- :param x_task_diagnostics: List of profilers to use on tasks.
771
- :type x_task_diagnostics: List[str]
772
- :param _request_timeout: timeout setting for this request. If one
773
- number provided, it will be total request
774
- timeout. It can also be a pair (tuple) of
775
- (connection, read) timeouts.
776
- :type _request_timeout: int, tuple(int, int), optional
777
- :param _request_auth: set to override the auth_settings for an a single
778
- request; this effectively ignores the
779
- authentication in the spec for a single request.
780
- :type _request_auth: dict, optional
781
- :param _content_type: force content-type for the request.
782
- :type _content_type: str, Optional
783
- :param _headers: set to override the headers for a single
784
- request; this effectively ignores the headers
785
- in the spec for a single request.
786
- :type _headers: dict, optional
787
- :param _host_index: set to override the host_index for a single
788
- request; this effectively ignores the host_index
789
- in the spec for a single request.
790
- :type _host_index: int, optional
791
- :return: Returns the result object.
792
- """ # noqa: E501
793
-
794
- _param = self._delete_serialize(
795
- file_file_repository_href=file_file_repository_href,
796
- x_task_diagnostics=x_task_diagnostics,
797
- _request_auth=_request_auth,
798
- _content_type=_content_type,
799
- _headers=_headers,
800
- _host_index=_host_index
801
- )
802
-
803
- _response_types_map: Dict[str, Optional[str]] = {
804
- '202': "AsyncOperationResponse",
805
- }
806
- response_data = self.api_client.call_api(
807
- *_param,
808
- _request_timeout=_request_timeout
809
- )
810
- response_data.read()
811
- return self.api_client.response_deserialize(
812
- response_data=response_data,
813
- response_types_map=_response_types_map,
814
- )
815
-
816
-
817
- @validate_call
818
- def delete_without_preload_content(
819
- self,
820
- file_file_repository_href: StrictStr,
821
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
822
- _request_timeout: Union[
823
- None,
824
- Annotated[StrictFloat, Field(gt=0)],
825
- Tuple[
826
- Annotated[StrictFloat, Field(gt=0)],
827
- Annotated[StrictFloat, Field(gt=0)]
828
- ]
829
- ] = None,
830
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
831
- _content_type: Optional[StrictStr] = None,
832
- _headers: Optional[Dict[StrictStr, Any]] = None,
833
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
834
- ) -> RESTResponseType:
835
- """Delete a file repository
836
-
837
- Trigger an asynchronous delete task
838
-
839
- :param file_file_repository_href: (required)
840
- :type file_file_repository_href: str
841
- :param x_task_diagnostics: List of profilers to use on tasks.
842
- :type x_task_diagnostics: List[str]
843
- :param _request_timeout: timeout setting for this request. If one
844
- number provided, it will be total request
845
- timeout. It can also be a pair (tuple) of
846
- (connection, read) timeouts.
847
- :type _request_timeout: int, tuple(int, int), optional
848
- :param _request_auth: set to override the auth_settings for an a single
849
- request; this effectively ignores the
850
- authentication in the spec for a single request.
851
- :type _request_auth: dict, optional
852
- :param _content_type: force content-type for the request.
853
- :type _content_type: str, Optional
854
- :param _headers: set to override the headers for a single
855
- request; this effectively ignores the headers
856
- in the spec for a single request.
857
- :type _headers: dict, optional
858
- :param _host_index: set to override the host_index for a single
859
- request; this effectively ignores the host_index
860
- in the spec for a single request.
861
- :type _host_index: int, optional
862
- :return: Returns the result object.
863
- """ # noqa: E501
864
-
865
- _param = self._delete_serialize(
866
- file_file_repository_href=file_file_repository_href,
867
- x_task_diagnostics=x_task_diagnostics,
868
- _request_auth=_request_auth,
869
- _content_type=_content_type,
870
- _headers=_headers,
871
- _host_index=_host_index
872
- )
873
-
874
- _response_types_map: Dict[str, Optional[str]] = {
875
- '202': "AsyncOperationResponse",
876
- }
877
- response_data = self.api_client.call_api(
878
- *_param,
879
- _request_timeout=_request_timeout
880
- )
881
- return response_data.response
882
-
883
-
884
- def _delete_serialize(
885
- self,
886
- file_file_repository_href,
887
- x_task_diagnostics,
888
- _request_auth,
889
- _content_type,
890
- _headers,
891
- _host_index,
892
- ) -> RequestSerialized:
893
-
894
- _host = None
895
-
896
- _collection_formats: Dict[str, str] = {
897
- 'X-Task-Diagnostics': 'csv',
898
- }
899
-
900
- _path_params: Dict[str, str] = {}
901
- _query_params: List[Tuple[str, str]] = []
902
- _header_params: Dict[str, Optional[str]] = _headers or {}
903
- _form_params: List[Tuple[str, str]] = []
904
- _files: Dict[
905
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
906
- ] = {}
907
- _body_params: Optional[bytes] = None
908
-
909
- # process the path parameters
910
- if file_file_repository_href is not None:
911
- _path_params['file_file_repository_href'] = file_file_repository_href
912
- # process the query parameters
913
- # process the header parameters
914
- if x_task_diagnostics is not None:
915
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
916
- # process the form parameters
917
- # process the body parameter
918
-
919
-
920
- # set the HTTP header `Accept`
921
- if 'Accept' not in _header_params:
922
- _header_params['Accept'] = self.api_client.select_header_accept(
923
- [
924
- 'application/json'
925
- ]
926
- )
927
-
928
-
929
- # authentication setting
930
- _auth_settings: List[str] = [
931
- 'json_header_remote_authentication',
932
- 'basicAuth',
933
- 'cookieAuth'
934
- ]
935
-
936
- return self.api_client.param_serialize(
937
- method='DELETE',
938
- resource_path='{file_file_repository_href}',
939
- path_params=_path_params,
940
- query_params=_query_params,
941
- header_params=_header_params,
942
- body=_body_params,
943
- post_params=_form_params,
944
- files=_files,
945
- auth_settings=_auth_settings,
946
- collection_formats=_collection_formats,
947
- _host=_host,
948
- _request_auth=_request_auth
949
- )
950
-
951
-
952
-
953
-
954
- @validate_call
955
- def list(
956
- self,
957
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
958
- latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
959
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
960
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
961
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
962
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
963
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
964
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
965
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
966
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
967
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
968
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
969
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
970
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
971
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
972
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
973
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
974
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
975
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
976
- remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
977
- retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
978
- retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
979
- retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
980
- retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
981
- retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
982
- retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
983
- retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
984
- retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
985
- with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
986
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
987
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
988
- pulp_domain: StrictStr = "default",
989
- _request_timeout: Union[
990
- None,
991
- Annotated[StrictFloat, Field(gt=0)],
992
- Tuple[
993
- Annotated[StrictFloat, Field(gt=0)],
994
- Annotated[StrictFloat, Field(gt=0)]
995
- ]
996
- ] = None,
997
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
- _content_type: Optional[StrictStr] = None,
999
- _headers: Optional[Dict[StrictStr, Any]] = None,
1000
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
- ) -> PaginatedfileFileRepositoryResponseList:
1002
- """List file repositorys
1003
-
1004
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
1005
-
1006
- :param pulp_domain: (required)
1007
- :type pulp_domain: str
1008
- :param x_task_diagnostics: List of profilers to use on tasks.
1009
- :type x_task_diagnostics: List[str]
1010
- :param latest_with_content: Content Unit referenced by HREF/PRN
1011
- :type latest_with_content: str
1012
- :param limit: Number of results to return per page.
1013
- :type limit: int
1014
- :param name: Filter results where name matches value
1015
- :type name: str
1016
- :param name__contains: Filter results where name contains value
1017
- :type name__contains: str
1018
- :param name__icontains: Filter results where name contains value
1019
- :type name__icontains: str
1020
- :param name__iexact: Filter results where name matches value
1021
- :type name__iexact: str
1022
- :param name__in: Filter results where name is in a comma-separated list of values
1023
- :type name__in: List[str]
1024
- :param name__iregex: Filter results where name matches regex value
1025
- :type name__iregex: str
1026
- :param name__istartswith: Filter results where name starts with value
1027
- :type name__istartswith: str
1028
- :param name__regex: Filter results where name matches regex value
1029
- :type name__regex: str
1030
- :param name__startswith: Filter results where name starts with value
1031
- :type name__startswith: str
1032
- :param offset: The initial index from which to return the results.
1033
- :type offset: int
1034
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1035
- :type ordering: List[str]
1036
- :param prn__in: Multiple values may be separated by commas.
1037
- :type prn__in: List[str]
1038
- :param pulp_href__in: Multiple values may be separated by commas.
1039
- :type pulp_href__in: List[str]
1040
- :param pulp_id__in: Multiple values may be separated by commas.
1041
- :type pulp_id__in: List[str]
1042
- :param pulp_label_select: Filter labels by search string
1043
- :type pulp_label_select: str
1044
- :param q: Filter results by using NOT, AND and OR operations on other filters
1045
- :type q: str
1046
- :param remote: Foreign Key referenced by HREF
1047
- :type remote: str
1048
- :param retain_repo_versions: Filter results where retain_repo_versions matches value
1049
- :type retain_repo_versions: int
1050
- :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1051
- :type retain_repo_versions__gt: int
1052
- :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1053
- :type retain_repo_versions__gte: int
1054
- :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1055
- :type retain_repo_versions__isnull: bool
1056
- :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1057
- :type retain_repo_versions__lt: int
1058
- :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1059
- :type retain_repo_versions__lte: int
1060
- :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1061
- :type retain_repo_versions__ne: int
1062
- :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1063
- :type retain_repo_versions__range: List[int]
1064
- :param with_content: Content Unit referenced by HREF/PRN
1065
- :type with_content: str
1066
- :param fields: A list of fields to include in the response.
1067
- :type fields: List[str]
1068
- :param exclude_fields: A list of fields to exclude from the response.
1069
- :type exclude_fields: List[str]
1070
- :param _request_timeout: timeout setting for this request. If one
1071
- number provided, it will be total request
1072
- timeout. It can also be a pair (tuple) of
1073
- (connection, read) timeouts.
1074
- :type _request_timeout: int, tuple(int, int), optional
1075
- :param _request_auth: set to override the auth_settings for an a single
1076
- request; this effectively ignores the
1077
- authentication in the spec for a single request.
1078
- :type _request_auth: dict, optional
1079
- :param _content_type: force content-type for the request.
1080
- :type _content_type: str, Optional
1081
- :param _headers: set to override the headers for a single
1082
- request; this effectively ignores the headers
1083
- in the spec for a single request.
1084
- :type _headers: dict, optional
1085
- :param _host_index: set to override the host_index for a single
1086
- request; this effectively ignores the host_index
1087
- in the spec for a single request.
1088
- :type _host_index: int, optional
1089
- :return: Returns the result object.
1090
- """ # noqa: E501
1091
-
1092
- _param = self._list_serialize(
1093
- pulp_domain=pulp_domain,
1094
- x_task_diagnostics=x_task_diagnostics,
1095
- latest_with_content=latest_with_content,
1096
- limit=limit,
1097
- name=name,
1098
- name__contains=name__contains,
1099
- name__icontains=name__icontains,
1100
- name__iexact=name__iexact,
1101
- name__in=name__in,
1102
- name__iregex=name__iregex,
1103
- name__istartswith=name__istartswith,
1104
- name__regex=name__regex,
1105
- name__startswith=name__startswith,
1106
- offset=offset,
1107
- ordering=ordering,
1108
- prn__in=prn__in,
1109
- pulp_href__in=pulp_href__in,
1110
- pulp_id__in=pulp_id__in,
1111
- pulp_label_select=pulp_label_select,
1112
- q=q,
1113
- remote=remote,
1114
- retain_repo_versions=retain_repo_versions,
1115
- retain_repo_versions__gt=retain_repo_versions__gt,
1116
- retain_repo_versions__gte=retain_repo_versions__gte,
1117
- retain_repo_versions__isnull=retain_repo_versions__isnull,
1118
- retain_repo_versions__lt=retain_repo_versions__lt,
1119
- retain_repo_versions__lte=retain_repo_versions__lte,
1120
- retain_repo_versions__ne=retain_repo_versions__ne,
1121
- retain_repo_versions__range=retain_repo_versions__range,
1122
- with_content=with_content,
1123
- fields=fields,
1124
- exclude_fields=exclude_fields,
1125
- _request_auth=_request_auth,
1126
- _content_type=_content_type,
1127
- _headers=_headers,
1128
- _host_index=_host_index
1129
- )
1130
-
1131
- _response_types_map: Dict[str, Optional[str]] = {
1132
- '200': "PaginatedfileFileRepositoryResponseList",
1133
- }
1134
- response_data = self.api_client.call_api(
1135
- *_param,
1136
- _request_timeout=_request_timeout
1137
- )
1138
- response_data.read()
1139
- return self.api_client.response_deserialize(
1140
- response_data=response_data,
1141
- response_types_map=_response_types_map,
1142
- ).data
1143
-
1144
-
1145
- @validate_call
1146
- def list_with_http_info(
1147
- self,
1148
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1149
- latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1150
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1151
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1152
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1153
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1154
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1155
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1156
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1157
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1158
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1159
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1160
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1161
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1162
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1163
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1164
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1165
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
1166
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1167
- remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
1168
- retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
1169
- retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
1170
- retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
1171
- retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
1172
- retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
1173
- retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
1174
- retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
1175
- retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
1176
- with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1177
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1178
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1179
- pulp_domain: StrictStr = "default",
1180
- _request_timeout: Union[
1181
- None,
1182
- Annotated[StrictFloat, Field(gt=0)],
1183
- Tuple[
1184
- Annotated[StrictFloat, Field(gt=0)],
1185
- Annotated[StrictFloat, Field(gt=0)]
1186
- ]
1187
- ] = None,
1188
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1189
- _content_type: Optional[StrictStr] = None,
1190
- _headers: Optional[Dict[StrictStr, Any]] = None,
1191
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1192
- ) -> ApiResponse[PaginatedfileFileRepositoryResponseList]:
1193
- """List file repositorys
1194
-
1195
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
1196
-
1197
- :param pulp_domain: (required)
1198
- :type pulp_domain: str
1199
- :param x_task_diagnostics: List of profilers to use on tasks.
1200
- :type x_task_diagnostics: List[str]
1201
- :param latest_with_content: Content Unit referenced by HREF/PRN
1202
- :type latest_with_content: str
1203
- :param limit: Number of results to return per page.
1204
- :type limit: int
1205
- :param name: Filter results where name matches value
1206
- :type name: str
1207
- :param name__contains: Filter results where name contains value
1208
- :type name__contains: str
1209
- :param name__icontains: Filter results where name contains value
1210
- :type name__icontains: str
1211
- :param name__iexact: Filter results where name matches value
1212
- :type name__iexact: str
1213
- :param name__in: Filter results where name is in a comma-separated list of values
1214
- :type name__in: List[str]
1215
- :param name__iregex: Filter results where name matches regex value
1216
- :type name__iregex: str
1217
- :param name__istartswith: Filter results where name starts with value
1218
- :type name__istartswith: str
1219
- :param name__regex: Filter results where name matches regex value
1220
- :type name__regex: str
1221
- :param name__startswith: Filter results where name starts with value
1222
- :type name__startswith: str
1223
- :param offset: The initial index from which to return the results.
1224
- :type offset: int
1225
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1226
- :type ordering: List[str]
1227
- :param prn__in: Multiple values may be separated by commas.
1228
- :type prn__in: List[str]
1229
- :param pulp_href__in: Multiple values may be separated by commas.
1230
- :type pulp_href__in: List[str]
1231
- :param pulp_id__in: Multiple values may be separated by commas.
1232
- :type pulp_id__in: List[str]
1233
- :param pulp_label_select: Filter labels by search string
1234
- :type pulp_label_select: str
1235
- :param q: Filter results by using NOT, AND and OR operations on other filters
1236
- :type q: str
1237
- :param remote: Foreign Key referenced by HREF
1238
- :type remote: str
1239
- :param retain_repo_versions: Filter results where retain_repo_versions matches value
1240
- :type retain_repo_versions: int
1241
- :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1242
- :type retain_repo_versions__gt: int
1243
- :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1244
- :type retain_repo_versions__gte: int
1245
- :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1246
- :type retain_repo_versions__isnull: bool
1247
- :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1248
- :type retain_repo_versions__lt: int
1249
- :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1250
- :type retain_repo_versions__lte: int
1251
- :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1252
- :type retain_repo_versions__ne: int
1253
- :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1254
- :type retain_repo_versions__range: List[int]
1255
- :param with_content: Content Unit referenced by HREF/PRN
1256
- :type with_content: str
1257
- :param fields: A list of fields to include in the response.
1258
- :type fields: List[str]
1259
- :param exclude_fields: A list of fields to exclude from the response.
1260
- :type exclude_fields: List[str]
1261
- :param _request_timeout: timeout setting for this request. If one
1262
- number provided, it will be total request
1263
- timeout. It can also be a pair (tuple) of
1264
- (connection, read) timeouts.
1265
- :type _request_timeout: int, tuple(int, int), optional
1266
- :param _request_auth: set to override the auth_settings for an a single
1267
- request; this effectively ignores the
1268
- authentication in the spec for a single request.
1269
- :type _request_auth: dict, optional
1270
- :param _content_type: force content-type for the request.
1271
- :type _content_type: str, Optional
1272
- :param _headers: set to override the headers for a single
1273
- request; this effectively ignores the headers
1274
- in the spec for a single request.
1275
- :type _headers: dict, optional
1276
- :param _host_index: set to override the host_index for a single
1277
- request; this effectively ignores the host_index
1278
- in the spec for a single request.
1279
- :type _host_index: int, optional
1280
- :return: Returns the result object.
1281
- """ # noqa: E501
1282
-
1283
- _param = self._list_serialize(
1284
- pulp_domain=pulp_domain,
1285
- x_task_diagnostics=x_task_diagnostics,
1286
- latest_with_content=latest_with_content,
1287
- limit=limit,
1288
- name=name,
1289
- name__contains=name__contains,
1290
- name__icontains=name__icontains,
1291
- name__iexact=name__iexact,
1292
- name__in=name__in,
1293
- name__iregex=name__iregex,
1294
- name__istartswith=name__istartswith,
1295
- name__regex=name__regex,
1296
- name__startswith=name__startswith,
1297
- offset=offset,
1298
- ordering=ordering,
1299
- prn__in=prn__in,
1300
- pulp_href__in=pulp_href__in,
1301
- pulp_id__in=pulp_id__in,
1302
- pulp_label_select=pulp_label_select,
1303
- q=q,
1304
- remote=remote,
1305
- retain_repo_versions=retain_repo_versions,
1306
- retain_repo_versions__gt=retain_repo_versions__gt,
1307
- retain_repo_versions__gte=retain_repo_versions__gte,
1308
- retain_repo_versions__isnull=retain_repo_versions__isnull,
1309
- retain_repo_versions__lt=retain_repo_versions__lt,
1310
- retain_repo_versions__lte=retain_repo_versions__lte,
1311
- retain_repo_versions__ne=retain_repo_versions__ne,
1312
- retain_repo_versions__range=retain_repo_versions__range,
1313
- with_content=with_content,
1314
- fields=fields,
1315
- exclude_fields=exclude_fields,
1316
- _request_auth=_request_auth,
1317
- _content_type=_content_type,
1318
- _headers=_headers,
1319
- _host_index=_host_index
1320
- )
1321
-
1322
- _response_types_map: Dict[str, Optional[str]] = {
1323
- '200': "PaginatedfileFileRepositoryResponseList",
1324
- }
1325
- response_data = self.api_client.call_api(
1326
- *_param,
1327
- _request_timeout=_request_timeout
1328
- )
1329
- response_data.read()
1330
- return self.api_client.response_deserialize(
1331
- response_data=response_data,
1332
- response_types_map=_response_types_map,
1333
- )
1334
-
1335
-
1336
- @validate_call
1337
- def list_without_preload_content(
1338
- self,
1339
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1340
- latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1341
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1342
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1343
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1344
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1345
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1346
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1347
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1348
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1349
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1350
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1351
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1352
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1353
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1354
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1355
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1356
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
1357
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1358
- remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
1359
- retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
1360
- retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
1361
- retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
1362
- retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
1363
- retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
1364
- retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
1365
- retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
1366
- retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
1367
- with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1368
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1369
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1370
- pulp_domain: StrictStr = "default",
1371
- _request_timeout: Union[
1372
- None,
1373
- Annotated[StrictFloat, Field(gt=0)],
1374
- Tuple[
1375
- Annotated[StrictFloat, Field(gt=0)],
1376
- Annotated[StrictFloat, Field(gt=0)]
1377
- ]
1378
- ] = None,
1379
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1380
- _content_type: Optional[StrictStr] = None,
1381
- _headers: Optional[Dict[StrictStr, Any]] = None,
1382
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1383
- ) -> RESTResponseType:
1384
- """List file repositorys
1385
-
1386
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
1387
-
1388
- :param pulp_domain: (required)
1389
- :type pulp_domain: str
1390
- :param x_task_diagnostics: List of profilers to use on tasks.
1391
- :type x_task_diagnostics: List[str]
1392
- :param latest_with_content: Content Unit referenced by HREF/PRN
1393
- :type latest_with_content: str
1394
- :param limit: Number of results to return per page.
1395
- :type limit: int
1396
- :param name: Filter results where name matches value
1397
- :type name: str
1398
- :param name__contains: Filter results where name contains value
1399
- :type name__contains: str
1400
- :param name__icontains: Filter results where name contains value
1401
- :type name__icontains: str
1402
- :param name__iexact: Filter results where name matches value
1403
- :type name__iexact: str
1404
- :param name__in: Filter results where name is in a comma-separated list of values
1405
- :type name__in: List[str]
1406
- :param name__iregex: Filter results where name matches regex value
1407
- :type name__iregex: str
1408
- :param name__istartswith: Filter results where name starts with value
1409
- :type name__istartswith: str
1410
- :param name__regex: Filter results where name matches regex value
1411
- :type name__regex: str
1412
- :param name__startswith: Filter results where name starts with value
1413
- :type name__startswith: str
1414
- :param offset: The initial index from which to return the results.
1415
- :type offset: int
1416
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1417
- :type ordering: List[str]
1418
- :param prn__in: Multiple values may be separated by commas.
1419
- :type prn__in: List[str]
1420
- :param pulp_href__in: Multiple values may be separated by commas.
1421
- :type pulp_href__in: List[str]
1422
- :param pulp_id__in: Multiple values may be separated by commas.
1423
- :type pulp_id__in: List[str]
1424
- :param pulp_label_select: Filter labels by search string
1425
- :type pulp_label_select: str
1426
- :param q: Filter results by using NOT, AND and OR operations on other filters
1427
- :type q: str
1428
- :param remote: Foreign Key referenced by HREF
1429
- :type remote: str
1430
- :param retain_repo_versions: Filter results where retain_repo_versions matches value
1431
- :type retain_repo_versions: int
1432
- :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1433
- :type retain_repo_versions__gt: int
1434
- :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1435
- :type retain_repo_versions__gte: int
1436
- :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1437
- :type retain_repo_versions__isnull: bool
1438
- :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1439
- :type retain_repo_versions__lt: int
1440
- :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1441
- :type retain_repo_versions__lte: int
1442
- :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1443
- :type retain_repo_versions__ne: int
1444
- :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1445
- :type retain_repo_versions__range: List[int]
1446
- :param with_content: Content Unit referenced by HREF/PRN
1447
- :type with_content: str
1448
- :param fields: A list of fields to include in the response.
1449
- :type fields: List[str]
1450
- :param exclude_fields: A list of fields to exclude from the response.
1451
- :type exclude_fields: List[str]
1452
- :param _request_timeout: timeout setting for this request. If one
1453
- number provided, it will be total request
1454
- timeout. It can also be a pair (tuple) of
1455
- (connection, read) timeouts.
1456
- :type _request_timeout: int, tuple(int, int), optional
1457
- :param _request_auth: set to override the auth_settings for an a single
1458
- request; this effectively ignores the
1459
- authentication in the spec for a single request.
1460
- :type _request_auth: dict, optional
1461
- :param _content_type: force content-type for the request.
1462
- :type _content_type: str, Optional
1463
- :param _headers: set to override the headers for a single
1464
- request; this effectively ignores the headers
1465
- in the spec for a single request.
1466
- :type _headers: dict, optional
1467
- :param _host_index: set to override the host_index for a single
1468
- request; this effectively ignores the host_index
1469
- in the spec for a single request.
1470
- :type _host_index: int, optional
1471
- :return: Returns the result object.
1472
- """ # noqa: E501
1473
-
1474
- _param = self._list_serialize(
1475
- pulp_domain=pulp_domain,
1476
- x_task_diagnostics=x_task_diagnostics,
1477
- latest_with_content=latest_with_content,
1478
- limit=limit,
1479
- name=name,
1480
- name__contains=name__contains,
1481
- name__icontains=name__icontains,
1482
- name__iexact=name__iexact,
1483
- name__in=name__in,
1484
- name__iregex=name__iregex,
1485
- name__istartswith=name__istartswith,
1486
- name__regex=name__regex,
1487
- name__startswith=name__startswith,
1488
- offset=offset,
1489
- ordering=ordering,
1490
- prn__in=prn__in,
1491
- pulp_href__in=pulp_href__in,
1492
- pulp_id__in=pulp_id__in,
1493
- pulp_label_select=pulp_label_select,
1494
- q=q,
1495
- remote=remote,
1496
- retain_repo_versions=retain_repo_versions,
1497
- retain_repo_versions__gt=retain_repo_versions__gt,
1498
- retain_repo_versions__gte=retain_repo_versions__gte,
1499
- retain_repo_versions__isnull=retain_repo_versions__isnull,
1500
- retain_repo_versions__lt=retain_repo_versions__lt,
1501
- retain_repo_versions__lte=retain_repo_versions__lte,
1502
- retain_repo_versions__ne=retain_repo_versions__ne,
1503
- retain_repo_versions__range=retain_repo_versions__range,
1504
- with_content=with_content,
1505
- fields=fields,
1506
- exclude_fields=exclude_fields,
1507
- _request_auth=_request_auth,
1508
- _content_type=_content_type,
1509
- _headers=_headers,
1510
- _host_index=_host_index
1511
- )
1512
-
1513
- _response_types_map: Dict[str, Optional[str]] = {
1514
- '200': "PaginatedfileFileRepositoryResponseList",
1515
- }
1516
- response_data = self.api_client.call_api(
1517
- *_param,
1518
- _request_timeout=_request_timeout
1519
- )
1520
- return response_data.response
1521
-
1522
-
1523
- def _list_serialize(
1524
- self,
1525
- pulp_domain,
1526
- x_task_diagnostics,
1527
- latest_with_content,
1528
- limit,
1529
- name,
1530
- name__contains,
1531
- name__icontains,
1532
- name__iexact,
1533
- name__in,
1534
- name__iregex,
1535
- name__istartswith,
1536
- name__regex,
1537
- name__startswith,
1538
- offset,
1539
- ordering,
1540
- prn__in,
1541
- pulp_href__in,
1542
- pulp_id__in,
1543
- pulp_label_select,
1544
- q,
1545
- remote,
1546
- retain_repo_versions,
1547
- retain_repo_versions__gt,
1548
- retain_repo_versions__gte,
1549
- retain_repo_versions__isnull,
1550
- retain_repo_versions__lt,
1551
- retain_repo_versions__lte,
1552
- retain_repo_versions__ne,
1553
- retain_repo_versions__range,
1554
- with_content,
1555
- fields,
1556
- exclude_fields,
1557
- _request_auth,
1558
- _content_type,
1559
- _headers,
1560
- _host_index,
1561
- ) -> RequestSerialized:
1562
-
1563
- _host = None
1564
-
1565
- _collection_formats: Dict[str, str] = {
1566
- 'X-Task-Diagnostics': 'csv',
1567
- 'name__in': 'csv',
1568
- 'ordering': 'csv',
1569
- 'prn__in': 'csv',
1570
- 'pulp_href__in': 'csv',
1571
- 'pulp_id__in': 'csv',
1572
- 'retain_repo_versions__range': 'csv',
1573
- 'fields': 'multi',
1574
- 'exclude_fields': 'multi',
1575
- }
1576
-
1577
- _path_params: Dict[str, str] = {}
1578
- _query_params: List[Tuple[str, str]] = []
1579
- _header_params: Dict[str, Optional[str]] = _headers or {}
1580
- _form_params: List[Tuple[str, str]] = []
1581
- _files: Dict[
1582
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1583
- ] = {}
1584
- _body_params: Optional[bytes] = None
1585
-
1586
- # process the path parameters
1587
- if pulp_domain is not None:
1588
- _path_params['pulp_domain'] = pulp_domain
1589
- # process the query parameters
1590
- if latest_with_content is not None:
1591
-
1592
- _query_params.append(('latest_with_content', latest_with_content))
1593
-
1594
- if limit is not None:
1595
-
1596
- _query_params.append(('limit', limit))
1597
-
1598
- if name is not None:
1599
-
1600
- _query_params.append(('name', name))
1601
-
1602
- if name__contains is not None:
1603
-
1604
- _query_params.append(('name__contains', name__contains))
1605
-
1606
- if name__icontains is not None:
1607
-
1608
- _query_params.append(('name__icontains', name__icontains))
1609
-
1610
- if name__iexact is not None:
1611
-
1612
- _query_params.append(('name__iexact', name__iexact))
1613
-
1614
- if name__in is not None:
1615
-
1616
- _query_params.append(('name__in', name__in))
1617
-
1618
- if name__iregex is not None:
1619
-
1620
- _query_params.append(('name__iregex', name__iregex))
1621
-
1622
- if name__istartswith is not None:
1623
-
1624
- _query_params.append(('name__istartswith', name__istartswith))
1625
-
1626
- if name__regex is not None:
1627
-
1628
- _query_params.append(('name__regex', name__regex))
1629
-
1630
- if name__startswith is not None:
1631
-
1632
- _query_params.append(('name__startswith', name__startswith))
1633
-
1634
- if offset is not None:
1635
-
1636
- _query_params.append(('offset', offset))
1637
-
1638
- if ordering is not None:
1639
-
1640
- _query_params.append(('ordering', ordering))
1641
-
1642
- if prn__in is not None:
1643
-
1644
- _query_params.append(('prn__in', prn__in))
1645
-
1646
- if pulp_href__in is not None:
1647
-
1648
- _query_params.append(('pulp_href__in', pulp_href__in))
1649
-
1650
- if pulp_id__in is not None:
1651
-
1652
- _query_params.append(('pulp_id__in', pulp_id__in))
1653
-
1654
- if pulp_label_select is not None:
1655
-
1656
- _query_params.append(('pulp_label_select', pulp_label_select))
1657
-
1658
- if q is not None:
1659
-
1660
- _query_params.append(('q', q))
1661
-
1662
- if remote is not None:
1663
-
1664
- _query_params.append(('remote', remote))
1665
-
1666
- if retain_repo_versions is not None:
1667
-
1668
- _query_params.append(('retain_repo_versions', retain_repo_versions))
1669
-
1670
- if retain_repo_versions__gt is not None:
1671
-
1672
- _query_params.append(('retain_repo_versions__gt', retain_repo_versions__gt))
1673
-
1674
- if retain_repo_versions__gte is not None:
1675
-
1676
- _query_params.append(('retain_repo_versions__gte', retain_repo_versions__gte))
1677
-
1678
- if retain_repo_versions__isnull is not None:
1679
-
1680
- _query_params.append(('retain_repo_versions__isnull', retain_repo_versions__isnull))
1681
-
1682
- if retain_repo_versions__lt is not None:
1683
-
1684
- _query_params.append(('retain_repo_versions__lt', retain_repo_versions__lt))
1685
-
1686
- if retain_repo_versions__lte is not None:
1687
-
1688
- _query_params.append(('retain_repo_versions__lte', retain_repo_versions__lte))
1689
-
1690
- if retain_repo_versions__ne is not None:
1691
-
1692
- _query_params.append(('retain_repo_versions__ne', retain_repo_versions__ne))
1693
-
1694
- if retain_repo_versions__range is not None:
1695
-
1696
- _query_params.append(('retain_repo_versions__range', retain_repo_versions__range))
1697
-
1698
- if with_content is not None:
1699
-
1700
- _query_params.append(('with_content', with_content))
1701
-
1702
- if fields is not None:
1703
-
1704
- _query_params.append(('fields', fields))
1705
-
1706
- if exclude_fields is not None:
1707
-
1708
- _query_params.append(('exclude_fields', exclude_fields))
1709
-
1710
- # process the header parameters
1711
- if x_task_diagnostics is not None:
1712
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1713
- # process the form parameters
1714
- # process the body parameter
1715
-
1716
-
1717
- # set the HTTP header `Accept`
1718
- if 'Accept' not in _header_params:
1719
- _header_params['Accept'] = self.api_client.select_header_accept(
1720
- [
1721
- 'application/json'
1722
- ]
1723
- )
1724
-
1725
-
1726
- # authentication setting
1727
- _auth_settings: List[str] = [
1728
- 'json_header_remote_authentication',
1729
- 'basicAuth',
1730
- 'cookieAuth'
1731
- ]
1732
-
1733
- return self.api_client.param_serialize(
1734
- method='GET',
1735
- resource_path='/api/pulp/{pulp_domain}/api/v3/repositories/file/file/',
1736
- path_params=_path_params,
1737
- query_params=_query_params,
1738
- header_params=_header_params,
1739
- body=_body_params,
1740
- post_params=_form_params,
1741
- files=_files,
1742
- auth_settings=_auth_settings,
1743
- collection_formats=_collection_formats,
1744
- _host=_host,
1745
- _request_auth=_request_auth
1746
- )
1747
-
1748
-
1749
-
1750
-
1751
- @validate_call
1752
- def list_roles(
1753
- self,
1754
- file_file_repository_href: StrictStr,
1755
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1756
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1757
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1758
- _request_timeout: Union[
1759
- None,
1760
- Annotated[StrictFloat, Field(gt=0)],
1761
- Tuple[
1762
- Annotated[StrictFloat, Field(gt=0)],
1763
- Annotated[StrictFloat, Field(gt=0)]
1764
- ]
1765
- ] = None,
1766
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1767
- _content_type: Optional[StrictStr] = None,
1768
- _headers: Optional[Dict[StrictStr, Any]] = None,
1769
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1770
- ) -> ObjectRolesResponse:
1771
- """List roles
1772
-
1773
- List roles assigned to this object.
1774
-
1775
- :param file_file_repository_href: (required)
1776
- :type file_file_repository_href: str
1777
- :param x_task_diagnostics: List of profilers to use on tasks.
1778
- :type x_task_diagnostics: List[str]
1779
- :param fields: A list of fields to include in the response.
1780
- :type fields: List[str]
1781
- :param exclude_fields: A list of fields to exclude from the response.
1782
- :type exclude_fields: List[str]
1783
- :param _request_timeout: timeout setting for this request. If one
1784
- number provided, it will be total request
1785
- timeout. It can also be a pair (tuple) of
1786
- (connection, read) timeouts.
1787
- :type _request_timeout: int, tuple(int, int), optional
1788
- :param _request_auth: set to override the auth_settings for an a single
1789
- request; this effectively ignores the
1790
- authentication in the spec for a single request.
1791
- :type _request_auth: dict, optional
1792
- :param _content_type: force content-type for the request.
1793
- :type _content_type: str, Optional
1794
- :param _headers: set to override the headers for a single
1795
- request; this effectively ignores the headers
1796
- in the spec for a single request.
1797
- :type _headers: dict, optional
1798
- :param _host_index: set to override the host_index for a single
1799
- request; this effectively ignores the host_index
1800
- in the spec for a single request.
1801
- :type _host_index: int, optional
1802
- :return: Returns the result object.
1803
- """ # noqa: E501
1804
-
1805
- _param = self._list_roles_serialize(
1806
- file_file_repository_href=file_file_repository_href,
1807
- x_task_diagnostics=x_task_diagnostics,
1808
- fields=fields,
1809
- exclude_fields=exclude_fields,
1810
- _request_auth=_request_auth,
1811
- _content_type=_content_type,
1812
- _headers=_headers,
1813
- _host_index=_host_index
1814
- )
1815
-
1816
- _response_types_map: Dict[str, Optional[str]] = {
1817
- '200': "ObjectRolesResponse",
1818
- }
1819
- response_data = self.api_client.call_api(
1820
- *_param,
1821
- _request_timeout=_request_timeout
1822
- )
1823
- response_data.read()
1824
- return self.api_client.response_deserialize(
1825
- response_data=response_data,
1826
- response_types_map=_response_types_map,
1827
- ).data
1828
-
1829
-
1830
- @validate_call
1831
- def list_roles_with_http_info(
1832
- self,
1833
- file_file_repository_href: StrictStr,
1834
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1835
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1836
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1837
- _request_timeout: Union[
1838
- None,
1839
- Annotated[StrictFloat, Field(gt=0)],
1840
- Tuple[
1841
- Annotated[StrictFloat, Field(gt=0)],
1842
- Annotated[StrictFloat, Field(gt=0)]
1843
- ]
1844
- ] = None,
1845
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1846
- _content_type: Optional[StrictStr] = None,
1847
- _headers: Optional[Dict[StrictStr, Any]] = None,
1848
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1849
- ) -> ApiResponse[ObjectRolesResponse]:
1850
- """List roles
1851
-
1852
- List roles assigned to this object.
1853
-
1854
- :param file_file_repository_href: (required)
1855
- :type file_file_repository_href: str
1856
- :param x_task_diagnostics: List of profilers to use on tasks.
1857
- :type x_task_diagnostics: List[str]
1858
- :param fields: A list of fields to include in the response.
1859
- :type fields: List[str]
1860
- :param exclude_fields: A list of fields to exclude from the response.
1861
- :type exclude_fields: List[str]
1862
- :param _request_timeout: timeout setting for this request. If one
1863
- number provided, it will be total request
1864
- timeout. It can also be a pair (tuple) of
1865
- (connection, read) timeouts.
1866
- :type _request_timeout: int, tuple(int, int), optional
1867
- :param _request_auth: set to override the auth_settings for an a single
1868
- request; this effectively ignores the
1869
- authentication in the spec for a single request.
1870
- :type _request_auth: dict, optional
1871
- :param _content_type: force content-type for the request.
1872
- :type _content_type: str, Optional
1873
- :param _headers: set to override the headers for a single
1874
- request; this effectively ignores the headers
1875
- in the spec for a single request.
1876
- :type _headers: dict, optional
1877
- :param _host_index: set to override the host_index for a single
1878
- request; this effectively ignores the host_index
1879
- in the spec for a single request.
1880
- :type _host_index: int, optional
1881
- :return: Returns the result object.
1882
- """ # noqa: E501
1883
-
1884
- _param = self._list_roles_serialize(
1885
- file_file_repository_href=file_file_repository_href,
1886
- x_task_diagnostics=x_task_diagnostics,
1887
- fields=fields,
1888
- exclude_fields=exclude_fields,
1889
- _request_auth=_request_auth,
1890
- _content_type=_content_type,
1891
- _headers=_headers,
1892
- _host_index=_host_index
1893
- )
1894
-
1895
- _response_types_map: Dict[str, Optional[str]] = {
1896
- '200': "ObjectRolesResponse",
1897
- }
1898
- response_data = self.api_client.call_api(
1899
- *_param,
1900
- _request_timeout=_request_timeout
1901
- )
1902
- response_data.read()
1903
- return self.api_client.response_deserialize(
1904
- response_data=response_data,
1905
- response_types_map=_response_types_map,
1906
- )
1907
-
1908
-
1909
- @validate_call
1910
- def list_roles_without_preload_content(
1911
- self,
1912
- file_file_repository_href: StrictStr,
1913
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1914
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1915
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1916
- _request_timeout: Union[
1917
- None,
1918
- Annotated[StrictFloat, Field(gt=0)],
1919
- Tuple[
1920
- Annotated[StrictFloat, Field(gt=0)],
1921
- Annotated[StrictFloat, Field(gt=0)]
1922
- ]
1923
- ] = None,
1924
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1925
- _content_type: Optional[StrictStr] = None,
1926
- _headers: Optional[Dict[StrictStr, Any]] = None,
1927
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1928
- ) -> RESTResponseType:
1929
- """List roles
1930
-
1931
- List roles assigned to this object.
1932
-
1933
- :param file_file_repository_href: (required)
1934
- :type file_file_repository_href: str
1935
- :param x_task_diagnostics: List of profilers to use on tasks.
1936
- :type x_task_diagnostics: List[str]
1937
- :param fields: A list of fields to include in the response.
1938
- :type fields: List[str]
1939
- :param exclude_fields: A list of fields to exclude from the response.
1940
- :type exclude_fields: List[str]
1941
- :param _request_timeout: timeout setting for this request. If one
1942
- number provided, it will be total request
1943
- timeout. It can also be a pair (tuple) of
1944
- (connection, read) timeouts.
1945
- :type _request_timeout: int, tuple(int, int), optional
1946
- :param _request_auth: set to override the auth_settings for an a single
1947
- request; this effectively ignores the
1948
- authentication in the spec for a single request.
1949
- :type _request_auth: dict, optional
1950
- :param _content_type: force content-type for the request.
1951
- :type _content_type: str, Optional
1952
- :param _headers: set to override the headers for a single
1953
- request; this effectively ignores the headers
1954
- in the spec for a single request.
1955
- :type _headers: dict, optional
1956
- :param _host_index: set to override the host_index for a single
1957
- request; this effectively ignores the host_index
1958
- in the spec for a single request.
1959
- :type _host_index: int, optional
1960
- :return: Returns the result object.
1961
- """ # noqa: E501
1962
-
1963
- _param = self._list_roles_serialize(
1964
- file_file_repository_href=file_file_repository_href,
1965
- x_task_diagnostics=x_task_diagnostics,
1966
- fields=fields,
1967
- exclude_fields=exclude_fields,
1968
- _request_auth=_request_auth,
1969
- _content_type=_content_type,
1970
- _headers=_headers,
1971
- _host_index=_host_index
1972
- )
1973
-
1974
- _response_types_map: Dict[str, Optional[str]] = {
1975
- '200': "ObjectRolesResponse",
1976
- }
1977
- response_data = self.api_client.call_api(
1978
- *_param,
1979
- _request_timeout=_request_timeout
1980
- )
1981
- return response_data.response
1982
-
1983
-
1984
- def _list_roles_serialize(
1985
- self,
1986
- file_file_repository_href,
1987
- x_task_diagnostics,
1988
- fields,
1989
- exclude_fields,
1990
- _request_auth,
1991
- _content_type,
1992
- _headers,
1993
- _host_index,
1994
- ) -> RequestSerialized:
1995
-
1996
- _host = None
1997
-
1998
- _collection_formats: Dict[str, str] = {
1999
- 'X-Task-Diagnostics': 'csv',
2000
- 'fields': 'multi',
2001
- 'exclude_fields': 'multi',
2002
- }
2003
-
2004
- _path_params: Dict[str, str] = {}
2005
- _query_params: List[Tuple[str, str]] = []
2006
- _header_params: Dict[str, Optional[str]] = _headers or {}
2007
- _form_params: List[Tuple[str, str]] = []
2008
- _files: Dict[
2009
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2010
- ] = {}
2011
- _body_params: Optional[bytes] = None
2012
-
2013
- # process the path parameters
2014
- if file_file_repository_href is not None:
2015
- _path_params['file_file_repository_href'] = file_file_repository_href
2016
- # process the query parameters
2017
- if fields is not None:
2018
-
2019
- _query_params.append(('fields', fields))
2020
-
2021
- if exclude_fields is not None:
2022
-
2023
- _query_params.append(('exclude_fields', exclude_fields))
2024
-
2025
- # process the header parameters
2026
- if x_task_diagnostics is not None:
2027
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2028
- # process the form parameters
2029
- # process the body parameter
2030
-
2031
-
2032
- # set the HTTP header `Accept`
2033
- if 'Accept' not in _header_params:
2034
- _header_params['Accept'] = self.api_client.select_header_accept(
2035
- [
2036
- 'application/json'
2037
- ]
2038
- )
2039
-
2040
-
2041
- # authentication setting
2042
- _auth_settings: List[str] = [
2043
- 'json_header_remote_authentication',
2044
- 'basicAuth',
2045
- 'cookieAuth'
2046
- ]
2047
-
2048
- return self.api_client.param_serialize(
2049
- method='GET',
2050
- resource_path='{file_file_repository_href}list_roles/',
2051
- path_params=_path_params,
2052
- query_params=_query_params,
2053
- header_params=_header_params,
2054
- body=_body_params,
2055
- post_params=_form_params,
2056
- files=_files,
2057
- auth_settings=_auth_settings,
2058
- collection_formats=_collection_formats,
2059
- _host=_host,
2060
- _request_auth=_request_auth
2061
- )
2062
-
2063
-
2064
-
2065
-
2066
- @validate_call
2067
- def modify(
2068
- self,
2069
- file_file_repository_href: StrictStr,
2070
- repository_add_remove_content: RepositoryAddRemoveContent,
2071
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2072
- _request_timeout: Union[
2073
- None,
2074
- Annotated[StrictFloat, Field(gt=0)],
2075
- Tuple[
2076
- Annotated[StrictFloat, Field(gt=0)],
2077
- Annotated[StrictFloat, Field(gt=0)]
2078
- ]
2079
- ] = None,
2080
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2081
- _content_type: Optional[StrictStr] = None,
2082
- _headers: Optional[Dict[StrictStr, Any]] = None,
2083
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2084
- ) -> AsyncOperationResponse:
2085
- """Modify Repository Content
2086
-
2087
- Trigger an asynchronous task to create a new repository version.
2088
-
2089
- :param file_file_repository_href: (required)
2090
- :type file_file_repository_href: str
2091
- :param repository_add_remove_content: (required)
2092
- :type repository_add_remove_content: RepositoryAddRemoveContent
2093
- :param x_task_diagnostics: List of profilers to use on tasks.
2094
- :type x_task_diagnostics: List[str]
2095
- :param _request_timeout: timeout setting for this request. If one
2096
- number provided, it will be total request
2097
- timeout. It can also be a pair (tuple) of
2098
- (connection, read) timeouts.
2099
- :type _request_timeout: int, tuple(int, int), optional
2100
- :param _request_auth: set to override the auth_settings for an a single
2101
- request; this effectively ignores the
2102
- authentication in the spec for a single request.
2103
- :type _request_auth: dict, optional
2104
- :param _content_type: force content-type for the request.
2105
- :type _content_type: str, Optional
2106
- :param _headers: set to override the headers for a single
2107
- request; this effectively ignores the headers
2108
- in the spec for a single request.
2109
- :type _headers: dict, optional
2110
- :param _host_index: set to override the host_index for a single
2111
- request; this effectively ignores the host_index
2112
- in the spec for a single request.
2113
- :type _host_index: int, optional
2114
- :return: Returns the result object.
2115
- """ # noqa: E501
2116
-
2117
- _param = self._modify_serialize(
2118
- file_file_repository_href=file_file_repository_href,
2119
- repository_add_remove_content=repository_add_remove_content,
2120
- x_task_diagnostics=x_task_diagnostics,
2121
- _request_auth=_request_auth,
2122
- _content_type=_content_type,
2123
- _headers=_headers,
2124
- _host_index=_host_index
2125
- )
2126
-
2127
- _response_types_map: Dict[str, Optional[str]] = {
2128
- '202': "AsyncOperationResponse",
2129
- }
2130
- response_data = self.api_client.call_api(
2131
- *_param,
2132
- _request_timeout=_request_timeout
2133
- )
2134
- response_data.read()
2135
- return self.api_client.response_deserialize(
2136
- response_data=response_data,
2137
- response_types_map=_response_types_map,
2138
- ).data
2139
-
2140
-
2141
- @validate_call
2142
- def modify_with_http_info(
2143
- self,
2144
- file_file_repository_href: StrictStr,
2145
- repository_add_remove_content: RepositoryAddRemoveContent,
2146
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2147
- _request_timeout: Union[
2148
- None,
2149
- Annotated[StrictFloat, Field(gt=0)],
2150
- Tuple[
2151
- Annotated[StrictFloat, Field(gt=0)],
2152
- Annotated[StrictFloat, Field(gt=0)]
2153
- ]
2154
- ] = None,
2155
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2156
- _content_type: Optional[StrictStr] = None,
2157
- _headers: Optional[Dict[StrictStr, Any]] = None,
2158
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2159
- ) -> ApiResponse[AsyncOperationResponse]:
2160
- """Modify Repository Content
2161
-
2162
- Trigger an asynchronous task to create a new repository version.
2163
-
2164
- :param file_file_repository_href: (required)
2165
- :type file_file_repository_href: str
2166
- :param repository_add_remove_content: (required)
2167
- :type repository_add_remove_content: RepositoryAddRemoveContent
2168
- :param x_task_diagnostics: List of profilers to use on tasks.
2169
- :type x_task_diagnostics: List[str]
2170
- :param _request_timeout: timeout setting for this request. If one
2171
- number provided, it will be total request
2172
- timeout. It can also be a pair (tuple) of
2173
- (connection, read) timeouts.
2174
- :type _request_timeout: int, tuple(int, int), optional
2175
- :param _request_auth: set to override the auth_settings for an a single
2176
- request; this effectively ignores the
2177
- authentication in the spec for a single request.
2178
- :type _request_auth: dict, optional
2179
- :param _content_type: force content-type for the request.
2180
- :type _content_type: str, Optional
2181
- :param _headers: set to override the headers for a single
2182
- request; this effectively ignores the headers
2183
- in the spec for a single request.
2184
- :type _headers: dict, optional
2185
- :param _host_index: set to override the host_index for a single
2186
- request; this effectively ignores the host_index
2187
- in the spec for a single request.
2188
- :type _host_index: int, optional
2189
- :return: Returns the result object.
2190
- """ # noqa: E501
2191
-
2192
- _param = self._modify_serialize(
2193
- file_file_repository_href=file_file_repository_href,
2194
- repository_add_remove_content=repository_add_remove_content,
2195
- x_task_diagnostics=x_task_diagnostics,
2196
- _request_auth=_request_auth,
2197
- _content_type=_content_type,
2198
- _headers=_headers,
2199
- _host_index=_host_index
2200
- )
2201
-
2202
- _response_types_map: Dict[str, Optional[str]] = {
2203
- '202': "AsyncOperationResponse",
2204
- }
2205
- response_data = self.api_client.call_api(
2206
- *_param,
2207
- _request_timeout=_request_timeout
2208
- )
2209
- response_data.read()
2210
- return self.api_client.response_deserialize(
2211
- response_data=response_data,
2212
- response_types_map=_response_types_map,
2213
- )
2214
-
2215
-
2216
- @validate_call
2217
- def modify_without_preload_content(
2218
- self,
2219
- file_file_repository_href: StrictStr,
2220
- repository_add_remove_content: RepositoryAddRemoveContent,
2221
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2222
- _request_timeout: Union[
2223
- None,
2224
- Annotated[StrictFloat, Field(gt=0)],
2225
- Tuple[
2226
- Annotated[StrictFloat, Field(gt=0)],
2227
- Annotated[StrictFloat, Field(gt=0)]
2228
- ]
2229
- ] = None,
2230
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2231
- _content_type: Optional[StrictStr] = None,
2232
- _headers: Optional[Dict[StrictStr, Any]] = None,
2233
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2234
- ) -> RESTResponseType:
2235
- """Modify Repository Content
2236
-
2237
- Trigger an asynchronous task to create a new repository version.
2238
-
2239
- :param file_file_repository_href: (required)
2240
- :type file_file_repository_href: str
2241
- :param repository_add_remove_content: (required)
2242
- :type repository_add_remove_content: RepositoryAddRemoveContent
2243
- :param x_task_diagnostics: List of profilers to use on tasks.
2244
- :type x_task_diagnostics: List[str]
2245
- :param _request_timeout: timeout setting for this request. If one
2246
- number provided, it will be total request
2247
- timeout. It can also be a pair (tuple) of
2248
- (connection, read) timeouts.
2249
- :type _request_timeout: int, tuple(int, int), optional
2250
- :param _request_auth: set to override the auth_settings for an a single
2251
- request; this effectively ignores the
2252
- authentication in the spec for a single request.
2253
- :type _request_auth: dict, optional
2254
- :param _content_type: force content-type for the request.
2255
- :type _content_type: str, Optional
2256
- :param _headers: set to override the headers for a single
2257
- request; this effectively ignores the headers
2258
- in the spec for a single request.
2259
- :type _headers: dict, optional
2260
- :param _host_index: set to override the host_index for a single
2261
- request; this effectively ignores the host_index
2262
- in the spec for a single request.
2263
- :type _host_index: int, optional
2264
- :return: Returns the result object.
2265
- """ # noqa: E501
2266
-
2267
- _param = self._modify_serialize(
2268
- file_file_repository_href=file_file_repository_href,
2269
- repository_add_remove_content=repository_add_remove_content,
2270
- x_task_diagnostics=x_task_diagnostics,
2271
- _request_auth=_request_auth,
2272
- _content_type=_content_type,
2273
- _headers=_headers,
2274
- _host_index=_host_index
2275
- )
2276
-
2277
- _response_types_map: Dict[str, Optional[str]] = {
2278
- '202': "AsyncOperationResponse",
2279
- }
2280
- response_data = self.api_client.call_api(
2281
- *_param,
2282
- _request_timeout=_request_timeout
2283
- )
2284
- return response_data.response
2285
-
2286
-
2287
- def _modify_serialize(
2288
- self,
2289
- file_file_repository_href,
2290
- repository_add_remove_content,
2291
- x_task_diagnostics,
2292
- _request_auth,
2293
- _content_type,
2294
- _headers,
2295
- _host_index,
2296
- ) -> RequestSerialized:
2297
-
2298
- _host = None
2299
-
2300
- _collection_formats: Dict[str, str] = {
2301
- 'X-Task-Diagnostics': 'csv',
2302
- }
2303
-
2304
- _path_params: Dict[str, str] = {}
2305
- _query_params: List[Tuple[str, str]] = []
2306
- _header_params: Dict[str, Optional[str]] = _headers or {}
2307
- _form_params: List[Tuple[str, str]] = []
2308
- _files: Dict[
2309
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2310
- ] = {}
2311
- _body_params: Optional[bytes] = None
2312
-
2313
- # process the path parameters
2314
- if file_file_repository_href is not None:
2315
- _path_params['file_file_repository_href'] = file_file_repository_href
2316
- # process the query parameters
2317
- # process the header parameters
2318
- if x_task_diagnostics is not None:
2319
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2320
- # process the form parameters
2321
- # process the body parameter
2322
- if repository_add_remove_content is not None:
2323
- _body_params = repository_add_remove_content
2324
-
2325
-
2326
- # set the HTTP header `Accept`
2327
- if 'Accept' not in _header_params:
2328
- _header_params['Accept'] = self.api_client.select_header_accept(
2329
- [
2330
- 'application/json'
2331
- ]
2332
- )
2333
-
2334
- # set the HTTP header `Content-Type`
2335
- if _content_type:
2336
- _header_params['Content-Type'] = _content_type
2337
- else:
2338
- _default_content_type = (
2339
- self.api_client.select_header_content_type(
2340
- [
2341
- 'application/json',
2342
- 'application/x-www-form-urlencoded',
2343
- 'multipart/form-data'
2344
- ]
2345
- )
2346
- )
2347
- if _default_content_type is not None:
2348
- _header_params['Content-Type'] = _default_content_type
2349
-
2350
- # authentication setting
2351
- _auth_settings: List[str] = [
2352
- 'json_header_remote_authentication',
2353
- 'basicAuth',
2354
- 'cookieAuth'
2355
- ]
2356
-
2357
- return self.api_client.param_serialize(
2358
- method='POST',
2359
- resource_path='{file_file_repository_href}modify/',
2360
- path_params=_path_params,
2361
- query_params=_query_params,
2362
- header_params=_header_params,
2363
- body=_body_params,
2364
- post_params=_form_params,
2365
- files=_files,
2366
- auth_settings=_auth_settings,
2367
- collection_formats=_collection_formats,
2368
- _host=_host,
2369
- _request_auth=_request_auth
2370
- )
2371
-
2372
-
2373
-
2374
-
2375
- @validate_call
2376
- def my_permissions(
2377
- self,
2378
- file_file_repository_href: StrictStr,
2379
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2380
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2381
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2382
- _request_timeout: Union[
2383
- None,
2384
- Annotated[StrictFloat, Field(gt=0)],
2385
- Tuple[
2386
- Annotated[StrictFloat, Field(gt=0)],
2387
- Annotated[StrictFloat, Field(gt=0)]
2388
- ]
2389
- ] = None,
2390
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2391
- _content_type: Optional[StrictStr] = None,
2392
- _headers: Optional[Dict[StrictStr, Any]] = None,
2393
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2394
- ) -> MyPermissionsResponse:
2395
- """List user permissions
2396
-
2397
- List permissions available to the current user on this object.
2398
-
2399
- :param file_file_repository_href: (required)
2400
- :type file_file_repository_href: str
2401
- :param x_task_diagnostics: List of profilers to use on tasks.
2402
- :type x_task_diagnostics: List[str]
2403
- :param fields: A list of fields to include in the response.
2404
- :type fields: List[str]
2405
- :param exclude_fields: A list of fields to exclude from the response.
2406
- :type exclude_fields: List[str]
2407
- :param _request_timeout: timeout setting for this request. If one
2408
- number provided, it will be total request
2409
- timeout. It can also be a pair (tuple) of
2410
- (connection, read) timeouts.
2411
- :type _request_timeout: int, tuple(int, int), optional
2412
- :param _request_auth: set to override the auth_settings for an a single
2413
- request; this effectively ignores the
2414
- authentication in the spec for a single request.
2415
- :type _request_auth: dict, optional
2416
- :param _content_type: force content-type for the request.
2417
- :type _content_type: str, Optional
2418
- :param _headers: set to override the headers for a single
2419
- request; this effectively ignores the headers
2420
- in the spec for a single request.
2421
- :type _headers: dict, optional
2422
- :param _host_index: set to override the host_index for a single
2423
- request; this effectively ignores the host_index
2424
- in the spec for a single request.
2425
- :type _host_index: int, optional
2426
- :return: Returns the result object.
2427
- """ # noqa: E501
2428
-
2429
- _param = self._my_permissions_serialize(
2430
- file_file_repository_href=file_file_repository_href,
2431
- x_task_diagnostics=x_task_diagnostics,
2432
- fields=fields,
2433
- exclude_fields=exclude_fields,
2434
- _request_auth=_request_auth,
2435
- _content_type=_content_type,
2436
- _headers=_headers,
2437
- _host_index=_host_index
2438
- )
2439
-
2440
- _response_types_map: Dict[str, Optional[str]] = {
2441
- '200': "MyPermissionsResponse",
2442
- }
2443
- response_data = self.api_client.call_api(
2444
- *_param,
2445
- _request_timeout=_request_timeout
2446
- )
2447
- response_data.read()
2448
- return self.api_client.response_deserialize(
2449
- response_data=response_data,
2450
- response_types_map=_response_types_map,
2451
- ).data
2452
-
2453
-
2454
- @validate_call
2455
- def my_permissions_with_http_info(
2456
- self,
2457
- file_file_repository_href: StrictStr,
2458
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2459
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2460
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2461
- _request_timeout: Union[
2462
- None,
2463
- Annotated[StrictFloat, Field(gt=0)],
2464
- Tuple[
2465
- Annotated[StrictFloat, Field(gt=0)],
2466
- Annotated[StrictFloat, Field(gt=0)]
2467
- ]
2468
- ] = None,
2469
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2470
- _content_type: Optional[StrictStr] = None,
2471
- _headers: Optional[Dict[StrictStr, Any]] = None,
2472
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2473
- ) -> ApiResponse[MyPermissionsResponse]:
2474
- """List user permissions
2475
-
2476
- List permissions available to the current user on this object.
2477
-
2478
- :param file_file_repository_href: (required)
2479
- :type file_file_repository_href: str
2480
- :param x_task_diagnostics: List of profilers to use on tasks.
2481
- :type x_task_diagnostics: List[str]
2482
- :param fields: A list of fields to include in the response.
2483
- :type fields: List[str]
2484
- :param exclude_fields: A list of fields to exclude from the response.
2485
- :type exclude_fields: List[str]
2486
- :param _request_timeout: timeout setting for this request. If one
2487
- number provided, it will be total request
2488
- timeout. It can also be a pair (tuple) of
2489
- (connection, read) timeouts.
2490
- :type _request_timeout: int, tuple(int, int), optional
2491
- :param _request_auth: set to override the auth_settings for an a single
2492
- request; this effectively ignores the
2493
- authentication in the spec for a single request.
2494
- :type _request_auth: dict, optional
2495
- :param _content_type: force content-type for the request.
2496
- :type _content_type: str, Optional
2497
- :param _headers: set to override the headers for a single
2498
- request; this effectively ignores the headers
2499
- in the spec for a single request.
2500
- :type _headers: dict, optional
2501
- :param _host_index: set to override the host_index for a single
2502
- request; this effectively ignores the host_index
2503
- in the spec for a single request.
2504
- :type _host_index: int, optional
2505
- :return: Returns the result object.
2506
- """ # noqa: E501
2507
-
2508
- _param = self._my_permissions_serialize(
2509
- file_file_repository_href=file_file_repository_href,
2510
- x_task_diagnostics=x_task_diagnostics,
2511
- fields=fields,
2512
- exclude_fields=exclude_fields,
2513
- _request_auth=_request_auth,
2514
- _content_type=_content_type,
2515
- _headers=_headers,
2516
- _host_index=_host_index
2517
- )
2518
-
2519
- _response_types_map: Dict[str, Optional[str]] = {
2520
- '200': "MyPermissionsResponse",
2521
- }
2522
- response_data = self.api_client.call_api(
2523
- *_param,
2524
- _request_timeout=_request_timeout
2525
- )
2526
- response_data.read()
2527
- return self.api_client.response_deserialize(
2528
- response_data=response_data,
2529
- response_types_map=_response_types_map,
2530
- )
2531
-
2532
-
2533
- @validate_call
2534
- def my_permissions_without_preload_content(
2535
- self,
2536
- file_file_repository_href: StrictStr,
2537
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2538
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2539
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2540
- _request_timeout: Union[
2541
- None,
2542
- Annotated[StrictFloat, Field(gt=0)],
2543
- Tuple[
2544
- Annotated[StrictFloat, Field(gt=0)],
2545
- Annotated[StrictFloat, Field(gt=0)]
2546
- ]
2547
- ] = None,
2548
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2549
- _content_type: Optional[StrictStr] = None,
2550
- _headers: Optional[Dict[StrictStr, Any]] = None,
2551
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2552
- ) -> RESTResponseType:
2553
- """List user permissions
2554
-
2555
- List permissions available to the current user on this object.
2556
-
2557
- :param file_file_repository_href: (required)
2558
- :type file_file_repository_href: str
2559
- :param x_task_diagnostics: List of profilers to use on tasks.
2560
- :type x_task_diagnostics: List[str]
2561
- :param fields: A list of fields to include in the response.
2562
- :type fields: List[str]
2563
- :param exclude_fields: A list of fields to exclude from the response.
2564
- :type exclude_fields: List[str]
2565
- :param _request_timeout: timeout setting for this request. If one
2566
- number provided, it will be total request
2567
- timeout. It can also be a pair (tuple) of
2568
- (connection, read) timeouts.
2569
- :type _request_timeout: int, tuple(int, int), optional
2570
- :param _request_auth: set to override the auth_settings for an a single
2571
- request; this effectively ignores the
2572
- authentication in the spec for a single request.
2573
- :type _request_auth: dict, optional
2574
- :param _content_type: force content-type for the request.
2575
- :type _content_type: str, Optional
2576
- :param _headers: set to override the headers for a single
2577
- request; this effectively ignores the headers
2578
- in the spec for a single request.
2579
- :type _headers: dict, optional
2580
- :param _host_index: set to override the host_index for a single
2581
- request; this effectively ignores the host_index
2582
- in the spec for a single request.
2583
- :type _host_index: int, optional
2584
- :return: Returns the result object.
2585
- """ # noqa: E501
2586
-
2587
- _param = self._my_permissions_serialize(
2588
- file_file_repository_href=file_file_repository_href,
2589
- x_task_diagnostics=x_task_diagnostics,
2590
- fields=fields,
2591
- exclude_fields=exclude_fields,
2592
- _request_auth=_request_auth,
2593
- _content_type=_content_type,
2594
- _headers=_headers,
2595
- _host_index=_host_index
2596
- )
2597
-
2598
- _response_types_map: Dict[str, Optional[str]] = {
2599
- '200': "MyPermissionsResponse",
2600
- }
2601
- response_data = self.api_client.call_api(
2602
- *_param,
2603
- _request_timeout=_request_timeout
2604
- )
2605
- return response_data.response
2606
-
2607
-
2608
- def _my_permissions_serialize(
2609
- self,
2610
- file_file_repository_href,
2611
- x_task_diagnostics,
2612
- fields,
2613
- exclude_fields,
2614
- _request_auth,
2615
- _content_type,
2616
- _headers,
2617
- _host_index,
2618
- ) -> RequestSerialized:
2619
-
2620
- _host = None
2621
-
2622
- _collection_formats: Dict[str, str] = {
2623
- 'X-Task-Diagnostics': 'csv',
2624
- 'fields': 'multi',
2625
- 'exclude_fields': 'multi',
2626
- }
2627
-
2628
- _path_params: Dict[str, str] = {}
2629
- _query_params: List[Tuple[str, str]] = []
2630
- _header_params: Dict[str, Optional[str]] = _headers or {}
2631
- _form_params: List[Tuple[str, str]] = []
2632
- _files: Dict[
2633
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2634
- ] = {}
2635
- _body_params: Optional[bytes] = None
2636
-
2637
- # process the path parameters
2638
- if file_file_repository_href is not None:
2639
- _path_params['file_file_repository_href'] = file_file_repository_href
2640
- # process the query parameters
2641
- if fields is not None:
2642
-
2643
- _query_params.append(('fields', fields))
2644
-
2645
- if exclude_fields is not None:
2646
-
2647
- _query_params.append(('exclude_fields', exclude_fields))
2648
-
2649
- # process the header parameters
2650
- if x_task_diagnostics is not None:
2651
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2652
- # process the form parameters
2653
- # process the body parameter
2654
-
2655
-
2656
- # set the HTTP header `Accept`
2657
- if 'Accept' not in _header_params:
2658
- _header_params['Accept'] = self.api_client.select_header_accept(
2659
- [
2660
- 'application/json'
2661
- ]
2662
- )
2663
-
2664
-
2665
- # authentication setting
2666
- _auth_settings: List[str] = [
2667
- 'json_header_remote_authentication',
2668
- 'basicAuth',
2669
- 'cookieAuth'
2670
- ]
2671
-
2672
- return self.api_client.param_serialize(
2673
- method='GET',
2674
- resource_path='{file_file_repository_href}my_permissions/',
2675
- path_params=_path_params,
2676
- query_params=_query_params,
2677
- header_params=_header_params,
2678
- body=_body_params,
2679
- post_params=_form_params,
2680
- files=_files,
2681
- auth_settings=_auth_settings,
2682
- collection_formats=_collection_formats,
2683
- _host=_host,
2684
- _request_auth=_request_auth
2685
- )
2686
-
2687
-
2688
-
2689
-
2690
- @validate_call
2691
- def partial_update(
2692
- self,
2693
- file_file_repository_href: StrictStr,
2694
- patchedfile_file_repository: PatchedfileFileRepository,
2695
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2696
- _request_timeout: Union[
2697
- None,
2698
- Annotated[StrictFloat, Field(gt=0)],
2699
- Tuple[
2700
- Annotated[StrictFloat, Field(gt=0)],
2701
- Annotated[StrictFloat, Field(gt=0)]
2702
- ]
2703
- ] = None,
2704
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2705
- _content_type: Optional[StrictStr] = None,
2706
- _headers: Optional[Dict[StrictStr, Any]] = None,
2707
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2708
- ) -> AsyncOperationResponse:
2709
- """Update a file repository
2710
-
2711
- Trigger an asynchronous partial update task
2712
-
2713
- :param file_file_repository_href: (required)
2714
- :type file_file_repository_href: str
2715
- :param patchedfile_file_repository: (required)
2716
- :type patchedfile_file_repository: PatchedfileFileRepository
2717
- :param x_task_diagnostics: List of profilers to use on tasks.
2718
- :type x_task_diagnostics: List[str]
2719
- :param _request_timeout: timeout setting for this request. If one
2720
- number provided, it will be total request
2721
- timeout. It can also be a pair (tuple) of
2722
- (connection, read) timeouts.
2723
- :type _request_timeout: int, tuple(int, int), optional
2724
- :param _request_auth: set to override the auth_settings for an a single
2725
- request; this effectively ignores the
2726
- authentication in the spec for a single request.
2727
- :type _request_auth: dict, optional
2728
- :param _content_type: force content-type for the request.
2729
- :type _content_type: str, Optional
2730
- :param _headers: set to override the headers for a single
2731
- request; this effectively ignores the headers
2732
- in the spec for a single request.
2733
- :type _headers: dict, optional
2734
- :param _host_index: set to override the host_index for a single
2735
- request; this effectively ignores the host_index
2736
- in the spec for a single request.
2737
- :type _host_index: int, optional
2738
- :return: Returns the result object.
2739
- """ # noqa: E501
2740
-
2741
- _param = self._partial_update_serialize(
2742
- file_file_repository_href=file_file_repository_href,
2743
- patchedfile_file_repository=patchedfile_file_repository,
2744
- x_task_diagnostics=x_task_diagnostics,
2745
- _request_auth=_request_auth,
2746
- _content_type=_content_type,
2747
- _headers=_headers,
2748
- _host_index=_host_index
2749
- )
2750
-
2751
- _response_types_map: Dict[str, Optional[str]] = {
2752
- '202': "AsyncOperationResponse",
2753
- }
2754
- response_data = self.api_client.call_api(
2755
- *_param,
2756
- _request_timeout=_request_timeout
2757
- )
2758
- response_data.read()
2759
- return self.api_client.response_deserialize(
2760
- response_data=response_data,
2761
- response_types_map=_response_types_map,
2762
- ).data
2763
-
2764
-
2765
- @validate_call
2766
- def partial_update_with_http_info(
2767
- self,
2768
- file_file_repository_href: StrictStr,
2769
- patchedfile_file_repository: PatchedfileFileRepository,
2770
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2771
- _request_timeout: Union[
2772
- None,
2773
- Annotated[StrictFloat, Field(gt=0)],
2774
- Tuple[
2775
- Annotated[StrictFloat, Field(gt=0)],
2776
- Annotated[StrictFloat, Field(gt=0)]
2777
- ]
2778
- ] = None,
2779
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2780
- _content_type: Optional[StrictStr] = None,
2781
- _headers: Optional[Dict[StrictStr, Any]] = None,
2782
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2783
- ) -> ApiResponse[AsyncOperationResponse]:
2784
- """Update a file repository
2785
-
2786
- Trigger an asynchronous partial update task
2787
-
2788
- :param file_file_repository_href: (required)
2789
- :type file_file_repository_href: str
2790
- :param patchedfile_file_repository: (required)
2791
- :type patchedfile_file_repository: PatchedfileFileRepository
2792
- :param x_task_diagnostics: List of profilers to use on tasks.
2793
- :type x_task_diagnostics: List[str]
2794
- :param _request_timeout: timeout setting for this request. If one
2795
- number provided, it will be total request
2796
- timeout. It can also be a pair (tuple) of
2797
- (connection, read) timeouts.
2798
- :type _request_timeout: int, tuple(int, int), optional
2799
- :param _request_auth: set to override the auth_settings for an a single
2800
- request; this effectively ignores the
2801
- authentication in the spec for a single request.
2802
- :type _request_auth: dict, optional
2803
- :param _content_type: force content-type for the request.
2804
- :type _content_type: str, Optional
2805
- :param _headers: set to override the headers for a single
2806
- request; this effectively ignores the headers
2807
- in the spec for a single request.
2808
- :type _headers: dict, optional
2809
- :param _host_index: set to override the host_index for a single
2810
- request; this effectively ignores the host_index
2811
- in the spec for a single request.
2812
- :type _host_index: int, optional
2813
- :return: Returns the result object.
2814
- """ # noqa: E501
2815
-
2816
- _param = self._partial_update_serialize(
2817
- file_file_repository_href=file_file_repository_href,
2818
- patchedfile_file_repository=patchedfile_file_repository,
2819
- x_task_diagnostics=x_task_diagnostics,
2820
- _request_auth=_request_auth,
2821
- _content_type=_content_type,
2822
- _headers=_headers,
2823
- _host_index=_host_index
2824
- )
2825
-
2826
- _response_types_map: Dict[str, Optional[str]] = {
2827
- '202': "AsyncOperationResponse",
2828
- }
2829
- response_data = self.api_client.call_api(
2830
- *_param,
2831
- _request_timeout=_request_timeout
2832
- )
2833
- response_data.read()
2834
- return self.api_client.response_deserialize(
2835
- response_data=response_data,
2836
- response_types_map=_response_types_map,
2837
- )
2838
-
2839
-
2840
- @validate_call
2841
- def partial_update_without_preload_content(
2842
- self,
2843
- file_file_repository_href: StrictStr,
2844
- patchedfile_file_repository: PatchedfileFileRepository,
2845
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2846
- _request_timeout: Union[
2847
- None,
2848
- Annotated[StrictFloat, Field(gt=0)],
2849
- Tuple[
2850
- Annotated[StrictFloat, Field(gt=0)],
2851
- Annotated[StrictFloat, Field(gt=0)]
2852
- ]
2853
- ] = None,
2854
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2855
- _content_type: Optional[StrictStr] = None,
2856
- _headers: Optional[Dict[StrictStr, Any]] = None,
2857
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2858
- ) -> RESTResponseType:
2859
- """Update a file repository
2860
-
2861
- Trigger an asynchronous partial update task
2862
-
2863
- :param file_file_repository_href: (required)
2864
- :type file_file_repository_href: str
2865
- :param patchedfile_file_repository: (required)
2866
- :type patchedfile_file_repository: PatchedfileFileRepository
2867
- :param x_task_diagnostics: List of profilers to use on tasks.
2868
- :type x_task_diagnostics: List[str]
2869
- :param _request_timeout: timeout setting for this request. If one
2870
- number provided, it will be total request
2871
- timeout. It can also be a pair (tuple) of
2872
- (connection, read) timeouts.
2873
- :type _request_timeout: int, tuple(int, int), optional
2874
- :param _request_auth: set to override the auth_settings for an a single
2875
- request; this effectively ignores the
2876
- authentication in the spec for a single request.
2877
- :type _request_auth: dict, optional
2878
- :param _content_type: force content-type for the request.
2879
- :type _content_type: str, Optional
2880
- :param _headers: set to override the headers for a single
2881
- request; this effectively ignores the headers
2882
- in the spec for a single request.
2883
- :type _headers: dict, optional
2884
- :param _host_index: set to override the host_index for a single
2885
- request; this effectively ignores the host_index
2886
- in the spec for a single request.
2887
- :type _host_index: int, optional
2888
- :return: Returns the result object.
2889
- """ # noqa: E501
2890
-
2891
- _param = self._partial_update_serialize(
2892
- file_file_repository_href=file_file_repository_href,
2893
- patchedfile_file_repository=patchedfile_file_repository,
2894
- x_task_diagnostics=x_task_diagnostics,
2895
- _request_auth=_request_auth,
2896
- _content_type=_content_type,
2897
- _headers=_headers,
2898
- _host_index=_host_index
2899
- )
2900
-
2901
- _response_types_map: Dict[str, Optional[str]] = {
2902
- '202': "AsyncOperationResponse",
2903
- }
2904
- response_data = self.api_client.call_api(
2905
- *_param,
2906
- _request_timeout=_request_timeout
2907
- )
2908
- return response_data.response
2909
-
2910
-
2911
- def _partial_update_serialize(
2912
- self,
2913
- file_file_repository_href,
2914
- patchedfile_file_repository,
2915
- x_task_diagnostics,
2916
- _request_auth,
2917
- _content_type,
2918
- _headers,
2919
- _host_index,
2920
- ) -> RequestSerialized:
2921
-
2922
- _host = None
2923
-
2924
- _collection_formats: Dict[str, str] = {
2925
- 'X-Task-Diagnostics': 'csv',
2926
- }
2927
-
2928
- _path_params: Dict[str, str] = {}
2929
- _query_params: List[Tuple[str, str]] = []
2930
- _header_params: Dict[str, Optional[str]] = _headers or {}
2931
- _form_params: List[Tuple[str, str]] = []
2932
- _files: Dict[
2933
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2934
- ] = {}
2935
- _body_params: Optional[bytes] = None
2936
-
2937
- # process the path parameters
2938
- if file_file_repository_href is not None:
2939
- _path_params['file_file_repository_href'] = file_file_repository_href
2940
- # process the query parameters
2941
- # process the header parameters
2942
- if x_task_diagnostics is not None:
2943
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2944
- # process the form parameters
2945
- # process the body parameter
2946
- if patchedfile_file_repository is not None:
2947
- _body_params = patchedfile_file_repository
2948
-
2949
-
2950
- # set the HTTP header `Accept`
2951
- if 'Accept' not in _header_params:
2952
- _header_params['Accept'] = self.api_client.select_header_accept(
2953
- [
2954
- 'application/json'
2955
- ]
2956
- )
2957
-
2958
- # set the HTTP header `Content-Type`
2959
- if _content_type:
2960
- _header_params['Content-Type'] = _content_type
2961
- else:
2962
- _default_content_type = (
2963
- self.api_client.select_header_content_type(
2964
- [
2965
- 'application/json',
2966
- 'application/x-www-form-urlencoded',
2967
- 'multipart/form-data'
2968
- ]
2969
- )
2970
- )
2971
- if _default_content_type is not None:
2972
- _header_params['Content-Type'] = _default_content_type
2973
-
2974
- # authentication setting
2975
- _auth_settings: List[str] = [
2976
- 'json_header_remote_authentication',
2977
- 'basicAuth',
2978
- 'cookieAuth'
2979
- ]
2980
-
2981
- return self.api_client.param_serialize(
2982
- method='PATCH',
2983
- resource_path='{file_file_repository_href}',
2984
- path_params=_path_params,
2985
- query_params=_query_params,
2986
- header_params=_header_params,
2987
- body=_body_params,
2988
- post_params=_form_params,
2989
- files=_files,
2990
- auth_settings=_auth_settings,
2991
- collection_formats=_collection_formats,
2992
- _host=_host,
2993
- _request_auth=_request_auth
2994
- )
2995
-
2996
-
2997
-
2998
-
2999
- @validate_call
3000
- def read(
3001
- self,
3002
- file_file_repository_href: StrictStr,
3003
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3004
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3005
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3006
- _request_timeout: Union[
3007
- None,
3008
- Annotated[StrictFloat, Field(gt=0)],
3009
- Tuple[
3010
- Annotated[StrictFloat, Field(gt=0)],
3011
- Annotated[StrictFloat, Field(gt=0)]
3012
- ]
3013
- ] = None,
3014
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3015
- _content_type: Optional[StrictStr] = None,
3016
- _headers: Optional[Dict[StrictStr, Any]] = None,
3017
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3018
- ) -> FileFileRepositoryResponse:
3019
- """Inspect a file repository
3020
-
3021
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
3022
-
3023
- :param file_file_repository_href: (required)
3024
- :type file_file_repository_href: str
3025
- :param x_task_diagnostics: List of profilers to use on tasks.
3026
- :type x_task_diagnostics: List[str]
3027
- :param fields: A list of fields to include in the response.
3028
- :type fields: List[str]
3029
- :param exclude_fields: A list of fields to exclude from the response.
3030
- :type exclude_fields: List[str]
3031
- :param _request_timeout: timeout setting for this request. If one
3032
- number provided, it will be total request
3033
- timeout. It can also be a pair (tuple) of
3034
- (connection, read) timeouts.
3035
- :type _request_timeout: int, tuple(int, int), optional
3036
- :param _request_auth: set to override the auth_settings for an a single
3037
- request; this effectively ignores the
3038
- authentication in the spec for a single request.
3039
- :type _request_auth: dict, optional
3040
- :param _content_type: force content-type for the request.
3041
- :type _content_type: str, Optional
3042
- :param _headers: set to override the headers for a single
3043
- request; this effectively ignores the headers
3044
- in the spec for a single request.
3045
- :type _headers: dict, optional
3046
- :param _host_index: set to override the host_index for a single
3047
- request; this effectively ignores the host_index
3048
- in the spec for a single request.
3049
- :type _host_index: int, optional
3050
- :return: Returns the result object.
3051
- """ # noqa: E501
3052
-
3053
- _param = self._read_serialize(
3054
- file_file_repository_href=file_file_repository_href,
3055
- x_task_diagnostics=x_task_diagnostics,
3056
- fields=fields,
3057
- exclude_fields=exclude_fields,
3058
- _request_auth=_request_auth,
3059
- _content_type=_content_type,
3060
- _headers=_headers,
3061
- _host_index=_host_index
3062
- )
3063
-
3064
- _response_types_map: Dict[str, Optional[str]] = {
3065
- '200': "FileFileRepositoryResponse",
3066
- }
3067
- response_data = self.api_client.call_api(
3068
- *_param,
3069
- _request_timeout=_request_timeout
3070
- )
3071
- response_data.read()
3072
- return self.api_client.response_deserialize(
3073
- response_data=response_data,
3074
- response_types_map=_response_types_map,
3075
- ).data
3076
-
3077
-
3078
- @validate_call
3079
- def read_with_http_info(
3080
- self,
3081
- file_file_repository_href: StrictStr,
3082
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3083
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3084
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3085
- _request_timeout: Union[
3086
- None,
3087
- Annotated[StrictFloat, Field(gt=0)],
3088
- Tuple[
3089
- Annotated[StrictFloat, Field(gt=0)],
3090
- Annotated[StrictFloat, Field(gt=0)]
3091
- ]
3092
- ] = None,
3093
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3094
- _content_type: Optional[StrictStr] = None,
3095
- _headers: Optional[Dict[StrictStr, Any]] = None,
3096
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3097
- ) -> ApiResponse[FileFileRepositoryResponse]:
3098
- """Inspect a file repository
3099
-
3100
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
3101
-
3102
- :param file_file_repository_href: (required)
3103
- :type file_file_repository_href: str
3104
- :param x_task_diagnostics: List of profilers to use on tasks.
3105
- :type x_task_diagnostics: List[str]
3106
- :param fields: A list of fields to include in the response.
3107
- :type fields: List[str]
3108
- :param exclude_fields: A list of fields to exclude from the response.
3109
- :type exclude_fields: List[str]
3110
- :param _request_timeout: timeout setting for this request. If one
3111
- number provided, it will be total request
3112
- timeout. It can also be a pair (tuple) of
3113
- (connection, read) timeouts.
3114
- :type _request_timeout: int, tuple(int, int), optional
3115
- :param _request_auth: set to override the auth_settings for an a single
3116
- request; this effectively ignores the
3117
- authentication in the spec for a single request.
3118
- :type _request_auth: dict, optional
3119
- :param _content_type: force content-type for the request.
3120
- :type _content_type: str, Optional
3121
- :param _headers: set to override the headers for a single
3122
- request; this effectively ignores the headers
3123
- in the spec for a single request.
3124
- :type _headers: dict, optional
3125
- :param _host_index: set to override the host_index for a single
3126
- request; this effectively ignores the host_index
3127
- in the spec for a single request.
3128
- :type _host_index: int, optional
3129
- :return: Returns the result object.
3130
- """ # noqa: E501
3131
-
3132
- _param = self._read_serialize(
3133
- file_file_repository_href=file_file_repository_href,
3134
- x_task_diagnostics=x_task_diagnostics,
3135
- fields=fields,
3136
- exclude_fields=exclude_fields,
3137
- _request_auth=_request_auth,
3138
- _content_type=_content_type,
3139
- _headers=_headers,
3140
- _host_index=_host_index
3141
- )
3142
-
3143
- _response_types_map: Dict[str, Optional[str]] = {
3144
- '200': "FileFileRepositoryResponse",
3145
- }
3146
- response_data = self.api_client.call_api(
3147
- *_param,
3148
- _request_timeout=_request_timeout
3149
- )
3150
- response_data.read()
3151
- return self.api_client.response_deserialize(
3152
- response_data=response_data,
3153
- response_types_map=_response_types_map,
3154
- )
3155
-
3156
-
3157
- @validate_call
3158
- def read_without_preload_content(
3159
- self,
3160
- file_file_repository_href: StrictStr,
3161
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3162
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3163
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3164
- _request_timeout: Union[
3165
- None,
3166
- Annotated[StrictFloat, Field(gt=0)],
3167
- Tuple[
3168
- Annotated[StrictFloat, Field(gt=0)],
3169
- Annotated[StrictFloat, Field(gt=0)]
3170
- ]
3171
- ] = None,
3172
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3173
- _content_type: Optional[StrictStr] = None,
3174
- _headers: Optional[Dict[StrictStr, Any]] = None,
3175
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3176
- ) -> RESTResponseType:
3177
- """Inspect a file repository
3178
-
3179
- FileRepository represents a single file repository, to which content can be synced, added, or removed.
3180
-
3181
- :param file_file_repository_href: (required)
3182
- :type file_file_repository_href: str
3183
- :param x_task_diagnostics: List of profilers to use on tasks.
3184
- :type x_task_diagnostics: List[str]
3185
- :param fields: A list of fields to include in the response.
3186
- :type fields: List[str]
3187
- :param exclude_fields: A list of fields to exclude from the response.
3188
- :type exclude_fields: List[str]
3189
- :param _request_timeout: timeout setting for this request. If one
3190
- number provided, it will be total request
3191
- timeout. It can also be a pair (tuple) of
3192
- (connection, read) timeouts.
3193
- :type _request_timeout: int, tuple(int, int), optional
3194
- :param _request_auth: set to override the auth_settings for an a single
3195
- request; this effectively ignores the
3196
- authentication in the spec for a single request.
3197
- :type _request_auth: dict, optional
3198
- :param _content_type: force content-type for the request.
3199
- :type _content_type: str, Optional
3200
- :param _headers: set to override the headers for a single
3201
- request; this effectively ignores the headers
3202
- in the spec for a single request.
3203
- :type _headers: dict, optional
3204
- :param _host_index: set to override the host_index for a single
3205
- request; this effectively ignores the host_index
3206
- in the spec for a single request.
3207
- :type _host_index: int, optional
3208
- :return: Returns the result object.
3209
- """ # noqa: E501
3210
-
3211
- _param = self._read_serialize(
3212
- file_file_repository_href=file_file_repository_href,
3213
- x_task_diagnostics=x_task_diagnostics,
3214
- fields=fields,
3215
- exclude_fields=exclude_fields,
3216
- _request_auth=_request_auth,
3217
- _content_type=_content_type,
3218
- _headers=_headers,
3219
- _host_index=_host_index
3220
- )
3221
-
3222
- _response_types_map: Dict[str, Optional[str]] = {
3223
- '200': "FileFileRepositoryResponse",
3224
- }
3225
- response_data = self.api_client.call_api(
3226
- *_param,
3227
- _request_timeout=_request_timeout
3228
- )
3229
- return response_data.response
3230
-
3231
-
3232
- def _read_serialize(
3233
- self,
3234
- file_file_repository_href,
3235
- x_task_diagnostics,
3236
- fields,
3237
- exclude_fields,
3238
- _request_auth,
3239
- _content_type,
3240
- _headers,
3241
- _host_index,
3242
- ) -> RequestSerialized:
3243
-
3244
- _host = None
3245
-
3246
- _collection_formats: Dict[str, str] = {
3247
- 'X-Task-Diagnostics': 'csv',
3248
- 'fields': 'multi',
3249
- 'exclude_fields': 'multi',
3250
- }
3251
-
3252
- _path_params: Dict[str, str] = {}
3253
- _query_params: List[Tuple[str, str]] = []
3254
- _header_params: Dict[str, Optional[str]] = _headers or {}
3255
- _form_params: List[Tuple[str, str]] = []
3256
- _files: Dict[
3257
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3258
- ] = {}
3259
- _body_params: Optional[bytes] = None
3260
-
3261
- # process the path parameters
3262
- if file_file_repository_href is not None:
3263
- _path_params['file_file_repository_href'] = file_file_repository_href
3264
- # process the query parameters
3265
- if fields is not None:
3266
-
3267
- _query_params.append(('fields', fields))
3268
-
3269
- if exclude_fields is not None:
3270
-
3271
- _query_params.append(('exclude_fields', exclude_fields))
3272
-
3273
- # process the header parameters
3274
- if x_task_diagnostics is not None:
3275
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3276
- # process the form parameters
3277
- # process the body parameter
3278
-
3279
-
3280
- # set the HTTP header `Accept`
3281
- if 'Accept' not in _header_params:
3282
- _header_params['Accept'] = self.api_client.select_header_accept(
3283
- [
3284
- 'application/json'
3285
- ]
3286
- )
3287
-
3288
-
3289
- # authentication setting
3290
- _auth_settings: List[str] = [
3291
- 'json_header_remote_authentication',
3292
- 'basicAuth',
3293
- 'cookieAuth'
3294
- ]
3295
-
3296
- return self.api_client.param_serialize(
3297
- method='GET',
3298
- resource_path='{file_file_repository_href}',
3299
- path_params=_path_params,
3300
- query_params=_query_params,
3301
- header_params=_header_params,
3302
- body=_body_params,
3303
- post_params=_form_params,
3304
- files=_files,
3305
- auth_settings=_auth_settings,
3306
- collection_formats=_collection_formats,
3307
- _host=_host,
3308
- _request_auth=_request_auth
3309
- )
3310
-
3311
-
3312
-
3313
-
3314
- @validate_call
3315
- def remove_role(
3316
- self,
3317
- file_file_repository_href: StrictStr,
3318
- nested_role: NestedRole,
3319
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3320
- _request_timeout: Union[
3321
- None,
3322
- Annotated[StrictFloat, Field(gt=0)],
3323
- Tuple[
3324
- Annotated[StrictFloat, Field(gt=0)],
3325
- Annotated[StrictFloat, Field(gt=0)]
3326
- ]
3327
- ] = None,
3328
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3329
- _content_type: Optional[StrictStr] = None,
3330
- _headers: Optional[Dict[StrictStr, Any]] = None,
3331
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3332
- ) -> NestedRoleResponse:
3333
- """Remove a role
3334
-
3335
- Remove a role for this object from users/groups.
3336
-
3337
- :param file_file_repository_href: (required)
3338
- :type file_file_repository_href: str
3339
- :param nested_role: (required)
3340
- :type nested_role: NestedRole
3341
- :param x_task_diagnostics: List of profilers to use on tasks.
3342
- :type x_task_diagnostics: List[str]
3343
- :param _request_timeout: timeout setting for this request. If one
3344
- number provided, it will be total request
3345
- timeout. It can also be a pair (tuple) of
3346
- (connection, read) timeouts.
3347
- :type _request_timeout: int, tuple(int, int), optional
3348
- :param _request_auth: set to override the auth_settings for an a single
3349
- request; this effectively ignores the
3350
- authentication in the spec for a single request.
3351
- :type _request_auth: dict, optional
3352
- :param _content_type: force content-type for the request.
3353
- :type _content_type: str, Optional
3354
- :param _headers: set to override the headers for a single
3355
- request; this effectively ignores the headers
3356
- in the spec for a single request.
3357
- :type _headers: dict, optional
3358
- :param _host_index: set to override the host_index for a single
3359
- request; this effectively ignores the host_index
3360
- in the spec for a single request.
3361
- :type _host_index: int, optional
3362
- :return: Returns the result object.
3363
- """ # noqa: E501
3364
-
3365
- _param = self._remove_role_serialize(
3366
- file_file_repository_href=file_file_repository_href,
3367
- nested_role=nested_role,
3368
- x_task_diagnostics=x_task_diagnostics,
3369
- _request_auth=_request_auth,
3370
- _content_type=_content_type,
3371
- _headers=_headers,
3372
- _host_index=_host_index
3373
- )
3374
-
3375
- _response_types_map: Dict[str, Optional[str]] = {
3376
- '201': "NestedRoleResponse",
3377
- }
3378
- response_data = self.api_client.call_api(
3379
- *_param,
3380
- _request_timeout=_request_timeout
3381
- )
3382
- response_data.read()
3383
- return self.api_client.response_deserialize(
3384
- response_data=response_data,
3385
- response_types_map=_response_types_map,
3386
- ).data
3387
-
3388
-
3389
- @validate_call
3390
- def remove_role_with_http_info(
3391
- self,
3392
- file_file_repository_href: StrictStr,
3393
- nested_role: NestedRole,
3394
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3395
- _request_timeout: Union[
3396
- None,
3397
- Annotated[StrictFloat, Field(gt=0)],
3398
- Tuple[
3399
- Annotated[StrictFloat, Field(gt=0)],
3400
- Annotated[StrictFloat, Field(gt=0)]
3401
- ]
3402
- ] = None,
3403
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3404
- _content_type: Optional[StrictStr] = None,
3405
- _headers: Optional[Dict[StrictStr, Any]] = None,
3406
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3407
- ) -> ApiResponse[NestedRoleResponse]:
3408
- """Remove a role
3409
-
3410
- Remove a role for this object from users/groups.
3411
-
3412
- :param file_file_repository_href: (required)
3413
- :type file_file_repository_href: str
3414
- :param nested_role: (required)
3415
- :type nested_role: NestedRole
3416
- :param x_task_diagnostics: List of profilers to use on tasks.
3417
- :type x_task_diagnostics: List[str]
3418
- :param _request_timeout: timeout setting for this request. If one
3419
- number provided, it will be total request
3420
- timeout. It can also be a pair (tuple) of
3421
- (connection, read) timeouts.
3422
- :type _request_timeout: int, tuple(int, int), optional
3423
- :param _request_auth: set to override the auth_settings for an a single
3424
- request; this effectively ignores the
3425
- authentication in the spec for a single request.
3426
- :type _request_auth: dict, optional
3427
- :param _content_type: force content-type for the request.
3428
- :type _content_type: str, Optional
3429
- :param _headers: set to override the headers for a single
3430
- request; this effectively ignores the headers
3431
- in the spec for a single request.
3432
- :type _headers: dict, optional
3433
- :param _host_index: set to override the host_index for a single
3434
- request; this effectively ignores the host_index
3435
- in the spec for a single request.
3436
- :type _host_index: int, optional
3437
- :return: Returns the result object.
3438
- """ # noqa: E501
3439
-
3440
- _param = self._remove_role_serialize(
3441
- file_file_repository_href=file_file_repository_href,
3442
- nested_role=nested_role,
3443
- x_task_diagnostics=x_task_diagnostics,
3444
- _request_auth=_request_auth,
3445
- _content_type=_content_type,
3446
- _headers=_headers,
3447
- _host_index=_host_index
3448
- )
3449
-
3450
- _response_types_map: Dict[str, Optional[str]] = {
3451
- '201': "NestedRoleResponse",
3452
- }
3453
- response_data = self.api_client.call_api(
3454
- *_param,
3455
- _request_timeout=_request_timeout
3456
- )
3457
- response_data.read()
3458
- return self.api_client.response_deserialize(
3459
- response_data=response_data,
3460
- response_types_map=_response_types_map,
3461
- )
3462
-
3463
-
3464
- @validate_call
3465
- def remove_role_without_preload_content(
3466
- self,
3467
- file_file_repository_href: StrictStr,
3468
- nested_role: NestedRole,
3469
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3470
- _request_timeout: Union[
3471
- None,
3472
- Annotated[StrictFloat, Field(gt=0)],
3473
- Tuple[
3474
- Annotated[StrictFloat, Field(gt=0)],
3475
- Annotated[StrictFloat, Field(gt=0)]
3476
- ]
3477
- ] = None,
3478
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3479
- _content_type: Optional[StrictStr] = None,
3480
- _headers: Optional[Dict[StrictStr, Any]] = None,
3481
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3482
- ) -> RESTResponseType:
3483
- """Remove a role
3484
-
3485
- Remove a role for this object from users/groups.
3486
-
3487
- :param file_file_repository_href: (required)
3488
- :type file_file_repository_href: str
3489
- :param nested_role: (required)
3490
- :type nested_role: NestedRole
3491
- :param x_task_diagnostics: List of profilers to use on tasks.
3492
- :type x_task_diagnostics: List[str]
3493
- :param _request_timeout: timeout setting for this request. If one
3494
- number provided, it will be total request
3495
- timeout. It can also be a pair (tuple) of
3496
- (connection, read) timeouts.
3497
- :type _request_timeout: int, tuple(int, int), optional
3498
- :param _request_auth: set to override the auth_settings for an a single
3499
- request; this effectively ignores the
3500
- authentication in the spec for a single request.
3501
- :type _request_auth: dict, optional
3502
- :param _content_type: force content-type for the request.
3503
- :type _content_type: str, Optional
3504
- :param _headers: set to override the headers for a single
3505
- request; this effectively ignores the headers
3506
- in the spec for a single request.
3507
- :type _headers: dict, optional
3508
- :param _host_index: set to override the host_index for a single
3509
- request; this effectively ignores the host_index
3510
- in the spec for a single request.
3511
- :type _host_index: int, optional
3512
- :return: Returns the result object.
3513
- """ # noqa: E501
3514
-
3515
- _param = self._remove_role_serialize(
3516
- file_file_repository_href=file_file_repository_href,
3517
- nested_role=nested_role,
3518
- x_task_diagnostics=x_task_diagnostics,
3519
- _request_auth=_request_auth,
3520
- _content_type=_content_type,
3521
- _headers=_headers,
3522
- _host_index=_host_index
3523
- )
3524
-
3525
- _response_types_map: Dict[str, Optional[str]] = {
3526
- '201': "NestedRoleResponse",
3527
- }
3528
- response_data = self.api_client.call_api(
3529
- *_param,
3530
- _request_timeout=_request_timeout
3531
- )
3532
- return response_data.response
3533
-
3534
-
3535
- def _remove_role_serialize(
3536
- self,
3537
- file_file_repository_href,
3538
- nested_role,
3539
- x_task_diagnostics,
3540
- _request_auth,
3541
- _content_type,
3542
- _headers,
3543
- _host_index,
3544
- ) -> RequestSerialized:
3545
-
3546
- _host = None
3547
-
3548
- _collection_formats: Dict[str, str] = {
3549
- 'X-Task-Diagnostics': 'csv',
3550
- }
3551
-
3552
- _path_params: Dict[str, str] = {}
3553
- _query_params: List[Tuple[str, str]] = []
3554
- _header_params: Dict[str, Optional[str]] = _headers or {}
3555
- _form_params: List[Tuple[str, str]] = []
3556
- _files: Dict[
3557
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3558
- ] = {}
3559
- _body_params: Optional[bytes] = None
3560
-
3561
- # process the path parameters
3562
- if file_file_repository_href is not None:
3563
- _path_params['file_file_repository_href'] = file_file_repository_href
3564
- # process the query parameters
3565
- # process the header parameters
3566
- if x_task_diagnostics is not None:
3567
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3568
- # process the form parameters
3569
- # process the body parameter
3570
- if nested_role is not None:
3571
- _body_params = nested_role
3572
-
3573
-
3574
- # set the HTTP header `Accept`
3575
- if 'Accept' not in _header_params:
3576
- _header_params['Accept'] = self.api_client.select_header_accept(
3577
- [
3578
- 'application/json'
3579
- ]
3580
- )
3581
-
3582
- # set the HTTP header `Content-Type`
3583
- if _content_type:
3584
- _header_params['Content-Type'] = _content_type
3585
- else:
3586
- _default_content_type = (
3587
- self.api_client.select_header_content_type(
3588
- [
3589
- 'application/json',
3590
- 'application/x-www-form-urlencoded',
3591
- 'multipart/form-data'
3592
- ]
3593
- )
3594
- )
3595
- if _default_content_type is not None:
3596
- _header_params['Content-Type'] = _default_content_type
3597
-
3598
- # authentication setting
3599
- _auth_settings: List[str] = [
3600
- 'json_header_remote_authentication',
3601
- 'basicAuth',
3602
- 'cookieAuth'
3603
- ]
3604
-
3605
- return self.api_client.param_serialize(
3606
- method='POST',
3607
- resource_path='{file_file_repository_href}remove_role/',
3608
- path_params=_path_params,
3609
- query_params=_query_params,
3610
- header_params=_header_params,
3611
- body=_body_params,
3612
- post_params=_form_params,
3613
- files=_files,
3614
- auth_settings=_auth_settings,
3615
- collection_formats=_collection_formats,
3616
- _host=_host,
3617
- _request_auth=_request_auth
3618
- )
3619
-
3620
-
3621
-
3622
-
3623
- @validate_call
3624
- def set_label(
3625
- self,
3626
- file_file_repository_href: StrictStr,
3627
- set_label: SetLabel,
3628
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3629
- _request_timeout: Union[
3630
- None,
3631
- Annotated[StrictFloat, Field(gt=0)],
3632
- Tuple[
3633
- Annotated[StrictFloat, Field(gt=0)],
3634
- Annotated[StrictFloat, Field(gt=0)]
3635
- ]
3636
- ] = None,
3637
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3638
- _content_type: Optional[StrictStr] = None,
3639
- _headers: Optional[Dict[StrictStr, Any]] = None,
3640
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3641
- ) -> SetLabelResponse:
3642
- """Set a label
3643
-
3644
- Set a single pulp_label on the object to a specific value or null.
3645
-
3646
- :param file_file_repository_href: (required)
3647
- :type file_file_repository_href: str
3648
- :param set_label: (required)
3649
- :type set_label: SetLabel
3650
- :param x_task_diagnostics: List of profilers to use on tasks.
3651
- :type x_task_diagnostics: List[str]
3652
- :param _request_timeout: timeout setting for this request. If one
3653
- number provided, it will be total request
3654
- timeout. It can also be a pair (tuple) of
3655
- (connection, read) timeouts.
3656
- :type _request_timeout: int, tuple(int, int), optional
3657
- :param _request_auth: set to override the auth_settings for an a single
3658
- request; this effectively ignores the
3659
- authentication in the spec for a single request.
3660
- :type _request_auth: dict, optional
3661
- :param _content_type: force content-type for the request.
3662
- :type _content_type: str, Optional
3663
- :param _headers: set to override the headers for a single
3664
- request; this effectively ignores the headers
3665
- in the spec for a single request.
3666
- :type _headers: dict, optional
3667
- :param _host_index: set to override the host_index for a single
3668
- request; this effectively ignores the host_index
3669
- in the spec for a single request.
3670
- :type _host_index: int, optional
3671
- :return: Returns the result object.
3672
- """ # noqa: E501
3673
-
3674
- _param = self._set_label_serialize(
3675
- file_file_repository_href=file_file_repository_href,
3676
- set_label=set_label,
3677
- x_task_diagnostics=x_task_diagnostics,
3678
- _request_auth=_request_auth,
3679
- _content_type=_content_type,
3680
- _headers=_headers,
3681
- _host_index=_host_index
3682
- )
3683
-
3684
- _response_types_map: Dict[str, Optional[str]] = {
3685
- '201': "SetLabelResponse",
3686
- }
3687
- response_data = self.api_client.call_api(
3688
- *_param,
3689
- _request_timeout=_request_timeout
3690
- )
3691
- response_data.read()
3692
- return self.api_client.response_deserialize(
3693
- response_data=response_data,
3694
- response_types_map=_response_types_map,
3695
- ).data
3696
-
3697
-
3698
- @validate_call
3699
- def set_label_with_http_info(
3700
- self,
3701
- file_file_repository_href: StrictStr,
3702
- set_label: SetLabel,
3703
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3704
- _request_timeout: Union[
3705
- None,
3706
- Annotated[StrictFloat, Field(gt=0)],
3707
- Tuple[
3708
- Annotated[StrictFloat, Field(gt=0)],
3709
- Annotated[StrictFloat, Field(gt=0)]
3710
- ]
3711
- ] = None,
3712
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3713
- _content_type: Optional[StrictStr] = None,
3714
- _headers: Optional[Dict[StrictStr, Any]] = None,
3715
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3716
- ) -> ApiResponse[SetLabelResponse]:
3717
- """Set a label
3718
-
3719
- Set a single pulp_label on the object to a specific value or null.
3720
-
3721
- :param file_file_repository_href: (required)
3722
- :type file_file_repository_href: str
3723
- :param set_label: (required)
3724
- :type set_label: SetLabel
3725
- :param x_task_diagnostics: List of profilers to use on tasks.
3726
- :type x_task_diagnostics: List[str]
3727
- :param _request_timeout: timeout setting for this request. If one
3728
- number provided, it will be total request
3729
- timeout. It can also be a pair (tuple) of
3730
- (connection, read) timeouts.
3731
- :type _request_timeout: int, tuple(int, int), optional
3732
- :param _request_auth: set to override the auth_settings for an a single
3733
- request; this effectively ignores the
3734
- authentication in the spec for a single request.
3735
- :type _request_auth: dict, optional
3736
- :param _content_type: force content-type for the request.
3737
- :type _content_type: str, Optional
3738
- :param _headers: set to override the headers for a single
3739
- request; this effectively ignores the headers
3740
- in the spec for a single request.
3741
- :type _headers: dict, optional
3742
- :param _host_index: set to override the host_index for a single
3743
- request; this effectively ignores the host_index
3744
- in the spec for a single request.
3745
- :type _host_index: int, optional
3746
- :return: Returns the result object.
3747
- """ # noqa: E501
3748
-
3749
- _param = self._set_label_serialize(
3750
- file_file_repository_href=file_file_repository_href,
3751
- set_label=set_label,
3752
- x_task_diagnostics=x_task_diagnostics,
3753
- _request_auth=_request_auth,
3754
- _content_type=_content_type,
3755
- _headers=_headers,
3756
- _host_index=_host_index
3757
- )
3758
-
3759
- _response_types_map: Dict[str, Optional[str]] = {
3760
- '201': "SetLabelResponse",
3761
- }
3762
- response_data = self.api_client.call_api(
3763
- *_param,
3764
- _request_timeout=_request_timeout
3765
- )
3766
- response_data.read()
3767
- return self.api_client.response_deserialize(
3768
- response_data=response_data,
3769
- response_types_map=_response_types_map,
3770
- )
3771
-
3772
-
3773
- @validate_call
3774
- def set_label_without_preload_content(
3775
- self,
3776
- file_file_repository_href: StrictStr,
3777
- set_label: SetLabel,
3778
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3779
- _request_timeout: Union[
3780
- None,
3781
- Annotated[StrictFloat, Field(gt=0)],
3782
- Tuple[
3783
- Annotated[StrictFloat, Field(gt=0)],
3784
- Annotated[StrictFloat, Field(gt=0)]
3785
- ]
3786
- ] = None,
3787
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3788
- _content_type: Optional[StrictStr] = None,
3789
- _headers: Optional[Dict[StrictStr, Any]] = None,
3790
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3791
- ) -> RESTResponseType:
3792
- """Set a label
3793
-
3794
- Set a single pulp_label on the object to a specific value or null.
3795
-
3796
- :param file_file_repository_href: (required)
3797
- :type file_file_repository_href: str
3798
- :param set_label: (required)
3799
- :type set_label: SetLabel
3800
- :param x_task_diagnostics: List of profilers to use on tasks.
3801
- :type x_task_diagnostics: List[str]
3802
- :param _request_timeout: timeout setting for this request. If one
3803
- number provided, it will be total request
3804
- timeout. It can also be a pair (tuple) of
3805
- (connection, read) timeouts.
3806
- :type _request_timeout: int, tuple(int, int), optional
3807
- :param _request_auth: set to override the auth_settings for an a single
3808
- request; this effectively ignores the
3809
- authentication in the spec for a single request.
3810
- :type _request_auth: dict, optional
3811
- :param _content_type: force content-type for the request.
3812
- :type _content_type: str, Optional
3813
- :param _headers: set to override the headers for a single
3814
- request; this effectively ignores the headers
3815
- in the spec for a single request.
3816
- :type _headers: dict, optional
3817
- :param _host_index: set to override the host_index for a single
3818
- request; this effectively ignores the host_index
3819
- in the spec for a single request.
3820
- :type _host_index: int, optional
3821
- :return: Returns the result object.
3822
- """ # noqa: E501
3823
-
3824
- _param = self._set_label_serialize(
3825
- file_file_repository_href=file_file_repository_href,
3826
- set_label=set_label,
3827
- x_task_diagnostics=x_task_diagnostics,
3828
- _request_auth=_request_auth,
3829
- _content_type=_content_type,
3830
- _headers=_headers,
3831
- _host_index=_host_index
3832
- )
3833
-
3834
- _response_types_map: Dict[str, Optional[str]] = {
3835
- '201': "SetLabelResponse",
3836
- }
3837
- response_data = self.api_client.call_api(
3838
- *_param,
3839
- _request_timeout=_request_timeout
3840
- )
3841
- return response_data.response
3842
-
3843
-
3844
- def _set_label_serialize(
3845
- self,
3846
- file_file_repository_href,
3847
- set_label,
3848
- x_task_diagnostics,
3849
- _request_auth,
3850
- _content_type,
3851
- _headers,
3852
- _host_index,
3853
- ) -> RequestSerialized:
3854
-
3855
- _host = None
3856
-
3857
- _collection_formats: Dict[str, str] = {
3858
- 'X-Task-Diagnostics': 'csv',
3859
- }
3860
-
3861
- _path_params: Dict[str, str] = {}
3862
- _query_params: List[Tuple[str, str]] = []
3863
- _header_params: Dict[str, Optional[str]] = _headers or {}
3864
- _form_params: List[Tuple[str, str]] = []
3865
- _files: Dict[
3866
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3867
- ] = {}
3868
- _body_params: Optional[bytes] = None
3869
-
3870
- # process the path parameters
3871
- if file_file_repository_href is not None:
3872
- _path_params['file_file_repository_href'] = file_file_repository_href
3873
- # process the query parameters
3874
- # process the header parameters
3875
- if x_task_diagnostics is not None:
3876
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3877
- # process the form parameters
3878
- # process the body parameter
3879
- if set_label is not None:
3880
- _body_params = set_label
3881
-
3882
-
3883
- # set the HTTP header `Accept`
3884
- if 'Accept' not in _header_params:
3885
- _header_params['Accept'] = self.api_client.select_header_accept(
3886
- [
3887
- 'application/json'
3888
- ]
3889
- )
3890
-
3891
- # set the HTTP header `Content-Type`
3892
- if _content_type:
3893
- _header_params['Content-Type'] = _content_type
3894
- else:
3895
- _default_content_type = (
3896
- self.api_client.select_header_content_type(
3897
- [
3898
- 'application/json',
3899
- 'application/x-www-form-urlencoded',
3900
- 'multipart/form-data'
3901
- ]
3902
- )
3903
- )
3904
- if _default_content_type is not None:
3905
- _header_params['Content-Type'] = _default_content_type
3906
-
3907
- # authentication setting
3908
- _auth_settings: List[str] = [
3909
- 'json_header_remote_authentication',
3910
- 'basicAuth',
3911
- 'cookieAuth'
3912
- ]
3913
-
3914
- return self.api_client.param_serialize(
3915
- method='POST',
3916
- resource_path='{file_file_repository_href}set_label/',
3917
- path_params=_path_params,
3918
- query_params=_query_params,
3919
- header_params=_header_params,
3920
- body=_body_params,
3921
- post_params=_form_params,
3922
- files=_files,
3923
- auth_settings=_auth_settings,
3924
- collection_formats=_collection_formats,
3925
- _host=_host,
3926
- _request_auth=_request_auth
3927
- )
3928
-
3929
-
3930
-
3931
-
3932
- @validate_call
3933
- def sync(
3934
- self,
3935
- file_file_repository_href: StrictStr,
3936
- repository_sync_url: RepositorySyncURL,
3937
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3938
- _request_timeout: Union[
3939
- None,
3940
- Annotated[StrictFloat, Field(gt=0)],
3941
- Tuple[
3942
- Annotated[StrictFloat, Field(gt=0)],
3943
- Annotated[StrictFloat, Field(gt=0)]
3944
- ]
3945
- ] = None,
3946
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3947
- _content_type: Optional[StrictStr] = None,
3948
- _headers: Optional[Dict[StrictStr, Any]] = None,
3949
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3950
- ) -> AsyncOperationResponse:
3951
- """Sync from a remote
3952
-
3953
- Trigger an asynchronous task to sync file content.
3954
-
3955
- :param file_file_repository_href: (required)
3956
- :type file_file_repository_href: str
3957
- :param repository_sync_url: (required)
3958
- :type repository_sync_url: RepositorySyncURL
3959
- :param x_task_diagnostics: List of profilers to use on tasks.
3960
- :type x_task_diagnostics: List[str]
3961
- :param _request_timeout: timeout setting for this request. If one
3962
- number provided, it will be total request
3963
- timeout. It can also be a pair (tuple) of
3964
- (connection, read) timeouts.
3965
- :type _request_timeout: int, tuple(int, int), optional
3966
- :param _request_auth: set to override the auth_settings for an a single
3967
- request; this effectively ignores the
3968
- authentication in the spec for a single request.
3969
- :type _request_auth: dict, optional
3970
- :param _content_type: force content-type for the request.
3971
- :type _content_type: str, Optional
3972
- :param _headers: set to override the headers for a single
3973
- request; this effectively ignores the headers
3974
- in the spec for a single request.
3975
- :type _headers: dict, optional
3976
- :param _host_index: set to override the host_index for a single
3977
- request; this effectively ignores the host_index
3978
- in the spec for a single request.
3979
- :type _host_index: int, optional
3980
- :return: Returns the result object.
3981
- """ # noqa: E501
3982
-
3983
- _param = self._sync_serialize(
3984
- file_file_repository_href=file_file_repository_href,
3985
- repository_sync_url=repository_sync_url,
3986
- x_task_diagnostics=x_task_diagnostics,
3987
- _request_auth=_request_auth,
3988
- _content_type=_content_type,
3989
- _headers=_headers,
3990
- _host_index=_host_index
3991
- )
3992
-
3993
- _response_types_map: Dict[str, Optional[str]] = {
3994
- '202': "AsyncOperationResponse",
3995
- }
3996
- response_data = self.api_client.call_api(
3997
- *_param,
3998
- _request_timeout=_request_timeout
3999
- )
4000
- response_data.read()
4001
- return self.api_client.response_deserialize(
4002
- response_data=response_data,
4003
- response_types_map=_response_types_map,
4004
- ).data
4005
-
4006
-
4007
- @validate_call
4008
- def sync_with_http_info(
4009
- self,
4010
- file_file_repository_href: StrictStr,
4011
- repository_sync_url: RepositorySyncURL,
4012
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4013
- _request_timeout: Union[
4014
- None,
4015
- Annotated[StrictFloat, Field(gt=0)],
4016
- Tuple[
4017
- Annotated[StrictFloat, Field(gt=0)],
4018
- Annotated[StrictFloat, Field(gt=0)]
4019
- ]
4020
- ] = None,
4021
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4022
- _content_type: Optional[StrictStr] = None,
4023
- _headers: Optional[Dict[StrictStr, Any]] = None,
4024
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4025
- ) -> ApiResponse[AsyncOperationResponse]:
4026
- """Sync from a remote
4027
-
4028
- Trigger an asynchronous task to sync file content.
4029
-
4030
- :param file_file_repository_href: (required)
4031
- :type file_file_repository_href: str
4032
- :param repository_sync_url: (required)
4033
- :type repository_sync_url: RepositorySyncURL
4034
- :param x_task_diagnostics: List of profilers to use on tasks.
4035
- :type x_task_diagnostics: List[str]
4036
- :param _request_timeout: timeout setting for this request. If one
4037
- number provided, it will be total request
4038
- timeout. It can also be a pair (tuple) of
4039
- (connection, read) timeouts.
4040
- :type _request_timeout: int, tuple(int, int), optional
4041
- :param _request_auth: set to override the auth_settings for an a single
4042
- request; this effectively ignores the
4043
- authentication in the spec for a single request.
4044
- :type _request_auth: dict, optional
4045
- :param _content_type: force content-type for the request.
4046
- :type _content_type: str, Optional
4047
- :param _headers: set to override the headers for a single
4048
- request; this effectively ignores the headers
4049
- in the spec for a single request.
4050
- :type _headers: dict, optional
4051
- :param _host_index: set to override the host_index for a single
4052
- request; this effectively ignores the host_index
4053
- in the spec for a single request.
4054
- :type _host_index: int, optional
4055
- :return: Returns the result object.
4056
- """ # noqa: E501
4057
-
4058
- _param = self._sync_serialize(
4059
- file_file_repository_href=file_file_repository_href,
4060
- repository_sync_url=repository_sync_url,
4061
- x_task_diagnostics=x_task_diagnostics,
4062
- _request_auth=_request_auth,
4063
- _content_type=_content_type,
4064
- _headers=_headers,
4065
- _host_index=_host_index
4066
- )
4067
-
4068
- _response_types_map: Dict[str, Optional[str]] = {
4069
- '202': "AsyncOperationResponse",
4070
- }
4071
- response_data = self.api_client.call_api(
4072
- *_param,
4073
- _request_timeout=_request_timeout
4074
- )
4075
- response_data.read()
4076
- return self.api_client.response_deserialize(
4077
- response_data=response_data,
4078
- response_types_map=_response_types_map,
4079
- )
4080
-
4081
-
4082
- @validate_call
4083
- def sync_without_preload_content(
4084
- self,
4085
- file_file_repository_href: StrictStr,
4086
- repository_sync_url: RepositorySyncURL,
4087
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4088
- _request_timeout: Union[
4089
- None,
4090
- Annotated[StrictFloat, Field(gt=0)],
4091
- Tuple[
4092
- Annotated[StrictFloat, Field(gt=0)],
4093
- Annotated[StrictFloat, Field(gt=0)]
4094
- ]
4095
- ] = None,
4096
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4097
- _content_type: Optional[StrictStr] = None,
4098
- _headers: Optional[Dict[StrictStr, Any]] = None,
4099
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4100
- ) -> RESTResponseType:
4101
- """Sync from a remote
4102
-
4103
- Trigger an asynchronous task to sync file content.
4104
-
4105
- :param file_file_repository_href: (required)
4106
- :type file_file_repository_href: str
4107
- :param repository_sync_url: (required)
4108
- :type repository_sync_url: RepositorySyncURL
4109
- :param x_task_diagnostics: List of profilers to use on tasks.
4110
- :type x_task_diagnostics: List[str]
4111
- :param _request_timeout: timeout setting for this request. If one
4112
- number provided, it will be total request
4113
- timeout. It can also be a pair (tuple) of
4114
- (connection, read) timeouts.
4115
- :type _request_timeout: int, tuple(int, int), optional
4116
- :param _request_auth: set to override the auth_settings for an a single
4117
- request; this effectively ignores the
4118
- authentication in the spec for a single request.
4119
- :type _request_auth: dict, optional
4120
- :param _content_type: force content-type for the request.
4121
- :type _content_type: str, Optional
4122
- :param _headers: set to override the headers for a single
4123
- request; this effectively ignores the headers
4124
- in the spec for a single request.
4125
- :type _headers: dict, optional
4126
- :param _host_index: set to override the host_index for a single
4127
- request; this effectively ignores the host_index
4128
- in the spec for a single request.
4129
- :type _host_index: int, optional
4130
- :return: Returns the result object.
4131
- """ # noqa: E501
4132
-
4133
- _param = self._sync_serialize(
4134
- file_file_repository_href=file_file_repository_href,
4135
- repository_sync_url=repository_sync_url,
4136
- x_task_diagnostics=x_task_diagnostics,
4137
- _request_auth=_request_auth,
4138
- _content_type=_content_type,
4139
- _headers=_headers,
4140
- _host_index=_host_index
4141
- )
4142
-
4143
- _response_types_map: Dict[str, Optional[str]] = {
4144
- '202': "AsyncOperationResponse",
4145
- }
4146
- response_data = self.api_client.call_api(
4147
- *_param,
4148
- _request_timeout=_request_timeout
4149
- )
4150
- return response_data.response
4151
-
4152
-
4153
- def _sync_serialize(
4154
- self,
4155
- file_file_repository_href,
4156
- repository_sync_url,
4157
- x_task_diagnostics,
4158
- _request_auth,
4159
- _content_type,
4160
- _headers,
4161
- _host_index,
4162
- ) -> RequestSerialized:
4163
-
4164
- _host = None
4165
-
4166
- _collection_formats: Dict[str, str] = {
4167
- 'X-Task-Diagnostics': 'csv',
4168
- }
4169
-
4170
- _path_params: Dict[str, str] = {}
4171
- _query_params: List[Tuple[str, str]] = []
4172
- _header_params: Dict[str, Optional[str]] = _headers or {}
4173
- _form_params: List[Tuple[str, str]] = []
4174
- _files: Dict[
4175
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4176
- ] = {}
4177
- _body_params: Optional[bytes] = None
4178
-
4179
- # process the path parameters
4180
- if file_file_repository_href is not None:
4181
- _path_params['file_file_repository_href'] = file_file_repository_href
4182
- # process the query parameters
4183
- # process the header parameters
4184
- if x_task_diagnostics is not None:
4185
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4186
- # process the form parameters
4187
- # process the body parameter
4188
- if repository_sync_url is not None:
4189
- _body_params = repository_sync_url
4190
-
4191
-
4192
- # set the HTTP header `Accept`
4193
- if 'Accept' not in _header_params:
4194
- _header_params['Accept'] = self.api_client.select_header_accept(
4195
- [
4196
- 'application/json'
4197
- ]
4198
- )
4199
-
4200
- # set the HTTP header `Content-Type`
4201
- if _content_type:
4202
- _header_params['Content-Type'] = _content_type
4203
- else:
4204
- _default_content_type = (
4205
- self.api_client.select_header_content_type(
4206
- [
4207
- 'application/json',
4208
- 'application/x-www-form-urlencoded',
4209
- 'multipart/form-data'
4210
- ]
4211
- )
4212
- )
4213
- if _default_content_type is not None:
4214
- _header_params['Content-Type'] = _default_content_type
4215
-
4216
- # authentication setting
4217
- _auth_settings: List[str] = [
4218
- 'json_header_remote_authentication',
4219
- 'basicAuth',
4220
- 'cookieAuth'
4221
- ]
4222
-
4223
- return self.api_client.param_serialize(
4224
- method='POST',
4225
- resource_path='{file_file_repository_href}sync/',
4226
- path_params=_path_params,
4227
- query_params=_query_params,
4228
- header_params=_header_params,
4229
- body=_body_params,
4230
- post_params=_form_params,
4231
- files=_files,
4232
- auth_settings=_auth_settings,
4233
- collection_formats=_collection_formats,
4234
- _host=_host,
4235
- _request_auth=_request_auth
4236
- )
4237
-
4238
-
4239
-
4240
-
4241
- @validate_call
4242
- def unset_label(
4243
- self,
4244
- file_file_repository_href: StrictStr,
4245
- unset_label: UnsetLabel,
4246
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4247
- _request_timeout: Union[
4248
- None,
4249
- Annotated[StrictFloat, Field(gt=0)],
4250
- Tuple[
4251
- Annotated[StrictFloat, Field(gt=0)],
4252
- Annotated[StrictFloat, Field(gt=0)]
4253
- ]
4254
- ] = None,
4255
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4256
- _content_type: Optional[StrictStr] = None,
4257
- _headers: Optional[Dict[StrictStr, Any]] = None,
4258
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4259
- ) -> UnsetLabelResponse:
4260
- """Unset a label
4261
-
4262
- Unset a single pulp_label on the object.
4263
-
4264
- :param file_file_repository_href: (required)
4265
- :type file_file_repository_href: str
4266
- :param unset_label: (required)
4267
- :type unset_label: UnsetLabel
4268
- :param x_task_diagnostics: List of profilers to use on tasks.
4269
- :type x_task_diagnostics: List[str]
4270
- :param _request_timeout: timeout setting for this request. If one
4271
- number provided, it will be total request
4272
- timeout. It can also be a pair (tuple) of
4273
- (connection, read) timeouts.
4274
- :type _request_timeout: int, tuple(int, int), optional
4275
- :param _request_auth: set to override the auth_settings for an a single
4276
- request; this effectively ignores the
4277
- authentication in the spec for a single request.
4278
- :type _request_auth: dict, optional
4279
- :param _content_type: force content-type for the request.
4280
- :type _content_type: str, Optional
4281
- :param _headers: set to override the headers for a single
4282
- request; this effectively ignores the headers
4283
- in the spec for a single request.
4284
- :type _headers: dict, optional
4285
- :param _host_index: set to override the host_index for a single
4286
- request; this effectively ignores the host_index
4287
- in the spec for a single request.
4288
- :type _host_index: int, optional
4289
- :return: Returns the result object.
4290
- """ # noqa: E501
4291
-
4292
- _param = self._unset_label_serialize(
4293
- file_file_repository_href=file_file_repository_href,
4294
- unset_label=unset_label,
4295
- x_task_diagnostics=x_task_diagnostics,
4296
- _request_auth=_request_auth,
4297
- _content_type=_content_type,
4298
- _headers=_headers,
4299
- _host_index=_host_index
4300
- )
4301
-
4302
- _response_types_map: Dict[str, Optional[str]] = {
4303
- '201': "UnsetLabelResponse",
4304
- }
4305
- response_data = self.api_client.call_api(
4306
- *_param,
4307
- _request_timeout=_request_timeout
4308
- )
4309
- response_data.read()
4310
- return self.api_client.response_deserialize(
4311
- response_data=response_data,
4312
- response_types_map=_response_types_map,
4313
- ).data
4314
-
4315
-
4316
- @validate_call
4317
- def unset_label_with_http_info(
4318
- self,
4319
- file_file_repository_href: StrictStr,
4320
- unset_label: UnsetLabel,
4321
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4322
- _request_timeout: Union[
4323
- None,
4324
- Annotated[StrictFloat, Field(gt=0)],
4325
- Tuple[
4326
- Annotated[StrictFloat, Field(gt=0)],
4327
- Annotated[StrictFloat, Field(gt=0)]
4328
- ]
4329
- ] = None,
4330
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4331
- _content_type: Optional[StrictStr] = None,
4332
- _headers: Optional[Dict[StrictStr, Any]] = None,
4333
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4334
- ) -> ApiResponse[UnsetLabelResponse]:
4335
- """Unset a label
4336
-
4337
- Unset a single pulp_label on the object.
4338
-
4339
- :param file_file_repository_href: (required)
4340
- :type file_file_repository_href: str
4341
- :param unset_label: (required)
4342
- :type unset_label: UnsetLabel
4343
- :param x_task_diagnostics: List of profilers to use on tasks.
4344
- :type x_task_diagnostics: List[str]
4345
- :param _request_timeout: timeout setting for this request. If one
4346
- number provided, it will be total request
4347
- timeout. It can also be a pair (tuple) of
4348
- (connection, read) timeouts.
4349
- :type _request_timeout: int, tuple(int, int), optional
4350
- :param _request_auth: set to override the auth_settings for an a single
4351
- request; this effectively ignores the
4352
- authentication in the spec for a single request.
4353
- :type _request_auth: dict, optional
4354
- :param _content_type: force content-type for the request.
4355
- :type _content_type: str, Optional
4356
- :param _headers: set to override the headers for a single
4357
- request; this effectively ignores the headers
4358
- in the spec for a single request.
4359
- :type _headers: dict, optional
4360
- :param _host_index: set to override the host_index for a single
4361
- request; this effectively ignores the host_index
4362
- in the spec for a single request.
4363
- :type _host_index: int, optional
4364
- :return: Returns the result object.
4365
- """ # noqa: E501
4366
-
4367
- _param = self._unset_label_serialize(
4368
- file_file_repository_href=file_file_repository_href,
4369
- unset_label=unset_label,
4370
- x_task_diagnostics=x_task_diagnostics,
4371
- _request_auth=_request_auth,
4372
- _content_type=_content_type,
4373
- _headers=_headers,
4374
- _host_index=_host_index
4375
- )
4376
-
4377
- _response_types_map: Dict[str, Optional[str]] = {
4378
- '201': "UnsetLabelResponse",
4379
- }
4380
- response_data = self.api_client.call_api(
4381
- *_param,
4382
- _request_timeout=_request_timeout
4383
- )
4384
- response_data.read()
4385
- return self.api_client.response_deserialize(
4386
- response_data=response_data,
4387
- response_types_map=_response_types_map,
4388
- )
4389
-
4390
-
4391
- @validate_call
4392
- def unset_label_without_preload_content(
4393
- self,
4394
- file_file_repository_href: StrictStr,
4395
- unset_label: UnsetLabel,
4396
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4397
- _request_timeout: Union[
4398
- None,
4399
- Annotated[StrictFloat, Field(gt=0)],
4400
- Tuple[
4401
- Annotated[StrictFloat, Field(gt=0)],
4402
- Annotated[StrictFloat, Field(gt=0)]
4403
- ]
4404
- ] = None,
4405
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4406
- _content_type: Optional[StrictStr] = None,
4407
- _headers: Optional[Dict[StrictStr, Any]] = None,
4408
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4409
- ) -> RESTResponseType:
4410
- """Unset a label
4411
-
4412
- Unset a single pulp_label on the object.
4413
-
4414
- :param file_file_repository_href: (required)
4415
- :type file_file_repository_href: str
4416
- :param unset_label: (required)
4417
- :type unset_label: UnsetLabel
4418
- :param x_task_diagnostics: List of profilers to use on tasks.
4419
- :type x_task_diagnostics: List[str]
4420
- :param _request_timeout: timeout setting for this request. If one
4421
- number provided, it will be total request
4422
- timeout. It can also be a pair (tuple) of
4423
- (connection, read) timeouts.
4424
- :type _request_timeout: int, tuple(int, int), optional
4425
- :param _request_auth: set to override the auth_settings for an a single
4426
- request; this effectively ignores the
4427
- authentication in the spec for a single request.
4428
- :type _request_auth: dict, optional
4429
- :param _content_type: force content-type for the request.
4430
- :type _content_type: str, Optional
4431
- :param _headers: set to override the headers for a single
4432
- request; this effectively ignores the headers
4433
- in the spec for a single request.
4434
- :type _headers: dict, optional
4435
- :param _host_index: set to override the host_index for a single
4436
- request; this effectively ignores the host_index
4437
- in the spec for a single request.
4438
- :type _host_index: int, optional
4439
- :return: Returns the result object.
4440
- """ # noqa: E501
4441
-
4442
- _param = self._unset_label_serialize(
4443
- file_file_repository_href=file_file_repository_href,
4444
- unset_label=unset_label,
4445
- x_task_diagnostics=x_task_diagnostics,
4446
- _request_auth=_request_auth,
4447
- _content_type=_content_type,
4448
- _headers=_headers,
4449
- _host_index=_host_index
4450
- )
4451
-
4452
- _response_types_map: Dict[str, Optional[str]] = {
4453
- '201': "UnsetLabelResponse",
4454
- }
4455
- response_data = self.api_client.call_api(
4456
- *_param,
4457
- _request_timeout=_request_timeout
4458
- )
4459
- return response_data.response
4460
-
4461
-
4462
- def _unset_label_serialize(
4463
- self,
4464
- file_file_repository_href,
4465
- unset_label,
4466
- x_task_diagnostics,
4467
- _request_auth,
4468
- _content_type,
4469
- _headers,
4470
- _host_index,
4471
- ) -> RequestSerialized:
4472
-
4473
- _host = None
4474
-
4475
- _collection_formats: Dict[str, str] = {
4476
- 'X-Task-Diagnostics': 'csv',
4477
- }
4478
-
4479
- _path_params: Dict[str, str] = {}
4480
- _query_params: List[Tuple[str, str]] = []
4481
- _header_params: Dict[str, Optional[str]] = _headers or {}
4482
- _form_params: List[Tuple[str, str]] = []
4483
- _files: Dict[
4484
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4485
- ] = {}
4486
- _body_params: Optional[bytes] = None
4487
-
4488
- # process the path parameters
4489
- if file_file_repository_href is not None:
4490
- _path_params['file_file_repository_href'] = file_file_repository_href
4491
- # process the query parameters
4492
- # process the header parameters
4493
- if x_task_diagnostics is not None:
4494
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4495
- # process the form parameters
4496
- # process the body parameter
4497
- if unset_label is not None:
4498
- _body_params = unset_label
4499
-
4500
-
4501
- # set the HTTP header `Accept`
4502
- if 'Accept' not in _header_params:
4503
- _header_params['Accept'] = self.api_client.select_header_accept(
4504
- [
4505
- 'application/json'
4506
- ]
4507
- )
4508
-
4509
- # set the HTTP header `Content-Type`
4510
- if _content_type:
4511
- _header_params['Content-Type'] = _content_type
4512
- else:
4513
- _default_content_type = (
4514
- self.api_client.select_header_content_type(
4515
- [
4516
- 'application/json',
4517
- 'application/x-www-form-urlencoded',
4518
- 'multipart/form-data'
4519
- ]
4520
- )
4521
- )
4522
- if _default_content_type is not None:
4523
- _header_params['Content-Type'] = _default_content_type
4524
-
4525
- # authentication setting
4526
- _auth_settings: List[str] = [
4527
- 'json_header_remote_authentication',
4528
- 'basicAuth',
4529
- 'cookieAuth'
4530
- ]
4531
-
4532
- return self.api_client.param_serialize(
4533
- method='POST',
4534
- resource_path='{file_file_repository_href}unset_label/',
4535
- path_params=_path_params,
4536
- query_params=_query_params,
4537
- header_params=_header_params,
4538
- body=_body_params,
4539
- post_params=_form_params,
4540
- files=_files,
4541
- auth_settings=_auth_settings,
4542
- collection_formats=_collection_formats,
4543
- _host=_host,
4544
- _request_auth=_request_auth
4545
- )
4546
-
4547
-
4548
-
4549
-
4550
- @validate_call
4551
- def update(
4552
- self,
4553
- file_file_repository_href: StrictStr,
4554
- file_file_repository: FileFileRepository,
4555
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4556
- _request_timeout: Union[
4557
- None,
4558
- Annotated[StrictFloat, Field(gt=0)],
4559
- Tuple[
4560
- Annotated[StrictFloat, Field(gt=0)],
4561
- Annotated[StrictFloat, Field(gt=0)]
4562
- ]
4563
- ] = None,
4564
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4565
- _content_type: Optional[StrictStr] = None,
4566
- _headers: Optional[Dict[StrictStr, Any]] = None,
4567
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4568
- ) -> AsyncOperationResponse:
4569
- """Update a file repository
4570
-
4571
- Trigger an asynchronous update task
4572
-
4573
- :param file_file_repository_href: (required)
4574
- :type file_file_repository_href: str
4575
- :param file_file_repository: (required)
4576
- :type file_file_repository: FileFileRepository
4577
- :param x_task_diagnostics: List of profilers to use on tasks.
4578
- :type x_task_diagnostics: List[str]
4579
- :param _request_timeout: timeout setting for this request. If one
4580
- number provided, it will be total request
4581
- timeout. It can also be a pair (tuple) of
4582
- (connection, read) timeouts.
4583
- :type _request_timeout: int, tuple(int, int), optional
4584
- :param _request_auth: set to override the auth_settings for an a single
4585
- request; this effectively ignores the
4586
- authentication in the spec for a single request.
4587
- :type _request_auth: dict, optional
4588
- :param _content_type: force content-type for the request.
4589
- :type _content_type: str, Optional
4590
- :param _headers: set to override the headers for a single
4591
- request; this effectively ignores the headers
4592
- in the spec for a single request.
4593
- :type _headers: dict, optional
4594
- :param _host_index: set to override the host_index for a single
4595
- request; this effectively ignores the host_index
4596
- in the spec for a single request.
4597
- :type _host_index: int, optional
4598
- :return: Returns the result object.
4599
- """ # noqa: E501
4600
-
4601
- _param = self._update_serialize(
4602
- file_file_repository_href=file_file_repository_href,
4603
- file_file_repository=file_file_repository,
4604
- x_task_diagnostics=x_task_diagnostics,
4605
- _request_auth=_request_auth,
4606
- _content_type=_content_type,
4607
- _headers=_headers,
4608
- _host_index=_host_index
4609
- )
4610
-
4611
- _response_types_map: Dict[str, Optional[str]] = {
4612
- '202': "AsyncOperationResponse",
4613
- }
4614
- response_data = self.api_client.call_api(
4615
- *_param,
4616
- _request_timeout=_request_timeout
4617
- )
4618
- response_data.read()
4619
- return self.api_client.response_deserialize(
4620
- response_data=response_data,
4621
- response_types_map=_response_types_map,
4622
- ).data
4623
-
4624
-
4625
- @validate_call
4626
- def update_with_http_info(
4627
- self,
4628
- file_file_repository_href: StrictStr,
4629
- file_file_repository: FileFileRepository,
4630
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4631
- _request_timeout: Union[
4632
- None,
4633
- Annotated[StrictFloat, Field(gt=0)],
4634
- Tuple[
4635
- Annotated[StrictFloat, Field(gt=0)],
4636
- Annotated[StrictFloat, Field(gt=0)]
4637
- ]
4638
- ] = None,
4639
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4640
- _content_type: Optional[StrictStr] = None,
4641
- _headers: Optional[Dict[StrictStr, Any]] = None,
4642
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4643
- ) -> ApiResponse[AsyncOperationResponse]:
4644
- """Update a file repository
4645
-
4646
- Trigger an asynchronous update task
4647
-
4648
- :param file_file_repository_href: (required)
4649
- :type file_file_repository_href: str
4650
- :param file_file_repository: (required)
4651
- :type file_file_repository: FileFileRepository
4652
- :param x_task_diagnostics: List of profilers to use on tasks.
4653
- :type x_task_diagnostics: List[str]
4654
- :param _request_timeout: timeout setting for this request. If one
4655
- number provided, it will be total request
4656
- timeout. It can also be a pair (tuple) of
4657
- (connection, read) timeouts.
4658
- :type _request_timeout: int, tuple(int, int), optional
4659
- :param _request_auth: set to override the auth_settings for an a single
4660
- request; this effectively ignores the
4661
- authentication in the spec for a single request.
4662
- :type _request_auth: dict, optional
4663
- :param _content_type: force content-type for the request.
4664
- :type _content_type: str, Optional
4665
- :param _headers: set to override the headers for a single
4666
- request; this effectively ignores the headers
4667
- in the spec for a single request.
4668
- :type _headers: dict, optional
4669
- :param _host_index: set to override the host_index for a single
4670
- request; this effectively ignores the host_index
4671
- in the spec for a single request.
4672
- :type _host_index: int, optional
4673
- :return: Returns the result object.
4674
- """ # noqa: E501
4675
-
4676
- _param = self._update_serialize(
4677
- file_file_repository_href=file_file_repository_href,
4678
- file_file_repository=file_file_repository,
4679
- x_task_diagnostics=x_task_diagnostics,
4680
- _request_auth=_request_auth,
4681
- _content_type=_content_type,
4682
- _headers=_headers,
4683
- _host_index=_host_index
4684
- )
4685
-
4686
- _response_types_map: Dict[str, Optional[str]] = {
4687
- '202': "AsyncOperationResponse",
4688
- }
4689
- response_data = self.api_client.call_api(
4690
- *_param,
4691
- _request_timeout=_request_timeout
4692
- )
4693
- response_data.read()
4694
- return self.api_client.response_deserialize(
4695
- response_data=response_data,
4696
- response_types_map=_response_types_map,
4697
- )
4698
-
4699
-
4700
- @validate_call
4701
- def update_without_preload_content(
4702
- self,
4703
- file_file_repository_href: StrictStr,
4704
- file_file_repository: FileFileRepository,
4705
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4706
- _request_timeout: Union[
4707
- None,
4708
- Annotated[StrictFloat, Field(gt=0)],
4709
- Tuple[
4710
- Annotated[StrictFloat, Field(gt=0)],
4711
- Annotated[StrictFloat, Field(gt=0)]
4712
- ]
4713
- ] = None,
4714
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
4715
- _content_type: Optional[StrictStr] = None,
4716
- _headers: Optional[Dict[StrictStr, Any]] = None,
4717
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4718
- ) -> RESTResponseType:
4719
- """Update a file repository
4720
-
4721
- Trigger an asynchronous update task
4722
-
4723
- :param file_file_repository_href: (required)
4724
- :type file_file_repository_href: str
4725
- :param file_file_repository: (required)
4726
- :type file_file_repository: FileFileRepository
4727
- :param x_task_diagnostics: List of profilers to use on tasks.
4728
- :type x_task_diagnostics: List[str]
4729
- :param _request_timeout: timeout setting for this request. If one
4730
- number provided, it will be total request
4731
- timeout. It can also be a pair (tuple) of
4732
- (connection, read) timeouts.
4733
- :type _request_timeout: int, tuple(int, int), optional
4734
- :param _request_auth: set to override the auth_settings for an a single
4735
- request; this effectively ignores the
4736
- authentication in the spec for a single request.
4737
- :type _request_auth: dict, optional
4738
- :param _content_type: force content-type for the request.
4739
- :type _content_type: str, Optional
4740
- :param _headers: set to override the headers for a single
4741
- request; this effectively ignores the headers
4742
- in the spec for a single request.
4743
- :type _headers: dict, optional
4744
- :param _host_index: set to override the host_index for a single
4745
- request; this effectively ignores the host_index
4746
- in the spec for a single request.
4747
- :type _host_index: int, optional
4748
- :return: Returns the result object.
4749
- """ # noqa: E501
4750
-
4751
- _param = self._update_serialize(
4752
- file_file_repository_href=file_file_repository_href,
4753
- file_file_repository=file_file_repository,
4754
- x_task_diagnostics=x_task_diagnostics,
4755
- _request_auth=_request_auth,
4756
- _content_type=_content_type,
4757
- _headers=_headers,
4758
- _host_index=_host_index
4759
- )
4760
-
4761
- _response_types_map: Dict[str, Optional[str]] = {
4762
- '202': "AsyncOperationResponse",
4763
- }
4764
- response_data = self.api_client.call_api(
4765
- *_param,
4766
- _request_timeout=_request_timeout
4767
- )
4768
- return response_data.response
4769
-
4770
-
4771
- def _update_serialize(
4772
- self,
4773
- file_file_repository_href,
4774
- file_file_repository,
4775
- x_task_diagnostics,
4776
- _request_auth,
4777
- _content_type,
4778
- _headers,
4779
- _host_index,
4780
- ) -> RequestSerialized:
4781
-
4782
- _host = None
4783
-
4784
- _collection_formats: Dict[str, str] = {
4785
- 'X-Task-Diagnostics': 'csv',
4786
- }
4787
-
4788
- _path_params: Dict[str, str] = {}
4789
- _query_params: List[Tuple[str, str]] = []
4790
- _header_params: Dict[str, Optional[str]] = _headers or {}
4791
- _form_params: List[Tuple[str, str]] = []
4792
- _files: Dict[
4793
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4794
- ] = {}
4795
- _body_params: Optional[bytes] = None
4796
-
4797
- # process the path parameters
4798
- if file_file_repository_href is not None:
4799
- _path_params['file_file_repository_href'] = file_file_repository_href
4800
- # process the query parameters
4801
- # process the header parameters
4802
- if x_task_diagnostics is not None:
4803
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4804
- # process the form parameters
4805
- # process the body parameter
4806
- if file_file_repository is not None:
4807
- _body_params = file_file_repository
4808
-
4809
-
4810
- # set the HTTP header `Accept`
4811
- if 'Accept' not in _header_params:
4812
- _header_params['Accept'] = self.api_client.select_header_accept(
4813
- [
4814
- 'application/json'
4815
- ]
4816
- )
4817
-
4818
- # set the HTTP header `Content-Type`
4819
- if _content_type:
4820
- _header_params['Content-Type'] = _content_type
4821
- else:
4822
- _default_content_type = (
4823
- self.api_client.select_header_content_type(
4824
- [
4825
- 'application/json',
4826
- 'application/x-www-form-urlencoded',
4827
- 'multipart/form-data'
4828
- ]
4829
- )
4830
- )
4831
- if _default_content_type is not None:
4832
- _header_params['Content-Type'] = _default_content_type
4833
-
4834
- # authentication setting
4835
- _auth_settings: List[str] = [
4836
- 'json_header_remote_authentication',
4837
- 'basicAuth',
4838
- 'cookieAuth'
4839
- ]
4840
-
4841
- return self.api_client.param_serialize(
4842
- method='PUT',
4843
- resource_path='{file_file_repository_href}',
4844
- path_params=_path_params,
4845
- query_params=_query_params,
4846
- header_params=_header_params,
4847
- body=_body_params,
4848
- post_params=_form_params,
4849
- files=_files,
4850
- auth_settings=_auth_settings,
4851
- collection_formats=_collection_formats,
4852
- _host=_host,
4853
- _request_auth=_request_auth
4854
- )
4855
-
4856
-