across-server-openapi-python 1.3.0__py3-none-any.whl → 1.4.0__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.
- across/sdk/v1/__init__.py +37 -7
- across/sdk/v1/api/__init__.py +2 -0
- across/sdk/v1/api/auth_api.py +1 -1
- across/sdk/v1/api/broker_alert_api.py +1017 -0
- across/sdk/v1/api/broker_event_api.py +697 -0
- across/sdk/v1/api/filter_api.py +1 -1
- across/sdk/v1/api/group_api.py +12 -12
- across/sdk/v1/api/group_invite_api.py +1 -1
- across/sdk/v1/api/group_role_api.py +7 -7
- across/sdk/v1/api/instrument_api.py +1 -1
- across/sdk/v1/api/internal_api.py +2 -2
- across/sdk/v1/api/observation_api.py +682 -52
- across/sdk/v1/api/observatory_api.py +1 -1
- across/sdk/v1/api/permission_api.py +1 -1
- across/sdk/v1/api/role_api.py +1 -1
- across/sdk/v1/api/schedule_api.py +1 -1
- across/sdk/v1/api/service_account_api.py +7 -7
- across/sdk/v1/api/telescope_api.py +1 -1
- across/sdk/v1/api/tle_api.py +1 -1
- across/sdk/v1/api/tools_api.py +1 -1
- across/sdk/v1/api/user_api.py +22 -22
- across/sdk/v1/api_client.py +1 -1
- across/sdk/v1/configuration.py +4 -4
- across/sdk/v1/exceptions.py +1 -1
- across/sdk/v1/models/__init__.py +17 -4
- across/sdk/v1/models/access_token_response.py +1 -1
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group.py +91 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +1 -1
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +7 -7
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +1 -1
- across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +95 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +1 -1
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +105 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +1 -1
- across/sdk/v1/models/bandpass.py +1 -1
- across/sdk/v1/models/bandpass_type.py +1 -1
- across/sdk/v1/models/broker_alert.py +104 -0
- across/sdk/v1/models/broker_alert_create.py +115 -0
- across/sdk/v1/models/broker_alert_data_source.py +39 -0
- across/sdk/v1/models/broker_alert_status.py +41 -0
- across/sdk/v1/models/broker_event.py +115 -0
- across/sdk/v1/models/broker_event_type.py +41 -0
- across/sdk/v1/models/constrained_date.py +1 -1
- across/sdk/v1/models/constraint_reason.py +1 -1
- across/sdk/v1/models/constraint_type.py +1 -1
- across/sdk/v1/models/coordinate.py +1 -1
- across/sdk/v1/models/date_range.py +1 -1
- across/sdk/v1/models/depth_unit.py +1 -1
- across/sdk/v1/models/energy_bandpass.py +1 -1
- across/sdk/v1/models/energy_unit.py +1 -1
- across/sdk/v1/models/ephemeris_type.py +1 -1
- across/sdk/v1/models/filter.py +1 -1
- across/sdk/v1/models/frequency_bandpass.py +1 -1
- across/sdk/v1/models/frequency_unit.py +1 -1
- across/sdk/v1/models/grant_type.py +1 -1
- across/sdk/v1/models/ground_parameters.py +1 -1
- across/sdk/v1/models/group.py +5 -15
- across/sdk/v1/models/group_base.py +91 -0
- across/sdk/v1/models/group_invite.py +1 -1
- across/sdk/v1/models/group_invite_create.py +1 -1
- across/sdk/v1/models/group_invite_group_details.py +1 -1
- across/sdk/v1/models/group_read.py +1 -1
- across/sdk/v1/models/group_role.py +37 -6
- across/sdk/v1/models/group_role_create.py +1 -1
- across/sdk/v1/models/group_role_read.py +9 -3
- across/sdk/v1/models/http_validation_error.py +1 -1
- across/sdk/v1/models/id_name_schema.py +1 -1
- across/sdk/v1/models/instrument.py +1 -1
- across/sdk/v1/models/ivoa_obs_category.py +1 -1
- across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
- across/sdk/v1/models/joint_visibility_result.py +1 -1
- across/sdk/v1/models/jpl_parameters.py +1 -1
- across/sdk/v1/models/localization.py +127 -0
- across/sdk/v1/models/localization_contour_base.py +95 -0
- across/sdk/v1/models/localization_create.py +121 -0
- across/sdk/v1/models/name_resolver.py +1 -1
- across/sdk/v1/models/nullable_date_range.py +1 -1
- across/sdk/v1/models/observation.py +1 -1
- across/sdk/v1/models/observation_create.py +1 -1
- across/sdk/v1/models/observation_footprint.py +1 -1
- across/sdk/v1/models/observation_footprint_create.py +1 -1
- across/sdk/v1/models/observation_status.py +1 -1
- across/sdk/v1/models/observation_strategy.py +1 -1
- across/sdk/v1/models/observation_type.py +1 -1
- across/sdk/v1/models/observatory.py +1 -1
- across/sdk/v1/models/observatory_ephemeris_type.py +1 -1
- across/sdk/v1/models/observatory_type.py +1 -1
- across/sdk/v1/models/page_broker_alert.py +116 -0
- across/sdk/v1/models/page_broker_event.py +116 -0
- across/sdk/v1/models/page_observation.py +1 -1
- across/sdk/v1/models/page_schedule.py +1 -1
- across/sdk/v1/models/parameters.py +1 -1
- across/sdk/v1/models/permission.py +1 -1
- across/sdk/v1/models/point.py +1 -1
- across/sdk/v1/models/role.py +4 -4
- across/sdk/v1/models/role_base.py +1 -1
- across/sdk/v1/models/schedule.py +1 -1
- across/sdk/v1/models/schedule_cadence.py +1 -1
- across/sdk/v1/models/schedule_create.py +1 -1
- across/sdk/v1/models/schedule_create_many.py +1 -1
- across/sdk/v1/models/schedule_fidelity.py +1 -1
- across/sdk/v1/models/schedule_status.py +1 -1
- across/sdk/v1/models/service_account.py +1 -1
- across/sdk/v1/models/service_account_create.py +1 -1
- across/sdk/v1/models/service_account_secret.py +1 -1
- across/sdk/v1/models/service_account_update.py +1 -1
- across/sdk/v1/models/spice_parameters.py +1 -1
- across/sdk/v1/models/system_service_account.py +1 -1
- across/sdk/v1/models/telescope.py +1 -1
- across/sdk/v1/models/telescope_instrument.py +1 -1
- across/sdk/v1/models/tle.py +1 -1
- across/sdk/v1/models/tle_create.py +1 -1
- across/sdk/v1/models/tle_parameters.py +1 -1
- across/sdk/v1/models/unit_value.py +1 -1
- across/sdk/v1/models/user.py +47 -7
- across/sdk/v1/models/user_create.py +1 -1
- across/sdk/v1/models/user_info.py +1 -1
- across/sdk/v1/models/user_update.py +1 -1
- across/sdk/v1/models/validation_error.py +1 -1
- across/sdk/v1/models/validation_error_loc_inner.py +1 -1
- across/sdk/v1/models/visibility_result.py +1 -1
- across/sdk/v1/models/visibility_type.py +1 -1
- across/sdk/v1/models/visibility_window.py +1 -1
- across/sdk/v1/models/wavelength_bandpass.py +1 -1
- across/sdk/v1/models/wavelength_unit.py +1 -1
- across/sdk/v1/models/window.py +1 -1
- across/sdk/v1/rest.py +1 -1
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/METADATA +34 -15
- across_server_openapi_python-1.4.0.dist-info/RECORD +143 -0
- across_server_openapi_python-1.3.0.dist-info/RECORD +0 -126
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/WHEEL +0 -0
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/licenses/LICENSE +0 -0
- {across_server_openapi_python-1.3.0.dist-info → across_server_openapi_python-1.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1017 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ACROSS Server
|
|
5
|
+
|
|
6
|
+
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.6.0
|
|
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 datetime import datetime
|
|
20
|
+
from pydantic import Field, StrictStr
|
|
21
|
+
from typing import List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from across.sdk.v1.models.broker_alert import BrokerAlert
|
|
24
|
+
from across.sdk.v1.models.broker_alert_create import BrokerAlertCreate
|
|
25
|
+
from across.sdk.v1.models.broker_alert_data_source import BrokerAlertDataSource
|
|
26
|
+
from across.sdk.v1.models.broker_alert_status import BrokerAlertStatus
|
|
27
|
+
from across.sdk.v1.models.page_broker_alert import PageBrokerAlert
|
|
28
|
+
|
|
29
|
+
from across.sdk.v1.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from across.sdk.v1.api_response import ApiResponse
|
|
31
|
+
from across.sdk.v1.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BrokerAlertApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def create_broker_alert(
|
|
49
|
+
self,
|
|
50
|
+
broker_alert_create: BrokerAlertCreate,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> str:
|
|
64
|
+
"""Create a BrokerAlert
|
|
65
|
+
|
|
66
|
+
Create a new BrokerAlert and any new associated BrokerEvent or Localization records.
|
|
67
|
+
|
|
68
|
+
:param broker_alert_create: (required)
|
|
69
|
+
:type broker_alert_create: BrokerAlertCreate
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._create_broker_alert_serialize(
|
|
93
|
+
broker_alert_create=broker_alert_create,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'201': "str",
|
|
102
|
+
'404': None,
|
|
103
|
+
'409': None,
|
|
104
|
+
'422': "HTTPValidationError",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def create_broker_alert_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
broker_alert_create: BrokerAlertCreate,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[str]:
|
|
134
|
+
"""Create a BrokerAlert
|
|
135
|
+
|
|
136
|
+
Create a new BrokerAlert and any new associated BrokerEvent or Localization records.
|
|
137
|
+
|
|
138
|
+
:param broker_alert_create: (required)
|
|
139
|
+
:type broker_alert_create: BrokerAlertCreate
|
|
140
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
141
|
+
number provided, it will be total request
|
|
142
|
+
timeout. It can also be a pair (tuple) of
|
|
143
|
+
(connection, read) timeouts.
|
|
144
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
145
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
146
|
+
request; this effectively ignores the
|
|
147
|
+
authentication in the spec for a single request.
|
|
148
|
+
:type _request_auth: dict, optional
|
|
149
|
+
:param _content_type: force content-type for the request.
|
|
150
|
+
:type _content_type: str, Optional
|
|
151
|
+
:param _headers: set to override the headers for a single
|
|
152
|
+
request; this effectively ignores the headers
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _headers: dict, optional
|
|
155
|
+
:param _host_index: set to override the host_index for a single
|
|
156
|
+
request; this effectively ignores the host_index
|
|
157
|
+
in the spec for a single request.
|
|
158
|
+
:type _host_index: int, optional
|
|
159
|
+
:return: Returns the result object.
|
|
160
|
+
""" # noqa: E501
|
|
161
|
+
|
|
162
|
+
_param = self._create_broker_alert_serialize(
|
|
163
|
+
broker_alert_create=broker_alert_create,
|
|
164
|
+
_request_auth=_request_auth,
|
|
165
|
+
_content_type=_content_type,
|
|
166
|
+
_headers=_headers,
|
|
167
|
+
_host_index=_host_index
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
171
|
+
'201': "str",
|
|
172
|
+
'404': None,
|
|
173
|
+
'409': None,
|
|
174
|
+
'422': "HTTPValidationError",
|
|
175
|
+
}
|
|
176
|
+
response_data = self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
def create_broker_alert_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
broker_alert_create: BrokerAlertCreate,
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Create a BrokerAlert
|
|
205
|
+
|
|
206
|
+
Create a new BrokerAlert and any new associated BrokerEvent or Localization records.
|
|
207
|
+
|
|
208
|
+
:param broker_alert_create: (required)
|
|
209
|
+
:type broker_alert_create: BrokerAlertCreate
|
|
210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
211
|
+
number provided, it will be total request
|
|
212
|
+
timeout. It can also be a pair (tuple) of
|
|
213
|
+
(connection, read) timeouts.
|
|
214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
216
|
+
request; this effectively ignores the
|
|
217
|
+
authentication in the spec for a single request.
|
|
218
|
+
:type _request_auth: dict, optional
|
|
219
|
+
:param _content_type: force content-type for the request.
|
|
220
|
+
:type _content_type: str, Optional
|
|
221
|
+
:param _headers: set to override the headers for a single
|
|
222
|
+
request; this effectively ignores the headers
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _headers: dict, optional
|
|
225
|
+
:param _host_index: set to override the host_index for a single
|
|
226
|
+
request; this effectively ignores the host_index
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _host_index: int, optional
|
|
229
|
+
:return: Returns the result object.
|
|
230
|
+
""" # noqa: E501
|
|
231
|
+
|
|
232
|
+
_param = self._create_broker_alert_serialize(
|
|
233
|
+
broker_alert_create=broker_alert_create,
|
|
234
|
+
_request_auth=_request_auth,
|
|
235
|
+
_content_type=_content_type,
|
|
236
|
+
_headers=_headers,
|
|
237
|
+
_host_index=_host_index
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
+
'201': "str",
|
|
242
|
+
'404': None,
|
|
243
|
+
'409': None,
|
|
244
|
+
'422': "HTTPValidationError",
|
|
245
|
+
}
|
|
246
|
+
response_data = self.api_client.call_api(
|
|
247
|
+
*_param,
|
|
248
|
+
_request_timeout=_request_timeout
|
|
249
|
+
)
|
|
250
|
+
return response_data.response
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _create_broker_alert_serialize(
|
|
254
|
+
self,
|
|
255
|
+
broker_alert_create,
|
|
256
|
+
_request_auth,
|
|
257
|
+
_content_type,
|
|
258
|
+
_headers,
|
|
259
|
+
_host_index,
|
|
260
|
+
) -> RequestSerialized:
|
|
261
|
+
|
|
262
|
+
_host = None
|
|
263
|
+
|
|
264
|
+
_collection_formats: Dict[str, str] = {
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
_path_params: Dict[str, str] = {}
|
|
268
|
+
_query_params: List[Tuple[str, str]] = []
|
|
269
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
270
|
+
_form_params: List[Tuple[str, str]] = []
|
|
271
|
+
_files: Dict[
|
|
272
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
273
|
+
] = {}
|
|
274
|
+
_body_params: Optional[bytes] = None
|
|
275
|
+
|
|
276
|
+
# process the path parameters
|
|
277
|
+
# process the query parameters
|
|
278
|
+
# process the header parameters
|
|
279
|
+
# process the form parameters
|
|
280
|
+
# process the body parameter
|
|
281
|
+
if broker_alert_create is not None:
|
|
282
|
+
_body_params = broker_alert_create
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Accept`
|
|
286
|
+
if 'Accept' not in _header_params:
|
|
287
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
288
|
+
[
|
|
289
|
+
'application/json'
|
|
290
|
+
]
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# set the HTTP header `Content-Type`
|
|
294
|
+
if _content_type:
|
|
295
|
+
_header_params['Content-Type'] = _content_type
|
|
296
|
+
else:
|
|
297
|
+
_default_content_type = (
|
|
298
|
+
self.api_client.select_header_content_type(
|
|
299
|
+
[
|
|
300
|
+
'application/json'
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
)
|
|
304
|
+
if _default_content_type is not None:
|
|
305
|
+
_header_params['Content-Type'] = _default_content_type
|
|
306
|
+
|
|
307
|
+
# authentication setting
|
|
308
|
+
_auth_settings: List[str] = [
|
|
309
|
+
'Authorization'
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
return self.api_client.param_serialize(
|
|
313
|
+
method='POST',
|
|
314
|
+
resource_path='/broker-alert/',
|
|
315
|
+
path_params=_path_params,
|
|
316
|
+
query_params=_query_params,
|
|
317
|
+
header_params=_header_params,
|
|
318
|
+
body=_body_params,
|
|
319
|
+
post_params=_form_params,
|
|
320
|
+
files=_files,
|
|
321
|
+
auth_settings=_auth_settings,
|
|
322
|
+
collection_formats=_collection_formats,
|
|
323
|
+
_host=_host,
|
|
324
|
+
_request_auth=_request_auth
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@validate_call
|
|
331
|
+
def get_broker_alert(
|
|
332
|
+
self,
|
|
333
|
+
broker_alert_id: StrictStr,
|
|
334
|
+
_request_timeout: Union[
|
|
335
|
+
None,
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
337
|
+
Tuple[
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
340
|
+
]
|
|
341
|
+
] = None,
|
|
342
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
343
|
+
_content_type: Optional[StrictStr] = None,
|
|
344
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
346
|
+
) -> BrokerAlert:
|
|
347
|
+
"""Read a broker alert
|
|
348
|
+
|
|
349
|
+
Read a broker alert by ID.
|
|
350
|
+
|
|
351
|
+
:param broker_alert_id: (required)
|
|
352
|
+
:type broker_alert_id: str
|
|
353
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
354
|
+
number provided, it will be total request
|
|
355
|
+
timeout. It can also be a pair (tuple) of
|
|
356
|
+
(connection, read) timeouts.
|
|
357
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
358
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
359
|
+
request; this effectively ignores the
|
|
360
|
+
authentication in the spec for a single request.
|
|
361
|
+
:type _request_auth: dict, optional
|
|
362
|
+
:param _content_type: force content-type for the request.
|
|
363
|
+
:type _content_type: str, Optional
|
|
364
|
+
:param _headers: set to override the headers for a single
|
|
365
|
+
request; this effectively ignores the headers
|
|
366
|
+
in the spec for a single request.
|
|
367
|
+
:type _headers: dict, optional
|
|
368
|
+
:param _host_index: set to override the host_index for a single
|
|
369
|
+
request; this effectively ignores the host_index
|
|
370
|
+
in the spec for a single request.
|
|
371
|
+
:type _host_index: int, optional
|
|
372
|
+
:return: Returns the result object.
|
|
373
|
+
""" # noqa: E501
|
|
374
|
+
|
|
375
|
+
_param = self._get_broker_alert_serialize(
|
|
376
|
+
broker_alert_id=broker_alert_id,
|
|
377
|
+
_request_auth=_request_auth,
|
|
378
|
+
_content_type=_content_type,
|
|
379
|
+
_headers=_headers,
|
|
380
|
+
_host_index=_host_index
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
384
|
+
'200': "BrokerAlert",
|
|
385
|
+
'404': None,
|
|
386
|
+
'422': "HTTPValidationError",
|
|
387
|
+
}
|
|
388
|
+
response_data = self.api_client.call_api(
|
|
389
|
+
*_param,
|
|
390
|
+
_request_timeout=_request_timeout
|
|
391
|
+
)
|
|
392
|
+
response_data.read()
|
|
393
|
+
return self.api_client.response_deserialize(
|
|
394
|
+
response_data=response_data,
|
|
395
|
+
response_types_map=_response_types_map,
|
|
396
|
+
).data
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
@validate_call
|
|
400
|
+
def get_broker_alert_with_http_info(
|
|
401
|
+
self,
|
|
402
|
+
broker_alert_id: StrictStr,
|
|
403
|
+
_request_timeout: Union[
|
|
404
|
+
None,
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Tuple[
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
409
|
+
]
|
|
410
|
+
] = None,
|
|
411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_content_type: Optional[StrictStr] = None,
|
|
413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
415
|
+
) -> ApiResponse[BrokerAlert]:
|
|
416
|
+
"""Read a broker alert
|
|
417
|
+
|
|
418
|
+
Read a broker alert by ID.
|
|
419
|
+
|
|
420
|
+
:param broker_alert_id: (required)
|
|
421
|
+
:type broker_alert_id: str
|
|
422
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
423
|
+
number provided, it will be total request
|
|
424
|
+
timeout. It can also be a pair (tuple) of
|
|
425
|
+
(connection, read) timeouts.
|
|
426
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
427
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
428
|
+
request; this effectively ignores the
|
|
429
|
+
authentication in the spec for a single request.
|
|
430
|
+
:type _request_auth: dict, optional
|
|
431
|
+
:param _content_type: force content-type for the request.
|
|
432
|
+
:type _content_type: str, Optional
|
|
433
|
+
:param _headers: set to override the headers for a single
|
|
434
|
+
request; this effectively ignores the headers
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _headers: dict, optional
|
|
437
|
+
:param _host_index: set to override the host_index for a single
|
|
438
|
+
request; this effectively ignores the host_index
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _host_index: int, optional
|
|
441
|
+
:return: Returns the result object.
|
|
442
|
+
""" # noqa: E501
|
|
443
|
+
|
|
444
|
+
_param = self._get_broker_alert_serialize(
|
|
445
|
+
broker_alert_id=broker_alert_id,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'200': "BrokerAlert",
|
|
454
|
+
'404': None,
|
|
455
|
+
'422': "HTTPValidationError",
|
|
456
|
+
}
|
|
457
|
+
response_data = self.api_client.call_api(
|
|
458
|
+
*_param,
|
|
459
|
+
_request_timeout=_request_timeout
|
|
460
|
+
)
|
|
461
|
+
response_data.read()
|
|
462
|
+
return self.api_client.response_deserialize(
|
|
463
|
+
response_data=response_data,
|
|
464
|
+
response_types_map=_response_types_map,
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
def get_broker_alert_without_preload_content(
|
|
470
|
+
self,
|
|
471
|
+
broker_alert_id: StrictStr,
|
|
472
|
+
_request_timeout: Union[
|
|
473
|
+
None,
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
475
|
+
Tuple[
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
478
|
+
]
|
|
479
|
+
] = None,
|
|
480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
481
|
+
_content_type: Optional[StrictStr] = None,
|
|
482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
484
|
+
) -> RESTResponseType:
|
|
485
|
+
"""Read a broker alert
|
|
486
|
+
|
|
487
|
+
Read a broker alert by ID.
|
|
488
|
+
|
|
489
|
+
:param broker_alert_id: (required)
|
|
490
|
+
:type broker_alert_id: str
|
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
+
number provided, it will be total request
|
|
493
|
+
timeout. It can also be a pair (tuple) of
|
|
494
|
+
(connection, read) timeouts.
|
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
497
|
+
request; this effectively ignores the
|
|
498
|
+
authentication in the spec for a single request.
|
|
499
|
+
:type _request_auth: dict, optional
|
|
500
|
+
:param _content_type: force content-type for the request.
|
|
501
|
+
:type _content_type: str, Optional
|
|
502
|
+
:param _headers: set to override the headers for a single
|
|
503
|
+
request; this effectively ignores the headers
|
|
504
|
+
in the spec for a single request.
|
|
505
|
+
:type _headers: dict, optional
|
|
506
|
+
:param _host_index: set to override the host_index for a single
|
|
507
|
+
request; this effectively ignores the host_index
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _host_index: int, optional
|
|
510
|
+
:return: Returns the result object.
|
|
511
|
+
""" # noqa: E501
|
|
512
|
+
|
|
513
|
+
_param = self._get_broker_alert_serialize(
|
|
514
|
+
broker_alert_id=broker_alert_id,
|
|
515
|
+
_request_auth=_request_auth,
|
|
516
|
+
_content_type=_content_type,
|
|
517
|
+
_headers=_headers,
|
|
518
|
+
_host_index=_host_index
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
522
|
+
'200': "BrokerAlert",
|
|
523
|
+
'404': None,
|
|
524
|
+
'422': "HTTPValidationError",
|
|
525
|
+
}
|
|
526
|
+
response_data = self.api_client.call_api(
|
|
527
|
+
*_param,
|
|
528
|
+
_request_timeout=_request_timeout
|
|
529
|
+
)
|
|
530
|
+
return response_data.response
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def _get_broker_alert_serialize(
|
|
534
|
+
self,
|
|
535
|
+
broker_alert_id,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
if broker_alert_id is not None:
|
|
558
|
+
_path_params['broker_alert_id'] = broker_alert_id
|
|
559
|
+
# process the query parameters
|
|
560
|
+
# process the header parameters
|
|
561
|
+
# process the form parameters
|
|
562
|
+
# process the body parameter
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# set the HTTP header `Accept`
|
|
566
|
+
if 'Accept' not in _header_params:
|
|
567
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
568
|
+
[
|
|
569
|
+
'application/json'
|
|
570
|
+
]
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
# authentication setting
|
|
575
|
+
_auth_settings: List[str] = [
|
|
576
|
+
]
|
|
577
|
+
|
|
578
|
+
return self.api_client.param_serialize(
|
|
579
|
+
method='GET',
|
|
580
|
+
resource_path='/broker-alert/{broker_alert_id}',
|
|
581
|
+
path_params=_path_params,
|
|
582
|
+
query_params=_query_params,
|
|
583
|
+
header_params=_header_params,
|
|
584
|
+
body=_body_params,
|
|
585
|
+
post_params=_form_params,
|
|
586
|
+
files=_files,
|
|
587
|
+
auth_settings=_auth_settings,
|
|
588
|
+
collection_formats=_collection_formats,
|
|
589
|
+
_host=_host,
|
|
590
|
+
_request_auth=_request_auth
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
@validate_call
|
|
597
|
+
def get_broker_alerts(
|
|
598
|
+
self,
|
|
599
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
600
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
601
|
+
status: Optional[List[BrokerAlertStatus]] = None,
|
|
602
|
+
broker_name: Optional[StrictStr] = None,
|
|
603
|
+
data_source: Optional[List[BrokerAlertDataSource]] = None,
|
|
604
|
+
external_event_id: Optional[StrictStr] = None,
|
|
605
|
+
broker_event_id: Optional[StrictStr] = None,
|
|
606
|
+
broker_received_before: Optional[datetime] = None,
|
|
607
|
+
broker_received_after: Optional[datetime] = None,
|
|
608
|
+
_request_timeout: Union[
|
|
609
|
+
None,
|
|
610
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
611
|
+
Tuple[
|
|
612
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
613
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
614
|
+
]
|
|
615
|
+
] = None,
|
|
616
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
617
|
+
_content_type: Optional[StrictStr] = None,
|
|
618
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
619
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
620
|
+
) -> PageBrokerAlert:
|
|
621
|
+
"""Read broker alert(s)
|
|
622
|
+
|
|
623
|
+
Read many broker alerts based on query params
|
|
624
|
+
|
|
625
|
+
:param page: Page number
|
|
626
|
+
:type page: int
|
|
627
|
+
:param page_limit: Records per page
|
|
628
|
+
:type page_limit: int
|
|
629
|
+
:param status:
|
|
630
|
+
:type status: List[BrokerAlertStatus]
|
|
631
|
+
:param broker_name:
|
|
632
|
+
:type broker_name: str
|
|
633
|
+
:param data_source:
|
|
634
|
+
:type data_source: List[BrokerAlertDataSource]
|
|
635
|
+
:param external_event_id:
|
|
636
|
+
:type external_event_id: str
|
|
637
|
+
:param broker_event_id:
|
|
638
|
+
:type broker_event_id: str
|
|
639
|
+
:param broker_received_before:
|
|
640
|
+
:type broker_received_before: datetime
|
|
641
|
+
:param broker_received_after:
|
|
642
|
+
:type broker_received_after: datetime
|
|
643
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
644
|
+
number provided, it will be total request
|
|
645
|
+
timeout. It can also be a pair (tuple) of
|
|
646
|
+
(connection, read) timeouts.
|
|
647
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
648
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
649
|
+
request; this effectively ignores the
|
|
650
|
+
authentication in the spec for a single request.
|
|
651
|
+
:type _request_auth: dict, optional
|
|
652
|
+
:param _content_type: force content-type for the request.
|
|
653
|
+
:type _content_type: str, Optional
|
|
654
|
+
:param _headers: set to override the headers for a single
|
|
655
|
+
request; this effectively ignores the headers
|
|
656
|
+
in the spec for a single request.
|
|
657
|
+
:type _headers: dict, optional
|
|
658
|
+
:param _host_index: set to override the host_index for a single
|
|
659
|
+
request; this effectively ignores the host_index
|
|
660
|
+
in the spec for a single request.
|
|
661
|
+
:type _host_index: int, optional
|
|
662
|
+
:return: Returns the result object.
|
|
663
|
+
""" # noqa: E501
|
|
664
|
+
|
|
665
|
+
_param = self._get_broker_alerts_serialize(
|
|
666
|
+
page=page,
|
|
667
|
+
page_limit=page_limit,
|
|
668
|
+
status=status,
|
|
669
|
+
broker_name=broker_name,
|
|
670
|
+
data_source=data_source,
|
|
671
|
+
external_event_id=external_event_id,
|
|
672
|
+
broker_event_id=broker_event_id,
|
|
673
|
+
broker_received_before=broker_received_before,
|
|
674
|
+
broker_received_after=broker_received_after,
|
|
675
|
+
_request_auth=_request_auth,
|
|
676
|
+
_content_type=_content_type,
|
|
677
|
+
_headers=_headers,
|
|
678
|
+
_host_index=_host_index
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
682
|
+
'200': "PageBrokerAlert",
|
|
683
|
+
'404': None,
|
|
684
|
+
'422': "HTTPValidationError",
|
|
685
|
+
}
|
|
686
|
+
response_data = self.api_client.call_api(
|
|
687
|
+
*_param,
|
|
688
|
+
_request_timeout=_request_timeout
|
|
689
|
+
)
|
|
690
|
+
response_data.read()
|
|
691
|
+
return self.api_client.response_deserialize(
|
|
692
|
+
response_data=response_data,
|
|
693
|
+
response_types_map=_response_types_map,
|
|
694
|
+
).data
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
@validate_call
|
|
698
|
+
def get_broker_alerts_with_http_info(
|
|
699
|
+
self,
|
|
700
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
701
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
702
|
+
status: Optional[List[BrokerAlertStatus]] = None,
|
|
703
|
+
broker_name: Optional[StrictStr] = None,
|
|
704
|
+
data_source: Optional[List[BrokerAlertDataSource]] = None,
|
|
705
|
+
external_event_id: Optional[StrictStr] = None,
|
|
706
|
+
broker_event_id: Optional[StrictStr] = None,
|
|
707
|
+
broker_received_before: Optional[datetime] = None,
|
|
708
|
+
broker_received_after: Optional[datetime] = None,
|
|
709
|
+
_request_timeout: Union[
|
|
710
|
+
None,
|
|
711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
712
|
+
Tuple[
|
|
713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
714
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
715
|
+
]
|
|
716
|
+
] = None,
|
|
717
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
718
|
+
_content_type: Optional[StrictStr] = None,
|
|
719
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
721
|
+
) -> ApiResponse[PageBrokerAlert]:
|
|
722
|
+
"""Read broker alert(s)
|
|
723
|
+
|
|
724
|
+
Read many broker alerts based on query params
|
|
725
|
+
|
|
726
|
+
:param page: Page number
|
|
727
|
+
:type page: int
|
|
728
|
+
:param page_limit: Records per page
|
|
729
|
+
:type page_limit: int
|
|
730
|
+
:param status:
|
|
731
|
+
:type status: List[BrokerAlertStatus]
|
|
732
|
+
:param broker_name:
|
|
733
|
+
:type broker_name: str
|
|
734
|
+
:param data_source:
|
|
735
|
+
:type data_source: List[BrokerAlertDataSource]
|
|
736
|
+
:param external_event_id:
|
|
737
|
+
:type external_event_id: str
|
|
738
|
+
:param broker_event_id:
|
|
739
|
+
:type broker_event_id: str
|
|
740
|
+
:param broker_received_before:
|
|
741
|
+
:type broker_received_before: datetime
|
|
742
|
+
:param broker_received_after:
|
|
743
|
+
:type broker_received_after: datetime
|
|
744
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
745
|
+
number provided, it will be total request
|
|
746
|
+
timeout. It can also be a pair (tuple) of
|
|
747
|
+
(connection, read) timeouts.
|
|
748
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
749
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
750
|
+
request; this effectively ignores the
|
|
751
|
+
authentication in the spec for a single request.
|
|
752
|
+
:type _request_auth: dict, optional
|
|
753
|
+
:param _content_type: force content-type for the request.
|
|
754
|
+
:type _content_type: str, Optional
|
|
755
|
+
:param _headers: set to override the headers for a single
|
|
756
|
+
request; this effectively ignores the headers
|
|
757
|
+
in the spec for a single request.
|
|
758
|
+
:type _headers: dict, optional
|
|
759
|
+
:param _host_index: set to override the host_index for a single
|
|
760
|
+
request; this effectively ignores the host_index
|
|
761
|
+
in the spec for a single request.
|
|
762
|
+
:type _host_index: int, optional
|
|
763
|
+
:return: Returns the result object.
|
|
764
|
+
""" # noqa: E501
|
|
765
|
+
|
|
766
|
+
_param = self._get_broker_alerts_serialize(
|
|
767
|
+
page=page,
|
|
768
|
+
page_limit=page_limit,
|
|
769
|
+
status=status,
|
|
770
|
+
broker_name=broker_name,
|
|
771
|
+
data_source=data_source,
|
|
772
|
+
external_event_id=external_event_id,
|
|
773
|
+
broker_event_id=broker_event_id,
|
|
774
|
+
broker_received_before=broker_received_before,
|
|
775
|
+
broker_received_after=broker_received_after,
|
|
776
|
+
_request_auth=_request_auth,
|
|
777
|
+
_content_type=_content_type,
|
|
778
|
+
_headers=_headers,
|
|
779
|
+
_host_index=_host_index
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
783
|
+
'200': "PageBrokerAlert",
|
|
784
|
+
'404': None,
|
|
785
|
+
'422': "HTTPValidationError",
|
|
786
|
+
}
|
|
787
|
+
response_data = self.api_client.call_api(
|
|
788
|
+
*_param,
|
|
789
|
+
_request_timeout=_request_timeout
|
|
790
|
+
)
|
|
791
|
+
response_data.read()
|
|
792
|
+
return self.api_client.response_deserialize(
|
|
793
|
+
response_data=response_data,
|
|
794
|
+
response_types_map=_response_types_map,
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
@validate_call
|
|
799
|
+
def get_broker_alerts_without_preload_content(
|
|
800
|
+
self,
|
|
801
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
802
|
+
page_limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Records per page")] = None,
|
|
803
|
+
status: Optional[List[BrokerAlertStatus]] = None,
|
|
804
|
+
broker_name: Optional[StrictStr] = None,
|
|
805
|
+
data_source: Optional[List[BrokerAlertDataSource]] = None,
|
|
806
|
+
external_event_id: Optional[StrictStr] = None,
|
|
807
|
+
broker_event_id: Optional[StrictStr] = None,
|
|
808
|
+
broker_received_before: Optional[datetime] = None,
|
|
809
|
+
broker_received_after: Optional[datetime] = None,
|
|
810
|
+
_request_timeout: Union[
|
|
811
|
+
None,
|
|
812
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
813
|
+
Tuple[
|
|
814
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
815
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
816
|
+
]
|
|
817
|
+
] = None,
|
|
818
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
819
|
+
_content_type: Optional[StrictStr] = None,
|
|
820
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
821
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
822
|
+
) -> RESTResponseType:
|
|
823
|
+
"""Read broker alert(s)
|
|
824
|
+
|
|
825
|
+
Read many broker alerts based on query params
|
|
826
|
+
|
|
827
|
+
:param page: Page number
|
|
828
|
+
:type page: int
|
|
829
|
+
:param page_limit: Records per page
|
|
830
|
+
:type page_limit: int
|
|
831
|
+
:param status:
|
|
832
|
+
:type status: List[BrokerAlertStatus]
|
|
833
|
+
:param broker_name:
|
|
834
|
+
:type broker_name: str
|
|
835
|
+
:param data_source:
|
|
836
|
+
:type data_source: List[BrokerAlertDataSource]
|
|
837
|
+
:param external_event_id:
|
|
838
|
+
:type external_event_id: str
|
|
839
|
+
:param broker_event_id:
|
|
840
|
+
:type broker_event_id: str
|
|
841
|
+
:param broker_received_before:
|
|
842
|
+
:type broker_received_before: datetime
|
|
843
|
+
:param broker_received_after:
|
|
844
|
+
:type broker_received_after: datetime
|
|
845
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
846
|
+
number provided, it will be total request
|
|
847
|
+
timeout. It can also be a pair (tuple) of
|
|
848
|
+
(connection, read) timeouts.
|
|
849
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
850
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
851
|
+
request; this effectively ignores the
|
|
852
|
+
authentication in the spec for a single request.
|
|
853
|
+
:type _request_auth: dict, optional
|
|
854
|
+
:param _content_type: force content-type for the request.
|
|
855
|
+
:type _content_type: str, Optional
|
|
856
|
+
:param _headers: set to override the headers for a single
|
|
857
|
+
request; this effectively ignores the headers
|
|
858
|
+
in the spec for a single request.
|
|
859
|
+
:type _headers: dict, optional
|
|
860
|
+
:param _host_index: set to override the host_index for a single
|
|
861
|
+
request; this effectively ignores the host_index
|
|
862
|
+
in the spec for a single request.
|
|
863
|
+
:type _host_index: int, optional
|
|
864
|
+
:return: Returns the result object.
|
|
865
|
+
""" # noqa: E501
|
|
866
|
+
|
|
867
|
+
_param = self._get_broker_alerts_serialize(
|
|
868
|
+
page=page,
|
|
869
|
+
page_limit=page_limit,
|
|
870
|
+
status=status,
|
|
871
|
+
broker_name=broker_name,
|
|
872
|
+
data_source=data_source,
|
|
873
|
+
external_event_id=external_event_id,
|
|
874
|
+
broker_event_id=broker_event_id,
|
|
875
|
+
broker_received_before=broker_received_before,
|
|
876
|
+
broker_received_after=broker_received_after,
|
|
877
|
+
_request_auth=_request_auth,
|
|
878
|
+
_content_type=_content_type,
|
|
879
|
+
_headers=_headers,
|
|
880
|
+
_host_index=_host_index
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
884
|
+
'200': "PageBrokerAlert",
|
|
885
|
+
'404': None,
|
|
886
|
+
'422': "HTTPValidationError",
|
|
887
|
+
}
|
|
888
|
+
response_data = self.api_client.call_api(
|
|
889
|
+
*_param,
|
|
890
|
+
_request_timeout=_request_timeout
|
|
891
|
+
)
|
|
892
|
+
return response_data.response
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
def _get_broker_alerts_serialize(
|
|
896
|
+
self,
|
|
897
|
+
page,
|
|
898
|
+
page_limit,
|
|
899
|
+
status,
|
|
900
|
+
broker_name,
|
|
901
|
+
data_source,
|
|
902
|
+
external_event_id,
|
|
903
|
+
broker_event_id,
|
|
904
|
+
broker_received_before,
|
|
905
|
+
broker_received_after,
|
|
906
|
+
_request_auth,
|
|
907
|
+
_content_type,
|
|
908
|
+
_headers,
|
|
909
|
+
_host_index,
|
|
910
|
+
) -> RequestSerialized:
|
|
911
|
+
|
|
912
|
+
_host = None
|
|
913
|
+
|
|
914
|
+
_collection_formats: Dict[str, str] = {
|
|
915
|
+
'status': 'multi',
|
|
916
|
+
'data_source': 'multi',
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
_path_params: Dict[str, str] = {}
|
|
920
|
+
_query_params: List[Tuple[str, str]] = []
|
|
921
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
922
|
+
_form_params: List[Tuple[str, str]] = []
|
|
923
|
+
_files: Dict[
|
|
924
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
925
|
+
] = {}
|
|
926
|
+
_body_params: Optional[bytes] = None
|
|
927
|
+
|
|
928
|
+
# process the path parameters
|
|
929
|
+
# process the query parameters
|
|
930
|
+
if page is not None:
|
|
931
|
+
|
|
932
|
+
_query_params.append(('page', page))
|
|
933
|
+
|
|
934
|
+
if page_limit is not None:
|
|
935
|
+
|
|
936
|
+
_query_params.append(('page_limit', page_limit))
|
|
937
|
+
|
|
938
|
+
if status is not None:
|
|
939
|
+
|
|
940
|
+
_query_params.append(('status', status))
|
|
941
|
+
|
|
942
|
+
if broker_name is not None:
|
|
943
|
+
|
|
944
|
+
_query_params.append(('broker_name', broker_name))
|
|
945
|
+
|
|
946
|
+
if data_source is not None:
|
|
947
|
+
|
|
948
|
+
_query_params.append(('data_source', data_source))
|
|
949
|
+
|
|
950
|
+
if external_event_id is not None:
|
|
951
|
+
|
|
952
|
+
_query_params.append(('external_event_id', external_event_id))
|
|
953
|
+
|
|
954
|
+
if broker_event_id is not None:
|
|
955
|
+
|
|
956
|
+
_query_params.append(('broker_event_id', broker_event_id))
|
|
957
|
+
|
|
958
|
+
if broker_received_before is not None:
|
|
959
|
+
if isinstance(broker_received_before, datetime):
|
|
960
|
+
_query_params.append(
|
|
961
|
+
(
|
|
962
|
+
'broker_received_before',
|
|
963
|
+
broker_received_before.strftime(
|
|
964
|
+
self.api_client.configuration.datetime_format
|
|
965
|
+
)
|
|
966
|
+
)
|
|
967
|
+
)
|
|
968
|
+
else:
|
|
969
|
+
_query_params.append(('broker_received_before', broker_received_before))
|
|
970
|
+
|
|
971
|
+
if broker_received_after is not None:
|
|
972
|
+
if isinstance(broker_received_after, datetime):
|
|
973
|
+
_query_params.append(
|
|
974
|
+
(
|
|
975
|
+
'broker_received_after',
|
|
976
|
+
broker_received_after.strftime(
|
|
977
|
+
self.api_client.configuration.datetime_format
|
|
978
|
+
)
|
|
979
|
+
)
|
|
980
|
+
)
|
|
981
|
+
else:
|
|
982
|
+
_query_params.append(('broker_received_after', broker_received_after))
|
|
983
|
+
|
|
984
|
+
# process the header parameters
|
|
985
|
+
# process the form parameters
|
|
986
|
+
# process the body parameter
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
# set the HTTP header `Accept`
|
|
990
|
+
if 'Accept' not in _header_params:
|
|
991
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
992
|
+
[
|
|
993
|
+
'application/json'
|
|
994
|
+
]
|
|
995
|
+
)
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
# authentication setting
|
|
999
|
+
_auth_settings: List[str] = [
|
|
1000
|
+
]
|
|
1001
|
+
|
|
1002
|
+
return self.api_client.param_serialize(
|
|
1003
|
+
method='GET',
|
|
1004
|
+
resource_path='/broker-alert/',
|
|
1005
|
+
path_params=_path_params,
|
|
1006
|
+
query_params=_query_params,
|
|
1007
|
+
header_params=_header_params,
|
|
1008
|
+
body=_body_params,
|
|
1009
|
+
post_params=_form_params,
|
|
1010
|
+
files=_files,
|
|
1011
|
+
auth_settings=_auth_settings,
|
|
1012
|
+
collection_formats=_collection_formats,
|
|
1013
|
+
_host=_host,
|
|
1014
|
+
_request_auth=_request_auth
|
|
1015
|
+
)
|
|
1016
|
+
|
|
1017
|
+
|