# DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
# Changes will be overwritten/lost when the file is regenerated.

from juju.client._definitions import *
from juju.client.facade import ReturnMapping, Type


class ClientFacade(Type):
    name = "Client"
    version = 8

    @ReturnMapping(FullStatus)
    async def FullStatus(self, include_storage=None, patterns=None):
        """FullStatus gives the information needed for juju status over the api

        include_storage : bool
        patterns : typing.Sequence[str]
        Returns -> FullStatus
        """
        if include_storage is not None and not isinstance(include_storage, bool):
            raise Exception(
                f"Expected include_storage to be a bool, received: {type(include_storage)}"
            )

        if patterns is not None and not isinstance(patterns, (bytes, str, list)):
            raise Exception(
                f"Expected patterns to be a Sequence, received: {type(patterns)}"
            )

        # map input types to rpc msg
        _params = dict()
        msg = dict(type="Client", request="FullStatus", version=8, params=_params)
        _params["include-storage"] = include_storage
        _params["patterns"] = patterns
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StatusHistoryResults)
    async def StatusHistory(self, requests=None):
        """StatusHistory returns a slice of past statuses for several entities.

        requests : typing.Sequence[~StatusHistoryRequest]
        Returns -> StatusHistoryResults
        """
        if requests is not None and not isinstance(requests, (bytes, str, list)):
            raise Exception(
                f"Expected requests to be a Sequence, received: {type(requests)}"
            )

        # map input types to rpc msg
        _params = dict()
        msg = dict(type="Client", request="StatusHistory", version=8, params=_params)
        _params["requests"] = requests
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(AllWatcherId)
    async def WatchAll(self):
        """WatchAll initiates a watcher for entities in the connected model.

        Returns -> AllWatcherId
        """
        # map input types to rpc msg
        _params = dict()
        msg = dict(type="Client", request="WatchAll", version=8, params=_params)

        reply = await self.rpc(msg)
        return reply
