# coding: utf-8

"""
    Ringer Business API

    This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites,  phone numbers, payments, users, and other business resources.  Operations typically require authentication and appropriate permissions. 

    The version of the OpenAPI document: 1.0.4
    Contact: support@ringer.tel
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBytes, StrictInt, StrictStr
from typing import Optional, Tuple, Union
from typing_extensions import Annotated
from ringer_business.models.menu_response import MenuResponse
from ringer_business.models.paginated_menu_list_response import PaginatedMenuListResponse

from ringer_business.api_client import ApiClient, RequestSerialized
from ringer_business.api_response import ApiResponse
from ringer_business.rest import RESTResponseType


class SiteFeaturesMenusApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def create_site_menu(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        name: StrictStr,
        fail_over_destination_code: StrictStr,
        pin: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Audio file for the menu greeting.")] = None,
        option_routes_0: Annotated[Optional[StrictStr], Field(description="Destination code for key '0'.")] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Annotated[Optional[StrictStr], Field(description="Destination code for key '*'.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> MenuResponse:
        """Create Menu for a Site

        Add a new menu (auto attendant) to your site. Greeting can be uploaded.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param name: (required)
        :type name: str
        :param fail_over_destination_code: (required)
        :type fail_over_destination_code: str
        :param pin:
        :type pin: str
        :param greeting: Audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0: Destination code for key '0'.
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_: Destination code for key '*'.
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_site_menu_serialize(
            site_id=site_id,
            name=name,
            fail_over_destination_code=fail_over_destination_code,
            pin=pin,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def create_site_menu_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        name: StrictStr,
        fail_over_destination_code: StrictStr,
        pin: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Audio file for the menu greeting.")] = None,
        option_routes_0: Annotated[Optional[StrictStr], Field(description="Destination code for key '0'.")] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Annotated[Optional[StrictStr], Field(description="Destination code for key '*'.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[MenuResponse]:
        """Create Menu for a Site

        Add a new menu (auto attendant) to your site. Greeting can be uploaded.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param name: (required)
        :type name: str
        :param fail_over_destination_code: (required)
        :type fail_over_destination_code: str
        :param pin:
        :type pin: str
        :param greeting: Audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0: Destination code for key '0'.
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_: Destination code for key '*'.
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_site_menu_serialize(
            site_id=site_id,
            name=name,
            fail_over_destination_code=fail_over_destination_code,
            pin=pin,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def create_site_menu_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        name: StrictStr,
        fail_over_destination_code: StrictStr,
        pin: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Audio file for the menu greeting.")] = None,
        option_routes_0: Annotated[Optional[StrictStr], Field(description="Destination code for key '0'.")] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Annotated[Optional[StrictStr], Field(description="Destination code for key '*'.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Create Menu for a Site

        Add a new menu (auto attendant) to your site. Greeting can be uploaded.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param name: (required)
        :type name: str
        :param fail_over_destination_code: (required)
        :type fail_over_destination_code: str
        :param pin:
        :type pin: str
        :param greeting: Audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0: Destination code for key '0'.
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_: Destination code for key '*'.
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_site_menu_serialize(
            site_id=site_id,
            name=name,
            fail_over_destination_code=fail_over_destination_code,
            pin=pin,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _create_site_menu_serialize(
        self,
        site_id,
        name,
        fail_over_destination_code,
        pin,
        greeting,
        option_routes_0,
        option_routes_1,
        option_routes_2,
        option_routes_3,
        option_routes_4,
        option_routes_5,
        option_routes_6,
        option_routes_7,
        option_routes_8,
        option_routes_9,
        option_routes_,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        if name is not None:
            _form_params.append(('name', name))
        if pin is not None:
            _form_params.append(('pin', pin))
        if fail_over_destination_code is not None:
            _form_params.append(('fail_over_destination_code', fail_over_destination_code))
        if greeting is not None:
            _files['greeting'] = greeting
        if option_routes_0 is not None:
            _form_params.append(('option_routes[0]', option_routes_0))
        if option_routes_1 is not None:
            _form_params.append(('option_routes[1]', option_routes_1))
        if option_routes_2 is not None:
            _form_params.append(('option_routes[2]', option_routes_2))
        if option_routes_3 is not None:
            _form_params.append(('option_routes[3]', option_routes_3))
        if option_routes_4 is not None:
            _form_params.append(('option_routes[4]', option_routes_4))
        if option_routes_5 is not None:
            _form_params.append(('option_routes[5]', option_routes_5))
        if option_routes_6 is not None:
            _form_params.append(('option_routes[6]', option_routes_6))
        if option_routes_7 is not None:
            _form_params.append(('option_routes[7]', option_routes_7))
        if option_routes_8 is not None:
            _form_params.append(('option_routes[8]', option_routes_8))
        if option_routes_9 is not None:
            _form_params.append(('option_routes[9]', option_routes_9))
        if option_routes_ is not None:
            _form_params.append(('option_routes[*]', option_routes_))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'multipart/form-data'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/sites/{siteId}/menus',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def delete_site_menu_by_id(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """Delete Menu

        Permanently delete a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def delete_site_menu_by_id_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """Delete Menu

        Permanently delete a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def delete_site_menu_by_id_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Delete Menu

        Permanently delete a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _delete_site_menu_by_id_serialize(
        self,
        site_id,
        menu_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        if menu_id is not None:
            _path_params['menuId'] = menu_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/sites/{siteId}/menus/{menuId}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_site_menu_by_id(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> MenuResponse:
        """Get Menu Details

        Retrieve the details of a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_site_menu_by_id_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[MenuResponse]:
        """Get Menu Details

        Retrieve the details of a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_site_menu_by_id_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Menu Details

        Retrieve the details of a specific menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_site_menu_by_id_serialize(
        self,
        site_id,
        menu_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        if menu_id is not None:
            _path_params['menuId'] = menu_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/sites/{siteId}/menus/{menuId}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def list_site_menus(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        page: Annotated[Optional[StrictInt], Field(description="Page number for pagination.")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of menus per page.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedMenuListResponse:
        """List Menus for a Site

        Retrieve a paginated list of all menus (auto attendants) that belong to a site.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param page: Page number for pagination.
        :type page: int
        :param page_size: Number of menus per page.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_site_menus_serialize(
            site_id=site_id,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PaginatedMenuListResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def list_site_menus_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        page: Annotated[Optional[StrictInt], Field(description="Page number for pagination.")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of menus per page.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedMenuListResponse]:
        """List Menus for a Site

        Retrieve a paginated list of all menus (auto attendants) that belong to a site.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param page: Page number for pagination.
        :type page: int
        :param page_size: Number of menus per page.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_site_menus_serialize(
            site_id=site_id,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PaginatedMenuListResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def list_site_menus_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        page: Annotated[Optional[StrictInt], Field(description="Page number for pagination.")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="Number of menus per page.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List Menus for a Site

        Retrieve a paginated list of all menus (auto attendants) that belong to a site.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param page: Page number for pagination.
        :type page: int
        :param page_size: Number of menus per page.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_site_menus_serialize(
            site_id=site_id,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PaginatedMenuListResponse",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _list_site_menus_serialize(
        self,
        site_id,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        # process the query parameters
        if page is not None:
            
            _query_params.append(('page', page))
            
        if page_size is not None:
            
            _query_params.append(('page_size', page_size))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/sites/{siteId}/menus',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def transfer_site_menu(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        new_site_id: Annotated[StrictInt, Field(description="The unique identifier of the target site for the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> MenuResponse:
        """Transfer Menu to Another Site

        Moves a menu from its current site (specified in the path)  to a new target site (specified in the request body) within the same customer account. 

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param new_site_id: The unique identifier of the target site for the menu. (required)
        :type new_site_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._transfer_site_menu_serialize(
            site_id=site_id,
            menu_id=menu_id,
            new_site_id=new_site_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def transfer_site_menu_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        new_site_id: Annotated[StrictInt, Field(description="The unique identifier of the target site for the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[MenuResponse]:
        """Transfer Menu to Another Site

        Moves a menu from its current site (specified in the path)  to a new target site (specified in the request body) within the same customer account. 

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param new_site_id: The unique identifier of the target site for the menu. (required)
        :type new_site_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._transfer_site_menu_serialize(
            site_id=site_id,
            menu_id=menu_id,
            new_site_id=new_site_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def transfer_site_menu_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        new_site_id: Annotated[StrictInt, Field(description="The unique identifier of the target site for the menu.")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Transfer Menu to Another Site

        Moves a menu from its current site (specified in the path)  to a new target site (specified in the request body) within the same customer account. 

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param new_site_id: The unique identifier of the target site for the menu. (required)
        :type new_site_id: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._transfer_site_menu_serialize(
            site_id=site_id,
            menu_id=menu_id,
            new_site_id=new_site_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _transfer_site_menu_serialize(
        self,
        site_id,
        menu_id,
        new_site_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        if menu_id is not None:
            _path_params['menuId'] = menu_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        if new_site_id is not None:
            _form_params.append(('new_site_id', new_site_id))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/x-www-form-urlencoded'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/sites/{siteId}/menus/{menuId}/transfer',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def update_site_menu_by_id(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        name: Optional[StrictStr] = None,
        pin: Optional[StrictStr] = None,
        fail_over_destination_code: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="New audio file for the menu greeting.")] = None,
        option_routes_0: Optional[StrictStr] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Optional[StrictStr] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> MenuResponse:
        """Update Menu Configuration

        Updates an existing menu. For `multipart/form-data`, provide only the fields to change. Audio files can be updated.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param name:
        :type name: str
        :param pin:
        :type pin: str
        :param fail_over_destination_code:
        :type fail_over_destination_code: str
        :param greeting: New audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0:
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_:
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            name=name,
            pin=pin,
            fail_over_destination_code=fail_over_destination_code,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def update_site_menu_by_id_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        name: Optional[StrictStr] = None,
        pin: Optional[StrictStr] = None,
        fail_over_destination_code: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="New audio file for the menu greeting.")] = None,
        option_routes_0: Optional[StrictStr] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Optional[StrictStr] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[MenuResponse]:
        """Update Menu Configuration

        Updates an existing menu. For `multipart/form-data`, provide only the fields to change. Audio files can be updated.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param name:
        :type name: str
        :param pin:
        :type pin: str
        :param fail_over_destination_code:
        :type fail_over_destination_code: str
        :param greeting: New audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0:
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_:
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            name=name,
            pin=pin,
            fail_over_destination_code=fail_over_destination_code,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def update_site_menu_by_id_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        name: Optional[StrictStr] = None,
        pin: Optional[StrictStr] = None,
        fail_over_destination_code: Optional[StrictStr] = None,
        greeting: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="New audio file for the menu greeting.")] = None,
        option_routes_0: Optional[StrictStr] = None,
        option_routes_1: Optional[StrictStr] = None,
        option_routes_2: Optional[StrictStr] = None,
        option_routes_3: Optional[StrictStr] = None,
        option_routes_4: Optional[StrictStr] = None,
        option_routes_5: Optional[StrictStr] = None,
        option_routes_6: Optional[StrictStr] = None,
        option_routes_7: Optional[StrictStr] = None,
        option_routes_8: Optional[StrictStr] = None,
        option_routes_9: Optional[StrictStr] = None,
        option_routes_: Optional[StrictStr] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Update Menu Configuration

        Updates an existing menu. For `multipart/form-data`, provide only the fields to change. Audio files can be updated.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param name:
        :type name: str
        :param pin:
        :type pin: str
        :param fail_over_destination_code:
        :type fail_over_destination_code: str
        :param greeting: New audio file for the menu greeting.
        :type greeting: bytearray
        :param option_routes_0:
        :type option_routes_0: str
        :param option_routes_1:
        :type option_routes_1: str
        :param option_routes_2:
        :type option_routes_2: str
        :param option_routes_3:
        :type option_routes_3: str
        :param option_routes_4:
        :type option_routes_4: str
        :param option_routes_5:
        :type option_routes_5: str
        :param option_routes_6:
        :type option_routes_6: str
        :param option_routes_7:
        :type option_routes_7: str
        :param option_routes_8:
        :type option_routes_8: str
        :param option_routes_9:
        :type option_routes_9: str
        :param option_routes_:
        :type option_routes_: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_site_menu_by_id_serialize(
            site_id=site_id,
            menu_id=menu_id,
            name=name,
            pin=pin,
            fail_over_destination_code=fail_over_destination_code,
            greeting=greeting,
            option_routes_0=option_routes_0,
            option_routes_1=option_routes_1,
            option_routes_2=option_routes_2,
            option_routes_3=option_routes_3,
            option_routes_4=option_routes_4,
            option_routes_5=option_routes_5,
            option_routes_6=option_routes_6,
            option_routes_7=option_routes_7,
            option_routes_8=option_routes_8,
            option_routes_9=option_routes_9,
            option_routes_=option_routes_,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _update_site_menu_by_id_serialize(
        self,
        site_id,
        menu_id,
        name,
        pin,
        fail_over_destination_code,
        greeting,
        option_routes_0,
        option_routes_1,
        option_routes_2,
        option_routes_3,
        option_routes_4,
        option_routes_5,
        option_routes_6,
        option_routes_7,
        option_routes_8,
        option_routes_9,
        option_routes_,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        if menu_id is not None:
            _path_params['menuId'] = menu_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        if name is not None:
            _form_params.append(('name', name))
        if pin is not None:
            _form_params.append(('pin', pin))
        if fail_over_destination_code is not None:
            _form_params.append(('fail_over_destination_code', fail_over_destination_code))
        if greeting is not None:
            _files['greeting'] = greeting
        if option_routes_0 is not None:
            _form_params.append(('option_routes[0]', option_routes_0))
        if option_routes_1 is not None:
            _form_params.append(('option_routes[1]', option_routes_1))
        if option_routes_2 is not None:
            _form_params.append(('option_routes[2]', option_routes_2))
        if option_routes_3 is not None:
            _form_params.append(('option_routes[3]', option_routes_3))
        if option_routes_4 is not None:
            _form_params.append(('option_routes[4]', option_routes_4))
        if option_routes_5 is not None:
            _form_params.append(('option_routes[5]', option_routes_5))
        if option_routes_6 is not None:
            _form_params.append(('option_routes[6]', option_routes_6))
        if option_routes_7 is not None:
            _form_params.append(('option_routes[7]', option_routes_7))
        if option_routes_8 is not None:
            _form_params.append(('option_routes[8]', option_routes_8))
        if option_routes_9 is not None:
            _form_params.append(('option_routes[9]', option_routes_9))
        if option_routes_ is not None:
            _form_params.append(('option_routes[*]', option_routes_))
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'multipart/form-data'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/sites/{siteId}/menus/{menuId}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def upload_site_menu_greeting(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        greeting: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Audio file for the menu greeting (e.g., .mp3, .wav).")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> MenuResponse:
        """Upload Menu Greeting

        Upload or update the greeting audio file for the specified menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param greeting: Audio file for the menu greeting (e.g., .mp3, .wav). (required)
        :type greeting: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._upload_site_menu_greeting_serialize(
            site_id=site_id,
            menu_id=menu_id,
            greeting=greeting,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def upload_site_menu_greeting_with_http_info(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        greeting: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Audio file for the menu greeting (e.g., .mp3, .wav).")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[MenuResponse]:
        """Upload Menu Greeting

        Upload or update the greeting audio file for the specified menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param greeting: Audio file for the menu greeting (e.g., .mp3, .wav). (required)
        :type greeting: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._upload_site_menu_greeting_serialize(
            site_id=site_id,
            menu_id=menu_id,
            greeting=greeting,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def upload_site_menu_greeting_without_preload_content(
        self,
        site_id: Annotated[StrictStr, Field(description="The unique identifier of the site.")],
        menu_id: Annotated[StrictInt, Field(description="The unique identifier of the menu.")],
        greeting: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Audio file for the menu greeting (e.g., .mp3, .wav).")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Upload Menu Greeting

        Upload or update the greeting audio file for the specified menu.

        :param site_id: The unique identifier of the site. (required)
        :type site_id: str
        :param menu_id: The unique identifier of the menu. (required)
        :type menu_id: int
        :param greeting: Audio file for the menu greeting (e.g., .mp3, .wav). (required)
        :type greeting: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._upload_site_menu_greeting_serialize(
            site_id=site_id,
            menu_id=menu_id,
            greeting=greeting,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "MenuResponse",
            '400': "Error",
            '401': "Error",
            '403': "Error",
            '404': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _upload_site_menu_greeting_serialize(
        self,
        site_id,
        menu_id,
        greeting,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if site_id is not None:
            _path_params['siteId'] = site_id
        if menu_id is not None:
            _path_params['menuId'] = menu_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        if greeting is not None:
            _files['greeting'] = greeting
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'multipart/form-data'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'oAuth2'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/sites/{siteId}/menus/{menuId}/upload',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


