flywheel-sdk 20.5.0__py2.py3-none-any.whl → 20.6.0rc2__py2.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.
- flywheel/__init__.py +6 -1
- flywheel/api/__init__.py +1 -0
- flywheel/api/acquisitions_api.py +2 -2
- flywheel/api/analyses_api.py +2 -2
- flywheel/api/collections_api.py +2 -2
- flywheel/api/containers_api.py +21 -16
- flywheel/api/custom_filters_api.py +466 -0
- flywheel/api/files_api.py +2 -2
- flywheel/api/groups_api.py +2 -2
- flywheel/api/projects_api.py +2 -2
- flywheel/api/sessions_api.py +2 -2
- flywheel/api/subjects_api.py +2 -2
- flywheel/api_client.py +1 -1
- flywheel/configuration.py +2 -2
- flywheel/flywheel.py +72 -16
- flywheel/models/__init__.py +6 -2
- flywheel/models/core_models_custom_filters_filter.py +348 -0
- flywheel/models/{filter.py → core_models_paginations_filter.py} +16 -16
- flywheel/models/features.py +28 -1
- flywheel/models/filter_input.py +216 -0
- flywheel/models/filter_view.py +27 -0
- flywheel/models/page_generic_filter.py +217 -0
- flywheel/models/search_status.py +4 -33
- flywheel/models/site.py +58 -4
- flywheel/models/status_type.py +2 -2
- {flywheel_sdk-20.5.0.dist-info → flywheel_sdk-20.6.0rc2.dist-info}/METADATA +1 -1
- {flywheel_sdk-20.5.0.dist-info → flywheel_sdk-20.6.0rc2.dist-info}/RECORD +30 -25
- {flywheel_sdk-20.5.0.dist-info → flywheel_sdk-20.6.0rc2.dist-info}/WHEEL +0 -0
- {flywheel_sdk-20.5.0.dist-info → flywheel_sdk-20.6.0rc2.dist-info}/licenses/LICENSE.txt +0 -0
- {flywheel_sdk-20.5.0.dist-info → flywheel_sdk-20.6.0rc2.dist-info}/top_level.txt +0 -0
flywheel/__init__.py
CHANGED
|
@@ -30,6 +30,7 @@ from flywheel.api.collections_api import CollectionsApi
|
|
|
30
30
|
from flywheel.api.config_api import ConfigApi
|
|
31
31
|
from flywheel.api.container_type_api import ContainerTypeApi
|
|
32
32
|
from flywheel.api.containers_api import ContainersApi
|
|
33
|
+
from flywheel.api.custom_filters_api import CustomFiltersApi
|
|
33
34
|
from flywheel.api.data_view_executions_api import DataViewExecutionsApi
|
|
34
35
|
from flywheel.api.dataexplorer_api import DataexplorerApi
|
|
35
36
|
from flywheel.api.devices_api import DevicesApi
|
|
@@ -203,7 +204,9 @@ from flywheel.models.copy_filter import CopyFilter
|
|
|
203
204
|
from flywheel.models.copy_status import CopyStatus
|
|
204
205
|
from flywheel.models.core_models_api_key_api_key_input import CoreModelsApiKeyApiKeyInput
|
|
205
206
|
from flywheel.models.core_models_common_source import CoreModelsCommonSource
|
|
207
|
+
from flywheel.models.core_models_custom_filters_filter import CoreModelsCustomFiltersFilter
|
|
206
208
|
from flywheel.models.core_models_jobs_api_key_input import CoreModelsJobsApiKeyInput
|
|
209
|
+
from flywheel.models.core_models_paginations_filter import CoreModelsPaginationsFilter
|
|
207
210
|
from flywheel.models.create_report_input import CreateReportInput
|
|
208
211
|
from flywheel.models.creds import Creds
|
|
209
212
|
from flywheel.models.curator import Curator
|
|
@@ -293,8 +296,9 @@ from flywheel.models.file_version_output import FileVersionOutput
|
|
|
293
296
|
from flywheel.models.file_via import FileVia
|
|
294
297
|
from flywheel.models.file_zip_entry import FileZipEntry
|
|
295
298
|
from flywheel.models.file_zip_info import FileZipInfo
|
|
296
|
-
from flywheel.models.
|
|
299
|
+
from flywheel.models.filter_input import FilterInput
|
|
297
300
|
from flywheel.models.filter_values import FilterValues
|
|
301
|
+
from flywheel.models.filter_view import FilterView
|
|
298
302
|
from flywheel.models.fixed_file_version_input import FixedFileVersionInput
|
|
299
303
|
from flywheel.models.fixed_input import FixedInput
|
|
300
304
|
from flywheel.models.form_definition import FormDefinition
|
|
@@ -483,6 +487,7 @@ from flywheel.models.packfile_cleanup_output import PackfileCleanupOutput
|
|
|
483
487
|
from flywheel.models.packfile_removed_output import PackfileRemovedOutput
|
|
484
488
|
from flywheel.models.page import Page
|
|
485
489
|
from flywheel.models.page_generic_file_output import PageGenericFileOutput
|
|
490
|
+
from flywheel.models.page_generic_filter import PageGenericFilter
|
|
486
491
|
from flywheel.models.parent_type import ParentType
|
|
487
492
|
from flywheel.models.parsed_query_response import ParsedQueryResponse
|
|
488
493
|
from flywheel.models.permission_access_permission import PermissionAccessPermission
|
flywheel/api/__init__.py
CHANGED
|
@@ -14,6 +14,7 @@ from flywheel.api.collections_api import CollectionsApi
|
|
|
14
14
|
from flywheel.api.config_api import ConfigApi
|
|
15
15
|
from flywheel.api.container_type_api import ContainerTypeApi
|
|
16
16
|
from flywheel.api.containers_api import ContainersApi
|
|
17
|
+
from flywheel.api.custom_filters_api import CustomFiltersApi
|
|
17
18
|
from flywheel.api.data_view_executions_api import DataViewExecutionsApi
|
|
18
19
|
from flywheel.api.dataexplorer_api import DataexplorerApi
|
|
19
20
|
from flywheel.api.devices_api import DevicesApi
|
flywheel/api/acquisitions_api.py
CHANGED
|
@@ -1712,7 +1712,7 @@ class AcquisitionsApi(object):
|
|
|
1712
1712
|
Delete multiple acquisitions by query
|
|
1713
1713
|
This method makes a synchronous HTTP request by default.
|
|
1714
1714
|
|
|
1715
|
-
:param list[
|
|
1715
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
1716
1716
|
:param ContainerDeleteReason delete_reason:
|
|
1717
1717
|
:param bool async_: Perform the request asynchronously
|
|
1718
1718
|
:return: DeletedResult
|
|
@@ -1739,7 +1739,7 @@ class AcquisitionsApi(object):
|
|
|
1739
1739
|
Delete multiple acquisitions by query
|
|
1740
1740
|
This method makes a synchronous HTTP request by default.
|
|
1741
1741
|
|
|
1742
|
-
:param list[
|
|
1742
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
1743
1743
|
:param ContainerDeleteReason delete_reason:
|
|
1744
1744
|
:param bool async_: Perform the request asynchronously
|
|
1745
1745
|
:return: DeletedResult
|
flywheel/api/analyses_api.py
CHANGED
|
@@ -374,7 +374,7 @@ class AnalysesApi(object):
|
|
|
374
374
|
Delete multiple analyses by query
|
|
375
375
|
This method makes a synchronous HTTP request by default.
|
|
376
376
|
|
|
377
|
-
:param list[
|
|
377
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
378
378
|
:param ContainerDeleteReason delete_reason:
|
|
379
379
|
:param bool async_: Perform the request asynchronously
|
|
380
380
|
:return: DeletedResult
|
|
@@ -401,7 +401,7 @@ class AnalysesApi(object):
|
|
|
401
401
|
Delete multiple analyses by query
|
|
402
402
|
This method makes a synchronous HTTP request by default.
|
|
403
403
|
|
|
404
|
-
:param list[
|
|
404
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
405
405
|
:param ContainerDeleteReason delete_reason:
|
|
406
406
|
:param bool async_: Perform the request asynchronously
|
|
407
407
|
:return: DeletedResult
|
flywheel/api/collections_api.py
CHANGED
|
@@ -1341,7 +1341,7 @@ class CollectionsApi(object):
|
|
|
1341
1341
|
Delete multiple collections by query
|
|
1342
1342
|
This method makes a synchronous HTTP request by default.
|
|
1343
1343
|
|
|
1344
|
-
:param list[
|
|
1344
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
1345
1345
|
:param ContainerDeleteReason delete_reason:
|
|
1346
1346
|
:param bool async_: Perform the request asynchronously
|
|
1347
1347
|
:return: DeletedResult
|
|
@@ -1368,7 +1368,7 @@ class CollectionsApi(object):
|
|
|
1368
1368
|
Delete multiple collections by query
|
|
1369
1369
|
This method makes a synchronous HTTP request by default.
|
|
1370
1370
|
|
|
1371
|
-
:param list[
|
|
1371
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
1372
1372
|
:param ContainerDeleteReason delete_reason:
|
|
1373
1373
|
:param bool async_: Perform the request asynchronously
|
|
1374
1374
|
:return: DeletedResult
|
flywheel/api/containers_api.py
CHANGED
|
@@ -3409,14 +3409,15 @@ class ContainersApi(object):
|
|
|
3409
3409
|
This method makes a synchronous HTTP request by default.
|
|
3410
3410
|
|
|
3411
3411
|
:param str container_id: The ID of the container, one of user, group or project. Use \"site\" as containerId to save or get a site data view. (required)
|
|
3412
|
-
:param str filter:
|
|
3413
|
-
:param str sort:
|
|
3414
|
-
:param int limit:
|
|
3415
|
-
:param int skip:
|
|
3416
|
-
:param int page:
|
|
3417
|
-
:param str after_id:
|
|
3412
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
3413
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
3414
|
+
:param int limit: The maximum number of entries to return.
|
|
3415
|
+
:param int skip: The number of entries to skip.
|
|
3416
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
3417
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
3418
|
+
:param list[union[HeaderFeature,str]] x_accept_feature:
|
|
3418
3419
|
:param bool async_: Perform the request asynchronously
|
|
3419
|
-
:return: list[ViewOutput]
|
|
3420
|
+
:return: union[Page,list[ViewOutput]]
|
|
3420
3421
|
"""
|
|
3421
3422
|
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
3422
3423
|
kwargs['_return_http_data_only'] = True
|
|
@@ -3441,17 +3442,18 @@ class ContainersApi(object):
|
|
|
3441
3442
|
This method makes a synchronous HTTP request by default.
|
|
3442
3443
|
|
|
3443
3444
|
:param str container_id: The ID of the container, one of user, group or project. Use \"site\" as containerId to save or get a site data view. (required)
|
|
3444
|
-
:param str filter:
|
|
3445
|
-
:param str sort:
|
|
3446
|
-
:param int limit:
|
|
3447
|
-
:param int skip:
|
|
3448
|
-
:param int page:
|
|
3449
|
-
:param str after_id:
|
|
3445
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
3446
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
3447
|
+
:param int limit: The maximum number of entries to return.
|
|
3448
|
+
:param int skip: The number of entries to skip.
|
|
3449
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
3450
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
3451
|
+
:param list[union[HeaderFeature,str]] x_accept_feature:
|
|
3450
3452
|
:param bool async_: Perform the request asynchronously
|
|
3451
|
-
:return: list[ViewOutput]
|
|
3453
|
+
:return: union[Page,list[ViewOutput]]
|
|
3452
3454
|
"""
|
|
3453
3455
|
|
|
3454
|
-
all_params = ['container_id','filter','sort','limit','skip','page','after_id',] # noqa: E501
|
|
3456
|
+
all_params = ['container_id','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
|
|
3455
3457
|
all_params.append('async_')
|
|
3456
3458
|
all_params.append('_return_http_data_only')
|
|
3457
3459
|
all_params.append('_preload_content')
|
|
@@ -3494,6 +3496,9 @@ class ContainersApi(object):
|
|
|
3494
3496
|
query_params.append(('after_id', params['after_id'])) # noqa: E501
|
|
3495
3497
|
|
|
3496
3498
|
header_params = {}
|
|
3499
|
+
if 'x_accept_feature' in params:
|
|
3500
|
+
header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
|
|
3501
|
+
collection_formats['x-accept-feature'] = '' # noqa: E501
|
|
3497
3502
|
|
|
3498
3503
|
form_params = []
|
|
3499
3504
|
local_var_files = {}
|
|
@@ -3514,7 +3519,7 @@ class ContainersApi(object):
|
|
|
3514
3519
|
body=body_params,
|
|
3515
3520
|
post_params=form_params,
|
|
3516
3521
|
files=local_var_files,
|
|
3517
|
-
response_type='list[ViewOutput]', # noqa: E501
|
|
3522
|
+
response_type='union[Page,list[ViewOutput]]', # noqa: E501
|
|
3518
3523
|
auth_settings=auth_settings,
|
|
3519
3524
|
async_=params.get('async_'),
|
|
3520
3525
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Flywheel
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 0.0.1
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
|
|
18
|
+
# python 2 and python 3 compatibility library
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
from flywheel.api_client import ApiClient
|
|
22
|
+
import flywheel.models
|
|
23
|
+
from flywheel.util import check_filename_params
|
|
24
|
+
|
|
25
|
+
# NOTE: This file is auto generated by the swagger code generator program.
|
|
26
|
+
# Do not edit the class manually.
|
|
27
|
+
|
|
28
|
+
class CustomFiltersApi(object):
|
|
29
|
+
def __init__(self, api_client=None):
|
|
30
|
+
if api_client is None:
|
|
31
|
+
api_client = ApiClient()
|
|
32
|
+
self.api_client = api_client
|
|
33
|
+
|
|
34
|
+
def create_custom_filter(self, body, **kwargs): # noqa: E501
|
|
35
|
+
"""Create a custom filter for user
|
|
36
|
+
|
|
37
|
+
Creates a custom filter for the user Args: filter_input: The input model for creating a filter auth_session: The user auth session for permission Checks Returns: Filter: A customer saved filter Raises: BusinessLogicError: when auth session does not have user set
|
|
38
|
+
This method makes a synchronous HTTP request by default.
|
|
39
|
+
|
|
40
|
+
:param FilterInput body: (required)
|
|
41
|
+
:param bool async_: Perform the request asynchronously
|
|
42
|
+
:return: CoreModelsCustomFiltersFilter
|
|
43
|
+
"""
|
|
44
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
45
|
+
kwargs['_return_http_data_only'] = True
|
|
46
|
+
|
|
47
|
+
if kwargs.get('async_'):
|
|
48
|
+
return self.create_custom_filter_with_http_info(body, **kwargs) # noqa: E501
|
|
49
|
+
else:
|
|
50
|
+
(data) = self.create_custom_filter_with_http_info(body, **kwargs) # noqa: E501
|
|
51
|
+
if (
|
|
52
|
+
data
|
|
53
|
+
and hasattr(data, 'return_value')
|
|
54
|
+
and not ignore_simplified_return_value
|
|
55
|
+
):
|
|
56
|
+
return data.return_value()
|
|
57
|
+
return data
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def create_custom_filter_with_http_info(self, body, **kwargs): # noqa: E501
|
|
61
|
+
"""Create a custom filter for user
|
|
62
|
+
|
|
63
|
+
Creates a custom filter for the user Args: filter_input: The input model for creating a filter auth_session: The user auth session for permission Checks Returns: Filter: A customer saved filter Raises: BusinessLogicError: when auth session does not have user set
|
|
64
|
+
This method makes a synchronous HTTP request by default.
|
|
65
|
+
|
|
66
|
+
:param FilterInput body: (required)
|
|
67
|
+
:param bool async_: Perform the request asynchronously
|
|
68
|
+
:return: CoreModelsCustomFiltersFilter
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['body',] # noqa: E501
|
|
72
|
+
all_params.append('async_')
|
|
73
|
+
all_params.append('_return_http_data_only')
|
|
74
|
+
all_params.append('_preload_content')
|
|
75
|
+
all_params.append('_request_timeout')
|
|
76
|
+
all_params.append('_request_out')
|
|
77
|
+
|
|
78
|
+
params = locals()
|
|
79
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
80
|
+
if key not in all_params:
|
|
81
|
+
raise TypeError(
|
|
82
|
+
"Got an unexpected keyword argument '%s'"
|
|
83
|
+
" to method create_custom_filter" % key
|
|
84
|
+
)
|
|
85
|
+
params[key] = val
|
|
86
|
+
del params['kwargs']
|
|
87
|
+
# verify the required parameter 'body' is set
|
|
88
|
+
if ('body' not in params or
|
|
89
|
+
params['body'] is None):
|
|
90
|
+
raise ValueError("Missing the required parameter `body` when calling `create_custom_filter`") # noqa: E501
|
|
91
|
+
check_filename_params(params)
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
if 'body' in params:
|
|
106
|
+
if 'FilterInput'.startswith('union'):
|
|
107
|
+
body_type = type(params['body'])
|
|
108
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
109
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
110
|
+
else:
|
|
111
|
+
body_params = params['body']
|
|
112
|
+
else:
|
|
113
|
+
body_params = flywheel.models.FilterInput.positional_to_model(params['body'])
|
|
114
|
+
# HTTP header `Accept`
|
|
115
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
116
|
+
['application/json']) # noqa: E501
|
|
117
|
+
|
|
118
|
+
# HTTP header `Content-Type`
|
|
119
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
120
|
+
['application/json']) # noqa: E501
|
|
121
|
+
|
|
122
|
+
# Authentication setting
|
|
123
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
124
|
+
|
|
125
|
+
return self.api_client.call_api(
|
|
126
|
+
'/custom_filters', 'POST',
|
|
127
|
+
path_params,
|
|
128
|
+
query_params,
|
|
129
|
+
header_params,
|
|
130
|
+
body=body_params,
|
|
131
|
+
post_params=form_params,
|
|
132
|
+
files=local_var_files,
|
|
133
|
+
response_type='CoreModelsCustomFiltersFilter', # noqa: E501
|
|
134
|
+
auth_settings=auth_settings,
|
|
135
|
+
async_=params.get('async_'),
|
|
136
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
137
|
+
_preload_content=params.get('_preload_content', True),
|
|
138
|
+
_request_timeout=params.get('_request_timeout'),
|
|
139
|
+
_request_out=params.get('_request_out'),
|
|
140
|
+
collection_formats=collection_formats)
|
|
141
|
+
|
|
142
|
+
def delete_custom_filter(self, custom_filter_id, **kwargs): # noqa: E501
|
|
143
|
+
"""Delete a custom filter for user
|
|
144
|
+
|
|
145
|
+
Deletes a custom filter for the authenticated user Args: custom_filter_id: The ID of the filter to delete auth_session: The user auth session for permission checks Returns: DeletedResult: Result indicating the number of deleted filters Raises: BusinessLogicError: when auth session does not have user privilege ResourceNotFound: when the filter doesn't exist PermissionError: when the filter doesn't belong to the user's origin
|
|
146
|
+
This method makes a synchronous HTTP request by default.
|
|
147
|
+
|
|
148
|
+
:param str custom_filter_id: (required)
|
|
149
|
+
:param bool async_: Perform the request asynchronously
|
|
150
|
+
:return: DeletedResult
|
|
151
|
+
"""
|
|
152
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
153
|
+
kwargs['_return_http_data_only'] = True
|
|
154
|
+
|
|
155
|
+
if kwargs.get('async_'):
|
|
156
|
+
return self.delete_custom_filter_with_http_info(custom_filter_id, **kwargs) # noqa: E501
|
|
157
|
+
else:
|
|
158
|
+
(data) = self.delete_custom_filter_with_http_info(custom_filter_id, **kwargs) # noqa: E501
|
|
159
|
+
if (
|
|
160
|
+
data
|
|
161
|
+
and hasattr(data, 'return_value')
|
|
162
|
+
and not ignore_simplified_return_value
|
|
163
|
+
):
|
|
164
|
+
return data.return_value()
|
|
165
|
+
return data
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def delete_custom_filter_with_http_info(self, custom_filter_id, **kwargs): # noqa: E501
|
|
169
|
+
"""Delete a custom filter for user
|
|
170
|
+
|
|
171
|
+
Deletes a custom filter for the authenticated user Args: custom_filter_id: The ID of the filter to delete auth_session: The user auth session for permission checks Returns: DeletedResult: Result indicating the number of deleted filters Raises: BusinessLogicError: when auth session does not have user privilege ResourceNotFound: when the filter doesn't exist PermissionError: when the filter doesn't belong to the user's origin
|
|
172
|
+
This method makes a synchronous HTTP request by default.
|
|
173
|
+
|
|
174
|
+
:param str custom_filter_id: (required)
|
|
175
|
+
:param bool async_: Perform the request asynchronously
|
|
176
|
+
:return: DeletedResult
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
all_params = ['custom_filter_id',] # noqa: E501
|
|
180
|
+
all_params.append('async_')
|
|
181
|
+
all_params.append('_return_http_data_only')
|
|
182
|
+
all_params.append('_preload_content')
|
|
183
|
+
all_params.append('_request_timeout')
|
|
184
|
+
all_params.append('_request_out')
|
|
185
|
+
|
|
186
|
+
params = locals()
|
|
187
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
188
|
+
if key not in all_params:
|
|
189
|
+
raise TypeError(
|
|
190
|
+
"Got an unexpected keyword argument '%s'"
|
|
191
|
+
" to method delete_custom_filter" % key
|
|
192
|
+
)
|
|
193
|
+
params[key] = val
|
|
194
|
+
del params['kwargs']
|
|
195
|
+
# verify the required parameter 'custom_filter_id' is set
|
|
196
|
+
if ('custom_filter_id' not in params or
|
|
197
|
+
params['custom_filter_id'] is None):
|
|
198
|
+
raise ValueError("Missing the required parameter `custom_filter_id` when calling `delete_custom_filter`") # noqa: E501
|
|
199
|
+
check_filename_params(params)
|
|
200
|
+
|
|
201
|
+
collection_formats = {}
|
|
202
|
+
|
|
203
|
+
path_params = {}
|
|
204
|
+
if 'custom_filter_id' in params:
|
|
205
|
+
path_params['custom_filter_id'] = params['custom_filter_id'] # noqa: E501
|
|
206
|
+
|
|
207
|
+
query_params = []
|
|
208
|
+
|
|
209
|
+
header_params = {}
|
|
210
|
+
|
|
211
|
+
form_params = []
|
|
212
|
+
local_var_files = {}
|
|
213
|
+
|
|
214
|
+
body_params = None
|
|
215
|
+
# HTTP header `Accept`
|
|
216
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
217
|
+
['application/json']) # noqa: E501
|
|
218
|
+
|
|
219
|
+
# Authentication setting
|
|
220
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
221
|
+
|
|
222
|
+
return self.api_client.call_api(
|
|
223
|
+
'/custom_filters/{custom_filter_id}', 'DELETE',
|
|
224
|
+
path_params,
|
|
225
|
+
query_params,
|
|
226
|
+
header_params,
|
|
227
|
+
body=body_params,
|
|
228
|
+
post_params=form_params,
|
|
229
|
+
files=local_var_files,
|
|
230
|
+
response_type='DeletedResult', # noqa: E501
|
|
231
|
+
auth_settings=auth_settings,
|
|
232
|
+
async_=params.get('async_'),
|
|
233
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
234
|
+
_preload_content=params.get('_preload_content', True),
|
|
235
|
+
_request_timeout=params.get('_request_timeout'),
|
|
236
|
+
_request_out=params.get('_request_out'),
|
|
237
|
+
collection_formats=collection_formats)
|
|
238
|
+
|
|
239
|
+
def get_all_custom_filters(self, **kwargs): # noqa: E501
|
|
240
|
+
"""Get all custom filters for user
|
|
241
|
+
|
|
242
|
+
Retrieves all custom filters for the authenticated user's origin Args: pagination: Pagination parameters for the query auth_session: The user auth session for permission checks Returns: Page[Filter]: A paginated list of custom filters matching the user's origin Raises: BusinessLogicError: when auth session does not have user privilege
|
|
243
|
+
This method makes a synchronous HTTP request by default.
|
|
244
|
+
|
|
245
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
246
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
247
|
+
:param int limit: The maximum number of entries to return.
|
|
248
|
+
:param int skip: The number of entries to skip.
|
|
249
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
250
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
251
|
+
:param bool async_: Perform the request asynchronously
|
|
252
|
+
:return: PageGenericFilter
|
|
253
|
+
"""
|
|
254
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
255
|
+
kwargs['_return_http_data_only'] = True
|
|
256
|
+
|
|
257
|
+
if kwargs.get('async_'):
|
|
258
|
+
return self.get_all_custom_filters_with_http_info(**kwargs) # noqa: E501
|
|
259
|
+
else:
|
|
260
|
+
(data) = self.get_all_custom_filters_with_http_info(**kwargs) # noqa: E501
|
|
261
|
+
if (
|
|
262
|
+
data
|
|
263
|
+
and hasattr(data, 'return_value')
|
|
264
|
+
and not ignore_simplified_return_value
|
|
265
|
+
):
|
|
266
|
+
return data.return_value()
|
|
267
|
+
return data
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def get_all_custom_filters_with_http_info(self, **kwargs): # noqa: E501
|
|
271
|
+
"""Get all custom filters for user
|
|
272
|
+
|
|
273
|
+
Retrieves all custom filters for the authenticated user's origin Args: pagination: Pagination parameters for the query auth_session: The user auth session for permission checks Returns: Page[Filter]: A paginated list of custom filters matching the user's origin Raises: BusinessLogicError: when auth session does not have user privilege
|
|
274
|
+
This method makes a synchronous HTTP request by default.
|
|
275
|
+
|
|
276
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
277
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
278
|
+
:param int limit: The maximum number of entries to return.
|
|
279
|
+
:param int skip: The number of entries to skip.
|
|
280
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
281
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
282
|
+
:param bool async_: Perform the request asynchronously
|
|
283
|
+
:return: PageGenericFilter
|
|
284
|
+
"""
|
|
285
|
+
|
|
286
|
+
all_params = ['filter','sort','limit','skip','page','after_id',] # noqa: E501
|
|
287
|
+
all_params.append('async_')
|
|
288
|
+
all_params.append('_return_http_data_only')
|
|
289
|
+
all_params.append('_preload_content')
|
|
290
|
+
all_params.append('_request_timeout')
|
|
291
|
+
all_params.append('_request_out')
|
|
292
|
+
|
|
293
|
+
params = locals()
|
|
294
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
295
|
+
if key not in all_params:
|
|
296
|
+
raise TypeError(
|
|
297
|
+
"Got an unexpected keyword argument '%s'"
|
|
298
|
+
" to method get_all_custom_filters" % key
|
|
299
|
+
)
|
|
300
|
+
params[key] = val
|
|
301
|
+
del params['kwargs']
|
|
302
|
+
check_filename_params(params)
|
|
303
|
+
|
|
304
|
+
collection_formats = {}
|
|
305
|
+
|
|
306
|
+
path_params = {}
|
|
307
|
+
|
|
308
|
+
query_params = []
|
|
309
|
+
if 'filter' in params:
|
|
310
|
+
query_params.append(('filter', params['filter'])) # noqa: E501
|
|
311
|
+
if 'sort' in params:
|
|
312
|
+
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
313
|
+
if 'limit' in params:
|
|
314
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
315
|
+
if 'skip' in params:
|
|
316
|
+
query_params.append(('skip', params['skip'])) # noqa: E501
|
|
317
|
+
if 'page' in params:
|
|
318
|
+
query_params.append(('page', params['page'])) # noqa: E501
|
|
319
|
+
if 'after_id' in params:
|
|
320
|
+
query_params.append(('after_id', params['after_id'])) # noqa: E501
|
|
321
|
+
|
|
322
|
+
header_params = {}
|
|
323
|
+
|
|
324
|
+
form_params = []
|
|
325
|
+
local_var_files = {}
|
|
326
|
+
|
|
327
|
+
body_params = None
|
|
328
|
+
# HTTP header `Accept`
|
|
329
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
330
|
+
['application/json']) # noqa: E501
|
|
331
|
+
|
|
332
|
+
# Authentication setting
|
|
333
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
334
|
+
|
|
335
|
+
return self.api_client.call_api(
|
|
336
|
+
'/custom_filters', 'GET',
|
|
337
|
+
path_params,
|
|
338
|
+
query_params,
|
|
339
|
+
header_params,
|
|
340
|
+
body=body_params,
|
|
341
|
+
post_params=form_params,
|
|
342
|
+
files=local_var_files,
|
|
343
|
+
response_type='PageGenericFilter', # noqa: E501
|
|
344
|
+
auth_settings=auth_settings,
|
|
345
|
+
async_=params.get('async_'),
|
|
346
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
347
|
+
_preload_content=params.get('_preload_content', True),
|
|
348
|
+
_request_timeout=params.get('_request_timeout'),
|
|
349
|
+
_request_out=params.get('_request_out'),
|
|
350
|
+
collection_formats=collection_formats)
|
|
351
|
+
|
|
352
|
+
def update_custom_filter(self, custom_filter_id, body, **kwargs): # noqa: E501
|
|
353
|
+
"""Update a custom filter for user
|
|
354
|
+
|
|
355
|
+
Updates an existing custom filter Args: custom_filter_id: The ID of the filter to update filter_input: The input model for updating a filter auth_session: The user auth session for permission checks Returns: Filter: The updated custom filter Raises: BusinessLogicError: when auth session does not have user privilege or origin mismatch
|
|
356
|
+
This method makes a synchronous HTTP request by default.
|
|
357
|
+
|
|
358
|
+
:param str custom_filter_id: (required)
|
|
359
|
+
:param FilterInput body: (required)
|
|
360
|
+
:param bool async_: Perform the request asynchronously
|
|
361
|
+
:return: CoreModelsCustomFiltersFilter
|
|
362
|
+
"""
|
|
363
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
364
|
+
kwargs['_return_http_data_only'] = True
|
|
365
|
+
|
|
366
|
+
if kwargs.get('async_'):
|
|
367
|
+
return self.update_custom_filter_with_http_info(custom_filter_id, body, **kwargs) # noqa: E501
|
|
368
|
+
else:
|
|
369
|
+
(data) = self.update_custom_filter_with_http_info(custom_filter_id, body, **kwargs) # noqa: E501
|
|
370
|
+
if (
|
|
371
|
+
data
|
|
372
|
+
and hasattr(data, 'return_value')
|
|
373
|
+
and not ignore_simplified_return_value
|
|
374
|
+
):
|
|
375
|
+
return data.return_value()
|
|
376
|
+
return data
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def update_custom_filter_with_http_info(self, custom_filter_id, body, **kwargs): # noqa: E501
|
|
380
|
+
"""Update a custom filter for user
|
|
381
|
+
|
|
382
|
+
Updates an existing custom filter Args: custom_filter_id: The ID of the filter to update filter_input: The input model for updating a filter auth_session: The user auth session for permission checks Returns: Filter: The updated custom filter Raises: BusinessLogicError: when auth session does not have user privilege or origin mismatch
|
|
383
|
+
This method makes a synchronous HTTP request by default.
|
|
384
|
+
|
|
385
|
+
:param str custom_filter_id: (required)
|
|
386
|
+
:param FilterInput body: (required)
|
|
387
|
+
:param bool async_: Perform the request asynchronously
|
|
388
|
+
:return: CoreModelsCustomFiltersFilter
|
|
389
|
+
"""
|
|
390
|
+
|
|
391
|
+
all_params = ['custom_filter_id','body',] # noqa: E501
|
|
392
|
+
all_params.append('async_')
|
|
393
|
+
all_params.append('_return_http_data_only')
|
|
394
|
+
all_params.append('_preload_content')
|
|
395
|
+
all_params.append('_request_timeout')
|
|
396
|
+
all_params.append('_request_out')
|
|
397
|
+
|
|
398
|
+
params = locals()
|
|
399
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
400
|
+
if key not in all_params:
|
|
401
|
+
raise TypeError(
|
|
402
|
+
"Got an unexpected keyword argument '%s'"
|
|
403
|
+
" to method update_custom_filter" % key
|
|
404
|
+
)
|
|
405
|
+
params[key] = val
|
|
406
|
+
del params['kwargs']
|
|
407
|
+
# verify the required parameter 'custom_filter_id' is set
|
|
408
|
+
if ('custom_filter_id' not in params or
|
|
409
|
+
params['custom_filter_id'] is None):
|
|
410
|
+
raise ValueError("Missing the required parameter `custom_filter_id` when calling `update_custom_filter`") # noqa: E501
|
|
411
|
+
# verify the required parameter 'body' is set
|
|
412
|
+
if ('body' not in params or
|
|
413
|
+
params['body'] is None):
|
|
414
|
+
raise ValueError("Missing the required parameter `body` when calling `update_custom_filter`") # noqa: E501
|
|
415
|
+
check_filename_params(params)
|
|
416
|
+
|
|
417
|
+
collection_formats = {}
|
|
418
|
+
|
|
419
|
+
path_params = {}
|
|
420
|
+
if 'custom_filter_id' in params:
|
|
421
|
+
path_params['custom_filter_id'] = params['custom_filter_id'] # noqa: E501
|
|
422
|
+
|
|
423
|
+
query_params = []
|
|
424
|
+
|
|
425
|
+
header_params = {}
|
|
426
|
+
|
|
427
|
+
form_params = []
|
|
428
|
+
local_var_files = {}
|
|
429
|
+
|
|
430
|
+
body_params = None
|
|
431
|
+
if 'body' in params:
|
|
432
|
+
if 'FilterInput'.startswith('union'):
|
|
433
|
+
body_type = type(params['body'])
|
|
434
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
435
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
436
|
+
else:
|
|
437
|
+
body_params = params['body']
|
|
438
|
+
else:
|
|
439
|
+
body_params = flywheel.models.FilterInput.positional_to_model(params['body'])
|
|
440
|
+
# HTTP header `Accept`
|
|
441
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
442
|
+
['application/json']) # noqa: E501
|
|
443
|
+
|
|
444
|
+
# HTTP header `Content-Type`
|
|
445
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
446
|
+
['application/json']) # noqa: E501
|
|
447
|
+
|
|
448
|
+
# Authentication setting
|
|
449
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
450
|
+
|
|
451
|
+
return self.api_client.call_api(
|
|
452
|
+
'/custom_filters/{custom_filter_id}', 'PUT',
|
|
453
|
+
path_params,
|
|
454
|
+
query_params,
|
|
455
|
+
header_params,
|
|
456
|
+
body=body_params,
|
|
457
|
+
post_params=form_params,
|
|
458
|
+
files=local_var_files,
|
|
459
|
+
response_type='CoreModelsCustomFiltersFilter', # noqa: E501
|
|
460
|
+
auth_settings=auth_settings,
|
|
461
|
+
async_=params.get('async_'),
|
|
462
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
463
|
+
_preload_content=params.get('_preload_content', True),
|
|
464
|
+
_request_timeout=params.get('_request_timeout'),
|
|
465
|
+
_request_out=params.get('_request_out'),
|
|
466
|
+
collection_formats=collection_formats)
|
flywheel/api/files_api.py
CHANGED
|
@@ -465,7 +465,7 @@ class FilesApi(object):
|
|
|
465
465
|
Delete multiple files by query
|
|
466
466
|
This method makes a synchronous HTTP request by default.
|
|
467
467
|
|
|
468
|
-
:param list[
|
|
468
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
469
469
|
:param ContainerDeleteReason delete_reason:
|
|
470
470
|
:param bool async_: Perform the request asynchronously
|
|
471
471
|
:return: DeletedResult
|
|
@@ -492,7 +492,7 @@ class FilesApi(object):
|
|
|
492
492
|
Delete multiple files by query
|
|
493
493
|
This method makes a synchronous HTTP request by default.
|
|
494
494
|
|
|
495
|
-
:param list[
|
|
495
|
+
:param list[CoreModelsPaginationsFilter] body: Query for containers to delete (required)
|
|
496
496
|
:param ContainerDeleteReason delete_reason:
|
|
497
497
|
:param bool async_: Perform the request asynchronously
|
|
498
498
|
:return: DeletedResult
|