wallaroo.wallaroo_ml_ops_api_client.api.plateau.plateau_get_pipeline_topic_name
1from typing import Any, Dict, Optional, Union 2 3import httpx 4 5from ...client import Client 6from ...models.plateau_get_pipeline_topic_name_json_body import \ 7 PlateauGetPipelineTopicNameJsonBody 8from ...models.plateau_get_pipeline_topic_name_response_200 import \ 9 PlateauGetPipelineTopicNameResponse200 10from ...models.plateau_get_pipeline_topic_name_response_400 import \ 11 PlateauGetPipelineTopicNameResponse400 12from ...models.plateau_get_pipeline_topic_name_response_401 import \ 13 PlateauGetPipelineTopicNameResponse401 14from ...models.plateau_get_pipeline_topic_name_response_500 import \ 15 PlateauGetPipelineTopicNameResponse500 16from ...types import Response 17 18 19def _get_kwargs( 20 *, 21 client: Client, 22 json_body: PlateauGetPipelineTopicNameJsonBody, 23 24) -> Dict[str, Any]: 25 url = "{}/v1/api/plateau/get_pipeline_topic_name".format( 26 client.base_url) 27 28 headers: Dict[str, str] = client.get_headers() 29 cookies: Dict[str, Any] = client.get_cookies() 30 31 32 33 34 35 36 37 json_json_body = json_body.to_dict() 38 39 40 41 42 43 return { 44 "method": "post", 45 "url": url, 46 "headers": headers, 47 "cookies": cookies, 48 "timeout": client.get_timeout(), 49 "json": json_json_body, 50 } 51 52 53def _parse_response(*, response: httpx.Response) -> Optional[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 54 if response.status_code == 500: 55 response_500 = PlateauGetPipelineTopicNameResponse500.from_dict(response.json()) 56 57 58 59 return response_500 60 if response.status_code == 400: 61 response_400 = PlateauGetPipelineTopicNameResponse400.from_dict(response.json()) 62 63 64 65 return response_400 66 if response.status_code == 401: 67 response_401 = PlateauGetPipelineTopicNameResponse401.from_dict(response.json()) 68 69 70 71 return response_401 72 if response.status_code == 200: 73 response_200 = PlateauGetPipelineTopicNameResponse200.from_dict(response.json()) 74 75 76 77 return response_200 78 return None 79 80 81def _build_response(*, response: httpx.Response) -> Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 82 return Response( 83 status_code=response.status_code, 84 content=response.content, 85 headers=response.headers, 86 parsed=_parse_response(response=response), 87 ) 88 89 90def sync_detailed( 91 *, 92 client: Client, 93 json_body: PlateauGetPipelineTopicNameJsonBody, 94 95) -> Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 96 """Get pipeline topic name 97 98 Returns the given pipeline's topic name. 99 100 Args: 101 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 102 103 Returns: 104 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 105 """ 106 107 108 kwargs = _get_kwargs( 109 client=client, 110json_body=json_body, 111 112 ) 113 114 response = httpx.request( 115 verify=client.verify_ssl, 116 **kwargs, 117 ) 118 119 return _build_response(response=response) 120 121def sync( 122 *, 123 client: Client, 124 json_body: PlateauGetPipelineTopicNameJsonBody, 125 126) -> Optional[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 127 """Get pipeline topic name 128 129 Returns the given pipeline's topic name. 130 131 Args: 132 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 133 134 Returns: 135 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 136 """ 137 138 139 return sync_detailed( 140 client=client, 141json_body=json_body, 142 143 ).parsed 144 145async def asyncio_detailed( 146 *, 147 client: Client, 148 json_body: PlateauGetPipelineTopicNameJsonBody, 149 150) -> Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 151 """Get pipeline topic name 152 153 Returns the given pipeline's topic name. 154 155 Args: 156 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 157 158 Returns: 159 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 160 """ 161 162 163 kwargs = _get_kwargs( 164 client=client, 165json_body=json_body, 166 167 ) 168 169 async with httpx.AsyncClient(verify=client.verify_ssl) as _client: 170 response = await _client.request( 171 **kwargs 172 ) 173 174 return _build_response(response=response) 175 176async def asyncio( 177 *, 178 client: Client, 179 json_body: PlateauGetPipelineTopicNameJsonBody, 180 181) -> Optional[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 182 """Get pipeline topic name 183 184 Returns the given pipeline's topic name. 185 186 Args: 187 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 188 189 Returns: 190 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 191 """ 192 193 194 return (await asyncio_detailed( 195 client=client, 196json_body=json_body, 197 198 )).parsed
91def sync_detailed( 92 *, 93 client: Client, 94 json_body: PlateauGetPipelineTopicNameJsonBody, 95 96) -> Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 97 """Get pipeline topic name 98 99 Returns the given pipeline's topic name. 100 101 Args: 102 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 103 104 Returns: 105 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 106 """ 107 108 109 kwargs = _get_kwargs( 110 client=client, 111json_body=json_body, 112 113 ) 114 115 response = httpx.request( 116 verify=client.verify_ssl, 117 **kwargs, 118 ) 119 120 return _build_response(response=response)
Get pipeline topic name
Returns the given pipeline's topic name.
Args: json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name.
Returns: Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]
122def sync( 123 *, 124 client: Client, 125 json_body: PlateauGetPipelineTopicNameJsonBody, 126 127) -> Optional[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 128 """Get pipeline topic name 129 130 Returns the given pipeline's topic name. 131 132 Args: 133 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 134 135 Returns: 136 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 137 """ 138 139 140 return sync_detailed( 141 client=client, 142json_body=json_body, 143 144 ).parsed
Get pipeline topic name
Returns the given pipeline's topic name.
Args: json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name.
Returns: Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]
146async def asyncio_detailed( 147 *, 148 client: Client, 149 json_body: PlateauGetPipelineTopicNameJsonBody, 150 151) -> Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 152 """Get pipeline topic name 153 154 Returns the given pipeline's topic name. 155 156 Args: 157 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 158 159 Returns: 160 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 161 """ 162 163 164 kwargs = _get_kwargs( 165 client=client, 166json_body=json_body, 167 168 ) 169 170 async with httpx.AsyncClient(verify=client.verify_ssl) as _client: 171 response = await _client.request( 172 **kwargs 173 ) 174 175 return _build_response(response=response)
Get pipeline topic name
Returns the given pipeline's topic name.
Args: json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name.
Returns: Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]
177async def asyncio( 178 *, 179 client: Client, 180 json_body: PlateauGetPipelineTopicNameJsonBody, 181 182) -> Optional[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]: 183 """Get pipeline topic name 184 185 Returns the given pipeline's topic name. 186 187 Args: 188 json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name. 189 190 Returns: 191 Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]] 192 """ 193 194 195 return (await asyncio_detailed( 196 client=client, 197json_body=json_body, 198 199 )).parsed
Get pipeline topic name
Returns the given pipeline's topic name.
Args: json_body (PlateauGetPipelineTopicNameJsonBody): Request for pipeline topic name.
Returns: Response[Union[PlateauGetPipelineTopicNameResponse200, PlateauGetPipelineTopicNameResponse400, PlateauGetPipelineTopicNameResponse401, PlateauGetPipelineTopicNameResponse500]]