"""
Fitbit Web API Explorer

Fitbit provides a Web API for accessing data from Fitbit activity trackers, Aria scale, and manually entered logs. Anyone can develop an application to access and modify a Fitbit user's data on their behalf, so long as it complies with Fitbit Platform Terms of Service. These Swagger UI docs do not currently support making Fitbit API requests directly. In order to make a request, construct a request for the appropriate endpoint using this documentation, and then add an Authorization header to each request with an access token obtained using the steps outlined here: https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/.

The version of the OpenAPI document: 1
Generated by OpenAPI Generator (https://openapi-generator.tech)

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

from typing import Any, Dict, List, Optional, Tuple, Union

from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call
from typing_extensions import Annotated

from fitbit_web_api.api_client import ApiClient, RequestSerialized
from fitbit_web_api.api_response import ApiResponse
from fitbit_web_api.models.device import Device
from fitbit_web_api.models.get_alarms_response import GetAlarmsResponse
from fitbit_web_api.rest import RESTResponseType


class DevicesApi:
    """
    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
    async def add_alarms(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        _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:
        """
        Add Alarm

        Adds the alarm settings to a given ID for a given device.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: 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._add_alarms_serialize(
            tracker_id=tracker_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def add_alarms_with_http_info(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        _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]:
        """
        Add Alarm

        Adds the alarm settings to a given ID for a given device.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: 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._add_alarms_serialize(
            tracker_id=tracker_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    async def add_alarms_without_preload_content(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        _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:
        """
        Add Alarm

        Adds the alarm settings to a given ID for a given device.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma separated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: 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._add_alarms_serialize(
            tracker_id=tracker_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _add_alarms_serialize(
        self,
        tracker_id,
        time,
        enabled,
        recurring,
        week_days,
        _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 tracker_id is not None:
            _path_params["tracker-id"] = tracker_id
        # process the query parameters
        if time is not None:
            _query_params.append(("time", time))

        if enabled is not None:
            _query_params.append(("enabled", enabled))

        if recurring is not None:
            _query_params.append(("recurring", recurring))

        if week_days is not None:
            _query_params.append(("weekDays", week_days))

        # 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="POST",
            resource_path="/1/user/-/devices/tracker/{tracker-id}/alarms.json",
            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
    async def delete_alarms(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint."
            ),
        ],
        _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 Alarm

        Deletes the user's device alarm entry with the given ID for a given device.

        :param tracker_id: The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint. (required)
        :type alarm_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_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

    @validate_call
    async def delete_alarms_with_http_info(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint."
            ),
        ],
        _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 Alarm

        Deletes the user's device alarm entry with the given ID for a given device.

        :param tracker_id: The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint. (required)
        :type alarm_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_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

    @validate_call
    async def delete_alarms_without_preload_content(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint."
            ),
        ],
        _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 Alarm

        Deletes the user's device alarm entry with the given ID for a given device.

        :param tracker_id: The ID of the tracker whose alarms is managed. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found via the Get Alarms endpoint. (required)
        :type alarm_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_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

    def _delete_alarms_serialize(
        self,
        tracker_id,
        alarm_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 tracker_id is not None:
            _path_params["tracker-id"] = tracker_id
        if alarm_id is not None:
            _path_params["alarm-id"] = alarm_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter

        # authentication setting
        _auth_settings: List[str] = ["oauth2"]

        return self.api_client.param_serialize(
            method="DELETE",
            resource_path="/1/user/-/devices/tracker/{tracker-id}/alarms/{alarm-id}.json",
            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
    async def get_alarms(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        _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,
    ) -> GetAlarmsResponse:
        """
        Get Alarms

        Returns alarms for a device

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_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_alarms_serialize(
            tracker_id=tracker_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "GetAlarmsResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def get_alarms_with_http_info(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        _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[GetAlarmsResponse]:
        """
        Get Alarms

        Returns alarms for a device

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_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_alarms_serialize(
            tracker_id=tracker_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "GetAlarmsResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    async def get_alarms_without_preload_content(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        _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 Alarms

        Returns alarms for a device

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_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_alarms_serialize(
            tracker_id=tracker_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "GetAlarmsResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_alarms_serialize(
        self,
        tracker_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 tracker_id is not None:
            _path_params["tracker-id"] = tracker_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="/1/user/-/devices/tracker/{tracker-id}/alarms.json",
            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
    async def get_devices(
        self,
        _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,
    ) -> List[Device]:
        """
        Get Devices

        Returns a list of the Fitbit devices connected to a user's account.

        :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.
        """
        _param = self._get_devices_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[Device]",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def get_devices_with_http_info(
        self,
        _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[List[Device]]:
        """
        Get Devices

        Returns a list of the Fitbit devices connected to a user's account.

        :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.
        """
        _param = self._get_devices_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[Device]",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    async def get_devices_without_preload_content(
        self,
        _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 Devices

        Returns a list of the Fitbit devices connected to a user's account.

        :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.
        """
        _param = self._get_devices_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[Device]",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_devices_serialize(
        self,
        _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
        # 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="/1/user/-/devices.json",
            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
    async def update_alarms(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, the alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        snooze_length: Annotated[
            StrictInt, Field(description="Minutes between alarms.")
        ],
        snooze_count: Annotated[StrictInt, Field(description="Maximum snooze count.")],
        _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:
        """
        Update Alarm

        Updates the alarm entry with a given ID for a given device. It also gets a response in the format requested.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint. (required)
        :type alarm_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, the alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: str
        :param snooze_length: Minutes between alarms. (required)
        :type snooze_length: int
        :param snooze_count: Maximum snooze count. (required)
        :type snooze_count: 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._update_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            snooze_length=snooze_length,
            snooze_count=snooze_count,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def update_alarms_with_http_info(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, the alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        snooze_length: Annotated[
            StrictInt, Field(description="Minutes between alarms.")
        ],
        snooze_count: Annotated[StrictInt, Field(description="Maximum snooze count.")],
        _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]:
        """
        Update Alarm

        Updates the alarm entry with a given ID for a given device. It also gets a response in the format requested.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint. (required)
        :type alarm_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, the alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: str
        :param snooze_length: Minutes between alarms. (required)
        :type snooze_length: int
        :param snooze_count: Maximum snooze count. (required)
        :type snooze_count: 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._update_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            snooze_length=snooze_length,
            snooze_count=snooze_count,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    async def update_alarms_without_preload_content(
        self,
        tracker_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint."
            ),
        ],
        alarm_id: Annotated[
            StrictInt,
            Field(
                description="The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint."
            ),
        ],
        time: Annotated[
            StrictStr,
            Field(
                description="Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00."
            ),
        ],
        enabled: Annotated[
            StrictBool,
            Field(
                description="true or false. If false, the alarm does not vibrate until enabled is set to true."
            ),
        ],
        recurring: Annotated[
            StrictStr,
            Field(description="true or false. If false, the alarm is a single event."),
        ],
        week_days: Annotated[
            StrictStr,
            Field(
                description="Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY."
            ),
        ],
        snooze_length: Annotated[
            StrictInt, Field(description="Minutes between alarms.")
        ],
        snooze_count: Annotated[StrictInt, Field(description="Maximum snooze count.")],
        _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 Alarm

        Updates the alarm entry with a given ID for a given device. It also gets a response in the format requested.

        :param tracker_id: The ID of the tracker for which data is returned. The tracker-id value is found via the Get Devices endpoint. (required)
        :type tracker_id: int
        :param alarm_id: The ID of the alarm to be updated. The alarm-id value is found in the response of the Get Activity endpoint. (required)
        :type alarm_id: int
        :param time: Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00. (required)
        :type time: str
        :param enabled: true or false. If false, the alarm does not vibrate until enabled is set to true. (required)
        :type enabled: bool
        :param recurring: true or false. If false, the alarm is a single event. (required)
        :type recurring: str
        :param week_days: Comma seperated list of days of the week on which the alarm vibrates, e.g. MONDAY, TUESDAY. (required)
        :type week_days: str
        :param snooze_length: Minutes between alarms. (required)
        :type snooze_length: int
        :param snooze_count: Maximum snooze count. (required)
        :type snooze_count: 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._update_alarms_serialize(
            tracker_id=tracker_id,
            alarm_id=alarm_id,
            time=time,
            enabled=enabled,
            recurring=recurring,
            week_days=week_days,
            snooze_length=snooze_length,
            snooze_count=snooze_count,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": None,
            "201": "AlarmResponse",
            "400": None,
            "401": None,
        }
        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _update_alarms_serialize(
        self,
        tracker_id,
        alarm_id,
        time,
        enabled,
        recurring,
        week_days,
        snooze_length,
        snooze_count,
        _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 tracker_id is not None:
            _path_params["tracker-id"] = tracker_id
        if alarm_id is not None:
            _path_params["alarm-id"] = alarm_id
        # process the query parameters
        if time is not None:
            _query_params.append(("time", time))

        if enabled is not None:
            _query_params.append(("enabled", enabled))

        if recurring is not None:
            _query_params.append(("recurring", recurring))

        if week_days is not None:
            _query_params.append(("weekDays", week_days))

        if snooze_length is not None:
            _query_params.append(("snoozeLength", snooze_length))

        if snooze_count is not None:
            _query_params.append(("snoozeCount", snooze_count))

        # 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="POST",
            resource_path="/1/user/-/devices/tracker/{tracker-id}/alarms/{alarm-id}.json",
            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,
        )
