aind-session-json-service-async-client 0.1.2__tar.gz
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.
- aind_session_json_service_async_client-0.1.2/PKG-INFO +25 -0
- aind_session_json_service_async_client-0.1.2/README.md +120 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/__init__.py +43 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/api/__init__.py +6 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/api/default_api.py +313 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/api/healthcheck_api.py +281 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/api_client.py +800 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/api_response.py +21 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/configuration.py +568 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/exceptions.py +216 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/__init__.py +25 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/fov_coordinate_ml.py +138 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/health_check.py +99 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/http_validation_error.py +95 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/input_source.py +178 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/job_settings.py +243 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/output_directory.py +144 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/user_settings_config_file.py +144 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/validation_error.py +99 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/models/validation_error_loc_inner.py +138 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/py.typed +0 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/rest.py +213 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client.egg-info/PKG-INFO +25 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client.egg-info/SOURCES.txt +40 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client.egg-info/dependency_links.txt +1 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client.egg-info/requires.txt +6 -0
- aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client.egg-info/top_level.txt +1 -0
- aind_session_json_service_async_client-0.1.2/pyproject.toml +91 -0
- aind_session_json_service_async_client-0.1.2/setup.cfg +7 -0
- aind_session_json_service_async_client-0.1.2/setup.py +51 -0
- aind_session_json_service_async_client-0.1.2/test/test_default_api.py +38 -0
- aind_session_json_service_async_client-0.1.2/test/test_fov_coordinate_ml.py +50 -0
- aind_session_json_service_async_client-0.1.2/test/test_health_check.py +52 -0
- aind_session_json_service_async_client-0.1.2/test/test_healthcheck_api.py +38 -0
- aind_session_json_service_async_client-0.1.2/test/test_http_validation_error.py +58 -0
- aind_session_json_service_async_client-0.1.2/test/test_input_source.py +50 -0
- aind_session_json_service_async_client-0.1.2/test/test_job_settings.py +107 -0
- aind_session_json_service_async_client-0.1.2/test/test_output_directory.py +50 -0
- aind_session_json_service_async_client-0.1.2/test/test_user_settings_config_file.py +50 -0
- aind_session_json_service_async_client-0.1.2/test/test_validation_error.py +60 -0
- aind_session_json_service_async_client-0.1.2/test/test_validation_error_loc_inner.py +50 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aind-session-json-service-async-client
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: aind-session-json-service
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: OpenAPI Generator community
|
|
7
|
+
Author-email: team@openapitools.org
|
|
8
|
+
Keywords: OpenAPI,OpenAPI-Generator,aind-session-json-service
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
11
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
12
|
+
Requires-Dist: aiohttp>=3.8.4
|
|
13
|
+
Requires-Dist: aiohttp-retry>=2.8.3
|
|
14
|
+
Requires-Dist: pydantic>=2
|
|
15
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: description-content-type
|
|
20
|
+
Dynamic: keywords
|
|
21
|
+
Dynamic: requires-dist
|
|
22
|
+
Dynamic: summary
|
|
23
|
+
|
|
24
|
+
## aind-session-json-service Run metadata mapper to create a session metadata
|
|
25
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# aind-session-json-service-async-client
|
|
2
|
+
|
|
3
|
+
## aind-session-json-service
|
|
4
|
+
|
|
5
|
+
Run metadata mapper to create a session metadata
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
10
|
+
|
|
11
|
+
- API version: 0.1.2
|
|
12
|
+
- Package version: 0.1.2
|
|
13
|
+
- Generator version: 7.13.0
|
|
14
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
15
|
+
|
|
16
|
+
## Requirements.
|
|
17
|
+
|
|
18
|
+
Python 3.9+
|
|
19
|
+
|
|
20
|
+
## Installation & Usage
|
|
21
|
+
### pip install
|
|
22
|
+
|
|
23
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
27
|
+
```
|
|
28
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
29
|
+
|
|
30
|
+
Then import the package:
|
|
31
|
+
```python
|
|
32
|
+
import aind_session_json_service_async_client
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Setuptools
|
|
36
|
+
|
|
37
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
python setup.py install --user
|
|
41
|
+
```
|
|
42
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
43
|
+
|
|
44
|
+
Then import the package:
|
|
45
|
+
```python
|
|
46
|
+
import aind_session_json_service_async_client
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Tests
|
|
50
|
+
|
|
51
|
+
Execute `pytest` to run the tests.
|
|
52
|
+
|
|
53
|
+
## Getting Started
|
|
54
|
+
|
|
55
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
|
|
59
|
+
import aind_session_json_service_async_client
|
|
60
|
+
from aind_session_json_service_async_client.rest import ApiException
|
|
61
|
+
from pprint import pprint
|
|
62
|
+
|
|
63
|
+
# Defining the host is optional and defaults to http://localhost
|
|
64
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
65
|
+
configuration = aind_session_json_service_async_client.Configuration(
|
|
66
|
+
host = "http://localhost"
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Enter a context with an instance of the API client
|
|
72
|
+
async with aind_session_json_service_async_client.ApiClient(configuration) as api_client:
|
|
73
|
+
# Create an instance of the API class
|
|
74
|
+
api_instance = aind_session_json_service_async_client.DefaultApi(api_client)
|
|
75
|
+
job_settings = aind_session_json_service_async_client.JobSettings() # JobSettings |
|
|
76
|
+
|
|
77
|
+
try:
|
|
78
|
+
# Get Session
|
|
79
|
+
api_response = await api_instance.get_session(job_settings)
|
|
80
|
+
print("The response of DefaultApi->get_session:\n")
|
|
81
|
+
pprint(api_response)
|
|
82
|
+
except ApiException as e:
|
|
83
|
+
print("Exception when calling DefaultApi->get_session: %s\n" % e)
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Documentation for API Endpoints
|
|
88
|
+
|
|
89
|
+
All URIs are relative to *http://localhost*
|
|
90
|
+
|
|
91
|
+
Class | Method | HTTP request | Description
|
|
92
|
+
------------ | ------------- | ------------- | -------------
|
|
93
|
+
*DefaultApi* | [**get_session**](docs/DefaultApi.md#get_session) | **POST** /bergamo | Get Session
|
|
94
|
+
*HealthcheckApi* | [**get_health**](docs/HealthcheckApi.md#get_health) | **GET** /healthcheck | Perform a Health Check
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Documentation For Models
|
|
98
|
+
|
|
99
|
+
- [FovCoordinateMl](docs/FovCoordinateMl.md)
|
|
100
|
+
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
101
|
+
- [HealthCheck](docs/HealthCheck.md)
|
|
102
|
+
- [InputSource](docs/InputSource.md)
|
|
103
|
+
- [JobSettings](docs/JobSettings.md)
|
|
104
|
+
- [OutputDirectory](docs/OutputDirectory.md)
|
|
105
|
+
- [UserSettingsConfigFile](docs/UserSettingsConfigFile.md)
|
|
106
|
+
- [ValidationError](docs/ValidationError.md)
|
|
107
|
+
- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<a id="documentation-for-authorization"></a>
|
|
111
|
+
## Documentation For Authorization
|
|
112
|
+
|
|
113
|
+
Endpoints do not require authorization.
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## Author
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
aind_session_json_service_async_client-0.1.2/aind_session_json_service_async_client/__init__.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
aind-session-json-service
|
|
7
|
+
|
|
8
|
+
## aind-session-json-service Run metadata mapper to create a session metadata
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 0.1.2
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "0.1.2"
|
|
18
|
+
|
|
19
|
+
# import apis into sdk package
|
|
20
|
+
from aind_session_json_service_async_client.api.default_api import DefaultApi
|
|
21
|
+
from aind_session_json_service_async_client.api.healthcheck_api import HealthcheckApi
|
|
22
|
+
|
|
23
|
+
# import ApiClient
|
|
24
|
+
from aind_session_json_service_async_client.api_response import ApiResponse
|
|
25
|
+
from aind_session_json_service_async_client.api_client import ApiClient
|
|
26
|
+
from aind_session_json_service_async_client.configuration import Configuration
|
|
27
|
+
from aind_session_json_service_async_client.exceptions import OpenApiException
|
|
28
|
+
from aind_session_json_service_async_client.exceptions import ApiTypeError
|
|
29
|
+
from aind_session_json_service_async_client.exceptions import ApiValueError
|
|
30
|
+
from aind_session_json_service_async_client.exceptions import ApiKeyError
|
|
31
|
+
from aind_session_json_service_async_client.exceptions import ApiAttributeError
|
|
32
|
+
from aind_session_json_service_async_client.exceptions import ApiException
|
|
33
|
+
|
|
34
|
+
# import models into sdk package
|
|
35
|
+
from aind_session_json_service_async_client.models.fov_coordinate_ml import FovCoordinateMl
|
|
36
|
+
from aind_session_json_service_async_client.models.http_validation_error import HTTPValidationError
|
|
37
|
+
from aind_session_json_service_async_client.models.health_check import HealthCheck
|
|
38
|
+
from aind_session_json_service_async_client.models.input_source import InputSource
|
|
39
|
+
from aind_session_json_service_async_client.models.job_settings import JobSettings
|
|
40
|
+
from aind_session_json_service_async_client.models.output_directory import OutputDirectory
|
|
41
|
+
from aind_session_json_service_async_client.models.user_settings_config_file import UserSettingsConfigFile
|
|
42
|
+
from aind_session_json_service_async_client.models.validation_error import ValidationError
|
|
43
|
+
from aind_session_json_service_async_client.models.validation_error_loc_inner import ValidationErrorLocInner
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
aind-session-json-service
|
|
5
|
+
|
|
6
|
+
## aind-session-json-service Run metadata mapper to create a session metadata
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.2
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from typing import Any
|
|
20
|
+
from aind_session_json_service_async_client.models.job_settings import JobSettings
|
|
21
|
+
|
|
22
|
+
from aind_session_json_service_async_client.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from aind_session_json_service_async_client.api_response import ApiResponse
|
|
24
|
+
from aind_session_json_service_async_client.rest import RESTResponseType
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DefaultApi:
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None) -> None:
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient.get_default()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@validate_call
|
|
41
|
+
async def get_session(
|
|
42
|
+
self,
|
|
43
|
+
job_settings: JobSettings,
|
|
44
|
+
_request_timeout: Union[
|
|
45
|
+
None,
|
|
46
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
47
|
+
Tuple[
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
50
|
+
]
|
|
51
|
+
] = None,
|
|
52
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_content_type: Optional[StrictStr] = None,
|
|
54
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
56
|
+
) -> object:
|
|
57
|
+
"""Get Session
|
|
58
|
+
|
|
59
|
+
## Get Session JSON metadata file.
|
|
60
|
+
|
|
61
|
+
:param job_settings: (required)
|
|
62
|
+
:type job_settings: JobSettings
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._get_session_serialize(
|
|
86
|
+
job_settings=job_settings,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'200': "object",
|
|
95
|
+
'422': "HTTPValidationError",
|
|
96
|
+
}
|
|
97
|
+
response_data = await self.api_client.call_api(
|
|
98
|
+
*_param,
|
|
99
|
+
_request_timeout=_request_timeout
|
|
100
|
+
)
|
|
101
|
+
await response_data.read()
|
|
102
|
+
return self.api_client.response_deserialize(
|
|
103
|
+
response_data=response_data,
|
|
104
|
+
response_types_map=_response_types_map,
|
|
105
|
+
).data
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@validate_call
|
|
109
|
+
async def get_session_with_http_info(
|
|
110
|
+
self,
|
|
111
|
+
job_settings: JobSettings,
|
|
112
|
+
_request_timeout: Union[
|
|
113
|
+
None,
|
|
114
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
115
|
+
Tuple[
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
118
|
+
]
|
|
119
|
+
] = None,
|
|
120
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
121
|
+
_content_type: Optional[StrictStr] = None,
|
|
122
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
123
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
124
|
+
) -> ApiResponse[object]:
|
|
125
|
+
"""Get Session
|
|
126
|
+
|
|
127
|
+
## Get Session JSON metadata file.
|
|
128
|
+
|
|
129
|
+
:param job_settings: (required)
|
|
130
|
+
:type job_settings: JobSettings
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._get_session_serialize(
|
|
154
|
+
job_settings=job_settings,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'200': "object",
|
|
163
|
+
'422': "HTTPValidationError",
|
|
164
|
+
}
|
|
165
|
+
response_data = await self.api_client.call_api(
|
|
166
|
+
*_param,
|
|
167
|
+
_request_timeout=_request_timeout
|
|
168
|
+
)
|
|
169
|
+
await response_data.read()
|
|
170
|
+
return self.api_client.response_deserialize(
|
|
171
|
+
response_data=response_data,
|
|
172
|
+
response_types_map=_response_types_map,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
@validate_call
|
|
177
|
+
async def get_session_without_preload_content(
|
|
178
|
+
self,
|
|
179
|
+
job_settings: JobSettings,
|
|
180
|
+
_request_timeout: Union[
|
|
181
|
+
None,
|
|
182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
183
|
+
Tuple[
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
186
|
+
]
|
|
187
|
+
] = None,
|
|
188
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
189
|
+
_content_type: Optional[StrictStr] = None,
|
|
190
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
192
|
+
) -> RESTResponseType:
|
|
193
|
+
"""Get Session
|
|
194
|
+
|
|
195
|
+
## Get Session JSON metadata file.
|
|
196
|
+
|
|
197
|
+
:param job_settings: (required)
|
|
198
|
+
:type job_settings: JobSettings
|
|
199
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
200
|
+
number provided, it will be total request
|
|
201
|
+
timeout. It can also be a pair (tuple) of
|
|
202
|
+
(connection, read) timeouts.
|
|
203
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
204
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
205
|
+
request; this effectively ignores the
|
|
206
|
+
authentication in the spec for a single request.
|
|
207
|
+
:type _request_auth: dict, optional
|
|
208
|
+
:param _content_type: force content-type for the request.
|
|
209
|
+
:type _content_type: str, Optional
|
|
210
|
+
:param _headers: set to override the headers for a single
|
|
211
|
+
request; this effectively ignores the headers
|
|
212
|
+
in the spec for a single request.
|
|
213
|
+
:type _headers: dict, optional
|
|
214
|
+
:param _host_index: set to override the host_index for a single
|
|
215
|
+
request; this effectively ignores the host_index
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _host_index: int, optional
|
|
218
|
+
:return: Returns the result object.
|
|
219
|
+
""" # noqa: E501
|
|
220
|
+
|
|
221
|
+
_param = self._get_session_serialize(
|
|
222
|
+
job_settings=job_settings,
|
|
223
|
+
_request_auth=_request_auth,
|
|
224
|
+
_content_type=_content_type,
|
|
225
|
+
_headers=_headers,
|
|
226
|
+
_host_index=_host_index
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
230
|
+
'200': "object",
|
|
231
|
+
'422': "HTTPValidationError",
|
|
232
|
+
}
|
|
233
|
+
response_data = await self.api_client.call_api(
|
|
234
|
+
*_param,
|
|
235
|
+
_request_timeout=_request_timeout
|
|
236
|
+
)
|
|
237
|
+
return response_data.response
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def _get_session_serialize(
|
|
241
|
+
self,
|
|
242
|
+
job_settings,
|
|
243
|
+
_request_auth,
|
|
244
|
+
_content_type,
|
|
245
|
+
_headers,
|
|
246
|
+
_host_index,
|
|
247
|
+
) -> RequestSerialized:
|
|
248
|
+
|
|
249
|
+
_host = None
|
|
250
|
+
|
|
251
|
+
_collection_formats: Dict[str, str] = {
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
_path_params: Dict[str, str] = {}
|
|
255
|
+
_query_params: List[Tuple[str, str]] = []
|
|
256
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
257
|
+
_form_params: List[Tuple[str, str]] = []
|
|
258
|
+
_files: Dict[
|
|
259
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
260
|
+
] = {}
|
|
261
|
+
_body_params: Optional[bytes] = None
|
|
262
|
+
|
|
263
|
+
# process the path parameters
|
|
264
|
+
# process the query parameters
|
|
265
|
+
# process the header parameters
|
|
266
|
+
# process the form parameters
|
|
267
|
+
# process the body parameter
|
|
268
|
+
if job_settings is not None:
|
|
269
|
+
_body_params = job_settings
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
# set the HTTP header `Accept`
|
|
273
|
+
if 'Accept' not in _header_params:
|
|
274
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
275
|
+
[
|
|
276
|
+
'application/json'
|
|
277
|
+
]
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Content-Type`
|
|
281
|
+
if _content_type:
|
|
282
|
+
_header_params['Content-Type'] = _content_type
|
|
283
|
+
else:
|
|
284
|
+
_default_content_type = (
|
|
285
|
+
self.api_client.select_header_content_type(
|
|
286
|
+
[
|
|
287
|
+
'application/json'
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
)
|
|
291
|
+
if _default_content_type is not None:
|
|
292
|
+
_header_params['Content-Type'] = _default_content_type
|
|
293
|
+
|
|
294
|
+
# authentication setting
|
|
295
|
+
_auth_settings: List[str] = [
|
|
296
|
+
]
|
|
297
|
+
|
|
298
|
+
return self.api_client.param_serialize(
|
|
299
|
+
method='POST',
|
|
300
|
+
resource_path='/bergamo',
|
|
301
|
+
path_params=_path_params,
|
|
302
|
+
query_params=_query_params,
|
|
303
|
+
header_params=_header_params,
|
|
304
|
+
body=_body_params,
|
|
305
|
+
post_params=_form_params,
|
|
306
|
+
files=_files,
|
|
307
|
+
auth_settings=_auth_settings,
|
|
308
|
+
collection_formats=_collection_formats,
|
|
309
|
+
_host=_host,
|
|
310
|
+
_request_auth=_request_auth
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
|