"""
This file is generated by generator/run.py based on the Chrome DevTools Protocol.


https://chromedevtools.github.io/devtools-protocol/tot/Animation/

***************************************************
                    Methods
***************************************************
"""
from __future__ import annotations

from cdpkit.protocol._types import (
    Runtime,
)
from cdpkit.protocol.base import CDPMethod, InputModel, OutputModel


class Disable(CDPMethod[None]):
    """ Disables animation domain notifications. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class Enable(CDPMethod[None]):
    """ Enables animation domain notifications. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = None


class GetCurrentTimeInput(InputModel):

    id: str


class GetCurrentTimeOutput(OutputModel):

    currentTime: float


class GetCurrentTime(CDPMethod[GetCurrentTimeOutput]):
    """ Returns the current time of the an animation. """

    INPUT_VALIDATOR = GetCurrentTimeInput
    OUTPUT_VALIDATOR = GetCurrentTimeOutput

    def __init__(
        self,
        *,
        id_: str
    ):
        super().__init__(
            id=id_
        )


class GetPlaybackRateOutput(OutputModel):

    playbackRate: float


class GetPlaybackRate(CDPMethod[GetPlaybackRateOutput]):
    """ Gets the playback rate of the document timeline. """

    INPUT_VALIDATOR = None
    OUTPUT_VALIDATOR = GetPlaybackRateOutput


class ReleaseAnimationsInput(InputModel):

    animations: list[str]


class ReleaseAnimations(CDPMethod[None]):
    """ Releases a set of animations to no longer be manipulated. """

    INPUT_VALIDATOR = ReleaseAnimationsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        animations: list[str]
    ):
        super().__init__(
            animations=animations
        )


class ResolveAnimationInput(InputModel):

    animationId: str


class ResolveAnimationOutput(OutputModel):

    remoteObject: Runtime.RemoteObject


class ResolveAnimation(CDPMethod[ResolveAnimationOutput]):
    """ Gets the remote object of the Animation. """

    INPUT_VALIDATOR = ResolveAnimationInput
    OUTPUT_VALIDATOR = ResolveAnimationOutput

    def __init__(
        self,
        *,
        animation_id: str
    ):
        super().__init__(
            animationId=animation_id
        )


class SeekAnimationsInput(InputModel):

    animations: list[str]
    currentTime: float


class SeekAnimations(CDPMethod[None]):
    """ Seek a set of animations to a particular time within each animation. """

    INPUT_VALIDATOR = SeekAnimationsInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        animations: list[str],
        current_time: float
    ):
        super().__init__(
            animations=animations,
            currentTime=current_time
        )


class SetPausedInput(InputModel):

    animations: list[str]
    paused: bool


class SetPaused(CDPMethod[None]):
    """ Sets the paused state of a set of animations. """

    INPUT_VALIDATOR = SetPausedInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        animations: list[str],
        paused: bool
    ):
        super().__init__(
            animations=animations,
            paused=paused
        )


class SetPlaybackRateInput(InputModel):

    playbackRate: float


class SetPlaybackRate(CDPMethod[None]):
    """ Sets the playback rate of the document timeline. """

    INPUT_VALIDATOR = SetPlaybackRateInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        playback_rate: float
    ):
        super().__init__(
            playbackRate=playback_rate
        )


class SetTimingInput(InputModel):

    animationId: str
    duration: float
    delay: float


class SetTiming(CDPMethod[None]):
    """ Sets the timing of an animation node. """

    INPUT_VALIDATOR = SetTimingInput
    OUTPUT_VALIDATOR = None

    def __init__(
        self,
        *,
        animation_id: str,
        duration: float,
        delay: float
    ):
        super().__init__(
            animationId=animation_id,
            duration=duration,
            delay=delay
        )
