wallaroo.wallaroo_ml_ops_api_client.api.plateau.plateau_get_topic_name API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.plateau.plateau_get_topic_name

View Source

      1from typing import Any, Dict, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.plateau_get_topic_name_json_body import \
      7    PlateauGetTopicNameJsonBody
      8from ...models.plateau_get_topic_name_response_200 import \
      9    PlateauGetTopicNameResponse200
     10from ...models.plateau_get_topic_name_response_400 import \
     11    PlateauGetTopicNameResponse400
     12from ...models.plateau_get_topic_name_response_401 import \
     13    PlateauGetTopicNameResponse401
     14from ...models.plateau_get_topic_name_response_500 import \
     15    PlateauGetTopicNameResponse500
     16from ...types import Response
     17
     18
     19def _get_kwargs(
     20    *,
     21    client: Client,
     22    json_body: PlateauGetTopicNameJsonBody,
     23
     24) -> Dict[str, Any]:
     25    url = "{}/v1/api/plateau/get_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[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
     54    if response.status_code == 500:
     55        response_500 = PlateauGetTopicNameResponse500.from_dict(response.json())
     56
     57
     58
     59        return response_500
     60    if response.status_code == 400:
     61        response_400 = PlateauGetTopicNameResponse400.from_dict(response.json())
     62
     63
     64
     65        return response_400
     66    if response.status_code == 401:
     67        response_401 = PlateauGetTopicNameResponse401.from_dict(response.json())
     68
     69
     70
     71        return response_401
     72    if response.status_code == 200:
     73        response_200 = PlateauGetTopicNameResponse200.from_dict(response.json())
     74
     75
     76
     77        return response_200
     78    return None
     79
     80
     81def _build_response(*, response: httpx.Response) -> Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
     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: PlateauGetTopicNameJsonBody,
     94
     95) -> Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
     96    """Get topic name
     97
     98     Returns the topic name for the given pipeline.
     99
    100    Args:
    101        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    102
    103    Returns:
    104        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    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: PlateauGetTopicNameJsonBody,
    125
    126) -> Optional[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    127    """Get topic name
    128
    129     Returns the topic name for the given pipeline.
    130
    131    Args:
    132        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    133
    134    Returns:
    135        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    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: PlateauGetTopicNameJsonBody,
    149
    150) -> Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    151    """Get topic name
    152
    153     Returns the topic name for the given pipeline.
    154
    155    Args:
    156        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    157
    158    Returns:
    159        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    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: PlateauGetTopicNameJsonBody,
    180
    181) -> Optional[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    182    """Get topic name
    183
    184     Returns the topic name for the given pipeline.
    185
    186    Args:
    187        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    188
    189    Returns:
    190        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    191    """
    192
    193
    194    return (await asyncio_detailed(
    195        client=client,
    196json_body=json_body,
    197
    198    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_json_body.PlateauGetTopicNameJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_200.PlateauGetTopicNameResponse200, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_400.PlateauGetTopicNameResponse400, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_401.PlateauGetTopicNameResponse401, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_500.PlateauGetTopicNameResponse500]]: View Source

     91def sync_detailed(
     92    *,
     93    client: Client,
     94    json_body: PlateauGetTopicNameJsonBody,
     95
     96) -> Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
     97    """Get topic name
     98
     99     Returns the topic name for the given pipeline.
    100
    101    Args:
    102        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    103
    104    Returns:
    105        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    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 topic name

Returns the topic name for the given pipeline.

Args: json_body (PlateauGetTopicNameJsonBody): Request for topic name.

Returns: Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_json_body.PlateauGetTopicNameJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_200.PlateauGetTopicNameResponse200, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_400.PlateauGetTopicNameResponse400, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_401.PlateauGetTopicNameResponse401, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_500.PlateauGetTopicNameResponse500, NoneType]: View Source

    122def sync(
    123    *,
    124    client: Client,
    125    json_body: PlateauGetTopicNameJsonBody,
    126
    127) -> Optional[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    128    """Get topic name
    129
    130     Returns the topic name for the given pipeline.
    131
    132    Args:
    133        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    134
    135    Returns:
    136        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    137    """
    138
    139
    140    return sync_detailed(
    141        client=client,
    142json_body=json_body,
    143
    144    ).parsed

Get topic name

Returns the topic name for the given pipeline.

Args: json_body (PlateauGetTopicNameJsonBody): Request for topic name.

Returns: Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_json_body.PlateauGetTopicNameJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_200.PlateauGetTopicNameResponse200, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_400.PlateauGetTopicNameResponse400, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_401.PlateauGetTopicNameResponse401, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_500.PlateauGetTopicNameResponse500]]: View Source

    146async def asyncio_detailed(
    147    *,
    148    client: Client,
    149    json_body: PlateauGetTopicNameJsonBody,
    150
    151) -> Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    152    """Get topic name
    153
    154     Returns the topic name for the given pipeline.
    155
    156    Args:
    157        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    158
    159    Returns:
    160        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    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 topic name

Returns the topic name for the given pipeline.

Args: json_body (PlateauGetTopicNameJsonBody): Request for topic name.

Returns: Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_json_body.PlateauGetTopicNameJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_200.PlateauGetTopicNameResponse200, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_400.PlateauGetTopicNameResponse400, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_401.PlateauGetTopicNameResponse401, wallaroo.wallaroo_ml_ops_api_client.models.plateau_get_topic_name_response_500.PlateauGetTopicNameResponse500, NoneType]: View Source

    177async def asyncio(
    178    *,
    179    client: Client,
    180    json_body: PlateauGetTopicNameJsonBody,
    181
    182) -> Optional[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]:
    183    """Get topic name
    184
    185     Returns the topic name for the given pipeline.
    186
    187    Args:
    188        json_body (PlateauGetTopicNameJsonBody):  Request for topic name.
    189
    190    Returns:
    191        Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]
    192    """
    193
    194
    195    return (await asyncio_detailed(
    196        client=client,
    197json_body=json_body,
    198
    199    )).parsed

Get topic name

Returns the topic name for the given pipeline.

Args: json_body (PlateauGetTopicNameJsonBody): Request for topic name.

Returns: Response[Union[PlateauGetTopicNameResponse200, PlateauGetTopicNameResponse400, PlateauGetTopicNameResponse401, PlateauGetTopicNameResponse500]]