# 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.facade import Type, ReturnMapping
from juju.client._definitions import *


class ActionFacade(Type):
    name = 'Action'
    version = 7
    schema =     {'definitions': {'Action': {'additionalProperties': False,
                                'properties': {'execution-group': {'type': 'string'},
                                               'name': {'type': 'string'},
                                               'parallel': {'type': 'boolean'},
                                               'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'},
                                               'receiver': {'type': 'string'},
                                               'tag': {'type': 'string'}},
                                'required': ['tag', 'receiver', 'name'],
                                'type': 'object'},
                     'ActionMessage': {'additionalProperties': False,
                                       'properties': {'message': {'type': 'string'},
                                                      'timestamp': {'format': 'date-time',
                                                                    'type': 'string'}},
                                       'required': ['timestamp', 'message'],
                                       'type': 'object'},
                     'ActionResult': {'additionalProperties': False,
                                      'properties': {'action': {'$ref': '#/definitions/Action'},
                                                     'completed': {'format': 'date-time',
                                                                   'type': 'string'},
                                                     'enqueued': {'format': 'date-time',
                                                                  'type': 'string'},
                                                     'error': {'$ref': '#/definitions/Error'},
                                                     'log': {'items': {'$ref': '#/definitions/ActionMessage'},
                                                             'type': 'array'},
                                                     'message': {'type': 'string'},
                                                     'output': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                             'type': 'object'}},
                                                                'type': 'object'},
                                                     'started': {'format': 'date-time',
                                                                 'type': 'string'},
                                                     'status': {'type': 'string'}},
                                      'type': 'object'},
                     'ActionResults': {'additionalProperties': False,
                                       'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                  'type': 'array'}},
                                       'type': 'object'},
                     'ActionSpec': {'additionalProperties': False,
                                    'properties': {'description': {'type': 'string'},
                                                   'params': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'}},
                                    'required': ['description', 'params'],
                                    'type': 'object'},
                     'Actions': {'additionalProperties': False,
                                 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
                                                            'type': 'array'}},
                                 'type': 'object'},
                     'ApplicationCharmActionsResult': {'additionalProperties': False,
                                                       'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
                                                                                  'type': 'object'},
                                                                      'application-tag': {'type': 'string'},
                                                                      'error': {'$ref': '#/definitions/Error'}},
                                                       'type': 'object'},
                     'ApplicationsCharmActionsResults': {'additionalProperties': False,
                                                         'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
                                                                                    'type': 'array'}},
                                                         'type': 'object'},
                     'EnqueuedActions': {'additionalProperties': False,
                                         'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                    'type': 'array'},
                                                        'operation': {'type': 'string'}},
                                         'required': ['operation'],
                                         'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'OperationQueryArgs': {'additionalProperties': False,
                                            'properties': {'actions': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'applications': {'items': {'type': 'string'},
                                                                            'type': 'array'},
                                                           'limit': {'type': 'integer'},
                                                           'machines': {'items': {'type': 'string'},
                                                                        'type': 'array'},
                                                           'offset': {'type': 'integer'},
                                                           'status': {'items': {'type': 'string'},
                                                                      'type': 'array'},
                                                           'units': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                            'type': 'object'},
                     'OperationResult': {'additionalProperties': False,
                                         'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                    'type': 'array'},
                                                        'completed': {'format': 'date-time',
                                                                      'type': 'string'},
                                                        'enqueued': {'format': 'date-time',
                                                                     'type': 'string'},
                                                        'error': {'$ref': '#/definitions/Error'},
                                                        'fail': {'type': 'string'},
                                                        'operation': {'type': 'string'},
                                                        'started': {'format': 'date-time',
                                                                    'type': 'string'},
                                                        'status': {'type': 'string'},
                                                        'summary': {'type': 'string'}},
                                         'required': ['operation', 'summary'],
                                         'type': 'object'},
                     'OperationResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/OperationResult'},
                                                                     'type': 'array'},
                                                         'truncated': {'type': 'boolean'}},
                                          'type': 'object'},
                     'RunParams': {'additionalProperties': False,
                                   'properties': {'applications': {'items': {'type': 'string'},
                                                                   'type': 'array'},
                                                  'commands': {'type': 'string'},
                                                  'execution-group': {'type': 'string'},
                                                  'machines': {'items': {'type': 'string'},
                                                               'type': 'array'},
                                                  'parallel': {'type': 'boolean'},
                                                  'timeout': {'type': 'integer'},
                                                  'units': {'items': {'type': 'string'},
                                                            'type': 'array'},
                                                  'workload-context': {'type': 'boolean'}},
                                   'required': ['commands', 'timeout'],
                                   'type': 'object'},
                     'StringsWatchResult': {'additionalProperties': False,
                                            'properties': {'changes': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'error': {'$ref': '#/definitions/Error'},
                                                           'watcher-id': {'type': 'string'}},
                                            'required': ['watcher-id'],
                                            'type': 'object'},
                     'StringsWatchResults': {'additionalProperties': False,
                                             'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
                                                                        'type': 'array'}},
                                             'required': ['results'],
                                             'type': 'object'}},
     'properties': {'Actions': {'description': 'Actions takes a list of '
                                               'ActionTags, and returns the full '
                                               'Action for\n'
                                               'each ID.',
                                'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                               'Result': {'$ref': '#/definitions/ActionResults'}},
                                'type': 'object'},
                    'ApplicationsCharmsActions': {'description': 'ApplicationsCharmsActions '
                                                                 'returns a slice '
                                                                 'of charm Actions '
                                                                 'for a slice of\n'
                                                                 'services.',
                                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
                                                  'type': 'object'},
                    'Cancel': {'description': 'Cancel attempts to cancel enqueued '
                                              'Actions from running.',
                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                              'Result': {'$ref': '#/definitions/ActionResults'}},
                               'type': 'object'},
                    'EnqueueOperation': {'description': 'EnqueueOperation takes a '
                                                        'list of Actions and '
                                                        'queues them up to be '
                                                        'executed as\n'
                                                        'an operation, each action '
                                                        'running as a task on the '
                                                        'designated '
                                                        'ActionReceiver.\n'
                                                        'We return the ID of the '
                                                        'overall operation and '
                                                        'each individual task.',
                                         'properties': {'Params': {'$ref': '#/definitions/Actions'},
                                                        'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                                         'type': 'object'},
                    'ListOperations': {'description': 'ListOperations fetches the '
                                                      'called actions for '
                                                      'specified apps/units.',
                                       'properties': {'Params': {'$ref': '#/definitions/OperationQueryArgs'},
                                                      'Result': {'$ref': '#/definitions/OperationResults'}},
                                       'type': 'object'},
                    'Operations': {'description': 'Operations fetches the '
                                                  'specified operation ids.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/OperationResults'}},
                                   'type': 'object'},
                    'Run': {'description': 'Run the commands specified on the '
                                           'machines identified through the\n'
                                           'list of machines, units and services.',
                            'properties': {'Params': {'$ref': '#/definitions/RunParams'},
                                           'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                            'type': 'object'},
                    'RunOnAllMachines': {'description': 'RunOnAllMachines attempts '
                                                        'to run the specified '
                                                        'command on all the '
                                                        'machines.',
                                         'properties': {'Params': {'$ref': '#/definitions/RunParams'},
                                                        'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                                         'type': 'object'},
                    'WatchActionsProgress': {'description': 'WatchActionsProgress '
                                                            'creates a watcher '
                                                            'that reports on '
                                                            'action log messages.',
                                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                            'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                             'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(ActionResults)
    async def Actions(self, entities=None):
        '''
        Actions takes a list of ActionTags, and returns the full Action for
        each ID.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Actions',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ApplicationsCharmActionsResults)
    async def ApplicationsCharmsActions(self, entities=None):
        '''
        ApplicationsCharmsActions returns a slice of charm Actions for a slice of
        services.

        entities : typing.Sequence[~Entity]
        Returns -> ApplicationsCharmActionsResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='ApplicationsCharmsActions',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ActionResults)
    async def Cancel(self, entities=None):
        '''
        Cancel attempts to cancel enqueued Actions from running.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Cancel',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def EnqueueOperation(self, actions=None):
        '''
        EnqueueOperation takes a list of Actions and queues them up to be executed as
        an operation, each action running as a task on the designated ActionReceiver.
        We return the ID of the overall operation and each individual task.

        actions : typing.Sequence[~Action]
        Returns -> EnqueuedActions
        '''
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception("Expected actions to be a Sequence, received: {}".format(type(actions)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='EnqueueOperation',
                   version=7,
                   params=_params)
        _params['actions'] = actions
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OperationResults)
    async def ListOperations(self, actions=None, applications=None, limit=None, machines=None, offset=None, status=None, units=None):
        '''
        ListOperations fetches the called actions for specified apps/units.

        actions : typing.Sequence[str]
        applications : typing.Sequence[str]
        limit : int
        machines : typing.Sequence[str]
        offset : int
        status : typing.Sequence[str]
        units : typing.Sequence[str]
        Returns -> OperationResults
        '''
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception("Expected actions to be a Sequence, received: {}".format(type(actions)))

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

        if limit is not None and not isinstance(limit, int):
            raise Exception("Expected limit to be a int, received: {}".format(type(limit)))

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

        if offset is not None and not isinstance(offset, int):
            raise Exception("Expected offset to be a int, received: {}".format(type(offset)))

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='ListOperations',
                   version=7,
                   params=_params)
        _params['actions'] = actions
        _params['applications'] = applications
        _params['limit'] = limit
        _params['machines'] = machines
        _params['offset'] = offset
        _params['status'] = status
        _params['units'] = units
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OperationResults)
    async def Operations(self, entities=None):
        '''
        Operations fetches the specified operation ids.

        entities : typing.Sequence[~Entity]
        Returns -> OperationResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Operations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def Run(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None):
        '''
        Run the commands specified on the machines identified through the
        list of machines, units and services.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        '''
        if applications is not None and not isinstance(applications, (bytes, str, list)):
            raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))

        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception("Expected commands to be a str, received: {}".format(type(commands)))

        if execution_group is not None and not isinstance(execution_group, (bytes, str)):
            raise Exception("Expected execution_group to be a str, received: {}".format(type(execution_group)))

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

        if parallel is not None and not isinstance(parallel, bool):
            raise Exception("Expected parallel to be a bool, received: {}".format(type(parallel)))

        if timeout is not None and not isinstance(timeout, int):
            raise Exception("Expected timeout to be a int, received: {}".format(type(timeout)))

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

        if workload_context is not None and not isinstance(workload_context, bool):
            raise Exception("Expected workload_context to be a bool, received: {}".format(type(workload_context)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Run',
                   version=7,
                   params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def RunOnAllMachines(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None):
        '''
        RunOnAllMachines attempts to run the specified command on all the machines.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        '''
        if applications is not None and not isinstance(applications, (bytes, str, list)):
            raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))

        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception("Expected commands to be a str, received: {}".format(type(commands)))

        if execution_group is not None and not isinstance(execution_group, (bytes, str)):
            raise Exception("Expected execution_group to be a str, received: {}".format(type(execution_group)))

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

        if parallel is not None and not isinstance(parallel, bool):
            raise Exception("Expected parallel to be a bool, received: {}".format(type(parallel)))

        if timeout is not None and not isinstance(timeout, int):
            raise Exception("Expected timeout to be a int, received: {}".format(type(timeout)))

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

        if workload_context is not None and not isinstance(workload_context, bool):
            raise Exception("Expected workload_context to be a bool, received: {}".format(type(workload_context)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='RunOnAllMachines',
                   version=7,
                   params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchActionsProgress(self, entities=None):
        '''
        WatchActionsProgress creates a watcher that reports on action log messages.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='WatchActionsProgress',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema =     {'definitions': {'AddCloudArgs': {'additionalProperties': False,
                                      'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
                                                     'force': {'type': 'boolean'},
                                                     'name': {'type': 'string'}},
                                      'required': ['cloud', 'name'],
                                      'type': 'object'},
                     'Cloud': {'additionalProperties': False,
                               'properties': {'auth-types': {'items': {'type': 'string'},
                                                             'type': 'array'},
                                              'ca-certificates': {'items': {'type': 'string'},
                                                                  'type': 'array'},
                                              'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                      'type': 'object'}},
                                                         'type': 'object'},
                                              'endpoint': {'type': 'string'},
                                              'host-cloud-region': {'type': 'string'},
                                              'identity-endpoint': {'type': 'string'},
                                              'is-controller-cloud': {'type': 'boolean'},
                                              'region-config': {'patternProperties': {'.*': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                                          'type': 'object'}},
                                                                                             'type': 'object'}},
                                                                'type': 'object'},
                                              'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
                                                          'type': 'array'},
                                              'skip-tls-verify': {'type': 'boolean'},
                                              'storage-endpoint': {'type': 'string'},
                                              'type': {'type': 'string'}},
                               'required': ['type'],
                               'type': 'object'},
                     'CloudCredential': {'additionalProperties': False,
                                         'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                  'type': 'object'},
                                                        'auth-type': {'type': 'string'},
                                                        'redacted': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                         'required': ['auth-type'],
                                         'type': 'object'},
                     'CloudCredentialArg': {'additionalProperties': False,
                                            'properties': {'cloud-name': {'type': 'string'},
                                                           'credential-name': {'type': 'string'}},
                                            'required': ['cloud-name',
                                                         'credential-name'],
                                            'type': 'object'},
                     'CloudCredentialArgs': {'additionalProperties': False,
                                             'properties': {'credentials': {'items': {'$ref': '#/definitions/CloudCredentialArg'},
                                                                            'type': 'array'},
                                                            'include-secrets': {'type': 'boolean'}},
                                             'required': ['include-secrets'],
                                             'type': 'object'},
                     'CloudCredentialResult': {'additionalProperties': False,
                                               'properties': {'error': {'$ref': '#/definitions/Error'},
                                                              'result': {'$ref': '#/definitions/CloudCredential'}},
                                               'type': 'object'},
                     'CloudCredentialResults': {'additionalProperties': False,
                                                'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
                                                                           'type': 'array'}},
                                                'type': 'object'},
                     'CloudDetails': {'additionalProperties': False,
                                      'properties': {'auth-types': {'items': {'type': 'string'},
                                                                    'type': 'array'},
                                                     'endpoint': {'type': 'string'},
                                                     'identity-endpoint': {'type': 'string'},
                                                     'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
                                                                 'type': 'array'},
                                                     'storage-endpoint': {'type': 'string'},
                                                     'type': {'type': 'string'}},
                                      'required': ['type'],
                                      'type': 'object'},
                     'CloudInfo': {'additionalProperties': False,
                                   'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
                                                  'users': {'items': {'$ref': '#/definitions/CloudUserInfo'},
                                                            'type': 'array'}},
                                   'required': ['CloudDetails', 'users'],
                                   'type': 'object'},
                     'CloudInfoResult': {'additionalProperties': False,
                                         'properties': {'error': {'$ref': '#/definitions/Error'},
                                                        'result': {'$ref': '#/definitions/CloudInfo'}},
                                         'type': 'object'},
                     'CloudInfoResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/CloudInfoResult'},
                                                                     'type': 'array'}},
                                          'required': ['results'],
                                          'type': 'object'},
                     'CloudInstanceTypesConstraint': {'additionalProperties': False,
                                                      'properties': {'cloud-tag': {'type': 'string'},
                                                                     'constraints': {'$ref': '#/definitions/Value'},
                                                                     'region': {'type': 'string'}},
                                                      'required': ['cloud-tag',
                                                                   'region'],
                                                      'type': 'object'},
                     'CloudInstanceTypesConstraints': {'additionalProperties': False,
                                                       'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
                                                                                      'type': 'array'}},
                                                       'required': ['constraints'],
                                                       'type': 'object'},
                     'CloudRegion': {'additionalProperties': False,
                                     'properties': {'endpoint': {'type': 'string'},
                                                    'identity-endpoint': {'type': 'string'},
                                                    'name': {'type': 'string'},
                                                    'storage-endpoint': {'type': 'string'}},
                                     'required': ['name'],
                                     'type': 'object'},
                     'CloudResult': {'additionalProperties': False,
                                     'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
                                                    'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'CloudResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
                                                                 'type': 'array'}},
                                      'type': 'object'},
                     'CloudUserInfo': {'additionalProperties': False,
                                       'properties': {'access': {'type': 'string'},
                                                      'display-name': {'type': 'string'},
                                                      'user': {'type': 'string'}},
                                       'required': ['user',
                                                    'display-name',
                                                    'access'],
                                       'type': 'object'},
                     'CloudsResult': {'additionalProperties': False,
                                      'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
                                                                'type': 'object'}},
                                      'type': 'object'},
                     'ControllerCredentialInfo': {'additionalProperties': False,
                                                  'properties': {'content': {'$ref': '#/definitions/CredentialContent'},
                                                                 'models': {'items': {'$ref': '#/definitions/ModelAccess'},
                                                                            'type': 'array'}},
                                                  'type': 'object'},
                     'CredentialContent': {'additionalProperties': False,
                                           'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                    'type': 'object'},
                                                          'auth-type': {'type': 'string'},
                                                          'cloud': {'type': 'string'},
                                                          'name': {'type': 'string'},
                                                          'valid': {'type': 'boolean'}},
                                           'required': ['name',
                                                        'cloud',
                                                        'auth-type'],
                                           'type': 'object'},
                     'CredentialContentResult': {'additionalProperties': False,
                                                 'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                'result': {'$ref': '#/definitions/ControllerCredentialInfo'}},
                                                 'type': 'object'},
                     'CredentialContentResults': {'additionalProperties': False,
                                                  'properties': {'results': {'items': {'$ref': '#/definitions/CredentialContentResult'},
                                                                             'type': 'array'}},
                                                  'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'ErrorResult': {'additionalProperties': False,
                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'ErrorResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                 'type': 'array'}},
                                      'required': ['results'],
                                      'type': 'object'},
                     'InstanceType': {'additionalProperties': False,
                                      'properties': {'arches': {'items': {'type': 'string'},
                                                                'type': 'array'},
                                                     'cost': {'type': 'integer'},
                                                     'cpu-cores': {'type': 'integer'},
                                                     'deprecated': {'type': 'boolean'},
                                                     'memory': {'type': 'integer'},
                                                     'name': {'type': 'string'},
                                                     'root-disk': {'type': 'integer'},
                                                     'virt-type': {'type': 'string'}},
                                      'required': ['arches', 'cpu-cores', 'memory'],
                                      'type': 'object'},
                     'InstanceTypesResult': {'additionalProperties': False,
                                             'properties': {'cost-currency': {'type': 'string'},
                                                            'cost-divisor': {'type': 'integer'},
                                                            'cost-unit': {'type': 'string'},
                                                            'error': {'$ref': '#/definitions/Error'},
                                                            'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
                                                                               'type': 'array'}},
                                             'type': 'object'},
                     'InstanceTypesResults': {'additionalProperties': False,
                                              'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
                                                                         'type': 'array'}},
                                              'required': ['results'],
                                              'type': 'object'},
                     'ListCloudInfo': {'additionalProperties': False,
                                       'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
                                                      'user-access': {'type': 'string'}},
                                       'required': ['CloudDetails', 'user-access'],
                                       'type': 'object'},
                     'ListCloudInfoResult': {'additionalProperties': False,
                                             'properties': {'error': {'$ref': '#/definitions/Error'},
                                                            'result': {'$ref': '#/definitions/ListCloudInfo'}},
                                             'type': 'object'},
                     'ListCloudInfoResults': {'additionalProperties': False,
                                              'properties': {'results': {'items': {'$ref': '#/definitions/ListCloudInfoResult'},
                                                                         'type': 'array'}},
                                              'required': ['results'],
                                              'type': 'object'},
                     'ListCloudsRequest': {'additionalProperties': False,
                                           'properties': {'all': {'type': 'boolean'},
                                                          'user-tag': {'type': 'string'}},
                                           'required': ['user-tag'],
                                           'type': 'object'},
                     'ModelAccess': {'additionalProperties': False,
                                     'properties': {'access': {'type': 'string'},
                                                    'model': {'type': 'string'}},
                                     'type': 'object'},
                     'ModifyCloudAccess': {'additionalProperties': False,
                                           'properties': {'access': {'type': 'string'},
                                                          'action': {'type': 'string'},
                                                          'cloud-tag': {'type': 'string'},
                                                          'user-tag': {'type': 'string'}},
                                           'required': ['user-tag',
                                                        'cloud-tag',
                                                        'action',
                                                        'access'],
                                           'type': 'object'},
                     'ModifyCloudAccessRequest': {'additionalProperties': False,
                                                  'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyCloudAccess'},
                                                                             'type': 'array'}},
                                                  'required': ['changes'],
                                                  'type': 'object'},
                     'RevokeCredentialArg': {'additionalProperties': False,
                                             'properties': {'force': {'type': 'boolean'},
                                                            'tag': {'type': 'string'}},
                                             'required': ['tag', 'force'],
                                             'type': 'object'},
                     'RevokeCredentialArgs': {'additionalProperties': False,
                                              'properties': {'credentials': {'items': {'$ref': '#/definitions/RevokeCredentialArg'},
                                                                             'type': 'array'}},
                                              'required': ['credentials'],
                                              'type': 'object'},
                     'StringsResult': {'additionalProperties': False,
                                       'properties': {'error': {'$ref': '#/definitions/Error'},
                                                      'result': {'items': {'type': 'string'},
                                                                 'type': 'array'}},
                                       'type': 'object'},
                     'StringsResults': {'additionalProperties': False,
                                        'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
                                                                   'type': 'array'}},
                                        'required': ['results'],
                                        'type': 'object'},
                     'TaggedCredential': {'additionalProperties': False,
                                          'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
                                                         'tag': {'type': 'string'}},
                                          'required': ['tag', 'credential'],
                                          'type': 'object'},
                     'TaggedCredentials': {'additionalProperties': False,
                                           'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
                                                                          'type': 'array'}},
                                           'type': 'object'},
                     'UpdateCloudArgs': {'additionalProperties': False,
                                         'properties': {'clouds': {'items': {'$ref': '#/definitions/AddCloudArgs'},
                                                                   'type': 'array'}},
                                         'required': ['clouds'],
                                         'type': 'object'},
                     'UpdateCredentialArgs': {'additionalProperties': False,
                                              'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
                                                                             'type': 'array'},
                                                             'force': {'type': 'boolean'}},
                                              'required': ['credentials', 'force'],
                                              'type': 'object'},
                     'UpdateCredentialModelResult': {'additionalProperties': False,
                                                     'properties': {'errors': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                               'type': 'array'},
                                                                    'name': {'type': 'string'},
                                                                    'uuid': {'type': 'string'}},
                                                     'required': ['uuid', 'name'],
                                                     'type': 'object'},
                     'UpdateCredentialResult': {'additionalProperties': False,
                                                'properties': {'error': {'$ref': '#/definitions/Error'},
                                                               'models': {'items': {'$ref': '#/definitions/UpdateCredentialModelResult'},
                                                                          'type': 'array'},
                                                               'tag': {'type': 'string'}},
                                                'required': ['tag'],
                                                'type': 'object'},
                     'UpdateCredentialResults': {'additionalProperties': False,
                                                 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateCredentialResult'},
                                                                            'type': 'array'}},
                                                 'type': 'object'},
                     'UserCloud': {'additionalProperties': False,
                                   'properties': {'cloud-tag': {'type': 'string'},
                                                  'user-tag': {'type': 'string'}},
                                   'required': ['user-tag', 'cloud-tag'],
                                   'type': 'object'},
                     'UserClouds': {'additionalProperties': False,
                                    'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
                                                                   'type': 'array'}},
                                    'type': 'object'},
                     'Value': {'additionalProperties': False,
                               'properties': {'allocate-public-ip': {'type': 'boolean'},
                                              'arch': {'type': 'string'},
                                              'container': {'type': 'string'},
                                              'cores': {'type': 'integer'},
                                              'cpu-power': {'type': 'integer'},
                                              'image-id': {'type': 'string'},
                                              'instance-role': {'type': 'string'},
                                              'instance-type': {'type': 'string'},
                                              'mem': {'type': 'integer'},
                                              'root-disk': {'type': 'integer'},
                                              'root-disk-source': {'type': 'string'},
                                              'spaces': {'items': {'type': 'string'},
                                                         'type': 'array'},
                                              'tags': {'items': {'type': 'string'},
                                                       'type': 'array'},
                                              'virt-type': {'type': 'string'},
                                              'zones': {'items': {'type': 'string'},
                                                        'type': 'array'}},
                               'type': 'object'}},
     'properties': {'AddCloud': {'description': 'AddCloud adds a new cloud, '
                                                'different from the one managed by '
                                                'the controller.',
                                 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
                                 'type': 'object'},
                    'AddCredentials': {'description': 'AddCredentials adds new '
                                                      'credentials.\n'
                                                      'In contrast to '
                                                      'UpdateCredentials() below, '
                                                      'the new credentials can be\n'
                                                      'for a cloud that the '
                                                      'controller does not manage '
                                                      '(this is required\n'
                                                      'for CAAS models)',
                                       'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                      'Result': {'$ref': '#/definitions/ErrorResults'}},
                                       'type': 'object'},
                    'CheckCredentialsModels': {'description': 'CheckCredentialsModels '
                                                              'validates supplied '
                                                              "cloud credentials' "
                                                              'content against\n'
                                                              'models that '
                                                              'currently use these '
                                                              'credentials.\n'
                                                              'If there are any '
                                                              'models that are '
                                                              'using a credential '
                                                              'and these models or '
                                                              'their\n'
                                                              'cloud instances are '
                                                              'not going to be '
                                                              'accessible with '
                                                              'corresponding '
                                                              'credential,\n'
                                                              'there will be '
                                                              'detailed validation '
                                                              'errors per model.\n'
                                                              "There's no Juju API "
                                                              'client which uses '
                                                              'this, but JAAS '
                                                              'does,',
                                               'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                              'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                               'type': 'object'},
                    'Cloud': {'description': 'Cloud returns the cloud definitions '
                                             'for the specified clouds.',
                              'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                             'Result': {'$ref': '#/definitions/CloudResults'}},
                              'type': 'object'},
                    'CloudInfo': {'description': 'CloudInfo returns information '
                                                 'about the specified clouds.',
                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                 'Result': {'$ref': '#/definitions/CloudInfoResults'}},
                                  'type': 'object'},
                    'Clouds': {'description': 'Clouds returns the definitions of '
                                              'all clouds supported by the '
                                              'controller\n'
                                              'that the logged in user can see.',
                               'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
                               'type': 'object'},
                    'Credential': {'description': 'Credential returns the '
                                                  'specified cloud credential for '
                                                  'each tag, minus secrets.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
                                   'type': 'object'},
                    'CredentialContents': {'description': 'CredentialContents '
                                                          'returns the specified '
                                                          'cloud credentials,\n'
                                                          'including the secrets '
                                                          'if requested.\n'
                                                          'If no specific '
                                                          'credential name/cloud '
                                                          'was passed in, all '
                                                          'credentials for this '
                                                          'user\n'
                                                          'are returned.\n'
                                                          'Only credential owner '
                                                          'can see its contents as '
                                                          'well as what models use '
                                                          'it.\n'
                                                          'Controller admin has no '
                                                          'special superpowers '
                                                          'here and is treated the '
                                                          'same as all other '
                                                          'users.',
                                           'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'},
                                                          'Result': {'$ref': '#/definitions/CredentialContentResults'}},
                                           'type': 'object'},
                    'InstanceTypes': {'description': 'InstanceTypes returns '
                                                     'instance type information '
                                                     'for the cloud and region\n'
                                                     'in which the current model '
                                                     'is deployed.',
                                      'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
                                      'type': 'object'},
                    'ListCloudInfo': {'description': 'ListCloudInfo returns clouds '
                                                     'that the specified user has '
                                                     'access to.\n'
                                                     'Controller admins '
                                                     '(superuser) can list clouds '
                                                     'for any user.\n'
                                                     'Other users can only ask '
                                                     'about their own clouds.',
                                      'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'},
                                                     'Result': {'$ref': '#/definitions/ListCloudInfoResults'}},
                                      'type': 'object'},
                    'ModifyCloudAccess': {'description': 'ModifyCloudAccess '
                                                         'changes the model access '
                                                         'granted to users.',
                                          'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'},
                                                         'Result': {'$ref': '#/definitions/ErrorResults'}},
                                          'type': 'object'},
                    'RemoveClouds': {'description': 'RemoveClouds removes the '
                                                    'specified clouds from the '
                                                    'controller.\n'
                                                    'If a cloud is in use (has '
                                                    'models deployed to it), the '
                                                    'removal will fail.',
                                     'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                     'type': 'object'},
                    'RevokeCredentialsCheckModels': {'description': 'RevokeCredentialsCheckModels '
                                                                    'revokes a set '
                                                                    'of cloud '
                                                                    'credentials.\n'
                                                                    'If the '
                                                                    'credentials '
                                                                    'are used by '
                                                                    'any of the '
                                                                    'models, the '
                                                                    'credential '
                                                                    'deletion will '
                                                                    'be aborted.\n'
                                                                    'If '
                                                                    'credential-in-use '
                                                                    'needs to be '
                                                                    'revoked '
                                                                    'nonetheless, '
                                                                    'this method '
                                                                    'allows the '
                                                                    'use of force.',
                                                     'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                                     'type': 'object'},
                    'UpdateCloud': {'description': 'UpdateCloud updates an '
                                                   'existing cloud that the '
                                                   'controller knows about.',
                                    'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'},
                                                   'Result': {'$ref': '#/definitions/ErrorResults'}},
                                    'type': 'object'},
                    'UpdateCredentialsCheckModels': {'description': 'UpdateCredentialsCheckModels '
                                                                    'updates a set '
                                                                    'of cloud '
                                                                    "credentials' "
                                                                    'content.\n'
                                                                    'If there are '
                                                                    'any models '
                                                                    'that are '
                                                                    'using a '
                                                                    'credential '
                                                                    'and these '
                                                                    'models\n'
                                                                    'are not going '
                                                                    'to be visible '
                                                                    'with updated '
                                                                    'credential '
                                                                    'content,\n'
                                                                    'there will be '
                                                                    'detailed '
                                                                    'validation '
                                                                    'errors per '
                                                                    'model.  Such '
                                                                    'model errors '
                                                                    'are returned\n'
                                                                    'separately '
                                                                    'and do not '
                                                                    'contribute to '
                                                                    'the overall '
                                                                    'method error '
                                                                    'status.\n'
                                                                    'Controller '
                                                                    'admins can '
                                                                    "'force' an "
                                                                    'update of the '
                                                                    'credential\n'
                                                                    'regardless of '
                                                                    'whether it is '
                                                                    'deemed valid '
                                                                    'or not.',
                                                     'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                                     'type': 'object'},
                    'UserCredentials': {'description': 'UserCredentials returns '
                                                       'the cloud credentials for '
                                                       'a set of users.',
                                        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
                                                       'Result': {'$ref': '#/definitions/StringsResults'}},
                                        'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        '''
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        '''
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception("Expected cloud to be a Cloud, received: {}".format(type(cloud)))

        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception("Expected name to be a str, received: {}".format(type(name)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='AddCloud',
                   version=7,
                   params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        '''
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='AddCredentials',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        '''
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CheckCredentialsModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        '''
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Cloud',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        '''
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CloudInfo',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        '''
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Clouds',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        '''
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Credential',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        '''
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        if include_secrets is not None and not isinstance(include_secrets, bool):
            raise Exception("Expected include_secrets to be a bool, received: {}".format(type(include_secrets)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CredentialContents',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        '''
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        '''
        if constraints is not None and not isinstance(constraints, (bytes, str, list)):
            raise Exception("Expected constraints to be a Sequence, received: {}".format(type(constraints)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='InstanceTypes',
                   version=7,
                   params=_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        '''
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        '''
        if all_ is not None and not isinstance(all_, bool):
            raise Exception("Expected all_ to be a bool, received: {}".format(type(all_)))

        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception("Expected user_tag to be a str, received: {}".format(type(user_tag)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='ListCloudInfo',
                   version=7,
                   params=_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        '''
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        '''
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='ModifyCloudAccess',
                   version=7,
                   params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        '''
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='RemoveClouds',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        '''
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='RevokeCredentialsCheckModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        '''
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        '''
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception("Expected clouds to be a Sequence, received: {}".format(type(clouds)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UpdateCloud',
                   version=7,
                   params=_params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        '''
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UpdateCredentialsCheckModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        '''
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        '''
        if user_clouds is not None and not isinstance(user_clouds, (bytes, str, list)):
            raise Exception("Expected user_clouds to be a Sequence, received: {}".format(type(user_clouds)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UserCredentials',
                   version=7,
                   params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply



class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema =     {'definitions': {'BoolResult': {'additionalProperties': False,
                                    'properties': {'error': {'$ref': '#/definitions/Error'},
                                                   'result': {'type': 'boolean'}},
                                    'required': ['result'],
                                    'type': 'object'},
                     'BoolResults': {'additionalProperties': False,
                                     'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
                                                                'type': 'array'}},
                                     'required': ['results'],
                                     'type': 'object'},
                     'CloudCredential': {'additionalProperties': False,
                                         'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                  'type': 'object'},
                                                        'auth-type': {'type': 'string'},
                                                        'redacted': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                         'required': ['auth-type'],
                                         'type': 'object'},
                     'CloudSpec': {'additionalProperties': False,
                                   'properties': {'cacertificates': {'items': {'type': 'string'},
                                                                     'type': 'array'},
                                                  'credential': {'$ref': '#/definitions/CloudCredential'},
                                                  'endpoint': {'type': 'string'},
                                                  'identity-endpoint': {'type': 'string'},
                                                  'is-controller-cloud': {'type': 'boolean'},
                                                  'name': {'type': 'string'},
                                                  'region': {'type': 'string'},
                                                  'skip-tls-verify': {'type': 'boolean'},
                                                  'storage-endpoint': {'type': 'string'},
                                                  'type': {'type': 'string'}},
                                   'required': ['type', 'name'],
                                   'type': 'object'},
                     'CloudSpecResult': {'additionalProperties': False,
                                         'properties': {'error': {'$ref': '#/definitions/Error'},
                                                        'result': {'$ref': '#/definitions/CloudSpec'}},
                                         'type': 'object'},
                     'CloudSpecResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
                                                                     'type': 'array'}},
                                          'type': 'object'},
                     'ControllerAPIInfoResult': {'additionalProperties': False,
                                                 'properties': {'addresses': {'items': {'type': 'string'},
                                                                              'type': 'array'},
                                                                'cacert': {'type': 'string'},
                                                                'error': {'$ref': '#/definitions/Error'}},
                                                 'required': ['addresses',
                                                              'cacert'],
                                                 'type': 'object'},
                     'ControllerAPIInfoResults': {'additionalProperties': False,
                                                  'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
                                                                             'type': 'array'}},
                                                  'required': ['results'],
                                                  'type': 'object'},
                     'ControllerConfigResult': {'additionalProperties': False,
                                                'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                       'type': 'object'}},
                                                                          'type': 'object'}},
                                                'required': ['config'],
                                                'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'EntityStatusArgs': {'additionalProperties': False,
                                          'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                               'type': 'object'}},
                                                                  'type': 'object'},
                                                         'info': {'type': 'string'},
                                                         'status': {'type': 'string'},
                                                         'tag': {'type': 'string'}},
                                          'required': ['tag',
                                                       'status',
                                                       'info',
                                                       'data'],
                                          'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'ErrorResult': {'additionalProperties': False,
                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'ErrorResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                 'type': 'array'}},
                                      'required': ['results'],
                                      'type': 'object'},
                     'ExposeInfoResult': {'additionalProperties': False,
                                          'properties': {'error': {'$ref': '#/definitions/Error'},
                                                         'exposed': {'type': 'boolean'},
                                                         'exposed-endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/ExposedEndpoint'}},
                                                                               'type': 'object'}},
                                          'type': 'object'},
                     'ExposeInfoResults': {'additionalProperties': False,
                                           'properties': {'results': {'items': {'$ref': '#/definitions/ExposeInfoResult'},
                                                                      'type': 'array'}},
                                           'required': ['results'],
                                           'type': 'object'},
                     'ExposedEndpoint': {'additionalProperties': False,
                                         'properties': {'expose-to-cidrs': {'items': {'type': 'string'},
                                                                            'type': 'array'},
                                                        'expose-to-spaces': {'items': {'type': 'string'},
                                                                             'type': 'array'}},
                                         'type': 'object'},
                     'FanConfigEntry': {'additionalProperties': False,
                                        'properties': {'overlay': {'type': 'string'},
                                                       'underlay': {'type': 'string'}},
                                        'required': ['underlay', 'overlay'],
                                        'type': 'object'},
                     'IngressRule': {'additionalProperties': False,
                                     'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
                                                    'source-cidrs': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                     'required': ['port-range', 'source-cidrs'],
                                     'type': 'object'},
                     'IngressRulesResult': {'additionalProperties': False,
                                            'properties': {'error': {'$ref': '#/definitions/Error'},
                                                           'rules': {'items': {'$ref': '#/definitions/IngressRule'},
                                                                     'type': 'array'}},
                                            'required': ['rules'],
                                            'type': 'object'},
                     'LifeResult': {'additionalProperties': False,
                                    'properties': {'error': {'$ref': '#/definitions/Error'},
                                                   'life': {'type': 'string'}},
                                    'required': ['life'],
                                    'type': 'object'},
                     'LifeResults': {'additionalProperties': False,
                                     'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
                                                                'type': 'array'}},
                                     'required': ['results'],
                                     'type': 'object'},
                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
                     'MacaroonResult': {'additionalProperties': False,
                                        'properties': {'error': {'$ref': '#/definitions/Error'},
                                                       'result': {'$ref': '#/definitions/Macaroon'}},
                                        'type': 'object'},
                     'MacaroonResults': {'additionalProperties': False,
                                         'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
                                                                    'type': 'array'}},
                                         'required': ['results'],
                                         'type': 'object'},
                     'ModelConfigResult': {'additionalProperties': False,
                                           'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                  'type': 'object'}},
                                                                     'type': 'object'}},
                                           'required': ['config'],
                                           'type': 'object'},
                     'ModelTag': {'additionalProperties': False, 'type': 'object'},
                     'NotifyWatchResult': {'additionalProperties': False,
                                           'properties': {'NotifyWatcherId': {'type': 'string'},
                                                          'error': {'$ref': '#/definitions/Error'}},
                                           'required': ['NotifyWatcherId'],
                                           'type': 'object'},
                     'NotifyWatchResults': {'additionalProperties': False,
                                            'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
                                                                       'type': 'array'}},
                                            'required': ['results'],
                                            'type': 'object'},
                     'OpenMachinePortRangesResult': {'additionalProperties': False,
                                                     'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                    'unit-port-ranges': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
                                                                                                                      'type': 'array'}},
                                                                                         'type': 'object'}},
                                                     'required': ['unit-port-ranges'],
                                                     'type': 'object'},
                     'OpenMachinePortRangesResults': {'additionalProperties': False,
                                                      'properties': {'results': {'items': {'$ref': '#/definitions/OpenMachinePortRangesResult'},
                                                                                 'type': 'array'}},
                                                      'required': ['results'],
                                                      'type': 'object'},
                     'OpenUnitPortRanges': {'additionalProperties': False,
                                            'properties': {'endpoint': {'type': 'string'},
                                                           'port-ranges': {'items': {'$ref': '#/definitions/PortRange'},
                                                                           'type': 'array'},
                                                           'subnet-cidrs': {'items': {'type': 'string'},
                                                                            'type': 'array'}},
                                            'required': ['endpoint',
                                                         'port-ranges',
                                                         'subnet-cidrs'],
                                            'type': 'object'},
                     'PortRange': {'additionalProperties': False,
                                   'properties': {'from-port': {'type': 'integer'},
                                                  'protocol': {'type': 'string'},
                                                  'to-port': {'type': 'integer'}},
                                   'required': ['from-port', 'to-port', 'protocol'],
                                   'type': 'object'},
                     'SetStatus': {'additionalProperties': False,
                                   'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
                                                               'type': 'array'}},
                                   'required': ['entities'],
                                   'type': 'object'},
                     'SpaceInfo': {'additionalProperties': False,
                                   'properties': {'id': {'type': 'string'},
                                                  'name': {'type': 'string'},
                                                  'provider-id': {'type': 'string'},
                                                  'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
                                                              'type': 'array'}},
                                   'required': ['id', 'name'],
                                   'type': 'object'},
                     'SpaceInfos': {'additionalProperties': False,
                                    'properties': {'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
                                                                   'type': 'array'}},
                                    'type': 'object'},
                     'SpaceInfosParams': {'additionalProperties': False,
                                          'properties': {'space-ids': {'items': {'type': 'string'},
                                                                       'type': 'array'}},
                                          'type': 'object'},
                     'StringResult': {'additionalProperties': False,
                                      'properties': {'error': {'$ref': '#/definitions/Error'},
                                                     'result': {'type': 'string'}},
                                      'required': ['result'],
                                      'type': 'object'},
                     'StringResults': {'additionalProperties': False,
                                       'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
                                                                  'type': 'array'}},
                                       'required': ['results'],
                                       'type': 'object'},
                     'StringsWatchResult': {'additionalProperties': False,
                                            'properties': {'changes': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'error': {'$ref': '#/definitions/Error'},
                                                           'watcher-id': {'type': 'string'}},
                                            'required': ['watcher-id'],
                                            'type': 'object'},
                     'StringsWatchResults': {'additionalProperties': False,
                                             'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
                                                                        'type': 'array'}},
                                             'required': ['results'],
                                             'type': 'object'},
                     'Subnet': {'additionalProperties': False,
                                'properties': {'cidr': {'type': 'string'},
                                               'life': {'type': 'string'},
                                               'provider-id': {'type': 'string'},
                                               'provider-network-id': {'type': 'string'},
                                               'provider-space-id': {'type': 'string'},
                                               'space-tag': {'type': 'string'},
                                               'status': {'type': 'string'},
                                               'vlan-tag': {'type': 'integer'},
                                               'zones': {'items': {'type': 'string'},
                                                         'type': 'array'}},
                                'required': ['cidr',
                                             'vlan-tag',
                                             'life',
                                             'space-tag',
                                             'zones'],
                                'type': 'object'},
                     'SubnetV2': {'additionalProperties': False,
                                  'properties': {'Subnet': {'$ref': '#/definitions/Subnet'},
                                                 'cidr': {'type': 'string'},
                                                 'id': {'type': 'string'},
                                                 'life': {'type': 'string'},
                                                 'provider-id': {'type': 'string'},
                                                 'provider-network-id': {'type': 'string'},
                                                 'provider-space-id': {'type': 'string'},
                                                 'space-tag': {'type': 'string'},
                                                 'status': {'type': 'string'},
                                                 'vlan-tag': {'type': 'integer'},
                                                 'zones': {'items': {'type': 'string'},
                                                           'type': 'array'}},
                                  'required': ['cidr',
                                               'vlan-tag',
                                               'life',
                                               'space-tag',
                                               'zones',
                                               'Subnet'],
                                  'type': 'object'},
                     'SubnetV3': {'additionalProperties': False,
                                  'properties': {'Subnet': {'$ref': '#/definitions/Subnet'},
                                                 'SubnetV2': {'$ref': '#/definitions/SubnetV2'},
                                                 'cidr': {'type': 'string'},
                                                 'fan-info': {'$ref': '#/definitions/FanConfigEntry'},
                                                 'id': {'type': 'string'},
                                                 'is-public': {'type': 'boolean'},
                                                 'life': {'type': 'string'},
                                                 'provider-id': {'type': 'string'},
                                                 'provider-network-id': {'type': 'string'},
                                                 'provider-space-id': {'type': 'string'},
                                                 'space-id': {'type': 'string'},
                                                 'space-tag': {'type': 'string'},
                                                 'status': {'type': 'string'},
                                                 'vlan-tag': {'type': 'integer'},
                                                 'zones': {'items': {'type': 'string'},
                                                           'type': 'array'}},
                                  'required': ['cidr',
                                               'vlan-tag',
                                               'life',
                                               'space-tag',
                                               'zones',
                                               'Subnet',
                                               'SubnetV2',
                                               'space-id'],
                                  'type': 'object'}},
     'properties': {'AreManuallyProvisioned': {'description': 'AreManuallyProvisioned '
                                                              'returns whether '
                                                              'each given entity '
                                                              'is\n'
                                                              'manually '
                                                              'provisioned or not. '
                                                              'Only machine tags '
                                                              'are accepted.',
                                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                              'Result': {'$ref': '#/definitions/BoolResults'}},
                                               'type': 'object'},
                    'CloudSpec': {'description': "CloudSpec returns the model's "
                                                 'cloud spec.',
                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
                                  'type': 'object'},
                    'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels '
                                                                  'returns the '
                                                                  'controller api '
                                                                  'connection '
                                                                  'details for the '
                                                                  'specified '
                                                                  'models.',
                                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                  'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
                                                   'type': 'object'},
                    'ControllerConfig': {'description': 'ControllerConfig returns '
                                                        "the controller's "
                                                        'configuration.',
                                         'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
                                         'type': 'object'},
                    'GetAssignedMachine': {'description': 'GetAssignedMachine '
                                                          'returns the assigned '
                                                          'machine tag (if any) '
                                                          'for\n'
                                                          'each given unit.',
                                           'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                          'Result': {'$ref': '#/definitions/StringResults'}},
                                           'type': 'object'},
                    'GetCloudSpec': {'description': 'GetCloudSpec constructs the '
                                                    'CloudSpec for a validated and '
                                                    'authorized model.',
                                     'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
                                                    'Result': {'$ref': '#/definitions/CloudSpecResult'}},
                                     'type': 'object'},
                    'GetExposeInfo': {'description': 'GetExposeInfo returns the '
                                                     'expose flag and per-endpoint '
                                                     'expose settings\n'
                                                     'for the specified '
                                                     'applications.',
                                      'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                     'Result': {'$ref': '#/definitions/ExposeInfoResults'}},
                                      'type': 'object'},
                    'InstanceId': {'description': 'InstanceId returns the provider '
                                                  'specific instance id for each '
                                                  'given\n'
                                                  'machine or an '
                                                  'CodeNotProvisioned error, if '
                                                  'not set.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/StringResults'}},
                                   'type': 'object'},
                    'Life': {'description': 'Life returns the life status of every '
                                            'supplied entity, where available.',
                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                            'Result': {'$ref': '#/definitions/LifeResults'}},
                             'type': 'object'},
                    'MacaroonForRelations': {'description': 'MacaroonForRelations '
                                                            'returns the macaroon '
                                                            'for the specified '
                                                            'relations.',
                                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                            'Result': {'$ref': '#/definitions/MacaroonResults'}},
                                             'type': 'object'},
                    'ModelConfig': {'description': 'ModelConfig returns the '
                                                   "current model's configuration.",
                                    'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
                                    'type': 'object'},
                    'ModelFirewallRules': {'description': 'ModelFirewallRules '
                                                          'returns the firewall '
                                                          'rules that this model '
                                                          'is\n'
                                                          'configured to open',
                                           'properties': {'Result': {'$ref': '#/definitions/IngressRulesResult'}},
                                           'type': 'object'},
                    'OpenedMachinePortRanges': {'description': 'OpenedMachinePortRanges '
                                                               'returns a list of '
                                                               'the opened port '
                                                               'ranges for the\n'
                                                               'specified machines '
                                                               'where each result '
                                                               'is broken down by '
                                                               'unit. The list of\n'
                                                               'opened ports for '
                                                               'each unit is '
                                                               'further grouped by '
                                                               'endpoint name and '
                                                               'includes\n'
                                                               'the subnet CIDRs '
                                                               'that belong to the '
                                                               'space that each '
                                                               'endpoint is bound '
                                                               'to.',
                                                'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                               'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
                                                'type': 'object'},
                    'SetRelationsStatus': {'description': 'SetRelationsStatus sets '
                                                          'the status for the '
                                                          'specified relations.',
                                           'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
                                                          'Result': {'$ref': '#/definitions/ErrorResults'}},
                                           'type': 'object'},
                    'SpaceInfos': {'description': 'SpaceInfos returns a '
                                                  'comprehensive representation of '
                                                  'either all spaces or\n'
                                                  'a filtered subset of the known '
                                                  'spaces and their associated '
                                                  'subnet details.',
                                   'properties': {'Params': {'$ref': '#/definitions/SpaceInfosParams'},
                                                  'Result': {'$ref': '#/definitions/SpaceInfos'}},
                                   'type': 'object'},
                    'Watch': {'description': 'Watch starts an NotifyWatcher for '
                                             'each given entity.',
                              'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                             'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                              'type': 'object'},
                    'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges '
                                                              'returns a watcher '
                                                              'for cloud spec '
                                                              'changes.',
                                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                              'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                                               'type': 'object'},
                    'WatchEgressAddressesForRelations': {'description': 'WatchEgressAddressesForRelations '
                                                                        'creates a '
                                                                        'watcher '
                                                                        'that '
                                                                        'notifies '
                                                                        'when '
                                                                        'addresses, '
                                                                        'from '
                                                                        'which\n'
                                                                        'connections '
                                                                        'will '
                                                                        'originate '
                                                                        'for the '
                                                                        'relation, '
                                                                        'change.\n'
                                                                        'Each '
                                                                        'event '
                                                                        'contains '
                                                                        'the '
                                                                        'entire '
                                                                        'set of '
                                                                        'addresses '
                                                                        'which are '
                                                                        'required '
                                                                        'for '
                                                                        'ingress '
                                                                        'for the '
                                                                        'relation.',
                                                         'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                        'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                                         'type': 'object'},
                    'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges '
                                                                  'returns a '
                                                                  'NotifyWatcher '
                                                                  'that observes\n'
                                                                  'changes to the '
                                                                  'model '
                                                                  'configuration.\n'
                                                                  'Note that '
                                                                  'although the '
                                                                  'NotifyWatchResult '
                                                                  'contains an '
                                                                  'Error field,\n'
                                                                  "it's not used "
                                                                  'because we are '
                                                                  'only returning '
                                                                  'a single '
                                                                  'watcher,\n'
                                                                  'so we use the '
                                                                  'regular error '
                                                                  'return.',
                                                   'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
                                                   'type': 'object'},
                    'WatchIngressAddressesForRelations': {'description': 'WatchIngressAddressesForRelations '
                                                                         'creates '
                                                                         'a '
                                                                         'watcher '
                                                                         'that '
                                                                         'returns '
                                                                         'the '
                                                                         'ingress '
                                                                         'networks\n'
                                                                         'that '
                                                                         'have '
                                                                         'been '
                                                                         'recorded '
                                                                         'against '
                                                                         'the '
                                                                         'specified '
                                                                         'relations.',
                                                          'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                         'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                                          'type': 'object'},
                    'WatchModelFirewallRules': {'description': 'WatchModelFirewallRules '
                                                               'returns a '
                                                               'NotifyWatcher that '
                                                               'notifies of\n'
                                                               'potential changes '
                                                               "to a model's "
                                                               'configured '
                                                               'firewall rules',
                                                'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
                                                'type': 'object'},
                    'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes '
                                                                   'watches the '
                                                                   'non-container '
                                                                   'machines in '
                                                                   'the model\n'
                                                                   'for changes to '
                                                                   'the Life or '
                                                                   'AgentStartTime '
                                                                   'fields and '
                                                                   'reports them '
                                                                   'as a batch.',
                                                    'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                                    'type': 'object'},
                    'WatchModelMachines': {'description': 'WatchModelMachines '
                                                          'returns a '
                                                          'StringsWatcher that '
                                                          'notifies of\n'
                                                          'changes to the life '
                                                          'cycles of the top level '
                                                          'machines in the '
                                                          'current\n'
                                                          'model.',
                                           'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                           'type': 'object'},
                    'WatchOpenedPorts': {'description': 'WatchOpenedPorts returns '
                                                        'a new StringsWatcher for '
                                                        'each given\n'
                                                        'model tag.',
                                         'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                        'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                         'type': 'object'},
                    'WatchSubnets': {'description': 'WatchSubnets returns a new '
                                                    'StringsWatcher that watches '
                                                    'the specified\n'
                                                    'subnet tags or all tags if no '
                                                    'entities are specified.',
                                     'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                    'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                     'type': 'object'},
                    'WatchUnits': {'description': 'WatchUnits starts a '
                                                  'StringsWatcher to watch all '
                                                  'units belonging to\n'
                                                  'to any entity (machine or '
                                                  'service) passed in args.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                   'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        '''
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='AreManuallyProvisioned',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        '''
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='CloudSpec',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        '''
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ControllerAPIInfoForModels',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        '''
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ControllerConfig',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        '''
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetAssignedMachine',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        '''
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetCloudSpec',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        '''
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetExposeInfo',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        '''
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='InstanceId',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        '''
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='Life',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        '''
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='MacaroonForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        '''
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ModelConfig',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        '''
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ModelFirewallRules',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        '''
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='OpenedMachinePortRanges',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        '''
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='SetRelationsStatus',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        '''
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        '''
        if space_ids is not None and not isinstance(space_ids, (bytes, str, list)):
            raise Exception("Expected space_ids to be a Sequence, received: {}".format(type(space_ids)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='SpaceInfos',
                   version=7,
                   params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        '''
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='Watch',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        '''
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchCloudSpecsChanges',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        '''
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchEgressAddressesForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        '''
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchForModelConfigChanges',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        '''
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchIngressAddressesForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        '''
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelFirewallRules',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        '''
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelMachineStartTimes',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        '''
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelMachines',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        '''
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchOpenedPorts',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        '''
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchSubnets',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        '''
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchUnits',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



333188f5b7cd04be36a758b53c6a68feadb77adb
<mask token>


class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema = {'definitions': {'AddCloudArgs': {'additionalProperties': 
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'force': {'type': 'boolean'}, 'name': {'type': 'string'}},
        'required': ['cloud', 'name'], 'type': 'object'}, 'Cloud': {
        'additionalProperties': False, 'properties': {'auth-types': {
        'items': {'type': 'string'}, 'type': 'array'}, 'ca-certificates': {
        'items': {'type': 'string'}, 'type': 'array'}, 'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'endpoint': {'type': 'string'},
        'host-cloud-region': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'is-controller-cloud': {'type': 'boolean'},
        'region-config': {'patternProperties': {'.*': {'patternProperties':
        {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}}, 'type': 'object'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'skip-tls-verify':
        {'type': 'boolean'}, 'storage-endpoint': {'type': 'string'}, 'type':
        {'type': 'string'}}, 'required': ['type'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudCredentialArg': {'additionalProperties': 
        False, 'properties': {'cloud-name': {'type': 'string'},
        'credential-name': {'type': 'string'}}, 'required': ['cloud-name',
        'credential-name'], 'type': 'object'}, 'CloudCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/CloudCredentialArg'}, 'type':
        'array'}, 'include-secrets': {'type': 'boolean'}}, 'required': [
        'include-secrets'], 'type': 'object'}, 'CloudCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudCredential'}}, 'type': 'object'},
        'CloudCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/CloudCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'CloudDetails': {'additionalProperties': False,
        'properties': {'auth-types': {'items': {'type': 'string'}, 'type':
        'array'}, 'endpoint': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'storage-endpoint':
        {'type': 'string'}, 'type': {'type': 'string'}}, 'required': [
        'type'], 'type': 'object'}, 'CloudInfo': {'additionalProperties': 
        False, 'properties': {'CloudDetails': {'$ref':
        '#/definitions/CloudDetails'}, 'users': {'items': {'$ref':
        '#/definitions/CloudUserInfo'}, 'type': 'array'}}, 'required': [
        'CloudDetails', 'users'], 'type': 'object'}, 'CloudInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudInfo'}}, 'type': 'object'}, 'CloudInfoResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudInfoResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'},
        'CloudInstanceTypesConstraint': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'constraints': {
        '$ref': '#/definitions/Value'}, 'region': {'type': 'string'}},
        'required': ['cloud-tag', 'region'], 'type': 'object'},
        'CloudInstanceTypesConstraints': {'additionalProperties': False,
        'properties': {'constraints': {'items': {'$ref':
        '#/definitions/CloudInstanceTypesConstraint'}, 'type': 'array'}},
        'required': ['constraints'], 'type': 'object'}, 'CloudRegion': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'identity-endpoint': {'type': 'string'}, 'name': {'type':
        'string'}, 'storage-endpoint': {'type': 'string'}}, 'required': [
        'name'], 'type': 'object'}, 'CloudResult': {'additionalProperties':
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'},
        'CloudResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/CloudResult'}, 'type':
        'array'}}, 'type': 'object'}, 'CloudUserInfo': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'display-name': {'type': 'string'}, 'user': {'type':
        'string'}}, 'required': ['user', 'display-name', 'access'], 'type':
        'object'}, 'CloudsResult': {'additionalProperties': False,
        'properties': {'clouds': {'patternProperties': {'.*': {'$ref':
        '#/definitions/Cloud'}}, 'type': 'object'}}, 'type': 'object'},
        'ControllerCredentialInfo': {'additionalProperties': False,
        'properties': {'content': {'$ref':
        '#/definitions/CredentialContent'}, 'models': {'items': {'$ref':
        '#/definitions/ModelAccess'}, 'type': 'array'}}, 'type': 'object'},
        'CredentialContent': {'additionalProperties': False, 'properties':
        {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'cloud': {'type':
        'string'}, 'name': {'type': 'string'}, 'valid': {'type': 'boolean'}
        }, 'required': ['name', 'cloud', 'auth-type'], 'type': 'object'},
        'CredentialContentResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ControllerCredentialInfo'}}, 'type':
        'object'}, 'CredentialContentResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/CredentialContentResult'}, 'type': 'array'}}, 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'InstanceType': {
        'additionalProperties': False, 'properties': {'arches': {'items': {
        'type': 'string'}, 'type': 'array'}, 'cost': {'type': 'integer'},
        'cpu-cores': {'type': 'integer'}, 'deprecated': {'type': 'boolean'},
        'memory': {'type': 'integer'}, 'name': {'type': 'string'},
        'root-disk': {'type': 'integer'}, 'virt-type': {'type': 'string'}},
        'required': ['arches', 'cpu-cores', 'memory'], 'type': 'object'},
        'InstanceTypesResult': {'additionalProperties': False, 'properties':
        {'cost-currency': {'type': 'string'}, 'cost-divisor': {'type':
        'integer'}, 'cost-unit': {'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'instance-types': {'items': {'$ref':
        '#/definitions/InstanceType'}, 'type': 'array'}}, 'type': 'object'},
        'InstanceTypesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/InstanceTypesResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudInfo': {
        'additionalProperties': False, 'properties': {'CloudDetails': {
        '$ref': '#/definitions/CloudDetails'}, 'user-access': {'type':
        'string'}}, 'required': ['CloudDetails', 'user-access'], 'type':
        'object'}, 'ListCloudInfoResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ListCloudInfo'}}, 'type': 'object'},
        'ListCloudInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ListCloudInfoResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudsRequest': {
        'additionalProperties': False, 'properties': {'all': {'type':
        'boolean'}, 'user-tag': {'type': 'string'}}, 'required': [
        'user-tag'], 'type': 'object'}, 'ModelAccess': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'model': {'type': 'string'}}, 'type': 'object'},
        'ModifyCloudAccess': {'additionalProperties': False, 'properties':
        {'access': {'type': 'string'}, 'action': {'type': 'string'},
        'cloud-tag': {'type': 'string'}, 'user-tag': {'type': 'string'}},
        'required': ['user-tag', 'cloud-tag', 'action', 'access'], 'type':
        'object'}, 'ModifyCloudAccessRequest': {'additionalProperties': 
        False, 'properties': {'changes': {'items': {'$ref':
        '#/definitions/ModifyCloudAccess'}, 'type': 'array'}}, 'required':
        ['changes'], 'type': 'object'}, 'RevokeCredentialArg': {
        'additionalProperties': False, 'properties': {'force': {'type':
        'boolean'}, 'tag': {'type': 'string'}}, 'required': ['tag', 'force'
        ], 'type': 'object'}, 'RevokeCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/RevokeCredentialArg'}, 'type':
        'array'}}, 'required': ['credentials'], 'type': 'object'},
        'StringsResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringsResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringsResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'TaggedCredential': {'additionalProperties': False, 'properties': {
        'credential': {'$ref': '#/definitions/CloudCredential'}, 'tag': {
        'type': 'string'}}, 'required': ['tag', 'credential'], 'type':
        'object'}, 'TaggedCredentials': {'additionalProperties': False,
        'properties': {'credentials': {'items': {'$ref':
        '#/definitions/TaggedCredential'}, 'type': 'array'}}, 'type':
        'object'}, 'UpdateCloudArgs': {'additionalProperties': False,
        'properties': {'clouds': {'items': {'$ref':
        '#/definitions/AddCloudArgs'}, 'type': 'array'}}, 'required': [
        'clouds'], 'type': 'object'}, 'UpdateCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/TaggedCredential'}, 'type':
        'array'}, 'force': {'type': 'boolean'}}, 'required': ['credentials',
        'force'], 'type': 'object'}, 'UpdateCredentialModelResult': {
        'additionalProperties': False, 'properties': {'errors': {'items': {
        '$ref': '#/definitions/ErrorResult'}, 'type': 'array'}, 'name': {
        'type': 'string'}, 'uuid': {'type': 'string'}}, 'required': ['uuid',
        'name'], 'type': 'object'}, 'UpdateCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'models': {'items': {'$ref':
        '#/definitions/UpdateCredentialModelResult'}, 'type': 'array'},
        'tag': {'type': 'string'}}, 'required': ['tag'], 'type': 'object'},
        'UpdateCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/UpdateCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'UserCloud': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'user-tag': {'type':
        'string'}}, 'required': ['user-tag', 'cloud-tag'], 'type': 'object'
        }, 'UserClouds': {'additionalProperties': False, 'properties': {
        'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
        'type': 'array'}}, 'type': 'object'}, 'Value': {
        'additionalProperties': False, 'properties': {'allocate-public-ip':
        {'type': 'boolean'}, 'arch': {'type': 'string'}, 'container': {
        'type': 'string'}, 'cores': {'type': 'integer'}, 'cpu-power': {
        'type': 'integer'}, 'image-id': {'type': 'string'}, 'instance-role':
        {'type': 'string'}, 'instance-type': {'type': 'string'}, 'mem': {
        'type': 'integer'}, 'root-disk': {'type': 'integer'},
        'root-disk-source': {'type': 'string'}, 'spaces': {'items': {'type':
        'string'}, 'type': 'array'}, 'tags': {'items': {'type': 'string'},
        'type': 'array'}, 'virt-type': {'type': 'string'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}},
        'properties': {'AddCloud': {'description':
        'AddCloud adds a new cloud, different from the one managed by the controller.'
        , 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
        'type': 'object'}, 'AddCredentials': {'description':
        """AddCredentials adds new credentials.
In contrast to UpdateCredentials() below, the new credentials can be
for a cloud that the controller does not manage (this is required
for CAAS models)"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'},
        'CheckCredentialsModels': {'description':
        """CheckCredentialsModels validates supplied cloud credentials' content against
models that currently use these credentials.
If there are any models that are using a credential and these models or their
cloud instances are not going to be accessible with corresponding credential,
there will be detailed validation errors per model.
There's no Juju API client which uses this, but JAAS does,"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'Cloud': {'description':
        'Cloud returns the cloud definitions for the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudResults'}}, 'type': 'object'
        }, 'CloudInfo': {'description':
        'CloudInfo returns information about the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudInfoResults'}}, 'type':
        'object'}, 'Clouds': {'description':
        """Clouds returns the definitions of all clouds supported by the controller
that the logged in user can see."""
        , 'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
        'type': 'object'}, 'Credential': {'description':
        'Credential returns the specified cloud credential for each tag, minus secrets.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, 'type':
        'object'}, 'CredentialContents': {'description':
        """CredentialContents returns the specified cloud credentials,
including the secrets if requested.
If no specific credential name/cloud was passed in, all credentials for this user
are returned.
Only credential owner can see its contents as well as what models use it.
Controller admin has no special superpowers here and is treated the same as all other users."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/CredentialContentResults'}}, 'type': 'object'},
        'InstanceTypes': {'description':
        """InstanceTypes returns instance type information for the cloud and region
in which the current model is deployed."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudInstanceTypesConstraints'}, 'Result': {'$ref':
        '#/definitions/InstanceTypesResults'}}, 'type': 'object'},
        'ListCloudInfo': {'description':
        """ListCloudInfo returns clouds that the specified user has access to.
Controller admins (superuser) can list clouds for any user.
Other users can only ask about their own clouds."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/ListCloudsRequest'}, 'Result': {'$ref':
        '#/definitions/ListCloudInfoResults'}}, 'type': 'object'},
        'ModifyCloudAccess': {'description':
        'ModifyCloudAccess changes the model access granted to users.',
        'properties': {'Params': {'$ref':
        '#/definitions/ModifyCloudAccessRequest'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'RemoveClouds':
        {'description':
        """RemoveClouds removes the specified clouds from the controller.
If a cloud is in use (has models deployed to it), the removal will fail."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'RevokeCredentialsCheckModels': {'description':
        """RevokeCredentialsCheckModels revokes a set of cloud credentials.
If the credentials are used by any of the models, the credential deletion will be aborted.
If credential-in-use needs to be revoked nonetheless, this method allows the use of force."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/RevokeCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'UpdateCloud': {
        'description':
        'UpdateCloud updates an existing cloud that the controller knows about.'
        , 'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'
        }, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type':
        'object'}, 'UpdateCredentialsCheckModels': {'description':
        """UpdateCredentialsCheckModels updates a set of cloud credentials' content.
If there are any models that are using a credential and these models
are not going to be visible with updated credential content,
there will be detailed validation errors per model.  Such model errors are returned
separately and do not contribute to the overall method error status.
Controller admins can 'force' an update of the credential
regardless of whether it is deemed valid or not."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/UpdateCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'UserCredentials': {'description':
        'UserCredentials returns the cloud credentials for a set of users.',
        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
        'Result': {'$ref': '#/definitions/StringsResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        """
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        """
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception('Expected cloud to be a Cloud, received: {}'.
                format(type(cloud)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception('Expected name to be a str, received: {}'.
                format(type(name)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCloud', version=7, params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        """
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCredentials', version=7,
            params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        """
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='CheckCredentialsModels', version=
            7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        """
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Cloud', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        """
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='CloudInfo', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        """
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        """
        _params = dict()
        msg = dict(type='Cloud', request='Clouds', version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        """
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Credential', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        """
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if include_secrets is not None and not isinstance(include_secrets, bool
            ):
            raise Exception(
                'Expected include_secrets to be a bool, received: {}'.
                format(type(include_secrets)))
        _params = dict()
        msg = dict(type='Cloud', request='CredentialContents', version=7,
            params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        """
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        """
        if constraints is not None and not isinstance(constraints, (bytes,
            str, list)):
            raise Exception(
                'Expected constraints to be a Sequence, received: {}'.
                format(type(constraints)))
        _params = dict()
        msg = dict(type='Cloud', request='InstanceTypes', version=7, params
            =_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        """
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        """
        if all_ is not None and not isinstance(all_, bool):
            raise Exception('Expected all_ to be a bool, received: {}'.
                format(type(all_)))
        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception('Expected user_tag to be a str, received: {}'.
                format(type(user_tag)))
        _params = dict()
        msg = dict(type='Cloud', request='ListCloudInfo', version=7, params
            =_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        """
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        """
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception('Expected changes to be a Sequence, received: {}'
                .format(type(changes)))
        _params = dict()
        msg = dict(type='Cloud', request='ModifyCloudAccess', version=7,
            params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        """
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='RemoveClouds', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        """
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='RevokeCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        """
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        """
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception('Expected clouds to be a Sequence, received: {}'
                .format(type(clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCloud', version=7, params=
            _params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        """
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        """
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        """
        if user_clouds is not None and not isinstance(user_clouds, (bytes,
            str, list)):
            raise Exception(
                'Expected user_clouds to be a Sequence, received: {}'.
                format(type(user_clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UserCredentials', version=7,
            params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply


class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema = {'definitions': {'BoolResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'type': 'boolean'}}, 'required': ['result'], 'type': 'object'},
        'BoolResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/BoolResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudSpec': {'additionalProperties': False,
        'properties': {'cacertificates': {'items': {'type': 'string'},
        'type': 'array'}, 'credential': {'$ref':
        '#/definitions/CloudCredential'}, 'endpoint': {'type': 'string'},
        'identity-endpoint': {'type': 'string'}, 'is-controller-cloud': {
        'type': 'boolean'}, 'name': {'type': 'string'}, 'region': {'type':
        'string'}, 'skip-tls-verify': {'type': 'boolean'},
        'storage-endpoint': {'type': 'string'}, 'type': {'type': 'string'}},
        'required': ['type', 'name'], 'type': 'object'}, 'CloudSpecResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudSpec'}}, 'type': 'object'}, 'CloudSpecResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudSpecResult'}, 'type': 'array'}},
        'type': 'object'}, 'ControllerAPIInfoResult': {
        'additionalProperties': False, 'properties': {'addresses': {'items':
        {'type': 'string'}, 'type': 'array'}, 'cacert': {'type': 'string'},
        'error': {'$ref': '#/definitions/Error'}}, 'required': ['addresses',
        'cacert'], 'type': 'object'}, 'ControllerAPIInfoResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ControllerAPIInfoResult'}, 'type': 'array'}
        }, 'required': ['results'], 'type': 'object'},
        'ControllerConfigResult': {'additionalProperties': False,
        'properties': {'config': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}
        }, 'required': ['config'], 'type': 'object'}, 'Entities': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, 'required': [
        'entities'], 'type': 'object'}, 'Entity': {'additionalProperties': 
        False, 'properties': {'tag': {'type': 'string'}}, 'required': [
        'tag'], 'type': 'object'}, 'EntityStatusArgs': {
        'additionalProperties': False, 'properties': {'data': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'info': {'type': 'string'}, 'status':
        {'type': 'string'}, 'tag': {'type': 'string'}}, 'required': ['tag',
        'status', 'info', 'data'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposeInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'exposed': {'type': 'boolean'},
        'exposed-endpoints': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ExposedEndpoint'}}, 'type': 'object'}}, 'type':
        'object'}, 'ExposeInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ExposeInfoResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposedEndpoint': {
        'additionalProperties': False, 'properties': {'expose-to-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}, 'expose-to-spaces':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'FanConfigEntry': {'additionalProperties': False, 'properties': {
        'overlay': {'type': 'string'}, 'underlay': {'type': 'string'}},
        'required': ['underlay', 'overlay'], 'type': 'object'},
        'IngressRule': {'additionalProperties': False, 'properties': {
        'port-range': {'$ref': '#/definitions/PortRange'}, 'source-cidrs':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'port-range', 'source-cidrs'], 'type': 'object'},
        'IngressRulesResult': {'additionalProperties': False, 'properties':
        {'error': {'$ref': '#/definitions/Error'}, 'rules': {'items': {
        '$ref': '#/definitions/IngressRule'}, 'type': 'array'}}, 'required':
        ['rules'], 'type': 'object'}, 'LifeResult': {'additionalProperties':
        False, 'properties': {'error': {'$ref': '#/definitions/Error'},
        'life': {'type': 'string'}}, 'required': ['life'], 'type': 'object'
        }, 'LifeResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'}, 'Macaroon':
        {'additionalProperties': False, 'type': 'object'}, 'MacaroonResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref': '#/definitions/Macaroon'
        }}, 'type': 'object'}, 'MacaroonResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/MacaroonResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ModelConfigResult': {
        'additionalProperties': False, 'properties': {'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['config'], 'type':
        'object'}, 'ModelTag': {'additionalProperties': False, 'type':
        'object'}, 'NotifyWatchResult': {'additionalProperties': False,
        'properties': {'NotifyWatcherId': {'type': 'string'}, 'error': {
        '$ref': '#/definitions/Error'}}, 'required': ['NotifyWatcherId'],
        'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'OpenMachinePortRangesResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'unit-port-ranges': {'patternProperties': {
        '.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
        'type': 'array'}}, 'type': 'object'}}, 'required': [
        'unit-port-ranges'], 'type': 'object'},
        'OpenMachinePortRangesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/OpenMachinePortRangesResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'}, 'OpenUnitPortRanges': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'port-ranges': {'items': {'$ref':
        '#/definitions/PortRange'}, 'type': 'array'}, 'subnet-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'endpoint', 'port-ranges', 'subnet-cidrs'], 'type': 'object'},
        'PortRange': {'additionalProperties': False, 'properties': {
        'from-port': {'type': 'integer'}, 'protocol': {'type': 'string'},
        'to-port': {'type': 'integer'}}, 'required': ['from-port',
        'to-port', 'protocol'], 'type': 'object'}, 'SetStatus': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}},
        'required': ['entities'], 'type': 'object'}, 'SpaceInfo': {
        'additionalProperties': False, 'properties': {'id': {'type':
        'string'}, 'name': {'type': 'string'}, 'provider-id': {'type':
        'string'}, 'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
        'type': 'array'}}, 'required': ['id', 'name'], 'type': 'object'},
        'SpaceInfos': {'additionalProperties': False, 'properties': {
        'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
        'type': 'array'}}, 'type': 'object'}, 'SpaceInfosParams': {
        'additionalProperties': False, 'properties': {'space-ids': {'items':
        {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'type':
        'string'}}, 'required': ['result'], 'type': 'object'},
        'StringResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'StringsWatchResult': {'additionalProperties': False, 'properties':
        {'changes': {'items': {'type': 'string'}, 'type': 'array'}, 'error':
        {'$ref': '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'Subnet': {'additionalProperties': False, 'properties': {'cidr': {
        'type': 'string'}, 'life': {'type': 'string'}, 'provider-id': {
        'type': 'string'}, 'provider-network-id': {'type': 'string'},
        'provider-space-id': {'type': 'string'}, 'space-tag': {'type':
        'string'}, 'status': {'type': 'string'}, 'vlan-tag': {'type':
        'integer'}, 'zones': {'items': {'type': 'string'}, 'type': 'array'}
        }, 'required': ['cidr', 'vlan-tag', 'life', 'space-tag', 'zones'],
        'type': 'object'}, 'SubnetV2': {'additionalProperties': False,
        'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, 'cidr':
        {'type': 'string'}, 'id': {'type': 'string'}, 'life': {'type':
        'string'}, 'provider-id': {'type': 'string'}, 'provider-network-id':
        {'type': 'string'}, 'provider-space-id': {'type': 'string'},
        'space-tag': {'type': 'string'}, 'status': {'type': 'string'},
        'vlan-tag': {'type': 'integer'}, 'zones': {'items': {'type':
        'string'}, 'type': 'array'}}, 'required': ['cidr', 'vlan-tag',
        'life', 'space-tag', 'zones', 'Subnet'], 'type': 'object'},
        'SubnetV3': {'additionalProperties': False, 'properties': {'Subnet':
        {'$ref': '#/definitions/Subnet'}, 'SubnetV2': {'$ref':
        '#/definitions/SubnetV2'}, 'cidr': {'type': 'string'}, 'fan-info':
        {'$ref': '#/definitions/FanConfigEntry'}, 'id': {'type': 'string'},
        'is-public': {'type': 'boolean'}, 'life': {'type': 'string'},
        'provider-id': {'type': 'string'}, 'provider-network-id': {'type':
        'string'}, 'provider-space-id': {'type': 'string'}, 'space-id': {
        'type': 'string'}, 'space-tag': {'type': 'string'}, 'status': {
        'type': 'string'}, 'vlan-tag': {'type': 'integer'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cidr',
        'vlan-tag', 'life', 'space-tag', 'zones', 'Subnet', 'SubnetV2',
        'space-id'], 'type': 'object'}}, 'properties': {
        'AreManuallyProvisioned': {'description':
        """AreManuallyProvisioned returns whether each given entity is
manually provisioned or not. Only machine tags are accepted."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/BoolResults'}}, 'type': 'object'},
        'CloudSpec': {'description':
        "CloudSpec returns the model's cloud spec.", 'properties': {
        'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref':
        '#/definitions/CloudSpecResults'}}, 'type': 'object'},
        'ControllerAPIInfoForModels': {'description':
        'ControllerAPIInfoForModels returns the controller api connection details for the specified models.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
        'type': 'object'}, 'ControllerConfig': {'description':
        "ControllerConfig returns the controller's configuration.",
        'properties': {'Result': {'$ref':
        '#/definitions/ControllerConfigResult'}}, 'type': 'object'},
        'GetAssignedMachine': {'description':
        """GetAssignedMachine returns the assigned machine tag (if any) for
each given unit."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'GetCloudSpec': {'description':
        'GetCloudSpec constructs the CloudSpec for a validated and authorized model.'
        , 'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
        'Result': {'$ref': '#/definitions/CloudSpecResult'}}, 'type':
        'object'}, 'GetExposeInfo': {'description':
        """GetExposeInfo returns the expose flag and per-endpoint expose settings
for the specified applications."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ExposeInfoResults'}}, 'type':
        'object'}, 'InstanceId': {'description':
        """InstanceId returns the provider specific instance id for each given
machine or an CodeNotProvisioned error, if not set."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'Life': {'description':
        'Life returns the life status of every supplied entity, where available.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'},
        'MacaroonForRelations': {'description':
        'MacaroonForRelations returns the macaroon for the specified relations.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/MacaroonResults'}}, 'type':
        'object'}, 'ModelConfig': {'description':
        "ModelConfig returns the current model's configuration.",
        'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'
        }}, 'type': 'object'}, 'ModelFirewallRules': {'description':
        """ModelFirewallRules returns the firewall rules that this model is
configured to open"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/IngressRulesResult'}}, 'type': 'object'},
        'OpenedMachinePortRanges': {'description':
        """OpenedMachinePortRanges returns a list of the opened port ranges for the
specified machines where each result is broken down by unit. The list of
opened ports for each unit is further grouped by endpoint name and includes
the subnet CIDRs that belong to the space that each endpoint is bound to."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
        'type': 'object'}, 'SetRelationsStatus': {'description':
        'SetRelationsStatus sets the status for the specified relations.',
        'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'SpaceInfos': {'description':
        """SpaceInfos returns a comprehensive representation of either all spaces or
a filtered subset of the known spaces and their associated subnet details."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/SpaceInfosParams'}, 'Result': {'$ref':
        '#/definitions/SpaceInfos'}}, 'type': 'object'}, 'Watch': {
        'description':
        'Watch starts an NotifyWatcher for each given entity.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchCloudSpecsChanges': {'description':
        'WatchCloudSpecsChanges returns a watcher for cloud spec changes.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchEgressAddressesForRelations': {'description':
        """WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
connections will originate for the relation, change.
Each event contains the entire set of addresses which are required for ingress for the relation."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchForModelConfigChanges': {'description':
        """WatchForModelConfigChanges returns a NotifyWatcher that observes
changes to the model configuration.
Note that although the NotifyWatchResult contains an Error field,
it's not used because we are only returning a single watcher,
so we use the regular error return."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchIngressAddressesForRelations': {'description':
        """WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
that have been recorded against the specified relations."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchModelFirewallRules': {'description':
        """WatchModelFirewallRules returns a NotifyWatcher that notifies of
potential changes to a model's configured firewall rules"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchModelMachineStartTimes': {'description':
        """WatchModelMachineStartTimes watches the non-container machines in the model
for changes to the Life or AgentStartTime fields and reports them as a batch."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchModelMachines': {'description':
        """WatchModelMachines returns a StringsWatcher that notifies of
changes to the life cycles of the top level machines in the current
model."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchOpenedPorts': {'description':
        """WatchOpenedPorts returns a new StringsWatcher for each given
model tag."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchSubnets': {'description':
        """WatchSubnets returns a new StringsWatcher that watches the specified
subnet tags or all tags if no entities are specified."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResult'}}, 'type':
        'object'}, 'WatchUnits': {'description':
        """WatchUnits starts a StringsWatcher to watch all units belonging to
to any entity (machine or service) passed in args."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        """
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='AreManuallyProvisioned',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        """
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='CloudSpec', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        """
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerAPIInfoForModels',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        """
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        """
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetAssignedMachine', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        """
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='GetCloudSpec', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        """
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetExposeInfo', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        """
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='InstanceId', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        """
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Life', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        """
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='MacaroonForRelations',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        """
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        """
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelFirewallRules', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        """
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='OpenedMachinePortRanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        """
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='SetRelationsStatus', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        """
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        """
        if space_ids is not None and not isinstance(space_ids, (bytes, str,
            list)):
            raise Exception('Expected space_ids to be a Sequence, received: {}'
                .format(type(space_ids)))
        _params = dict()
        msg = dict(type='Firewaller', request='SpaceInfos', version=7,
            params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        """
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Watch', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        """
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchCloudSpecsChanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        """
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchEgressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        """
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchForModelConfigChanges',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        """
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchIngressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        """
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelFirewallRules',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        """
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachineStartTimes',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        """
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachines', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        """
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchOpenedPorts', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        """
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchSubnets', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        """
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchUnits', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

<mask token>


class ActionFacade(Type):
    <mask token>
    <mask token>
    <mask token>

    @ReturnMapping(ActionResults)
    async def Actions(self, entities=None):
        """
        Actions takes a list of ActionTags, and returns the full Action for
        each ID.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Actions', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ApplicationsCharmActionsResults)
    async def ApplicationsCharmsActions(self, entities=None):
        """
        ApplicationsCharmsActions returns a slice of charm Actions for a slice of
        services.

        entities : typing.Sequence[~Entity]
        Returns -> ApplicationsCharmActionsResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='ApplicationsCharmsActions',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ActionResults)
    async def Cancel(self, entities=None):
        """
        Cancel attempts to cancel enqueued Actions from running.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Cancel', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def EnqueueOperation(self, actions=None):
        """
        EnqueueOperation takes a list of Actions and queues them up to be executed as
        an operation, each action running as a task on the designated ActionReceiver.
        We return the ID of the overall operation and each individual task.

        actions : typing.Sequence[~Action]
        Returns -> EnqueuedActions
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        _params = dict()
        msg = dict(type='Action', request='EnqueueOperation', version=7,
            params=_params)
        _params['actions'] = actions
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def ListOperations(self, actions=None, applications=None, limit=
        None, machines=None, offset=None, status=None, units=None):
        """
        ListOperations fetches the called actions for specified apps/units.

        actions : typing.Sequence[str]
        applications : typing.Sequence[str]
        limit : int
        machines : typing.Sequence[str]
        offset : int
        status : typing.Sequence[str]
        units : typing.Sequence[str]
        Returns -> OperationResults
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if limit is not None and not isinstance(limit, int):
            raise Exception('Expected limit to be a int, received: {}'.
                format(type(limit)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if offset is not None and not isinstance(offset, int):
            raise Exception('Expected offset to be a int, received: {}'.
                format(type(offset)))
        if status is not None and not isinstance(status, (bytes, str, list)):
            raise Exception('Expected status to be a Sequence, received: {}'
                .format(type(status)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        _params = dict()
        msg = dict(type='Action', request='ListOperations', version=7,
            params=_params)
        _params['actions'] = actions
        _params['applications'] = applications
        _params['limit'] = limit
        _params['machines'] = machines
        _params['offset'] = offset
        _params['status'] = status
        _params['units'] = units
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def Operations(self, entities=None):
        """
        Operations fetches the specified operation ids.

        entities : typing.Sequence[~Entity]
        Returns -> OperationResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Operations', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def Run(self, applications=None, commands=None, execution_group=
        None, machines=None, parallel=None, timeout=None, units=None,
        workload_context=None):
        """
        Run the commands specified on the machines identified through the
        list of machines, units and services.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='Run', version=7, params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def RunOnAllMachines(self, applications=None, commands=None,
        execution_group=None, machines=None, parallel=None, timeout=None,
        units=None, workload_context=None):
        """
        RunOnAllMachines attempts to run the specified command on all the machines.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='RunOnAllMachines', version=7,
            params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchActionsProgress(self, entities=None):
        """
        WatchActionsProgress creates a watcher that reports on action log messages.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='WatchActionsProgress', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply


class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema = {'definitions': {'AddCloudArgs': {'additionalProperties': 
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'force': {'type': 'boolean'}, 'name': {'type': 'string'}},
        'required': ['cloud', 'name'], 'type': 'object'}, 'Cloud': {
        'additionalProperties': False, 'properties': {'auth-types': {
        'items': {'type': 'string'}, 'type': 'array'}, 'ca-certificates': {
        'items': {'type': 'string'}, 'type': 'array'}, 'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'endpoint': {'type': 'string'},
        'host-cloud-region': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'is-controller-cloud': {'type': 'boolean'},
        'region-config': {'patternProperties': {'.*': {'patternProperties':
        {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}}, 'type': 'object'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'skip-tls-verify':
        {'type': 'boolean'}, 'storage-endpoint': {'type': 'string'}, 'type':
        {'type': 'string'}}, 'required': ['type'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudCredentialArg': {'additionalProperties': 
        False, 'properties': {'cloud-name': {'type': 'string'},
        'credential-name': {'type': 'string'}}, 'required': ['cloud-name',
        'credential-name'], 'type': 'object'}, 'CloudCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/CloudCredentialArg'}, 'type':
        'array'}, 'include-secrets': {'type': 'boolean'}}, 'required': [
        'include-secrets'], 'type': 'object'}, 'CloudCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudCredential'}}, 'type': 'object'},
        'CloudCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/CloudCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'CloudDetails': {'additionalProperties': False,
        'properties': {'auth-types': {'items': {'type': 'string'}, 'type':
        'array'}, 'endpoint': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'storage-endpoint':
        {'type': 'string'}, 'type': {'type': 'string'}}, 'required': [
        'type'], 'type': 'object'}, 'CloudInfo': {'additionalProperties': 
        False, 'properties': {'CloudDetails': {'$ref':
        '#/definitions/CloudDetails'}, 'users': {'items': {'$ref':
        '#/definitions/CloudUserInfo'}, 'type': 'array'}}, 'required': [
        'CloudDetails', 'users'], 'type': 'object'}, 'CloudInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudInfo'}}, 'type': 'object'}, 'CloudInfoResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudInfoResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'},
        'CloudInstanceTypesConstraint': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'constraints': {
        '$ref': '#/definitions/Value'}, 'region': {'type': 'string'}},
        'required': ['cloud-tag', 'region'], 'type': 'object'},
        'CloudInstanceTypesConstraints': {'additionalProperties': False,
        'properties': {'constraints': {'items': {'$ref':
        '#/definitions/CloudInstanceTypesConstraint'}, 'type': 'array'}},
        'required': ['constraints'], 'type': 'object'}, 'CloudRegion': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'identity-endpoint': {'type': 'string'}, 'name': {'type':
        'string'}, 'storage-endpoint': {'type': 'string'}}, 'required': [
        'name'], 'type': 'object'}, 'CloudResult': {'additionalProperties':
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'},
        'CloudResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/CloudResult'}, 'type':
        'array'}}, 'type': 'object'}, 'CloudUserInfo': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'display-name': {'type': 'string'}, 'user': {'type':
        'string'}}, 'required': ['user', 'display-name', 'access'], 'type':
        'object'}, 'CloudsResult': {'additionalProperties': False,
        'properties': {'clouds': {'patternProperties': {'.*': {'$ref':
        '#/definitions/Cloud'}}, 'type': 'object'}}, 'type': 'object'},
        'ControllerCredentialInfo': {'additionalProperties': False,
        'properties': {'content': {'$ref':
        '#/definitions/CredentialContent'}, 'models': {'items': {'$ref':
        '#/definitions/ModelAccess'}, 'type': 'array'}}, 'type': 'object'},
        'CredentialContent': {'additionalProperties': False, 'properties':
        {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'cloud': {'type':
        'string'}, 'name': {'type': 'string'}, 'valid': {'type': 'boolean'}
        }, 'required': ['name', 'cloud', 'auth-type'], 'type': 'object'},
        'CredentialContentResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ControllerCredentialInfo'}}, 'type':
        'object'}, 'CredentialContentResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/CredentialContentResult'}, 'type': 'array'}}, 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'InstanceType': {
        'additionalProperties': False, 'properties': {'arches': {'items': {
        'type': 'string'}, 'type': 'array'}, 'cost': {'type': 'integer'},
        'cpu-cores': {'type': 'integer'}, 'deprecated': {'type': 'boolean'},
        'memory': {'type': 'integer'}, 'name': {'type': 'string'},
        'root-disk': {'type': 'integer'}, 'virt-type': {'type': 'string'}},
        'required': ['arches', 'cpu-cores', 'memory'], 'type': 'object'},
        'InstanceTypesResult': {'additionalProperties': False, 'properties':
        {'cost-currency': {'type': 'string'}, 'cost-divisor': {'type':
        'integer'}, 'cost-unit': {'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'instance-types': {'items': {'$ref':
        '#/definitions/InstanceType'}, 'type': 'array'}}, 'type': 'object'},
        'InstanceTypesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/InstanceTypesResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudInfo': {
        'additionalProperties': False, 'properties': {'CloudDetails': {
        '$ref': '#/definitions/CloudDetails'}, 'user-access': {'type':
        'string'}}, 'required': ['CloudDetails', 'user-access'], 'type':
        'object'}, 'ListCloudInfoResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ListCloudInfo'}}, 'type': 'object'},
        'ListCloudInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ListCloudInfoResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudsRequest': {
        'additionalProperties': False, 'properties': {'all': {'type':
        'boolean'}, 'user-tag': {'type': 'string'}}, 'required': [
        'user-tag'], 'type': 'object'}, 'ModelAccess': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'model': {'type': 'string'}}, 'type': 'object'},
        'ModifyCloudAccess': {'additionalProperties': False, 'properties':
        {'access': {'type': 'string'}, 'action': {'type': 'string'},
        'cloud-tag': {'type': 'string'}, 'user-tag': {'type': 'string'}},
        'required': ['user-tag', 'cloud-tag', 'action', 'access'], 'type':
        'object'}, 'ModifyCloudAccessRequest': {'additionalProperties': 
        False, 'properties': {'changes': {'items': {'$ref':
        '#/definitions/ModifyCloudAccess'}, 'type': 'array'}}, 'required':
        ['changes'], 'type': 'object'}, 'RevokeCredentialArg': {
        'additionalProperties': False, 'properties': {'force': {'type':
        'boolean'}, 'tag': {'type': 'string'}}, 'required': ['tag', 'force'
        ], 'type': 'object'}, 'RevokeCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/RevokeCredentialArg'}, 'type':
        'array'}}, 'required': ['credentials'], 'type': 'object'},
        'StringsResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringsResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringsResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'TaggedCredential': {'additionalProperties': False, 'properties': {
        'credential': {'$ref': '#/definitions/CloudCredential'}, 'tag': {
        'type': 'string'}}, 'required': ['tag', 'credential'], 'type':
        'object'}, 'TaggedCredentials': {'additionalProperties': False,
        'properties': {'credentials': {'items': {'$ref':
        '#/definitions/TaggedCredential'}, 'type': 'array'}}, 'type':
        'object'}, 'UpdateCloudArgs': {'additionalProperties': False,
        'properties': {'clouds': {'items': {'$ref':
        '#/definitions/AddCloudArgs'}, 'type': 'array'}}, 'required': [
        'clouds'], 'type': 'object'}, 'UpdateCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/TaggedCredential'}, 'type':
        'array'}, 'force': {'type': 'boolean'}}, 'required': ['credentials',
        'force'], 'type': 'object'}, 'UpdateCredentialModelResult': {
        'additionalProperties': False, 'properties': {'errors': {'items': {
        '$ref': '#/definitions/ErrorResult'}, 'type': 'array'}, 'name': {
        'type': 'string'}, 'uuid': {'type': 'string'}}, 'required': ['uuid',
        'name'], 'type': 'object'}, 'UpdateCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'models': {'items': {'$ref':
        '#/definitions/UpdateCredentialModelResult'}, 'type': 'array'},
        'tag': {'type': 'string'}}, 'required': ['tag'], 'type': 'object'},
        'UpdateCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/UpdateCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'UserCloud': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'user-tag': {'type':
        'string'}}, 'required': ['user-tag', 'cloud-tag'], 'type': 'object'
        }, 'UserClouds': {'additionalProperties': False, 'properties': {
        'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
        'type': 'array'}}, 'type': 'object'}, 'Value': {
        'additionalProperties': False, 'properties': {'allocate-public-ip':
        {'type': 'boolean'}, 'arch': {'type': 'string'}, 'container': {
        'type': 'string'}, 'cores': {'type': 'integer'}, 'cpu-power': {
        'type': 'integer'}, 'image-id': {'type': 'string'}, 'instance-role':
        {'type': 'string'}, 'instance-type': {'type': 'string'}, 'mem': {
        'type': 'integer'}, 'root-disk': {'type': 'integer'},
        'root-disk-source': {'type': 'string'}, 'spaces': {'items': {'type':
        'string'}, 'type': 'array'}, 'tags': {'items': {'type': 'string'},
        'type': 'array'}, 'virt-type': {'type': 'string'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}},
        'properties': {'AddCloud': {'description':
        'AddCloud adds a new cloud, different from the one managed by the controller.'
        , 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
        'type': 'object'}, 'AddCredentials': {'description':
        """AddCredentials adds new credentials.
In contrast to UpdateCredentials() below, the new credentials can be
for a cloud that the controller does not manage (this is required
for CAAS models)"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'},
        'CheckCredentialsModels': {'description':
        """CheckCredentialsModels validates supplied cloud credentials' content against
models that currently use these credentials.
If there are any models that are using a credential and these models or their
cloud instances are not going to be accessible with corresponding credential,
there will be detailed validation errors per model.
There's no Juju API client which uses this, but JAAS does,"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'Cloud': {'description':
        'Cloud returns the cloud definitions for the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudResults'}}, 'type': 'object'
        }, 'CloudInfo': {'description':
        'CloudInfo returns information about the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudInfoResults'}}, 'type':
        'object'}, 'Clouds': {'description':
        """Clouds returns the definitions of all clouds supported by the controller
that the logged in user can see."""
        , 'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
        'type': 'object'}, 'Credential': {'description':
        'Credential returns the specified cloud credential for each tag, minus secrets.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, 'type':
        'object'}, 'CredentialContents': {'description':
        """CredentialContents returns the specified cloud credentials,
including the secrets if requested.
If no specific credential name/cloud was passed in, all credentials for this user
are returned.
Only credential owner can see its contents as well as what models use it.
Controller admin has no special superpowers here and is treated the same as all other users."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/CredentialContentResults'}}, 'type': 'object'},
        'InstanceTypes': {'description':
        """InstanceTypes returns instance type information for the cloud and region
in which the current model is deployed."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudInstanceTypesConstraints'}, 'Result': {'$ref':
        '#/definitions/InstanceTypesResults'}}, 'type': 'object'},
        'ListCloudInfo': {'description':
        """ListCloudInfo returns clouds that the specified user has access to.
Controller admins (superuser) can list clouds for any user.
Other users can only ask about their own clouds."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/ListCloudsRequest'}, 'Result': {'$ref':
        '#/definitions/ListCloudInfoResults'}}, 'type': 'object'},
        'ModifyCloudAccess': {'description':
        'ModifyCloudAccess changes the model access granted to users.',
        'properties': {'Params': {'$ref':
        '#/definitions/ModifyCloudAccessRequest'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'RemoveClouds':
        {'description':
        """RemoveClouds removes the specified clouds from the controller.
If a cloud is in use (has models deployed to it), the removal will fail."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'RevokeCredentialsCheckModels': {'description':
        """RevokeCredentialsCheckModels revokes a set of cloud credentials.
If the credentials are used by any of the models, the credential deletion will be aborted.
If credential-in-use needs to be revoked nonetheless, this method allows the use of force."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/RevokeCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'UpdateCloud': {
        'description':
        'UpdateCloud updates an existing cloud that the controller knows about.'
        , 'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'
        }, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type':
        'object'}, 'UpdateCredentialsCheckModels': {'description':
        """UpdateCredentialsCheckModels updates a set of cloud credentials' content.
If there are any models that are using a credential and these models
are not going to be visible with updated credential content,
there will be detailed validation errors per model.  Such model errors are returned
separately and do not contribute to the overall method error status.
Controller admins can 'force' an update of the credential
regardless of whether it is deemed valid or not."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/UpdateCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'UserCredentials': {'description':
        'UserCredentials returns the cloud credentials for a set of users.',
        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
        'Result': {'$ref': '#/definitions/StringsResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        """
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        """
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception('Expected cloud to be a Cloud, received: {}'.
                format(type(cloud)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception('Expected name to be a str, received: {}'.
                format(type(name)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCloud', version=7, params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        """
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCredentials', version=7,
            params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        """
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='CheckCredentialsModels', version=
            7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        """
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Cloud', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        """
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='CloudInfo', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        """
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        """
        _params = dict()
        msg = dict(type='Cloud', request='Clouds', version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        """
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Credential', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        """
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if include_secrets is not None and not isinstance(include_secrets, bool
            ):
            raise Exception(
                'Expected include_secrets to be a bool, received: {}'.
                format(type(include_secrets)))
        _params = dict()
        msg = dict(type='Cloud', request='CredentialContents', version=7,
            params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        """
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        """
        if constraints is not None and not isinstance(constraints, (bytes,
            str, list)):
            raise Exception(
                'Expected constraints to be a Sequence, received: {}'.
                format(type(constraints)))
        _params = dict()
        msg = dict(type='Cloud', request='InstanceTypes', version=7, params
            =_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        """
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        """
        if all_ is not None and not isinstance(all_, bool):
            raise Exception('Expected all_ to be a bool, received: {}'.
                format(type(all_)))
        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception('Expected user_tag to be a str, received: {}'.
                format(type(user_tag)))
        _params = dict()
        msg = dict(type='Cloud', request='ListCloudInfo', version=7, params
            =_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        """
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        """
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception('Expected changes to be a Sequence, received: {}'
                .format(type(changes)))
        _params = dict()
        msg = dict(type='Cloud', request='ModifyCloudAccess', version=7,
            params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        """
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='RemoveClouds', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        """
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='RevokeCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        """
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        """
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception('Expected clouds to be a Sequence, received: {}'
                .format(type(clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCloud', version=7, params=
            _params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        """
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        """
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        """
        if user_clouds is not None and not isinstance(user_clouds, (bytes,
            str, list)):
            raise Exception(
                'Expected user_clouds to be a Sequence, received: {}'.
                format(type(user_clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UserCredentials', version=7,
            params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply


class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema = {'definitions': {'BoolResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'type': 'boolean'}}, 'required': ['result'], 'type': 'object'},
        'BoolResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/BoolResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudSpec': {'additionalProperties': False,
        'properties': {'cacertificates': {'items': {'type': 'string'},
        'type': 'array'}, 'credential': {'$ref':
        '#/definitions/CloudCredential'}, 'endpoint': {'type': 'string'},
        'identity-endpoint': {'type': 'string'}, 'is-controller-cloud': {
        'type': 'boolean'}, 'name': {'type': 'string'}, 'region': {'type':
        'string'}, 'skip-tls-verify': {'type': 'boolean'},
        'storage-endpoint': {'type': 'string'}, 'type': {'type': 'string'}},
        'required': ['type', 'name'], 'type': 'object'}, 'CloudSpecResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudSpec'}}, 'type': 'object'}, 'CloudSpecResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudSpecResult'}, 'type': 'array'}},
        'type': 'object'}, 'ControllerAPIInfoResult': {
        'additionalProperties': False, 'properties': {'addresses': {'items':
        {'type': 'string'}, 'type': 'array'}, 'cacert': {'type': 'string'},
        'error': {'$ref': '#/definitions/Error'}}, 'required': ['addresses',
        'cacert'], 'type': 'object'}, 'ControllerAPIInfoResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ControllerAPIInfoResult'}, 'type': 'array'}
        }, 'required': ['results'], 'type': 'object'},
        'ControllerConfigResult': {'additionalProperties': False,
        'properties': {'config': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}
        }, 'required': ['config'], 'type': 'object'}, 'Entities': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, 'required': [
        'entities'], 'type': 'object'}, 'Entity': {'additionalProperties': 
        False, 'properties': {'tag': {'type': 'string'}}, 'required': [
        'tag'], 'type': 'object'}, 'EntityStatusArgs': {
        'additionalProperties': False, 'properties': {'data': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'info': {'type': 'string'}, 'status':
        {'type': 'string'}, 'tag': {'type': 'string'}}, 'required': ['tag',
        'status', 'info', 'data'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposeInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'exposed': {'type': 'boolean'},
        'exposed-endpoints': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ExposedEndpoint'}}, 'type': 'object'}}, 'type':
        'object'}, 'ExposeInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ExposeInfoResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposedEndpoint': {
        'additionalProperties': False, 'properties': {'expose-to-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}, 'expose-to-spaces':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'FanConfigEntry': {'additionalProperties': False, 'properties': {
        'overlay': {'type': 'string'}, 'underlay': {'type': 'string'}},
        'required': ['underlay', 'overlay'], 'type': 'object'},
        'IngressRule': {'additionalProperties': False, 'properties': {
        'port-range': {'$ref': '#/definitions/PortRange'}, 'source-cidrs':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'port-range', 'source-cidrs'], 'type': 'object'},
        'IngressRulesResult': {'additionalProperties': False, 'properties':
        {'error': {'$ref': '#/definitions/Error'}, 'rules': {'items': {
        '$ref': '#/definitions/IngressRule'}, 'type': 'array'}}, 'required':
        ['rules'], 'type': 'object'}, 'LifeResult': {'additionalProperties':
        False, 'properties': {'error': {'$ref': '#/definitions/Error'},
        'life': {'type': 'string'}}, 'required': ['life'], 'type': 'object'
        }, 'LifeResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'}, 'Macaroon':
        {'additionalProperties': False, 'type': 'object'}, 'MacaroonResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref': '#/definitions/Macaroon'
        }}, 'type': 'object'}, 'MacaroonResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/MacaroonResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ModelConfigResult': {
        'additionalProperties': False, 'properties': {'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['config'], 'type':
        'object'}, 'ModelTag': {'additionalProperties': False, 'type':
        'object'}, 'NotifyWatchResult': {'additionalProperties': False,
        'properties': {'NotifyWatcherId': {'type': 'string'}, 'error': {
        '$ref': '#/definitions/Error'}}, 'required': ['NotifyWatcherId'],
        'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'OpenMachinePortRangesResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'unit-port-ranges': {'patternProperties': {
        '.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
        'type': 'array'}}, 'type': 'object'}}, 'required': [
        'unit-port-ranges'], 'type': 'object'},
        'OpenMachinePortRangesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/OpenMachinePortRangesResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'}, 'OpenUnitPortRanges': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'port-ranges': {'items': {'$ref':
        '#/definitions/PortRange'}, 'type': 'array'}, 'subnet-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'endpoint', 'port-ranges', 'subnet-cidrs'], 'type': 'object'},
        'PortRange': {'additionalProperties': False, 'properties': {
        'from-port': {'type': 'integer'}, 'protocol': {'type': 'string'},
        'to-port': {'type': 'integer'}}, 'required': ['from-port',
        'to-port', 'protocol'], 'type': 'object'}, 'SetStatus': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}},
        'required': ['entities'], 'type': 'object'}, 'SpaceInfo': {
        'additionalProperties': False, 'properties': {'id': {'type':
        'string'}, 'name': {'type': 'string'}, 'provider-id': {'type':
        'string'}, 'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
        'type': 'array'}}, 'required': ['id', 'name'], 'type': 'object'},
        'SpaceInfos': {'additionalProperties': False, 'properties': {
        'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
        'type': 'array'}}, 'type': 'object'}, 'SpaceInfosParams': {
        'additionalProperties': False, 'properties': {'space-ids': {'items':
        {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'type':
        'string'}}, 'required': ['result'], 'type': 'object'},
        'StringResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'StringsWatchResult': {'additionalProperties': False, 'properties':
        {'changes': {'items': {'type': 'string'}, 'type': 'array'}, 'error':
        {'$ref': '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'Subnet': {'additionalProperties': False, 'properties': {'cidr': {
        'type': 'string'}, 'life': {'type': 'string'}, 'provider-id': {
        'type': 'string'}, 'provider-network-id': {'type': 'string'},
        'provider-space-id': {'type': 'string'}, 'space-tag': {'type':
        'string'}, 'status': {'type': 'string'}, 'vlan-tag': {'type':
        'integer'}, 'zones': {'items': {'type': 'string'}, 'type': 'array'}
        }, 'required': ['cidr', 'vlan-tag', 'life', 'space-tag', 'zones'],
        'type': 'object'}, 'SubnetV2': {'additionalProperties': False,
        'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, 'cidr':
        {'type': 'string'}, 'id': {'type': 'string'}, 'life': {'type':
        'string'}, 'provider-id': {'type': 'string'}, 'provider-network-id':
        {'type': 'string'}, 'provider-space-id': {'type': 'string'},
        'space-tag': {'type': 'string'}, 'status': {'type': 'string'},
        'vlan-tag': {'type': 'integer'}, 'zones': {'items': {'type':
        'string'}, 'type': 'array'}}, 'required': ['cidr', 'vlan-tag',
        'life', 'space-tag', 'zones', 'Subnet'], 'type': 'object'},
        'SubnetV3': {'additionalProperties': False, 'properties': {'Subnet':
        {'$ref': '#/definitions/Subnet'}, 'SubnetV2': {'$ref':
        '#/definitions/SubnetV2'}, 'cidr': {'type': 'string'}, 'fan-info':
        {'$ref': '#/definitions/FanConfigEntry'}, 'id': {'type': 'string'},
        'is-public': {'type': 'boolean'}, 'life': {'type': 'string'},
        'provider-id': {'type': 'string'}, 'provider-network-id': {'type':
        'string'}, 'provider-space-id': {'type': 'string'}, 'space-id': {
        'type': 'string'}, 'space-tag': {'type': 'string'}, 'status': {
        'type': 'string'}, 'vlan-tag': {'type': 'integer'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cidr',
        'vlan-tag', 'life', 'space-tag', 'zones', 'Subnet', 'SubnetV2',
        'space-id'], 'type': 'object'}}, 'properties': {
        'AreManuallyProvisioned': {'description':
        """AreManuallyProvisioned returns whether each given entity is
manually provisioned or not. Only machine tags are accepted."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/BoolResults'}}, 'type': 'object'},
        'CloudSpec': {'description':
        "CloudSpec returns the model's cloud spec.", 'properties': {
        'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref':
        '#/definitions/CloudSpecResults'}}, 'type': 'object'},
        'ControllerAPIInfoForModels': {'description':
        'ControllerAPIInfoForModels returns the controller api connection details for the specified models.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
        'type': 'object'}, 'ControllerConfig': {'description':
        "ControllerConfig returns the controller's configuration.",
        'properties': {'Result': {'$ref':
        '#/definitions/ControllerConfigResult'}}, 'type': 'object'},
        'GetAssignedMachine': {'description':
        """GetAssignedMachine returns the assigned machine tag (if any) for
each given unit."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'GetCloudSpec': {'description':
        'GetCloudSpec constructs the CloudSpec for a validated and authorized model.'
        , 'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
        'Result': {'$ref': '#/definitions/CloudSpecResult'}}, 'type':
        'object'}, 'GetExposeInfo': {'description':
        """GetExposeInfo returns the expose flag and per-endpoint expose settings
for the specified applications."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ExposeInfoResults'}}, 'type':
        'object'}, 'InstanceId': {'description':
        """InstanceId returns the provider specific instance id for each given
machine or an CodeNotProvisioned error, if not set."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'Life': {'description':
        'Life returns the life status of every supplied entity, where available.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'},
        'MacaroonForRelations': {'description':
        'MacaroonForRelations returns the macaroon for the specified relations.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/MacaroonResults'}}, 'type':
        'object'}, 'ModelConfig': {'description':
        "ModelConfig returns the current model's configuration.",
        'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'
        }}, 'type': 'object'}, 'ModelFirewallRules': {'description':
        """ModelFirewallRules returns the firewall rules that this model is
configured to open"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/IngressRulesResult'}}, 'type': 'object'},
        'OpenedMachinePortRanges': {'description':
        """OpenedMachinePortRanges returns a list of the opened port ranges for the
specified machines where each result is broken down by unit. The list of
opened ports for each unit is further grouped by endpoint name and includes
the subnet CIDRs that belong to the space that each endpoint is bound to."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
        'type': 'object'}, 'SetRelationsStatus': {'description':
        'SetRelationsStatus sets the status for the specified relations.',
        'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'SpaceInfos': {'description':
        """SpaceInfos returns a comprehensive representation of either all spaces or
a filtered subset of the known spaces and their associated subnet details."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/SpaceInfosParams'}, 'Result': {'$ref':
        '#/definitions/SpaceInfos'}}, 'type': 'object'}, 'Watch': {
        'description':
        'Watch starts an NotifyWatcher for each given entity.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchCloudSpecsChanges': {'description':
        'WatchCloudSpecsChanges returns a watcher for cloud spec changes.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchEgressAddressesForRelations': {'description':
        """WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
connections will originate for the relation, change.
Each event contains the entire set of addresses which are required for ingress for the relation."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchForModelConfigChanges': {'description':
        """WatchForModelConfigChanges returns a NotifyWatcher that observes
changes to the model configuration.
Note that although the NotifyWatchResult contains an Error field,
it's not used because we are only returning a single watcher,
so we use the regular error return."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchIngressAddressesForRelations': {'description':
        """WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
that have been recorded against the specified relations."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchModelFirewallRules': {'description':
        """WatchModelFirewallRules returns a NotifyWatcher that notifies of
potential changes to a model's configured firewall rules"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchModelMachineStartTimes': {'description':
        """WatchModelMachineStartTimes watches the non-container machines in the model
for changes to the Life or AgentStartTime fields and reports them as a batch."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchModelMachines': {'description':
        """WatchModelMachines returns a StringsWatcher that notifies of
changes to the life cycles of the top level machines in the current
model."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchOpenedPorts': {'description':
        """WatchOpenedPorts returns a new StringsWatcher for each given
model tag."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchSubnets': {'description':
        """WatchSubnets returns a new StringsWatcher that watches the specified
subnet tags or all tags if no entities are specified."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResult'}}, 'type':
        'object'}, 'WatchUnits': {'description':
        """WatchUnits starts a StringsWatcher to watch all units belonging to
to any entity (machine or service) passed in args."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        """
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='AreManuallyProvisioned',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        """
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='CloudSpec', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        """
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerAPIInfoForModels',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        """
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        """
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetAssignedMachine', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        """
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='GetCloudSpec', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        """
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetExposeInfo', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        """
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='InstanceId', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        """
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Life', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        """
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='MacaroonForRelations',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        """
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        """
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelFirewallRules', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        """
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='OpenedMachinePortRanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        """
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='SetRelationsStatus', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        """
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        """
        if space_ids is not None and not isinstance(space_ids, (bytes, str,
            list)):
            raise Exception('Expected space_ids to be a Sequence, received: {}'
                .format(type(space_ids)))
        _params = dict()
        msg = dict(type='Firewaller', request='SpaceInfos', version=7,
            params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        """
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Watch', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        """
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchCloudSpecsChanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        """
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchEgressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        """
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchForModelConfigChanges',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        """
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchIngressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        """
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelFirewallRules',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        """
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachineStartTimes',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        """
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachines', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        """
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchOpenedPorts', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        """
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchSubnets', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        """
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchUnits', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

<mask token>


class ActionFacade(Type):
    name = 'Action'
    version = 7
    schema = {'definitions': {'Action': {'additionalProperties': False,
        'properties': {'execution-group': {'type': 'string'}, 'name': {
        'type': 'string'}, 'parallel': {'type': 'boolean'}, 'parameters': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'receiver': {'type': 'string'},
        'tag': {'type': 'string'}}, 'required': ['tag', 'receiver', 'name'],
        'type': 'object'}, 'ActionMessage': {'additionalProperties': False,
        'properties': {'message': {'type': 'string'}, 'timestamp': {
        'format': 'date-time', 'type': 'string'}}, 'required': ['timestamp',
        'message'], 'type': 'object'}, 'ActionResult': {
        'additionalProperties': False, 'properties': {'action': {'$ref':
        '#/definitions/Action'}, 'completed': {'format': 'date-time',
        'type': 'string'}, 'enqueued': {'format': 'date-time', 'type':
        'string'}, 'error': {'$ref': '#/definitions/Error'}, 'log': {
        'items': {'$ref': '#/definitions/ActionMessage'}, 'type': 'array'},
        'message': {'type': 'string'}, 'output': {'patternProperties': {
        '.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}, 'started': {'format': 'date-time', 'type': 'string'},
        'status': {'type': 'string'}}, 'type': 'object'}, 'ActionResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ActionResult'}, 'type': 'array'}}, 'type':
        'object'}, 'ActionSpec': {'additionalProperties': False,
        'properties': {'description': {'type': 'string'}, 'params': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['description',
        'params'], 'type': 'object'}, 'Actions': {'additionalProperties': 
        False, 'properties': {'actions': {'items': {'$ref':
        '#/definitions/Action'}, 'type': 'array'}}, 'type': 'object'},
        'ApplicationCharmActionsResult': {'additionalProperties': False,
        'properties': {'actions': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ActionSpec'}}, 'type': 'object'}, 'application-tag':
        {'type': 'string'}, 'error': {'$ref': '#/definitions/Error'}},
        'type': 'object'}, 'ApplicationsCharmActionsResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ApplicationCharmActionsResult'}, 'type':
        'array'}}, 'type': 'object'}, 'EnqueuedActions': {
        'additionalProperties': False, 'properties': {'actions': {'items':
        {'$ref': '#/definitions/ActionResult'}, 'type': 'array'},
        'operation': {'type': 'string'}}, 'required': ['operation'], 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'OperationQueryArgs': {'additionalProperties': 
        False, 'properties': {'actions': {'items': {'type': 'string'},
        'type': 'array'}, 'applications': {'items': {'type': 'string'},
        'type': 'array'}, 'limit': {'type': 'integer'}, 'machines': {
        'items': {'type': 'string'}, 'type': 'array'}, 'offset': {'type':
        'integer'}, 'status': {'items': {'type': 'string'}, 'type': 'array'
        }, 'units': {'items': {'type': 'string'}, 'type': 'array'}}, 'type':
        'object'}, 'OperationResult': {'additionalProperties': False,
        'properties': {'actions': {'items': {'$ref':
        '#/definitions/ActionResult'}, 'type': 'array'}, 'completed': {
        'format': 'date-time', 'type': 'string'}, 'enqueued': {'format':
        'date-time', 'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'fail': {'type': 'string'}, 'operation': {
        'type': 'string'}, 'started': {'format': 'date-time', 'type':
        'string'}, 'status': {'type': 'string'}, 'summary': {'type':
        'string'}}, 'required': ['operation', 'summary'], 'type': 'object'},
        'OperationResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/OperationResult'},
        'type': 'array'}, 'truncated': {'type': 'boolean'}}, 'type':
        'object'}, 'RunParams': {'additionalProperties': False,
        'properties': {'applications': {'items': {'type': 'string'}, 'type':
        'array'}, 'commands': {'type': 'string'}, 'execution-group': {
        'type': 'string'}, 'machines': {'items': {'type': 'string'}, 'type':
        'array'}, 'parallel': {'type': 'boolean'}, 'timeout': {'type':
        'integer'}, 'units': {'items': {'type': 'string'}, 'type': 'array'},
        'workload-context': {'type': 'boolean'}}, 'required': ['commands',
        'timeout'], 'type': 'object'}, 'StringsWatchResult': {
        'additionalProperties': False, 'properties': {'changes': {'items':
        {'type': 'string'}, 'type': 'array'}, 'error': {'$ref':
        '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'}},
        'properties': {'Actions': {'description':
        """Actions takes a list of ActionTags, and returns the full Action for
each ID."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ActionResults'}}, 'type':
        'object'}, 'ApplicationsCharmsActions': {'description':
        """ApplicationsCharmsActions returns a slice of charm Actions for a slice of
services."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}
        }, 'type': 'object'}, 'Cancel': {'description':
        'Cancel attempts to cancel enqueued Actions from running.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ActionResults'}}, 'type':
        'object'}, 'EnqueueOperation': {'description':
        """EnqueueOperation takes a list of Actions and queues them up to be executed as
an operation, each action running as a task on the designated ActionReceiver.
We return the ID of the overall operation and each individual task."""
        , 'properties': {'Params': {'$ref': '#/definitions/Actions'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'ListOperations': {'description':
        'ListOperations fetches the called actions for specified apps/units.',
        'properties': {'Params': {'$ref':
        '#/definitions/OperationQueryArgs'}, 'Result': {'$ref':
        '#/definitions/OperationResults'}}, 'type': 'object'}, 'Operations':
        {'description': 'Operations fetches the specified operation ids.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OperationResults'}}, 'type':
        'object'}, 'Run': {'description':
        """Run the commands specified on the machines identified through the
list of machines, units and services."""
        , 'properties': {'Params': {'$ref': '#/definitions/RunParams'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'RunOnAllMachines': {'description':
        'RunOnAllMachines attempts to run the specified command on all the machines.'
        , 'properties': {'Params': {'$ref': '#/definitions/RunParams'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'WatchActionsProgress': {'description':
        'WatchActionsProgress creates a watcher that reports on action log messages.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(ActionResults)
    async def Actions(self, entities=None):
        """
        Actions takes a list of ActionTags, and returns the full Action for
        each ID.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Actions', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ApplicationsCharmActionsResults)
    async def ApplicationsCharmsActions(self, entities=None):
        """
        ApplicationsCharmsActions returns a slice of charm Actions for a slice of
        services.

        entities : typing.Sequence[~Entity]
        Returns -> ApplicationsCharmActionsResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='ApplicationsCharmsActions',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ActionResults)
    async def Cancel(self, entities=None):
        """
        Cancel attempts to cancel enqueued Actions from running.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Cancel', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def EnqueueOperation(self, actions=None):
        """
        EnqueueOperation takes a list of Actions and queues them up to be executed as
        an operation, each action running as a task on the designated ActionReceiver.
        We return the ID of the overall operation and each individual task.

        actions : typing.Sequence[~Action]
        Returns -> EnqueuedActions
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        _params = dict()
        msg = dict(type='Action', request='EnqueueOperation', version=7,
            params=_params)
        _params['actions'] = actions
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def ListOperations(self, actions=None, applications=None, limit=
        None, machines=None, offset=None, status=None, units=None):
        """
        ListOperations fetches the called actions for specified apps/units.

        actions : typing.Sequence[str]
        applications : typing.Sequence[str]
        limit : int
        machines : typing.Sequence[str]
        offset : int
        status : typing.Sequence[str]
        units : typing.Sequence[str]
        Returns -> OperationResults
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if limit is not None and not isinstance(limit, int):
            raise Exception('Expected limit to be a int, received: {}'.
                format(type(limit)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if offset is not None and not isinstance(offset, int):
            raise Exception('Expected offset to be a int, received: {}'.
                format(type(offset)))
        if status is not None and not isinstance(status, (bytes, str, list)):
            raise Exception('Expected status to be a Sequence, received: {}'
                .format(type(status)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        _params = dict()
        msg = dict(type='Action', request='ListOperations', version=7,
            params=_params)
        _params['actions'] = actions
        _params['applications'] = applications
        _params['limit'] = limit
        _params['machines'] = machines
        _params['offset'] = offset
        _params['status'] = status
        _params['units'] = units
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def Operations(self, entities=None):
        """
        Operations fetches the specified operation ids.

        entities : typing.Sequence[~Entity]
        Returns -> OperationResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Operations', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def Run(self, applications=None, commands=None, execution_group=
        None, machines=None, parallel=None, timeout=None, units=None,
        workload_context=None):
        """
        Run the commands specified on the machines identified through the
        list of machines, units and services.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='Run', version=7, params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def RunOnAllMachines(self, applications=None, commands=None,
        execution_group=None, machines=None, parallel=None, timeout=None,
        units=None, workload_context=None):
        """
        RunOnAllMachines attempts to run the specified command on all the machines.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='RunOnAllMachines', version=7,
            params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchActionsProgress(self, entities=None):
        """
        WatchActionsProgress creates a watcher that reports on action log messages.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='WatchActionsProgress', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply


class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema = {'definitions': {'AddCloudArgs': {'additionalProperties': 
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'force': {'type': 'boolean'}, 'name': {'type': 'string'}},
        'required': ['cloud', 'name'], 'type': 'object'}, 'Cloud': {
        'additionalProperties': False, 'properties': {'auth-types': {
        'items': {'type': 'string'}, 'type': 'array'}, 'ca-certificates': {
        'items': {'type': 'string'}, 'type': 'array'}, 'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'endpoint': {'type': 'string'},
        'host-cloud-region': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'is-controller-cloud': {'type': 'boolean'},
        'region-config': {'patternProperties': {'.*': {'patternProperties':
        {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}}, 'type': 'object'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'skip-tls-verify':
        {'type': 'boolean'}, 'storage-endpoint': {'type': 'string'}, 'type':
        {'type': 'string'}}, 'required': ['type'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudCredentialArg': {'additionalProperties': 
        False, 'properties': {'cloud-name': {'type': 'string'},
        'credential-name': {'type': 'string'}}, 'required': ['cloud-name',
        'credential-name'], 'type': 'object'}, 'CloudCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/CloudCredentialArg'}, 'type':
        'array'}, 'include-secrets': {'type': 'boolean'}}, 'required': [
        'include-secrets'], 'type': 'object'}, 'CloudCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudCredential'}}, 'type': 'object'},
        'CloudCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/CloudCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'CloudDetails': {'additionalProperties': False,
        'properties': {'auth-types': {'items': {'type': 'string'}, 'type':
        'array'}, 'endpoint': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'storage-endpoint':
        {'type': 'string'}, 'type': {'type': 'string'}}, 'required': [
        'type'], 'type': 'object'}, 'CloudInfo': {'additionalProperties': 
        False, 'properties': {'CloudDetails': {'$ref':
        '#/definitions/CloudDetails'}, 'users': {'items': {'$ref':
        '#/definitions/CloudUserInfo'}, 'type': 'array'}}, 'required': [
        'CloudDetails', 'users'], 'type': 'object'}, 'CloudInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudInfo'}}, 'type': 'object'}, 'CloudInfoResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudInfoResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'},
        'CloudInstanceTypesConstraint': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'constraints': {
        '$ref': '#/definitions/Value'}, 'region': {'type': 'string'}},
        'required': ['cloud-tag', 'region'], 'type': 'object'},
        'CloudInstanceTypesConstraints': {'additionalProperties': False,
        'properties': {'constraints': {'items': {'$ref':
        '#/definitions/CloudInstanceTypesConstraint'}, 'type': 'array'}},
        'required': ['constraints'], 'type': 'object'}, 'CloudRegion': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'identity-endpoint': {'type': 'string'}, 'name': {'type':
        'string'}, 'storage-endpoint': {'type': 'string'}}, 'required': [
        'name'], 'type': 'object'}, 'CloudResult': {'additionalProperties':
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'},
        'CloudResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/CloudResult'}, 'type':
        'array'}}, 'type': 'object'}, 'CloudUserInfo': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'display-name': {'type': 'string'}, 'user': {'type':
        'string'}}, 'required': ['user', 'display-name', 'access'], 'type':
        'object'}, 'CloudsResult': {'additionalProperties': False,
        'properties': {'clouds': {'patternProperties': {'.*': {'$ref':
        '#/definitions/Cloud'}}, 'type': 'object'}}, 'type': 'object'},
        'ControllerCredentialInfo': {'additionalProperties': False,
        'properties': {'content': {'$ref':
        '#/definitions/CredentialContent'}, 'models': {'items': {'$ref':
        '#/definitions/ModelAccess'}, 'type': 'array'}}, 'type': 'object'},
        'CredentialContent': {'additionalProperties': False, 'properties':
        {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'cloud': {'type':
        'string'}, 'name': {'type': 'string'}, 'valid': {'type': 'boolean'}
        }, 'required': ['name', 'cloud', 'auth-type'], 'type': 'object'},
        'CredentialContentResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ControllerCredentialInfo'}}, 'type':
        'object'}, 'CredentialContentResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/CredentialContentResult'}, 'type': 'array'}}, 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'InstanceType': {
        'additionalProperties': False, 'properties': {'arches': {'items': {
        'type': 'string'}, 'type': 'array'}, 'cost': {'type': 'integer'},
        'cpu-cores': {'type': 'integer'}, 'deprecated': {'type': 'boolean'},
        'memory': {'type': 'integer'}, 'name': {'type': 'string'},
        'root-disk': {'type': 'integer'}, 'virt-type': {'type': 'string'}},
        'required': ['arches', 'cpu-cores', 'memory'], 'type': 'object'},
        'InstanceTypesResult': {'additionalProperties': False, 'properties':
        {'cost-currency': {'type': 'string'}, 'cost-divisor': {'type':
        'integer'}, 'cost-unit': {'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'instance-types': {'items': {'$ref':
        '#/definitions/InstanceType'}, 'type': 'array'}}, 'type': 'object'},
        'InstanceTypesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/InstanceTypesResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudInfo': {
        'additionalProperties': False, 'properties': {'CloudDetails': {
        '$ref': '#/definitions/CloudDetails'}, 'user-access': {'type':
        'string'}}, 'required': ['CloudDetails', 'user-access'], 'type':
        'object'}, 'ListCloudInfoResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ListCloudInfo'}}, 'type': 'object'},
        'ListCloudInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ListCloudInfoResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudsRequest': {
        'additionalProperties': False, 'properties': {'all': {'type':
        'boolean'}, 'user-tag': {'type': 'string'}}, 'required': [
        'user-tag'], 'type': 'object'}, 'ModelAccess': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'model': {'type': 'string'}}, 'type': 'object'},
        'ModifyCloudAccess': {'additionalProperties': False, 'properties':
        {'access': {'type': 'string'}, 'action': {'type': 'string'},
        'cloud-tag': {'type': 'string'}, 'user-tag': {'type': 'string'}},
        'required': ['user-tag', 'cloud-tag', 'action', 'access'], 'type':
        'object'}, 'ModifyCloudAccessRequest': {'additionalProperties': 
        False, 'properties': {'changes': {'items': {'$ref':
        '#/definitions/ModifyCloudAccess'}, 'type': 'array'}}, 'required':
        ['changes'], 'type': 'object'}, 'RevokeCredentialArg': {
        'additionalProperties': False, 'properties': {'force': {'type':
        'boolean'}, 'tag': {'type': 'string'}}, 'required': ['tag', 'force'
        ], 'type': 'object'}, 'RevokeCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/RevokeCredentialArg'}, 'type':
        'array'}}, 'required': ['credentials'], 'type': 'object'},
        'StringsResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringsResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringsResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'TaggedCredential': {'additionalProperties': False, 'properties': {
        'credential': {'$ref': '#/definitions/CloudCredential'}, 'tag': {
        'type': 'string'}}, 'required': ['tag', 'credential'], 'type':
        'object'}, 'TaggedCredentials': {'additionalProperties': False,
        'properties': {'credentials': {'items': {'$ref':
        '#/definitions/TaggedCredential'}, 'type': 'array'}}, 'type':
        'object'}, 'UpdateCloudArgs': {'additionalProperties': False,
        'properties': {'clouds': {'items': {'$ref':
        '#/definitions/AddCloudArgs'}, 'type': 'array'}}, 'required': [
        'clouds'], 'type': 'object'}, 'UpdateCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/TaggedCredential'}, 'type':
        'array'}, 'force': {'type': 'boolean'}}, 'required': ['credentials',
        'force'], 'type': 'object'}, 'UpdateCredentialModelResult': {
        'additionalProperties': False, 'properties': {'errors': {'items': {
        '$ref': '#/definitions/ErrorResult'}, 'type': 'array'}, 'name': {
        'type': 'string'}, 'uuid': {'type': 'string'}}, 'required': ['uuid',
        'name'], 'type': 'object'}, 'UpdateCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'models': {'items': {'$ref':
        '#/definitions/UpdateCredentialModelResult'}, 'type': 'array'},
        'tag': {'type': 'string'}}, 'required': ['tag'], 'type': 'object'},
        'UpdateCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/UpdateCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'UserCloud': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'user-tag': {'type':
        'string'}}, 'required': ['user-tag', 'cloud-tag'], 'type': 'object'
        }, 'UserClouds': {'additionalProperties': False, 'properties': {
        'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
        'type': 'array'}}, 'type': 'object'}, 'Value': {
        'additionalProperties': False, 'properties': {'allocate-public-ip':
        {'type': 'boolean'}, 'arch': {'type': 'string'}, 'container': {
        'type': 'string'}, 'cores': {'type': 'integer'}, 'cpu-power': {
        'type': 'integer'}, 'image-id': {'type': 'string'}, 'instance-role':
        {'type': 'string'}, 'instance-type': {'type': 'string'}, 'mem': {
        'type': 'integer'}, 'root-disk': {'type': 'integer'},
        'root-disk-source': {'type': 'string'}, 'spaces': {'items': {'type':
        'string'}, 'type': 'array'}, 'tags': {'items': {'type': 'string'},
        'type': 'array'}, 'virt-type': {'type': 'string'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}},
        'properties': {'AddCloud': {'description':
        'AddCloud adds a new cloud, different from the one managed by the controller.'
        , 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
        'type': 'object'}, 'AddCredentials': {'description':
        """AddCredentials adds new credentials.
In contrast to UpdateCredentials() below, the new credentials can be
for a cloud that the controller does not manage (this is required
for CAAS models)"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'},
        'CheckCredentialsModels': {'description':
        """CheckCredentialsModels validates supplied cloud credentials' content against
models that currently use these credentials.
If there are any models that are using a credential and these models or their
cloud instances are not going to be accessible with corresponding credential,
there will be detailed validation errors per model.
There's no Juju API client which uses this, but JAAS does,"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'Cloud': {'description':
        'Cloud returns the cloud definitions for the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudResults'}}, 'type': 'object'
        }, 'CloudInfo': {'description':
        'CloudInfo returns information about the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudInfoResults'}}, 'type':
        'object'}, 'Clouds': {'description':
        """Clouds returns the definitions of all clouds supported by the controller
that the logged in user can see."""
        , 'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
        'type': 'object'}, 'Credential': {'description':
        'Credential returns the specified cloud credential for each tag, minus secrets.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, 'type':
        'object'}, 'CredentialContents': {'description':
        """CredentialContents returns the specified cloud credentials,
including the secrets if requested.
If no specific credential name/cloud was passed in, all credentials for this user
are returned.
Only credential owner can see its contents as well as what models use it.
Controller admin has no special superpowers here and is treated the same as all other users."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/CredentialContentResults'}}, 'type': 'object'},
        'InstanceTypes': {'description':
        """InstanceTypes returns instance type information for the cloud and region
in which the current model is deployed."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudInstanceTypesConstraints'}, 'Result': {'$ref':
        '#/definitions/InstanceTypesResults'}}, 'type': 'object'},
        'ListCloudInfo': {'description':
        """ListCloudInfo returns clouds that the specified user has access to.
Controller admins (superuser) can list clouds for any user.
Other users can only ask about their own clouds."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/ListCloudsRequest'}, 'Result': {'$ref':
        '#/definitions/ListCloudInfoResults'}}, 'type': 'object'},
        'ModifyCloudAccess': {'description':
        'ModifyCloudAccess changes the model access granted to users.',
        'properties': {'Params': {'$ref':
        '#/definitions/ModifyCloudAccessRequest'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'RemoveClouds':
        {'description':
        """RemoveClouds removes the specified clouds from the controller.
If a cloud is in use (has models deployed to it), the removal will fail."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'RevokeCredentialsCheckModels': {'description':
        """RevokeCredentialsCheckModels revokes a set of cloud credentials.
If the credentials are used by any of the models, the credential deletion will be aborted.
If credential-in-use needs to be revoked nonetheless, this method allows the use of force."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/RevokeCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'UpdateCloud': {
        'description':
        'UpdateCloud updates an existing cloud that the controller knows about.'
        , 'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'
        }, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type':
        'object'}, 'UpdateCredentialsCheckModels': {'description':
        """UpdateCredentialsCheckModels updates a set of cloud credentials' content.
If there are any models that are using a credential and these models
are not going to be visible with updated credential content,
there will be detailed validation errors per model.  Such model errors are returned
separately and do not contribute to the overall method error status.
Controller admins can 'force' an update of the credential
regardless of whether it is deemed valid or not."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/UpdateCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'UserCredentials': {'description':
        'UserCredentials returns the cloud credentials for a set of users.',
        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
        'Result': {'$ref': '#/definitions/StringsResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        """
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        """
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception('Expected cloud to be a Cloud, received: {}'.
                format(type(cloud)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception('Expected name to be a str, received: {}'.
                format(type(name)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCloud', version=7, params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        """
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCredentials', version=7,
            params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        """
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='CheckCredentialsModels', version=
            7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        """
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Cloud', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        """
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='CloudInfo', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        """
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        """
        _params = dict()
        msg = dict(type='Cloud', request='Clouds', version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        """
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Credential', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        """
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if include_secrets is not None and not isinstance(include_secrets, bool
            ):
            raise Exception(
                'Expected include_secrets to be a bool, received: {}'.
                format(type(include_secrets)))
        _params = dict()
        msg = dict(type='Cloud', request='CredentialContents', version=7,
            params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        """
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        """
        if constraints is not None and not isinstance(constraints, (bytes,
            str, list)):
            raise Exception(
                'Expected constraints to be a Sequence, received: {}'.
                format(type(constraints)))
        _params = dict()
        msg = dict(type='Cloud', request='InstanceTypes', version=7, params
            =_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        """
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        """
        if all_ is not None and not isinstance(all_, bool):
            raise Exception('Expected all_ to be a bool, received: {}'.
                format(type(all_)))
        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception('Expected user_tag to be a str, received: {}'.
                format(type(user_tag)))
        _params = dict()
        msg = dict(type='Cloud', request='ListCloudInfo', version=7, params
            =_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        """
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        """
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception('Expected changes to be a Sequence, received: {}'
                .format(type(changes)))
        _params = dict()
        msg = dict(type='Cloud', request='ModifyCloudAccess', version=7,
            params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        """
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='RemoveClouds', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        """
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='RevokeCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        """
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        """
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception('Expected clouds to be a Sequence, received: {}'
                .format(type(clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCloud', version=7, params=
            _params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        """
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        """
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        """
        if user_clouds is not None and not isinstance(user_clouds, (bytes,
            str, list)):
            raise Exception(
                'Expected user_clouds to be a Sequence, received: {}'.
                format(type(user_clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UserCredentials', version=7,
            params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply


class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema = {'definitions': {'BoolResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'type': 'boolean'}}, 'required': ['result'], 'type': 'object'},
        'BoolResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/BoolResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudSpec': {'additionalProperties': False,
        'properties': {'cacertificates': {'items': {'type': 'string'},
        'type': 'array'}, 'credential': {'$ref':
        '#/definitions/CloudCredential'}, 'endpoint': {'type': 'string'},
        'identity-endpoint': {'type': 'string'}, 'is-controller-cloud': {
        'type': 'boolean'}, 'name': {'type': 'string'}, 'region': {'type':
        'string'}, 'skip-tls-verify': {'type': 'boolean'},
        'storage-endpoint': {'type': 'string'}, 'type': {'type': 'string'}},
        'required': ['type', 'name'], 'type': 'object'}, 'CloudSpecResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudSpec'}}, 'type': 'object'}, 'CloudSpecResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudSpecResult'}, 'type': 'array'}},
        'type': 'object'}, 'ControllerAPIInfoResult': {
        'additionalProperties': False, 'properties': {'addresses': {'items':
        {'type': 'string'}, 'type': 'array'}, 'cacert': {'type': 'string'},
        'error': {'$ref': '#/definitions/Error'}}, 'required': ['addresses',
        'cacert'], 'type': 'object'}, 'ControllerAPIInfoResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ControllerAPIInfoResult'}, 'type': 'array'}
        }, 'required': ['results'], 'type': 'object'},
        'ControllerConfigResult': {'additionalProperties': False,
        'properties': {'config': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}
        }, 'required': ['config'], 'type': 'object'}, 'Entities': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, 'required': [
        'entities'], 'type': 'object'}, 'Entity': {'additionalProperties': 
        False, 'properties': {'tag': {'type': 'string'}}, 'required': [
        'tag'], 'type': 'object'}, 'EntityStatusArgs': {
        'additionalProperties': False, 'properties': {'data': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'info': {'type': 'string'}, 'status':
        {'type': 'string'}, 'tag': {'type': 'string'}}, 'required': ['tag',
        'status', 'info', 'data'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposeInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'exposed': {'type': 'boolean'},
        'exposed-endpoints': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ExposedEndpoint'}}, 'type': 'object'}}, 'type':
        'object'}, 'ExposeInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ExposeInfoResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposedEndpoint': {
        'additionalProperties': False, 'properties': {'expose-to-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}, 'expose-to-spaces':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'FanConfigEntry': {'additionalProperties': False, 'properties': {
        'overlay': {'type': 'string'}, 'underlay': {'type': 'string'}},
        'required': ['underlay', 'overlay'], 'type': 'object'},
        'IngressRule': {'additionalProperties': False, 'properties': {
        'port-range': {'$ref': '#/definitions/PortRange'}, 'source-cidrs':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'port-range', 'source-cidrs'], 'type': 'object'},
        'IngressRulesResult': {'additionalProperties': False, 'properties':
        {'error': {'$ref': '#/definitions/Error'}, 'rules': {'items': {
        '$ref': '#/definitions/IngressRule'}, 'type': 'array'}}, 'required':
        ['rules'], 'type': 'object'}, 'LifeResult': {'additionalProperties':
        False, 'properties': {'error': {'$ref': '#/definitions/Error'},
        'life': {'type': 'string'}}, 'required': ['life'], 'type': 'object'
        }, 'LifeResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'}, 'Macaroon':
        {'additionalProperties': False, 'type': 'object'}, 'MacaroonResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref': '#/definitions/Macaroon'
        }}, 'type': 'object'}, 'MacaroonResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/MacaroonResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ModelConfigResult': {
        'additionalProperties': False, 'properties': {'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['config'], 'type':
        'object'}, 'ModelTag': {'additionalProperties': False, 'type':
        'object'}, 'NotifyWatchResult': {'additionalProperties': False,
        'properties': {'NotifyWatcherId': {'type': 'string'}, 'error': {
        '$ref': '#/definitions/Error'}}, 'required': ['NotifyWatcherId'],
        'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'OpenMachinePortRangesResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'unit-port-ranges': {'patternProperties': {
        '.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
        'type': 'array'}}, 'type': 'object'}}, 'required': [
        'unit-port-ranges'], 'type': 'object'},
        'OpenMachinePortRangesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/OpenMachinePortRangesResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'}, 'OpenUnitPortRanges': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'port-ranges': {'items': {'$ref':
        '#/definitions/PortRange'}, 'type': 'array'}, 'subnet-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'endpoint', 'port-ranges', 'subnet-cidrs'], 'type': 'object'},
        'PortRange': {'additionalProperties': False, 'properties': {
        'from-port': {'type': 'integer'}, 'protocol': {'type': 'string'},
        'to-port': {'type': 'integer'}}, 'required': ['from-port',
        'to-port', 'protocol'], 'type': 'object'}, 'SetStatus': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}},
        'required': ['entities'], 'type': 'object'}, 'SpaceInfo': {
        'additionalProperties': False, 'properties': {'id': {'type':
        'string'}, 'name': {'type': 'string'}, 'provider-id': {'type':
        'string'}, 'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
        'type': 'array'}}, 'required': ['id', 'name'], 'type': 'object'},
        'SpaceInfos': {'additionalProperties': False, 'properties': {
        'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
        'type': 'array'}}, 'type': 'object'}, 'SpaceInfosParams': {
        'additionalProperties': False, 'properties': {'space-ids': {'items':
        {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'type':
        'string'}}, 'required': ['result'], 'type': 'object'},
        'StringResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'StringsWatchResult': {'additionalProperties': False, 'properties':
        {'changes': {'items': {'type': 'string'}, 'type': 'array'}, 'error':
        {'$ref': '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'Subnet': {'additionalProperties': False, 'properties': {'cidr': {
        'type': 'string'}, 'life': {'type': 'string'}, 'provider-id': {
        'type': 'string'}, 'provider-network-id': {'type': 'string'},
        'provider-space-id': {'type': 'string'}, 'space-tag': {'type':
        'string'}, 'status': {'type': 'string'}, 'vlan-tag': {'type':
        'integer'}, 'zones': {'items': {'type': 'string'}, 'type': 'array'}
        }, 'required': ['cidr', 'vlan-tag', 'life', 'space-tag', 'zones'],
        'type': 'object'}, 'SubnetV2': {'additionalProperties': False,
        'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, 'cidr':
        {'type': 'string'}, 'id': {'type': 'string'}, 'life': {'type':
        'string'}, 'provider-id': {'type': 'string'}, 'provider-network-id':
        {'type': 'string'}, 'provider-space-id': {'type': 'string'},
        'space-tag': {'type': 'string'}, 'status': {'type': 'string'},
        'vlan-tag': {'type': 'integer'}, 'zones': {'items': {'type':
        'string'}, 'type': 'array'}}, 'required': ['cidr', 'vlan-tag',
        'life', 'space-tag', 'zones', 'Subnet'], 'type': 'object'},
        'SubnetV3': {'additionalProperties': False, 'properties': {'Subnet':
        {'$ref': '#/definitions/Subnet'}, 'SubnetV2': {'$ref':
        '#/definitions/SubnetV2'}, 'cidr': {'type': 'string'}, 'fan-info':
        {'$ref': '#/definitions/FanConfigEntry'}, 'id': {'type': 'string'},
        'is-public': {'type': 'boolean'}, 'life': {'type': 'string'},
        'provider-id': {'type': 'string'}, 'provider-network-id': {'type':
        'string'}, 'provider-space-id': {'type': 'string'}, 'space-id': {
        'type': 'string'}, 'space-tag': {'type': 'string'}, 'status': {
        'type': 'string'}, 'vlan-tag': {'type': 'integer'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cidr',
        'vlan-tag', 'life', 'space-tag', 'zones', 'Subnet', 'SubnetV2',
        'space-id'], 'type': 'object'}}, 'properties': {
        'AreManuallyProvisioned': {'description':
        """AreManuallyProvisioned returns whether each given entity is
manually provisioned or not. Only machine tags are accepted."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/BoolResults'}}, 'type': 'object'},
        'CloudSpec': {'description':
        "CloudSpec returns the model's cloud spec.", 'properties': {
        'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref':
        '#/definitions/CloudSpecResults'}}, 'type': 'object'},
        'ControllerAPIInfoForModels': {'description':
        'ControllerAPIInfoForModels returns the controller api connection details for the specified models.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
        'type': 'object'}, 'ControllerConfig': {'description':
        "ControllerConfig returns the controller's configuration.",
        'properties': {'Result': {'$ref':
        '#/definitions/ControllerConfigResult'}}, 'type': 'object'},
        'GetAssignedMachine': {'description':
        """GetAssignedMachine returns the assigned machine tag (if any) for
each given unit."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'GetCloudSpec': {'description':
        'GetCloudSpec constructs the CloudSpec for a validated and authorized model.'
        , 'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
        'Result': {'$ref': '#/definitions/CloudSpecResult'}}, 'type':
        'object'}, 'GetExposeInfo': {'description':
        """GetExposeInfo returns the expose flag and per-endpoint expose settings
for the specified applications."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ExposeInfoResults'}}, 'type':
        'object'}, 'InstanceId': {'description':
        """InstanceId returns the provider specific instance id for each given
machine or an CodeNotProvisioned error, if not set."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'Life': {'description':
        'Life returns the life status of every supplied entity, where available.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'},
        'MacaroonForRelations': {'description':
        'MacaroonForRelations returns the macaroon for the specified relations.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/MacaroonResults'}}, 'type':
        'object'}, 'ModelConfig': {'description':
        "ModelConfig returns the current model's configuration.",
        'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'
        }}, 'type': 'object'}, 'ModelFirewallRules': {'description':
        """ModelFirewallRules returns the firewall rules that this model is
configured to open"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/IngressRulesResult'}}, 'type': 'object'},
        'OpenedMachinePortRanges': {'description':
        """OpenedMachinePortRanges returns a list of the opened port ranges for the
specified machines where each result is broken down by unit. The list of
opened ports for each unit is further grouped by endpoint name and includes
the subnet CIDRs that belong to the space that each endpoint is bound to."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
        'type': 'object'}, 'SetRelationsStatus': {'description':
        'SetRelationsStatus sets the status for the specified relations.',
        'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'SpaceInfos': {'description':
        """SpaceInfos returns a comprehensive representation of either all spaces or
a filtered subset of the known spaces and their associated subnet details."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/SpaceInfosParams'}, 'Result': {'$ref':
        '#/definitions/SpaceInfos'}}, 'type': 'object'}, 'Watch': {
        'description':
        'Watch starts an NotifyWatcher for each given entity.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchCloudSpecsChanges': {'description':
        'WatchCloudSpecsChanges returns a watcher for cloud spec changes.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchEgressAddressesForRelations': {'description':
        """WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
connections will originate for the relation, change.
Each event contains the entire set of addresses which are required for ingress for the relation."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchForModelConfigChanges': {'description':
        """WatchForModelConfigChanges returns a NotifyWatcher that observes
changes to the model configuration.
Note that although the NotifyWatchResult contains an Error field,
it's not used because we are only returning a single watcher,
so we use the regular error return."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchIngressAddressesForRelations': {'description':
        """WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
that have been recorded against the specified relations."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchModelFirewallRules': {'description':
        """WatchModelFirewallRules returns a NotifyWatcher that notifies of
potential changes to a model's configured firewall rules"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchModelMachineStartTimes': {'description':
        """WatchModelMachineStartTimes watches the non-container machines in the model
for changes to the Life or AgentStartTime fields and reports them as a batch."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchModelMachines': {'description':
        """WatchModelMachines returns a StringsWatcher that notifies of
changes to the life cycles of the top level machines in the current
model."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchOpenedPorts': {'description':
        """WatchOpenedPorts returns a new StringsWatcher for each given
model tag."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchSubnets': {'description':
        """WatchSubnets returns a new StringsWatcher that watches the specified
subnet tags or all tags if no entities are specified."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResult'}}, 'type':
        'object'}, 'WatchUnits': {'description':
        """WatchUnits starts a StringsWatcher to watch all units belonging to
to any entity (machine or service) passed in args."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        """
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='AreManuallyProvisioned',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        """
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='CloudSpec', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        """
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerAPIInfoForModels',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        """
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        """
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetAssignedMachine', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        """
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='GetCloudSpec', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        """
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetExposeInfo', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        """
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='InstanceId', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        """
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Life', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        """
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='MacaroonForRelations',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        """
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        """
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelFirewallRules', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        """
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='OpenedMachinePortRanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        """
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='SetRelationsStatus', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        """
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        """
        if space_ids is not None and not isinstance(space_ids, (bytes, str,
            list)):
            raise Exception('Expected space_ids to be a Sequence, received: {}'
                .format(type(space_ids)))
        _params = dict()
        msg = dict(type='Firewaller', request='SpaceInfos', version=7,
            params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        """
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Watch', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        """
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchCloudSpecsChanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        """
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchEgressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        """
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchForModelConfigChanges',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        """
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchIngressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        """
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelFirewallRules',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        """
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachineStartTimes',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        """
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachines', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        """
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchOpenedPorts', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        """
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchSubnets', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        """
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchUnits', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

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


class ActionFacade(Type):
    name = 'Action'
    version = 7
    schema = {'definitions': {'Action': {'additionalProperties': False,
        'properties': {'execution-group': {'type': 'string'}, 'name': {
        'type': 'string'}, 'parallel': {'type': 'boolean'}, 'parameters': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'receiver': {'type': 'string'},
        'tag': {'type': 'string'}}, 'required': ['tag', 'receiver', 'name'],
        'type': 'object'}, 'ActionMessage': {'additionalProperties': False,
        'properties': {'message': {'type': 'string'}, 'timestamp': {
        'format': 'date-time', 'type': 'string'}}, 'required': ['timestamp',
        'message'], 'type': 'object'}, 'ActionResult': {
        'additionalProperties': False, 'properties': {'action': {'$ref':
        '#/definitions/Action'}, 'completed': {'format': 'date-time',
        'type': 'string'}, 'enqueued': {'format': 'date-time', 'type':
        'string'}, 'error': {'$ref': '#/definitions/Error'}, 'log': {
        'items': {'$ref': '#/definitions/ActionMessage'}, 'type': 'array'},
        'message': {'type': 'string'}, 'output': {'patternProperties': {
        '.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}, 'started': {'format': 'date-time', 'type': 'string'},
        'status': {'type': 'string'}}, 'type': 'object'}, 'ActionResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ActionResult'}, 'type': 'array'}}, 'type':
        'object'}, 'ActionSpec': {'additionalProperties': False,
        'properties': {'description': {'type': 'string'}, 'params': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['description',
        'params'], 'type': 'object'}, 'Actions': {'additionalProperties': 
        False, 'properties': {'actions': {'items': {'$ref':
        '#/definitions/Action'}, 'type': 'array'}}, 'type': 'object'},
        'ApplicationCharmActionsResult': {'additionalProperties': False,
        'properties': {'actions': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ActionSpec'}}, 'type': 'object'}, 'application-tag':
        {'type': 'string'}, 'error': {'$ref': '#/definitions/Error'}},
        'type': 'object'}, 'ApplicationsCharmActionsResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ApplicationCharmActionsResult'}, 'type':
        'array'}}, 'type': 'object'}, 'EnqueuedActions': {
        'additionalProperties': False, 'properties': {'actions': {'items':
        {'$ref': '#/definitions/ActionResult'}, 'type': 'array'},
        'operation': {'type': 'string'}}, 'required': ['operation'], 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'OperationQueryArgs': {'additionalProperties': 
        False, 'properties': {'actions': {'items': {'type': 'string'},
        'type': 'array'}, 'applications': {'items': {'type': 'string'},
        'type': 'array'}, 'limit': {'type': 'integer'}, 'machines': {
        'items': {'type': 'string'}, 'type': 'array'}, 'offset': {'type':
        'integer'}, 'status': {'items': {'type': 'string'}, 'type': 'array'
        }, 'units': {'items': {'type': 'string'}, 'type': 'array'}}, 'type':
        'object'}, 'OperationResult': {'additionalProperties': False,
        'properties': {'actions': {'items': {'$ref':
        '#/definitions/ActionResult'}, 'type': 'array'}, 'completed': {
        'format': 'date-time', 'type': 'string'}, 'enqueued': {'format':
        'date-time', 'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'fail': {'type': 'string'}, 'operation': {
        'type': 'string'}, 'started': {'format': 'date-time', 'type':
        'string'}, 'status': {'type': 'string'}, 'summary': {'type':
        'string'}}, 'required': ['operation', 'summary'], 'type': 'object'},
        'OperationResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/OperationResult'},
        'type': 'array'}, 'truncated': {'type': 'boolean'}}, 'type':
        'object'}, 'RunParams': {'additionalProperties': False,
        'properties': {'applications': {'items': {'type': 'string'}, 'type':
        'array'}, 'commands': {'type': 'string'}, 'execution-group': {
        'type': 'string'}, 'machines': {'items': {'type': 'string'}, 'type':
        'array'}, 'parallel': {'type': 'boolean'}, 'timeout': {'type':
        'integer'}, 'units': {'items': {'type': 'string'}, 'type': 'array'},
        'workload-context': {'type': 'boolean'}}, 'required': ['commands',
        'timeout'], 'type': 'object'}, 'StringsWatchResult': {
        'additionalProperties': False, 'properties': {'changes': {'items':
        {'type': 'string'}, 'type': 'array'}, 'error': {'$ref':
        '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'}},
        'properties': {'Actions': {'description':
        """Actions takes a list of ActionTags, and returns the full Action for
each ID."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ActionResults'}}, 'type':
        'object'}, 'ApplicationsCharmsActions': {'description':
        """ApplicationsCharmsActions returns a slice of charm Actions for a slice of
services."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}
        }, 'type': 'object'}, 'Cancel': {'description':
        'Cancel attempts to cancel enqueued Actions from running.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ActionResults'}}, 'type':
        'object'}, 'EnqueueOperation': {'description':
        """EnqueueOperation takes a list of Actions and queues them up to be executed as
an operation, each action running as a task on the designated ActionReceiver.
We return the ID of the overall operation and each individual task."""
        , 'properties': {'Params': {'$ref': '#/definitions/Actions'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'ListOperations': {'description':
        'ListOperations fetches the called actions for specified apps/units.',
        'properties': {'Params': {'$ref':
        '#/definitions/OperationQueryArgs'}, 'Result': {'$ref':
        '#/definitions/OperationResults'}}, 'type': 'object'}, 'Operations':
        {'description': 'Operations fetches the specified operation ids.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OperationResults'}}, 'type':
        'object'}, 'Run': {'description':
        """Run the commands specified on the machines identified through the
list of machines, units and services."""
        , 'properties': {'Params': {'$ref': '#/definitions/RunParams'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'RunOnAllMachines': {'description':
        'RunOnAllMachines attempts to run the specified command on all the machines.'
        , 'properties': {'Params': {'$ref': '#/definitions/RunParams'},
        'Result': {'$ref': '#/definitions/EnqueuedActions'}}, 'type':
        'object'}, 'WatchActionsProgress': {'description':
        'WatchActionsProgress creates a watcher that reports on action log messages.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(ActionResults)
    async def Actions(self, entities=None):
        """
        Actions takes a list of ActionTags, and returns the full Action for
        each ID.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Actions', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ApplicationsCharmActionsResults)
    async def ApplicationsCharmsActions(self, entities=None):
        """
        ApplicationsCharmsActions returns a slice of charm Actions for a slice of
        services.

        entities : typing.Sequence[~Entity]
        Returns -> ApplicationsCharmActionsResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='ApplicationsCharmsActions',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ActionResults)
    async def Cancel(self, entities=None):
        """
        Cancel attempts to cancel enqueued Actions from running.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Cancel', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def EnqueueOperation(self, actions=None):
        """
        EnqueueOperation takes a list of Actions and queues them up to be executed as
        an operation, each action running as a task on the designated ActionReceiver.
        We return the ID of the overall operation and each individual task.

        actions : typing.Sequence[~Action]
        Returns -> EnqueuedActions
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        _params = dict()
        msg = dict(type='Action', request='EnqueueOperation', version=7,
            params=_params)
        _params['actions'] = actions
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def ListOperations(self, actions=None, applications=None, limit=
        None, machines=None, offset=None, status=None, units=None):
        """
        ListOperations fetches the called actions for specified apps/units.

        actions : typing.Sequence[str]
        applications : typing.Sequence[str]
        limit : int
        machines : typing.Sequence[str]
        offset : int
        status : typing.Sequence[str]
        units : typing.Sequence[str]
        Returns -> OperationResults
        """
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception('Expected actions to be a Sequence, received: {}'
                .format(type(actions)))
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if limit is not None and not isinstance(limit, int):
            raise Exception('Expected limit to be a int, received: {}'.
                format(type(limit)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if offset is not None and not isinstance(offset, int):
            raise Exception('Expected offset to be a int, received: {}'.
                format(type(offset)))
        if status is not None and not isinstance(status, (bytes, str, list)):
            raise Exception('Expected status to be a Sequence, received: {}'
                .format(type(status)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        _params = dict()
        msg = dict(type='Action', request='ListOperations', version=7,
            params=_params)
        _params['actions'] = actions
        _params['applications'] = applications
        _params['limit'] = limit
        _params['machines'] = machines
        _params['offset'] = offset
        _params['status'] = status
        _params['units'] = units
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OperationResults)
    async def Operations(self, entities=None):
        """
        Operations fetches the specified operation ids.

        entities : typing.Sequence[~Entity]
        Returns -> OperationResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='Operations', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def Run(self, applications=None, commands=None, execution_group=
        None, machines=None, parallel=None, timeout=None, units=None,
        workload_context=None):
        """
        Run the commands specified on the machines identified through the
        list of machines, units and services.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='Run', version=7, params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(EnqueuedActions)
    async def RunOnAllMachines(self, applications=None, commands=None,
        execution_group=None, machines=None, parallel=None, timeout=None,
        units=None, workload_context=None):
        """
        RunOnAllMachines attempts to run the specified command on all the machines.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        """
        if applications is not None and not isinstance(applications, (bytes,
            str, list)):
            raise Exception(
                'Expected applications to be a Sequence, received: {}'.
                format(type(applications)))
        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception('Expected commands to be a str, received: {}'.
                format(type(commands)))
        if execution_group is not None and not isinstance(execution_group,
            (bytes, str)):
            raise Exception(
                'Expected execution_group to be a str, received: {}'.format
                (type(execution_group)))
        if machines is not None and not isinstance(machines, (bytes, str, list)
            ):
            raise Exception('Expected machines to be a Sequence, received: {}'
                .format(type(machines)))
        if parallel is not None and not isinstance(parallel, bool):
            raise Exception('Expected parallel to be a bool, received: {}'.
                format(type(parallel)))
        if timeout is not None and not isinstance(timeout, int):
            raise Exception('Expected timeout to be a int, received: {}'.
                format(type(timeout)))
        if units is not None and not isinstance(units, (bytes, str, list)):
            raise Exception('Expected units to be a Sequence, received: {}'
                .format(type(units)))
        if workload_context is not None and not isinstance(workload_context,
            bool):
            raise Exception(
                'Expected workload_context to be a bool, received: {}'.
                format(type(workload_context)))
        _params = dict()
        msg = dict(type='Action', request='RunOnAllMachines', version=7,
            params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchActionsProgress(self, entities=None):
        """
        WatchActionsProgress creates a watcher that reports on action log messages.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Action', request='WatchActionsProgress', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply


class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema = {'definitions': {'AddCloudArgs': {'additionalProperties': 
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'force': {'type': 'boolean'}, 'name': {'type': 'string'}},
        'required': ['cloud', 'name'], 'type': 'object'}, 'Cloud': {
        'additionalProperties': False, 'properties': {'auth-types': {
        'items': {'type': 'string'}, 'type': 'array'}, 'ca-certificates': {
        'items': {'type': 'string'}, 'type': 'array'}, 'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'endpoint': {'type': 'string'},
        'host-cloud-region': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'is-controller-cloud': {'type': 'boolean'},
        'region-config': {'patternProperties': {'.*': {'patternProperties':
        {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type':
        'object'}}, 'type': 'object'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'skip-tls-verify':
        {'type': 'boolean'}, 'storage-endpoint': {'type': 'string'}, 'type':
        {'type': 'string'}}, 'required': ['type'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudCredentialArg': {'additionalProperties': 
        False, 'properties': {'cloud-name': {'type': 'string'},
        'credential-name': {'type': 'string'}}, 'required': ['cloud-name',
        'credential-name'], 'type': 'object'}, 'CloudCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/CloudCredentialArg'}, 'type':
        'array'}, 'include-secrets': {'type': 'boolean'}}, 'required': [
        'include-secrets'], 'type': 'object'}, 'CloudCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudCredential'}}, 'type': 'object'},
        'CloudCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/CloudCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'CloudDetails': {'additionalProperties': False,
        'properties': {'auth-types': {'items': {'type': 'string'}, 'type':
        'array'}, 'endpoint': {'type': 'string'}, 'identity-endpoint': {
        'type': 'string'}, 'regions': {'items': {'$ref':
        '#/definitions/CloudRegion'}, 'type': 'array'}, 'storage-endpoint':
        {'type': 'string'}, 'type': {'type': 'string'}}, 'required': [
        'type'], 'type': 'object'}, 'CloudInfo': {'additionalProperties': 
        False, 'properties': {'CloudDetails': {'$ref':
        '#/definitions/CloudDetails'}, 'users': {'items': {'$ref':
        '#/definitions/CloudUserInfo'}, 'type': 'array'}}, 'required': [
        'CloudDetails', 'users'], 'type': 'object'}, 'CloudInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudInfo'}}, 'type': 'object'}, 'CloudInfoResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudInfoResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'},
        'CloudInstanceTypesConstraint': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'constraints': {
        '$ref': '#/definitions/Value'}, 'region': {'type': 'string'}},
        'required': ['cloud-tag', 'region'], 'type': 'object'},
        'CloudInstanceTypesConstraints': {'additionalProperties': False,
        'properties': {'constraints': {'items': {'$ref':
        '#/definitions/CloudInstanceTypesConstraint'}, 'type': 'array'}},
        'required': ['constraints'], 'type': 'object'}, 'CloudRegion': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'identity-endpoint': {'type': 'string'}, 'name': {'type':
        'string'}, 'storage-endpoint': {'type': 'string'}}, 'required': [
        'name'], 'type': 'object'}, 'CloudResult': {'additionalProperties':
        False, 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
        'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'},
        'CloudResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/CloudResult'}, 'type':
        'array'}}, 'type': 'object'}, 'CloudUserInfo': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'display-name': {'type': 'string'}, 'user': {'type':
        'string'}}, 'required': ['user', 'display-name', 'access'], 'type':
        'object'}, 'CloudsResult': {'additionalProperties': False,
        'properties': {'clouds': {'patternProperties': {'.*': {'$ref':
        '#/definitions/Cloud'}}, 'type': 'object'}}, 'type': 'object'},
        'ControllerCredentialInfo': {'additionalProperties': False,
        'properties': {'content': {'$ref':
        '#/definitions/CredentialContent'}, 'models': {'items': {'$ref':
        '#/definitions/ModelAccess'}, 'type': 'array'}}, 'type': 'object'},
        'CredentialContent': {'additionalProperties': False, 'properties':
        {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'cloud': {'type':
        'string'}, 'name': {'type': 'string'}, 'valid': {'type': 'boolean'}
        }, 'required': ['name', 'cloud', 'auth-type'], 'type': 'object'},
        'CredentialContentResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ControllerCredentialInfo'}}, 'type':
        'object'}, 'CredentialContentResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/CredentialContentResult'}, 'type': 'array'}}, 'type':
        'object'}, 'Entities': {'additionalProperties': False, 'properties':
        {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type':
        'array'}}, 'required': ['entities'], 'type': 'object'}, 'Entity': {
        'additionalProperties': False, 'properties': {'tag': {'type':
        'string'}}, 'required': ['tag'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'InstanceType': {
        'additionalProperties': False, 'properties': {'arches': {'items': {
        'type': 'string'}, 'type': 'array'}, 'cost': {'type': 'integer'},
        'cpu-cores': {'type': 'integer'}, 'deprecated': {'type': 'boolean'},
        'memory': {'type': 'integer'}, 'name': {'type': 'string'},
        'root-disk': {'type': 'integer'}, 'virt-type': {'type': 'string'}},
        'required': ['arches', 'cpu-cores', 'memory'], 'type': 'object'},
        'InstanceTypesResult': {'additionalProperties': False, 'properties':
        {'cost-currency': {'type': 'string'}, 'cost-divisor': {'type':
        'integer'}, 'cost-unit': {'type': 'string'}, 'error': {'$ref':
        '#/definitions/Error'}, 'instance-types': {'items': {'$ref':
        '#/definitions/InstanceType'}, 'type': 'array'}}, 'type': 'object'},
        'InstanceTypesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/InstanceTypesResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudInfo': {
        'additionalProperties': False, 'properties': {'CloudDetails': {
        '$ref': '#/definitions/CloudDetails'}, 'user-access': {'type':
        'string'}}, 'required': ['CloudDetails', 'user-access'], 'type':
        'object'}, 'ListCloudInfoResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'$ref': '#/definitions/ListCloudInfo'}}, 'type': 'object'},
        'ListCloudInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ListCloudInfoResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'ListCloudsRequest': {
        'additionalProperties': False, 'properties': {'all': {'type':
        'boolean'}, 'user-tag': {'type': 'string'}}, 'required': [
        'user-tag'], 'type': 'object'}, 'ModelAccess': {
        'additionalProperties': False, 'properties': {'access': {'type':
        'string'}, 'model': {'type': 'string'}}, 'type': 'object'},
        'ModifyCloudAccess': {'additionalProperties': False, 'properties':
        {'access': {'type': 'string'}, 'action': {'type': 'string'},
        'cloud-tag': {'type': 'string'}, 'user-tag': {'type': 'string'}},
        'required': ['user-tag', 'cloud-tag', 'action', 'access'], 'type':
        'object'}, 'ModifyCloudAccessRequest': {'additionalProperties': 
        False, 'properties': {'changes': {'items': {'$ref':
        '#/definitions/ModifyCloudAccess'}, 'type': 'array'}}, 'required':
        ['changes'], 'type': 'object'}, 'RevokeCredentialArg': {
        'additionalProperties': False, 'properties': {'force': {'type':
        'boolean'}, 'tag': {'type': 'string'}}, 'required': ['tag', 'force'
        ], 'type': 'object'}, 'RevokeCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/RevokeCredentialArg'}, 'type':
        'array'}}, 'required': ['credentials'], 'type': 'object'},
        'StringsResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringsResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringsResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'TaggedCredential': {'additionalProperties': False, 'properties': {
        'credential': {'$ref': '#/definitions/CloudCredential'}, 'tag': {
        'type': 'string'}}, 'required': ['tag', 'credential'], 'type':
        'object'}, 'TaggedCredentials': {'additionalProperties': False,
        'properties': {'credentials': {'items': {'$ref':
        '#/definitions/TaggedCredential'}, 'type': 'array'}}, 'type':
        'object'}, 'UpdateCloudArgs': {'additionalProperties': False,
        'properties': {'clouds': {'items': {'$ref':
        '#/definitions/AddCloudArgs'}, 'type': 'array'}}, 'required': [
        'clouds'], 'type': 'object'}, 'UpdateCredentialArgs': {
        'additionalProperties': False, 'properties': {'credentials': {
        'items': {'$ref': '#/definitions/TaggedCredential'}, 'type':
        'array'}, 'force': {'type': 'boolean'}}, 'required': ['credentials',
        'force'], 'type': 'object'}, 'UpdateCredentialModelResult': {
        'additionalProperties': False, 'properties': {'errors': {'items': {
        '$ref': '#/definitions/ErrorResult'}, 'type': 'array'}, 'name': {
        'type': 'string'}, 'uuid': {'type': 'string'}}, 'required': ['uuid',
        'name'], 'type': 'object'}, 'UpdateCredentialResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'models': {'items': {'$ref':
        '#/definitions/UpdateCredentialModelResult'}, 'type': 'array'},
        'tag': {'type': 'string'}}, 'required': ['tag'], 'type': 'object'},
        'UpdateCredentialResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/UpdateCredentialResult'}, 'type': 'array'}}, 'type':
        'object'}, 'UserCloud': {'additionalProperties': False,
        'properties': {'cloud-tag': {'type': 'string'}, 'user-tag': {'type':
        'string'}}, 'required': ['user-tag', 'cloud-tag'], 'type': 'object'
        }, 'UserClouds': {'additionalProperties': False, 'properties': {
        'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
        'type': 'array'}}, 'type': 'object'}, 'Value': {
        'additionalProperties': False, 'properties': {'allocate-public-ip':
        {'type': 'boolean'}, 'arch': {'type': 'string'}, 'container': {
        'type': 'string'}, 'cores': {'type': 'integer'}, 'cpu-power': {
        'type': 'integer'}, 'image-id': {'type': 'string'}, 'instance-role':
        {'type': 'string'}, 'instance-type': {'type': 'string'}, 'mem': {
        'type': 'integer'}, 'root-disk': {'type': 'integer'},
        'root-disk-source': {'type': 'string'}, 'spaces': {'items': {'type':
        'string'}, 'type': 'array'}, 'tags': {'items': {'type': 'string'},
        'type': 'array'}, 'virt-type': {'type': 'string'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'}},
        'properties': {'AddCloud': {'description':
        'AddCloud adds a new cloud, different from the one managed by the controller.'
        , 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
        'type': 'object'}, 'AddCredentials': {'description':
        """AddCredentials adds new credentials.
In contrast to UpdateCredentials() below, the new credentials can be
for a cloud that the controller does not manage (this is required
for CAAS models)"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'},
        'CheckCredentialsModels': {'description':
        """CheckCredentialsModels validates supplied cloud credentials' content against
models that currently use these credentials.
If there are any models that are using a credential and these models or their
cloud instances are not going to be accessible with corresponding credential,
there will be detailed validation errors per model.
There's no Juju API client which uses this, but JAAS does,"""
        , 'properties': {'Params': {'$ref':
        '#/definitions/TaggedCredentials'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'Cloud': {'description':
        'Cloud returns the cloud definitions for the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudResults'}}, 'type': 'object'
        }, 'CloudInfo': {'description':
        'CloudInfo returns information about the specified clouds.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudInfoResults'}}, 'type':
        'object'}, 'Clouds': {'description':
        """Clouds returns the definitions of all clouds supported by the controller
that the logged in user can see."""
        , 'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
        'type': 'object'}, 'Credential': {'description':
        'Credential returns the specified cloud credential for each tag, minus secrets.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, 'type':
        'object'}, 'CredentialContents': {'description':
        """CredentialContents returns the specified cloud credentials,
including the secrets if requested.
If no specific credential name/cloud was passed in, all credentials for this user
are returned.
Only credential owner can see its contents as well as what models use it.
Controller admin has no special superpowers here and is treated the same as all other users."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/CredentialContentResults'}}, 'type': 'object'},
        'InstanceTypes': {'description':
        """InstanceTypes returns instance type information for the cloud and region
in which the current model is deployed."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/CloudInstanceTypesConstraints'}, 'Result': {'$ref':
        '#/definitions/InstanceTypesResults'}}, 'type': 'object'},
        'ListCloudInfo': {'description':
        """ListCloudInfo returns clouds that the specified user has access to.
Controller admins (superuser) can list clouds for any user.
Other users can only ask about their own clouds."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/ListCloudsRequest'}, 'Result': {'$ref':
        '#/definitions/ListCloudInfoResults'}}, 'type': 'object'},
        'ModifyCloudAccess': {'description':
        'ModifyCloudAccess changes the model access granted to users.',
        'properties': {'Params': {'$ref':
        '#/definitions/ModifyCloudAccessRequest'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'RemoveClouds':
        {'description':
        """RemoveClouds removes the specified clouds from the controller.
If a cloud is in use (has models deployed to it), the removal will fail."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'RevokeCredentialsCheckModels': {'description':
        """RevokeCredentialsCheckModels revokes a set of cloud credentials.
If the credentials are used by any of the models, the credential deletion will be aborted.
If credential-in-use needs to be revoked nonetheless, this method allows the use of force."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/RevokeCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/ErrorResults'}}, 'type': 'object'}, 'UpdateCloud': {
        'description':
        'UpdateCloud updates an existing cloud that the controller knows about.'
        , 'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'
        }, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type':
        'object'}, 'UpdateCredentialsCheckModels': {'description':
        """UpdateCredentialsCheckModels updates a set of cloud credentials' content.
If there are any models that are using a credential and these models
are not going to be visible with updated credential content,
there will be detailed validation errors per model.  Such model errors are returned
separately and do not contribute to the overall method error status.
Controller admins can 'force' an update of the credential
regardless of whether it is deemed valid or not."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/UpdateCredentialArgs'}, 'Result': {'$ref':
        '#/definitions/UpdateCredentialResults'}}, 'type': 'object'},
        'UserCredentials': {'description':
        'UserCredentials returns the cloud credentials for a set of users.',
        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
        'Result': {'$ref': '#/definitions/StringsResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        """
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        """
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception('Expected cloud to be a Cloud, received: {}'.
                format(type(cloud)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception('Expected name to be a str, received: {}'.
                format(type(name)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCloud', version=7, params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        """
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='AddCredentials', version=7,
            params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        """
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='CheckCredentialsModels', version=
            7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        """
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Cloud', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        """
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='CloudInfo', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        """
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        """
        _params = dict()
        msg = dict(type='Cloud', request='Clouds', version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        """
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='Credential', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        """
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if include_secrets is not None and not isinstance(include_secrets, bool
            ):
            raise Exception(
                'Expected include_secrets to be a bool, received: {}'.
                format(type(include_secrets)))
        _params = dict()
        msg = dict(type='Cloud', request='CredentialContents', version=7,
            params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        """
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        """
        if constraints is not None and not isinstance(constraints, (bytes,
            str, list)):
            raise Exception(
                'Expected constraints to be a Sequence, received: {}'.
                format(type(constraints)))
        _params = dict()
        msg = dict(type='Cloud', request='InstanceTypes', version=7, params
            =_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        """
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        """
        if all_ is not None and not isinstance(all_, bool):
            raise Exception('Expected all_ to be a bool, received: {}'.
                format(type(all_)))
        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception('Expected user_tag to be a str, received: {}'.
                format(type(user_tag)))
        _params = dict()
        msg = dict(type='Cloud', request='ListCloudInfo', version=7, params
            =_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        """
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        """
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception('Expected changes to be a Sequence, received: {}'
                .format(type(changes)))
        _params = dict()
        msg = dict(type='Cloud', request='ModifyCloudAccess', version=7,
            params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        """
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Cloud', request='RemoveClouds', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        """
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        _params = dict()
        msg = dict(type='Cloud', request='RevokeCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        """
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        """
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception('Expected clouds to be a Sequence, received: {}'
                .format(type(clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCloud', version=7, params=
            _params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        """
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        """
        if credentials is not None and not isinstance(credentials, (bytes,
            str, list)):
            raise Exception(
                'Expected credentials to be a Sequence, received: {}'.
                format(type(credentials)))
        if force is not None and not isinstance(force, bool):
            raise Exception('Expected force to be a bool, received: {}'.
                format(type(force)))
        _params = dict()
        msg = dict(type='Cloud', request='UpdateCredentialsCheckModels',
            version=7, params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        """
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        """
        if user_clouds is not None and not isinstance(user_clouds, (bytes,
            str, list)):
            raise Exception(
                'Expected user_clouds to be a Sequence, received: {}'.
                format(type(user_clouds)))
        _params = dict()
        msg = dict(type='Cloud', request='UserCredentials', version=7,
            params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply


class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema = {'definitions': {'BoolResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}, 'result':
        {'type': 'boolean'}}, 'required': ['result'], 'type': 'object'},
        'BoolResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/BoolResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'CloudCredential': {'additionalProperties': False, 'properties': {
        'attrs': {'patternProperties': {'.*': {'type': 'string'}}, 'type':
        'object'}, 'auth-type': {'type': 'string'}, 'redacted': {'items': {
        'type': 'string'}, 'type': 'array'}}, 'required': ['auth-type'],
        'type': 'object'}, 'CloudSpec': {'additionalProperties': False,
        'properties': {'cacertificates': {'items': {'type': 'string'},
        'type': 'array'}, 'credential': {'$ref':
        '#/definitions/CloudCredential'}, 'endpoint': {'type': 'string'},
        'identity-endpoint': {'type': 'string'}, 'is-controller-cloud': {
        'type': 'boolean'}, 'name': {'type': 'string'}, 'region': {'type':
        'string'}, 'skip-tls-verify': {'type': 'boolean'},
        'storage-endpoint': {'type': 'string'}, 'type': {'type': 'string'}},
        'required': ['type', 'name'], 'type': 'object'}, 'CloudSpecResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref':
        '#/definitions/CloudSpec'}}, 'type': 'object'}, 'CloudSpecResults':
        {'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/CloudSpecResult'}, 'type': 'array'}},
        'type': 'object'}, 'ControllerAPIInfoResult': {
        'additionalProperties': False, 'properties': {'addresses': {'items':
        {'type': 'string'}, 'type': 'array'}, 'cacert': {'type': 'string'},
        'error': {'$ref': '#/definitions/Error'}}, 'required': ['addresses',
        'cacert'], 'type': 'object'}, 'ControllerAPIInfoResults': {
        'additionalProperties': False, 'properties': {'results': {'items':
        {'$ref': '#/definitions/ControllerAPIInfoResult'}, 'type': 'array'}
        }, 'required': ['results'], 'type': 'object'},
        'ControllerConfigResult': {'additionalProperties': False,
        'properties': {'config': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}
        }, 'required': ['config'], 'type': 'object'}, 'Entities': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, 'required': [
        'entities'], 'type': 'object'}, 'Entity': {'additionalProperties': 
        False, 'properties': {'tag': {'type': 'string'}}, 'required': [
        'tag'], 'type': 'object'}, 'EntityStatusArgs': {
        'additionalProperties': False, 'properties': {'data': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}, 'info': {'type': 'string'}, 'status':
        {'type': 'string'}, 'tag': {'type': 'string'}}, 'required': ['tag',
        'status', 'info', 'data'], 'type': 'object'}, 'Error': {
        'additionalProperties': False, 'properties': {'code': {'type':
        'string'}, 'info': {'patternProperties': {'.*': {
        'additionalProperties': True, 'type': 'object'}}, 'type': 'object'},
        'message': {'type': 'string'}}, 'required': ['message', 'code'],
        'type': 'object'}, 'ErrorResult': {'additionalProperties': False,
        'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type':
        'object'}, 'ErrorResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ErrorResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposeInfoResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'exposed': {'type': 'boolean'},
        'exposed-endpoints': {'patternProperties': {'.*': {'$ref':
        '#/definitions/ExposedEndpoint'}}, 'type': 'object'}}, 'type':
        'object'}, 'ExposeInfoResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/ExposeInfoResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ExposedEndpoint': {
        'additionalProperties': False, 'properties': {'expose-to-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}, 'expose-to-spaces':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'FanConfigEntry': {'additionalProperties': False, 'properties': {
        'overlay': {'type': 'string'}, 'underlay': {'type': 'string'}},
        'required': ['underlay', 'overlay'], 'type': 'object'},
        'IngressRule': {'additionalProperties': False, 'properties': {
        'port-range': {'$ref': '#/definitions/PortRange'}, 'source-cidrs':
        {'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'port-range', 'source-cidrs'], 'type': 'object'},
        'IngressRulesResult': {'additionalProperties': False, 'properties':
        {'error': {'$ref': '#/definitions/Error'}, 'rules': {'items': {
        '$ref': '#/definitions/IngressRule'}, 'type': 'array'}}, 'required':
        ['rules'], 'type': 'object'}, 'LifeResult': {'additionalProperties':
        False, 'properties': {'error': {'$ref': '#/definitions/Error'},
        'life': {'type': 'string'}}, 'required': ['life'], 'type': 'object'
        }, 'LifeResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'}, 'Macaroon':
        {'additionalProperties': False, 'type': 'object'}, 'MacaroonResult':
        {'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'result': {'$ref': '#/definitions/Macaroon'
        }}, 'type': 'object'}, 'MacaroonResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/MacaroonResult'}, 'type': 'array'}}, 'required': [
        'results'], 'type': 'object'}, 'ModelConfigResult': {
        'additionalProperties': False, 'properties': {'config': {
        'patternProperties': {'.*': {'additionalProperties': True, 'type':
        'object'}}, 'type': 'object'}}, 'required': ['config'], 'type':
        'object'}, 'ModelTag': {'additionalProperties': False, 'type':
        'object'}, 'NotifyWatchResult': {'additionalProperties': False,
        'properties': {'NotifyWatcherId': {'type': 'string'}, 'error': {
        '$ref': '#/definitions/Error'}}, 'required': ['NotifyWatcherId'],
        'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': 
        False, 'properties': {'results': {'items': {'$ref':
        '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, 'required':
        ['results'], 'type': 'object'}, 'OpenMachinePortRangesResult': {
        'additionalProperties': False, 'properties': {'error': {'$ref':
        '#/definitions/Error'}, 'unit-port-ranges': {'patternProperties': {
        '.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
        'type': 'array'}}, 'type': 'object'}}, 'required': [
        'unit-port-ranges'], 'type': 'object'},
        'OpenMachinePortRangesResults': {'additionalProperties': False,
        'properties': {'results': {'items': {'$ref':
        '#/definitions/OpenMachinePortRangesResult'}, 'type': 'array'}},
        'required': ['results'], 'type': 'object'}, 'OpenUnitPortRanges': {
        'additionalProperties': False, 'properties': {'endpoint': {'type':
        'string'}, 'port-ranges': {'items': {'$ref':
        '#/definitions/PortRange'}, 'type': 'array'}, 'subnet-cidrs': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': [
        'endpoint', 'port-ranges', 'subnet-cidrs'], 'type': 'object'},
        'PortRange': {'additionalProperties': False, 'properties': {
        'from-port': {'type': 'integer'}, 'protocol': {'type': 'string'},
        'to-port': {'type': 'integer'}}, 'required': ['from-port',
        'to-port', 'protocol'], 'type': 'object'}, 'SetStatus': {
        'additionalProperties': False, 'properties': {'entities': {'items':
        {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}},
        'required': ['entities'], 'type': 'object'}, 'SpaceInfo': {
        'additionalProperties': False, 'properties': {'id': {'type':
        'string'}, 'name': {'type': 'string'}, 'provider-id': {'type':
        'string'}, 'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
        'type': 'array'}}, 'required': ['id', 'name'], 'type': 'object'},
        'SpaceInfos': {'additionalProperties': False, 'properties': {
        'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
        'type': 'array'}}, 'type': 'object'}, 'SpaceInfosParams': {
        'additionalProperties': False, 'properties': {'space-ids': {'items':
        {'type': 'string'}, 'type': 'array'}}, 'type': 'object'},
        'StringResult': {'additionalProperties': False, 'properties': {
        'error': {'$ref': '#/definitions/Error'}, 'result': {'type':
        'string'}}, 'required': ['result'], 'type': 'object'},
        'StringResults': {'additionalProperties': False, 'properties': {
        'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type':
        'array'}}, 'required': ['results'], 'type': 'object'},
        'StringsWatchResult': {'additionalProperties': False, 'properties':
        {'changes': {'items': {'type': 'string'}, 'type': 'array'}, 'error':
        {'$ref': '#/definitions/Error'}, 'watcher-id': {'type': 'string'}},
        'required': ['watcher-id'], 'type': 'object'},
        'StringsWatchResults': {'additionalProperties': False, 'properties':
        {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
        'type': 'array'}}, 'required': ['results'], 'type': 'object'},
        'Subnet': {'additionalProperties': False, 'properties': {'cidr': {
        'type': 'string'}, 'life': {'type': 'string'}, 'provider-id': {
        'type': 'string'}, 'provider-network-id': {'type': 'string'},
        'provider-space-id': {'type': 'string'}, 'space-tag': {'type':
        'string'}, 'status': {'type': 'string'}, 'vlan-tag': {'type':
        'integer'}, 'zones': {'items': {'type': 'string'}, 'type': 'array'}
        }, 'required': ['cidr', 'vlan-tag', 'life', 'space-tag', 'zones'],
        'type': 'object'}, 'SubnetV2': {'additionalProperties': False,
        'properties': {'Subnet': {'$ref': '#/definitions/Subnet'}, 'cidr':
        {'type': 'string'}, 'id': {'type': 'string'}, 'life': {'type':
        'string'}, 'provider-id': {'type': 'string'}, 'provider-network-id':
        {'type': 'string'}, 'provider-space-id': {'type': 'string'},
        'space-tag': {'type': 'string'}, 'status': {'type': 'string'},
        'vlan-tag': {'type': 'integer'}, 'zones': {'items': {'type':
        'string'}, 'type': 'array'}}, 'required': ['cidr', 'vlan-tag',
        'life', 'space-tag', 'zones', 'Subnet'], 'type': 'object'},
        'SubnetV3': {'additionalProperties': False, 'properties': {'Subnet':
        {'$ref': '#/definitions/Subnet'}, 'SubnetV2': {'$ref':
        '#/definitions/SubnetV2'}, 'cidr': {'type': 'string'}, 'fan-info':
        {'$ref': '#/definitions/FanConfigEntry'}, 'id': {'type': 'string'},
        'is-public': {'type': 'boolean'}, 'life': {'type': 'string'},
        'provider-id': {'type': 'string'}, 'provider-network-id': {'type':
        'string'}, 'provider-space-id': {'type': 'string'}, 'space-id': {
        'type': 'string'}, 'space-tag': {'type': 'string'}, 'status': {
        'type': 'string'}, 'vlan-tag': {'type': 'integer'}, 'zones': {
        'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['cidr',
        'vlan-tag', 'life', 'space-tag', 'zones', 'Subnet', 'SubnetV2',
        'space-id'], 'type': 'object'}}, 'properties': {
        'AreManuallyProvisioned': {'description':
        """AreManuallyProvisioned returns whether each given entity is
manually provisioned or not. Only machine tags are accepted."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/BoolResults'}}, 'type': 'object'},
        'CloudSpec': {'description':
        "CloudSpec returns the model's cloud spec.", 'properties': {
        'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref':
        '#/definitions/CloudSpecResults'}}, 'type': 'object'},
        'ControllerAPIInfoForModels': {'description':
        'ControllerAPIInfoForModels returns the controller api connection details for the specified models.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
        'type': 'object'}, 'ControllerConfig': {'description':
        "ControllerConfig returns the controller's configuration.",
        'properties': {'Result': {'$ref':
        '#/definitions/ControllerConfigResult'}}, 'type': 'object'},
        'GetAssignedMachine': {'description':
        """GetAssignedMachine returns the assigned machine tag (if any) for
each given unit."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'GetCloudSpec': {'description':
        'GetCloudSpec constructs the CloudSpec for a validated and authorized model.'
        , 'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
        'Result': {'$ref': '#/definitions/CloudSpecResult'}}, 'type':
        'object'}, 'GetExposeInfo': {'description':
        """GetExposeInfo returns the expose flag and per-endpoint expose settings
for the specified applications."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/ExposeInfoResults'}}, 'type':
        'object'}, 'InstanceId': {'description':
        """InstanceId returns the provider specific instance id for each given
machine or an CodeNotProvisioned error, if not set."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringResults'}}, 'type':
        'object'}, 'Life': {'description':
        'Life returns the life status of every supplied entity, where available.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'},
        'MacaroonForRelations': {'description':
        'MacaroonForRelations returns the macaroon for the specified relations.'
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/MacaroonResults'}}, 'type':
        'object'}, 'ModelConfig': {'description':
        "ModelConfig returns the current model's configuration.",
        'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'
        }}, 'type': 'object'}, 'ModelFirewallRules': {'description':
        """ModelFirewallRules returns the firewall rules that this model is
configured to open"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/IngressRulesResult'}}, 'type': 'object'},
        'OpenedMachinePortRanges': {'description':
        """OpenedMachinePortRanges returns a list of the opened port ranges for the
specified machines where each result is broken down by unit. The list of
opened ports for each unit is further grouped by endpoint name and includes
the subnet CIDRs that belong to the space that each endpoint is bound to."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
        'type': 'object'}, 'SetRelationsStatus': {'description':
        'SetRelationsStatus sets the status for the specified relations.',
        'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
        'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'
        }, 'SpaceInfos': {'description':
        """SpaceInfos returns a comprehensive representation of either all spaces or
a filtered subset of the known spaces and their associated subnet details."""
        , 'properties': {'Params': {'$ref':
        '#/definitions/SpaceInfosParams'}, 'Result': {'$ref':
        '#/definitions/SpaceInfos'}}, 'type': 'object'}, 'Watch': {
        'description':
        'Watch starts an NotifyWatcher for each given entity.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchCloudSpecsChanges': {'description':
        'WatchCloudSpecsChanges returns a watcher for cloud spec changes.',
        'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type':
        'object'}, 'WatchEgressAddressesForRelations': {'description':
        """WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
connections will originate for the relation, change.
Each event contains the entire set of addresses which are required for ingress for the relation."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchForModelConfigChanges': {'description':
        """WatchForModelConfigChanges returns a NotifyWatcher that observes
changes to the model configuration.
Note that although the NotifyWatchResult contains an Error field,
it's not used because we are only returning a single watcher,
so we use the regular error return."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchIngressAddressesForRelations': {'description':
        """WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
that have been recorded against the specified relations."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchModelFirewallRules': {'description':
        """WatchModelFirewallRules returns a NotifyWatcher that notifies of
potential changes to a model's configured firewall rules"""
        , 'properties': {'Result': {'$ref':
        '#/definitions/NotifyWatchResult'}}, 'type': 'object'},
        'WatchModelMachineStartTimes': {'description':
        """WatchModelMachineStartTimes watches the non-container machines in the model
for changes to the Life or AgentStartTime fields and reports them as a batch."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchModelMachines': {'description':
        """WatchModelMachines returns a StringsWatcher that notifies of
changes to the life cycles of the top level machines in the current
model."""
        , 'properties': {'Result': {'$ref':
        '#/definitions/StringsWatchResult'}}, 'type': 'object'},
        'WatchOpenedPorts': {'description':
        """WatchOpenedPorts returns a new StringsWatcher for each given
model tag."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}, 'WatchSubnets': {'description':
        """WatchSubnets returns a new StringsWatcher that watches the specified
subnet tags or all tags if no entities are specified."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResult'}}, 'type':
        'object'}, 'WatchUnits': {'description':
        """WatchUnits starts a StringsWatcher to watch all units belonging to
to any entity (machine or service) passed in args."""
        , 'properties': {'Params': {'$ref': '#/definitions/Entities'},
        'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type':
        'object'}}, 'type': 'object'}

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        """
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='AreManuallyProvisioned',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        """
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='CloudSpec', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        """
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerAPIInfoForModels',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        """
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ControllerConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        """
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetAssignedMachine', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        """
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='GetCloudSpec', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        """
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='GetExposeInfo', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        """
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='InstanceId', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        """
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Life', version=7, params=_params
            )
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        """
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='MacaroonForRelations',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        """
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelConfig', version=7,
            params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        """
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='ModelFirewallRules', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        """
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='OpenedMachinePortRanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        """
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='SetRelationsStatus', version
            =7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        """
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        """
        if space_ids is not None and not isinstance(space_ids, (bytes, str,
            list)):
            raise Exception('Expected space_ids to be a Sequence, received: {}'
                .format(type(space_ids)))
        _params = dict()
        msg = dict(type='Firewaller', request='SpaceInfos', version=7,
            params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        """
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='Watch', version=7, params=
            _params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        """
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchCloudSpecsChanges',
            version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        """
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchEgressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        """
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchForModelConfigChanges',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        """
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request=
            'WatchIngressAddressesForRelations', version=7, params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        """
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelFirewallRules',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        """
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachineStartTimes',
            version=7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        """
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        """
        _params = dict()
        msg = dict(type='Firewaller', request='WatchModelMachines', version
            =7, params=_params)
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        """
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchOpenedPorts', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        """
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchSubnets', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        """
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        """
        if entities is not None and not isinstance(entities, (bytes, str, list)
            ):
            raise Exception('Expected entities to be a Sequence, received: {}'
                .format(type(entities)))
        _params = dict()
        msg = dict(type='Firewaller', request='WatchUnits', version=7,
            params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply

# 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.facade import Type, ReturnMapping
from juju.client._definitions import *


class ActionFacade(Type):
    name = 'Action'
    version = 7
    schema =     {'definitions': {'Action': {'additionalProperties': False,
                                'properties': {'execution-group': {'type': 'string'},
                                               'name': {'type': 'string'},
                                               'parallel': {'type': 'boolean'},
                                               'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'},
                                               'receiver': {'type': 'string'},
                                               'tag': {'type': 'string'}},
                                'required': ['tag', 'receiver', 'name'],
                                'type': 'object'},
                     'ActionMessage': {'additionalProperties': False,
                                       'properties': {'message': {'type': 'string'},
                                                      'timestamp': {'format': 'date-time',
                                                                    'type': 'string'}},
                                       'required': ['timestamp', 'message'],
                                       'type': 'object'},
                     'ActionResult': {'additionalProperties': False,
                                      'properties': {'action': {'$ref': '#/definitions/Action'},
                                                     'completed': {'format': 'date-time',
                                                                   'type': 'string'},
                                                     'enqueued': {'format': 'date-time',
                                                                  'type': 'string'},
                                                     'error': {'$ref': '#/definitions/Error'},
                                                     'log': {'items': {'$ref': '#/definitions/ActionMessage'},
                                                             'type': 'array'},
                                                     'message': {'type': 'string'},
                                                     'output': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                             'type': 'object'}},
                                                                'type': 'object'},
                                                     'started': {'format': 'date-time',
                                                                 'type': 'string'},
                                                     'status': {'type': 'string'}},
                                      'type': 'object'},
                     'ActionResults': {'additionalProperties': False,
                                       'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                  'type': 'array'}},
                                       'type': 'object'},
                     'ActionSpec': {'additionalProperties': False,
                                    'properties': {'description': {'type': 'string'},
                                                   'params': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'}},
                                    'required': ['description', 'params'],
                                    'type': 'object'},
                     'Actions': {'additionalProperties': False,
                                 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
                                                            'type': 'array'}},
                                 'type': 'object'},
                     'ApplicationCharmActionsResult': {'additionalProperties': False,
                                                       'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
                                                                                  'type': 'object'},
                                                                      'application-tag': {'type': 'string'},
                                                                      'error': {'$ref': '#/definitions/Error'}},
                                                       'type': 'object'},
                     'ApplicationsCharmActionsResults': {'additionalProperties': False,
                                                         'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
                                                                                    'type': 'array'}},
                                                         'type': 'object'},
                     'EnqueuedActions': {'additionalProperties': False,
                                         'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                    'type': 'array'},
                                                        'operation': {'type': 'string'}},
                                         'required': ['operation'],
                                         'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'OperationQueryArgs': {'additionalProperties': False,
                                            'properties': {'actions': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'applications': {'items': {'type': 'string'},
                                                                            'type': 'array'},
                                                           'limit': {'type': 'integer'},
                                                           'machines': {'items': {'type': 'string'},
                                                                        'type': 'array'},
                                                           'offset': {'type': 'integer'},
                                                           'status': {'items': {'type': 'string'},
                                                                      'type': 'array'},
                                                           'units': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                            'type': 'object'},
                     'OperationResult': {'additionalProperties': False,
                                         'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
                                                                    'type': 'array'},
                                                        'completed': {'format': 'date-time',
                                                                      'type': 'string'},
                                                        'enqueued': {'format': 'date-time',
                                                                     'type': 'string'},
                                                        'error': {'$ref': '#/definitions/Error'},
                                                        'fail': {'type': 'string'},
                                                        'operation': {'type': 'string'},
                                                        'started': {'format': 'date-time',
                                                                    'type': 'string'},
                                                        'status': {'type': 'string'},
                                                        'summary': {'type': 'string'}},
                                         'required': ['operation', 'summary'],
                                         'type': 'object'},
                     'OperationResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/OperationResult'},
                                                                     'type': 'array'},
                                                         'truncated': {'type': 'boolean'}},
                                          'type': 'object'},
                     'RunParams': {'additionalProperties': False,
                                   'properties': {'applications': {'items': {'type': 'string'},
                                                                   'type': 'array'},
                                                  'commands': {'type': 'string'},
                                                  'execution-group': {'type': 'string'},
                                                  'machines': {'items': {'type': 'string'},
                                                               'type': 'array'},
                                                  'parallel': {'type': 'boolean'},
                                                  'timeout': {'type': 'integer'},
                                                  'units': {'items': {'type': 'string'},
                                                            'type': 'array'},
                                                  'workload-context': {'type': 'boolean'}},
                                   'required': ['commands', 'timeout'],
                                   'type': 'object'},
                     'StringsWatchResult': {'additionalProperties': False,
                                            'properties': {'changes': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'error': {'$ref': '#/definitions/Error'},
                                                           'watcher-id': {'type': 'string'}},
                                            'required': ['watcher-id'],
                                            'type': 'object'},
                     'StringsWatchResults': {'additionalProperties': False,
                                             'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
                                                                        'type': 'array'}},
                                             'required': ['results'],
                                             'type': 'object'}},
     'properties': {'Actions': {'description': 'Actions takes a list of '
                                               'ActionTags, and returns the full '
                                               'Action for\n'
                                               'each ID.',
                                'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                               'Result': {'$ref': '#/definitions/ActionResults'}},
                                'type': 'object'},
                    'ApplicationsCharmsActions': {'description': 'ApplicationsCharmsActions '
                                                                 'returns a slice '
                                                                 'of charm Actions '
                                                                 'for a slice of\n'
                                                                 'services.',
                                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
                                                  'type': 'object'},
                    'Cancel': {'description': 'Cancel attempts to cancel enqueued '
                                              'Actions from running.',
                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                              'Result': {'$ref': '#/definitions/ActionResults'}},
                               'type': 'object'},
                    'EnqueueOperation': {'description': 'EnqueueOperation takes a '
                                                        'list of Actions and '
                                                        'queues them up to be '
                                                        'executed as\n'
                                                        'an operation, each action '
                                                        'running as a task on the '
                                                        'designated '
                                                        'ActionReceiver.\n'
                                                        'We return the ID of the '
                                                        'overall operation and '
                                                        'each individual task.',
                                         'properties': {'Params': {'$ref': '#/definitions/Actions'},
                                                        'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                                         'type': 'object'},
                    'ListOperations': {'description': 'ListOperations fetches the '
                                                      'called actions for '
                                                      'specified apps/units.',
                                       'properties': {'Params': {'$ref': '#/definitions/OperationQueryArgs'},
                                                      'Result': {'$ref': '#/definitions/OperationResults'}},
                                       'type': 'object'},
                    'Operations': {'description': 'Operations fetches the '
                                                  'specified operation ids.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/OperationResults'}},
                                   'type': 'object'},
                    'Run': {'description': 'Run the commands specified on the '
                                           'machines identified through the\n'
                                           'list of machines, units and services.',
                            'properties': {'Params': {'$ref': '#/definitions/RunParams'},
                                           'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                            'type': 'object'},
                    'RunOnAllMachines': {'description': 'RunOnAllMachines attempts '
                                                        'to run the specified '
                                                        'command on all the '
                                                        'machines.',
                                         'properties': {'Params': {'$ref': '#/definitions/RunParams'},
                                                        'Result': {'$ref': '#/definitions/EnqueuedActions'}},
                                         'type': 'object'},
                    'WatchActionsProgress': {'description': 'WatchActionsProgress '
                                                            'creates a watcher '
                                                            'that reports on '
                                                            'action log messages.',
                                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                            'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                             'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(ActionResults)
    async def Actions(self, entities=None):
        '''
        Actions takes a list of ActionTags, and returns the full Action for
        each ID.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Actions',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ApplicationsCharmActionsResults)
    async def ApplicationsCharmsActions(self, entities=None):
        '''
        ApplicationsCharmsActions returns a slice of charm Actions for a slice of
        services.

        entities : typing.Sequence[~Entity]
        Returns -> ApplicationsCharmActionsResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='ApplicationsCharmsActions',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ActionResults)
    async def Cancel(self, entities=None):
        '''
        Cancel attempts to cancel enqueued Actions from running.

        entities : typing.Sequence[~Entity]
        Returns -> ActionResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Cancel',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def EnqueueOperation(self, actions=None):
        '''
        EnqueueOperation takes a list of Actions and queues them up to be executed as
        an operation, each action running as a task on the designated ActionReceiver.
        We return the ID of the overall operation and each individual task.

        actions : typing.Sequence[~Action]
        Returns -> EnqueuedActions
        '''
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception("Expected actions to be a Sequence, received: {}".format(type(actions)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='EnqueueOperation',
                   version=7,
                   params=_params)
        _params['actions'] = actions
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OperationResults)
    async def ListOperations(self, actions=None, applications=None, limit=None, machines=None, offset=None, status=None, units=None):
        '''
        ListOperations fetches the called actions for specified apps/units.

        actions : typing.Sequence[str]
        applications : typing.Sequence[str]
        limit : int
        machines : typing.Sequence[str]
        offset : int
        status : typing.Sequence[str]
        units : typing.Sequence[str]
        Returns -> OperationResults
        '''
        if actions is not None and not isinstance(actions, (bytes, str, list)):
            raise Exception("Expected actions to be a Sequence, received: {}".format(type(actions)))

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

        if limit is not None and not isinstance(limit, int):
            raise Exception("Expected limit to be a int, received: {}".format(type(limit)))

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

        if offset is not None and not isinstance(offset, int):
            raise Exception("Expected offset to be a int, received: {}".format(type(offset)))

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='ListOperations',
                   version=7,
                   params=_params)
        _params['actions'] = actions
        _params['applications'] = applications
        _params['limit'] = limit
        _params['machines'] = machines
        _params['offset'] = offset
        _params['status'] = status
        _params['units'] = units
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OperationResults)
    async def Operations(self, entities=None):
        '''
        Operations fetches the specified operation ids.

        entities : typing.Sequence[~Entity]
        Returns -> OperationResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Operations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def Run(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None):
        '''
        Run the commands specified on the machines identified through the
        list of machines, units and services.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        '''
        if applications is not None and not isinstance(applications, (bytes, str, list)):
            raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))

        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception("Expected commands to be a str, received: {}".format(type(commands)))

        if execution_group is not None and not isinstance(execution_group, (bytes, str)):
            raise Exception("Expected execution_group to be a str, received: {}".format(type(execution_group)))

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

        if parallel is not None and not isinstance(parallel, bool):
            raise Exception("Expected parallel to be a bool, received: {}".format(type(parallel)))

        if timeout is not None and not isinstance(timeout, int):
            raise Exception("Expected timeout to be a int, received: {}".format(type(timeout)))

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

        if workload_context is not None and not isinstance(workload_context, bool):
            raise Exception("Expected workload_context to be a bool, received: {}".format(type(workload_context)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='Run',
                   version=7,
                   params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(EnqueuedActions)
    async def RunOnAllMachines(self, applications=None, commands=None, execution_group=None, machines=None, parallel=None, timeout=None, units=None, workload_context=None):
        '''
        RunOnAllMachines attempts to run the specified command on all the machines.

        applications : typing.Sequence[str]
        commands : str
        execution_group : str
        machines : typing.Sequence[str]
        parallel : bool
        timeout : int
        units : typing.Sequence[str]
        workload_context : bool
        Returns -> EnqueuedActions
        '''
        if applications is not None and not isinstance(applications, (bytes, str, list)):
            raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))

        if commands is not None and not isinstance(commands, (bytes, str)):
            raise Exception("Expected commands to be a str, received: {}".format(type(commands)))

        if execution_group is not None and not isinstance(execution_group, (bytes, str)):
            raise Exception("Expected execution_group to be a str, received: {}".format(type(execution_group)))

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

        if parallel is not None and not isinstance(parallel, bool):
            raise Exception("Expected parallel to be a bool, received: {}".format(type(parallel)))

        if timeout is not None and not isinstance(timeout, int):
            raise Exception("Expected timeout to be a int, received: {}".format(type(timeout)))

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

        if workload_context is not None and not isinstance(workload_context, bool):
            raise Exception("Expected workload_context to be a bool, received: {}".format(type(workload_context)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='RunOnAllMachines',
                   version=7,
                   params=_params)
        _params['applications'] = applications
        _params['commands'] = commands
        _params['execution-group'] = execution_group
        _params['machines'] = machines
        _params['parallel'] = parallel
        _params['timeout'] = timeout
        _params['units'] = units
        _params['workload-context'] = workload_context
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchActionsProgress(self, entities=None):
        '''
        WatchActionsProgress creates a watcher that reports on action log messages.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Action',
                   request='WatchActionsProgress',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



class CloudFacade(Type):
    name = 'Cloud'
    version = 7
    schema =     {'definitions': {'AddCloudArgs': {'additionalProperties': False,
                                      'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
                                                     'force': {'type': 'boolean'},
                                                     'name': {'type': 'string'}},
                                      'required': ['cloud', 'name'],
                                      'type': 'object'},
                     'Cloud': {'additionalProperties': False,
                               'properties': {'auth-types': {'items': {'type': 'string'},
                                                             'type': 'array'},
                                              'ca-certificates': {'items': {'type': 'string'},
                                                                  'type': 'array'},
                                              'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                      'type': 'object'}},
                                                         'type': 'object'},
                                              'endpoint': {'type': 'string'},
                                              'host-cloud-region': {'type': 'string'},
                                              'identity-endpoint': {'type': 'string'},
                                              'is-controller-cloud': {'type': 'boolean'},
                                              'region-config': {'patternProperties': {'.*': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                                          'type': 'object'}},
                                                                                             'type': 'object'}},
                                                                'type': 'object'},
                                              'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
                                                          'type': 'array'},
                                              'skip-tls-verify': {'type': 'boolean'},
                                              'storage-endpoint': {'type': 'string'},
                                              'type': {'type': 'string'}},
                               'required': ['type'],
                               'type': 'object'},
                     'CloudCredential': {'additionalProperties': False,
                                         'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                  'type': 'object'},
                                                        'auth-type': {'type': 'string'},
                                                        'redacted': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                         'required': ['auth-type'],
                                         'type': 'object'},
                     'CloudCredentialArg': {'additionalProperties': False,
                                            'properties': {'cloud-name': {'type': 'string'},
                                                           'credential-name': {'type': 'string'}},
                                            'required': ['cloud-name',
                                                         'credential-name'],
                                            'type': 'object'},
                     'CloudCredentialArgs': {'additionalProperties': False,
                                             'properties': {'credentials': {'items': {'$ref': '#/definitions/CloudCredentialArg'},
                                                                            'type': 'array'},
                                                            'include-secrets': {'type': 'boolean'}},
                                             'required': ['include-secrets'],
                                             'type': 'object'},
                     'CloudCredentialResult': {'additionalProperties': False,
                                               'properties': {'error': {'$ref': '#/definitions/Error'},
                                                              'result': {'$ref': '#/definitions/CloudCredential'}},
                                               'type': 'object'},
                     'CloudCredentialResults': {'additionalProperties': False,
                                                'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
                                                                           'type': 'array'}},
                                                'type': 'object'},
                     'CloudDetails': {'additionalProperties': False,
                                      'properties': {'auth-types': {'items': {'type': 'string'},
                                                                    'type': 'array'},
                                                     'endpoint': {'type': 'string'},
                                                     'identity-endpoint': {'type': 'string'},
                                                     'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
                                                                 'type': 'array'},
                                                     'storage-endpoint': {'type': 'string'},
                                                     'type': {'type': 'string'}},
                                      'required': ['type'],
                                      'type': 'object'},
                     'CloudInfo': {'additionalProperties': False,
                                   'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
                                                  'users': {'items': {'$ref': '#/definitions/CloudUserInfo'},
                                                            'type': 'array'}},
                                   'required': ['CloudDetails', 'users'],
                                   'type': 'object'},
                     'CloudInfoResult': {'additionalProperties': False,
                                         'properties': {'error': {'$ref': '#/definitions/Error'},
                                                        'result': {'$ref': '#/definitions/CloudInfo'}},
                                         'type': 'object'},
                     'CloudInfoResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/CloudInfoResult'},
                                                                     'type': 'array'}},
                                          'required': ['results'],
                                          'type': 'object'},
                     'CloudInstanceTypesConstraint': {'additionalProperties': False,
                                                      'properties': {'cloud-tag': {'type': 'string'},
                                                                     'constraints': {'$ref': '#/definitions/Value'},
                                                                     'region': {'type': 'string'}},
                                                      'required': ['cloud-tag',
                                                                   'region'],
                                                      'type': 'object'},
                     'CloudInstanceTypesConstraints': {'additionalProperties': False,
                                                       'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
                                                                                      'type': 'array'}},
                                                       'required': ['constraints'],
                                                       'type': 'object'},
                     'CloudRegion': {'additionalProperties': False,
                                     'properties': {'endpoint': {'type': 'string'},
                                                    'identity-endpoint': {'type': 'string'},
                                                    'name': {'type': 'string'},
                                                    'storage-endpoint': {'type': 'string'}},
                                     'required': ['name'],
                                     'type': 'object'},
                     'CloudResult': {'additionalProperties': False,
                                     'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
                                                    'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'CloudResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
                                                                 'type': 'array'}},
                                      'type': 'object'},
                     'CloudUserInfo': {'additionalProperties': False,
                                       'properties': {'access': {'type': 'string'},
                                                      'display-name': {'type': 'string'},
                                                      'user': {'type': 'string'}},
                                       'required': ['user',
                                                    'display-name',
                                                    'access'],
                                       'type': 'object'},
                     'CloudsResult': {'additionalProperties': False,
                                      'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
                                                                'type': 'object'}},
                                      'type': 'object'},
                     'ControllerCredentialInfo': {'additionalProperties': False,
                                                  'properties': {'content': {'$ref': '#/definitions/CredentialContent'},
                                                                 'models': {'items': {'$ref': '#/definitions/ModelAccess'},
                                                                            'type': 'array'}},
                                                  'type': 'object'},
                     'CredentialContent': {'additionalProperties': False,
                                           'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                    'type': 'object'},
                                                          'auth-type': {'type': 'string'},
                                                          'cloud': {'type': 'string'},
                                                          'name': {'type': 'string'},
                                                          'valid': {'type': 'boolean'}},
                                           'required': ['name',
                                                        'cloud',
                                                        'auth-type'],
                                           'type': 'object'},
                     'CredentialContentResult': {'additionalProperties': False,
                                                 'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                'result': {'$ref': '#/definitions/ControllerCredentialInfo'}},
                                                 'type': 'object'},
                     'CredentialContentResults': {'additionalProperties': False,
                                                  'properties': {'results': {'items': {'$ref': '#/definitions/CredentialContentResult'},
                                                                             'type': 'array'}},
                                                  'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'ErrorResult': {'additionalProperties': False,
                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'ErrorResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                 'type': 'array'}},
                                      'required': ['results'],
                                      'type': 'object'},
                     'InstanceType': {'additionalProperties': False,
                                      'properties': {'arches': {'items': {'type': 'string'},
                                                                'type': 'array'},
                                                     'cost': {'type': 'integer'},
                                                     'cpu-cores': {'type': 'integer'},
                                                     'deprecated': {'type': 'boolean'},
                                                     'memory': {'type': 'integer'},
                                                     'name': {'type': 'string'},
                                                     'root-disk': {'type': 'integer'},
                                                     'virt-type': {'type': 'string'}},
                                      'required': ['arches', 'cpu-cores', 'memory'],
                                      'type': 'object'},
                     'InstanceTypesResult': {'additionalProperties': False,
                                             'properties': {'cost-currency': {'type': 'string'},
                                                            'cost-divisor': {'type': 'integer'},
                                                            'cost-unit': {'type': 'string'},
                                                            'error': {'$ref': '#/definitions/Error'},
                                                            'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
                                                                               'type': 'array'}},
                                             'type': 'object'},
                     'InstanceTypesResults': {'additionalProperties': False,
                                              'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
                                                                         'type': 'array'}},
                                              'required': ['results'],
                                              'type': 'object'},
                     'ListCloudInfo': {'additionalProperties': False,
                                       'properties': {'CloudDetails': {'$ref': '#/definitions/CloudDetails'},
                                                      'user-access': {'type': 'string'}},
                                       'required': ['CloudDetails', 'user-access'],
                                       'type': 'object'},
                     'ListCloudInfoResult': {'additionalProperties': False,
                                             'properties': {'error': {'$ref': '#/definitions/Error'},
                                                            'result': {'$ref': '#/definitions/ListCloudInfo'}},
                                             'type': 'object'},
                     'ListCloudInfoResults': {'additionalProperties': False,
                                              'properties': {'results': {'items': {'$ref': '#/definitions/ListCloudInfoResult'},
                                                                         'type': 'array'}},
                                              'required': ['results'],
                                              'type': 'object'},
                     'ListCloudsRequest': {'additionalProperties': False,
                                           'properties': {'all': {'type': 'boolean'},
                                                          'user-tag': {'type': 'string'}},
                                           'required': ['user-tag'],
                                           'type': 'object'},
                     'ModelAccess': {'additionalProperties': False,
                                     'properties': {'access': {'type': 'string'},
                                                    'model': {'type': 'string'}},
                                     'type': 'object'},
                     'ModifyCloudAccess': {'additionalProperties': False,
                                           'properties': {'access': {'type': 'string'},
                                                          'action': {'type': 'string'},
                                                          'cloud-tag': {'type': 'string'},
                                                          'user-tag': {'type': 'string'}},
                                           'required': ['user-tag',
                                                        'cloud-tag',
                                                        'action',
                                                        'access'],
                                           'type': 'object'},
                     'ModifyCloudAccessRequest': {'additionalProperties': False,
                                                  'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyCloudAccess'},
                                                                             'type': 'array'}},
                                                  'required': ['changes'],
                                                  'type': 'object'},
                     'RevokeCredentialArg': {'additionalProperties': False,
                                             'properties': {'force': {'type': 'boolean'},
                                                            'tag': {'type': 'string'}},
                                             'required': ['tag', 'force'],
                                             'type': 'object'},
                     'RevokeCredentialArgs': {'additionalProperties': False,
                                              'properties': {'credentials': {'items': {'$ref': '#/definitions/RevokeCredentialArg'},
                                                                             'type': 'array'}},
                                              'required': ['credentials'],
                                              'type': 'object'},
                     'StringsResult': {'additionalProperties': False,
                                       'properties': {'error': {'$ref': '#/definitions/Error'},
                                                      'result': {'items': {'type': 'string'},
                                                                 'type': 'array'}},
                                       'type': 'object'},
                     'StringsResults': {'additionalProperties': False,
                                        'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
                                                                   'type': 'array'}},
                                        'required': ['results'],
                                        'type': 'object'},
                     'TaggedCredential': {'additionalProperties': False,
                                          'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
                                                         'tag': {'type': 'string'}},
                                          'required': ['tag', 'credential'],
                                          'type': 'object'},
                     'TaggedCredentials': {'additionalProperties': False,
                                           'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
                                                                          'type': 'array'}},
                                           'type': 'object'},
                     'UpdateCloudArgs': {'additionalProperties': False,
                                         'properties': {'clouds': {'items': {'$ref': '#/definitions/AddCloudArgs'},
                                                                   'type': 'array'}},
                                         'required': ['clouds'],
                                         'type': 'object'},
                     'UpdateCredentialArgs': {'additionalProperties': False,
                                              'properties': {'credentials': {'items': {'$ref': '#/definitions/TaggedCredential'},
                                                                             'type': 'array'},
                                                             'force': {'type': 'boolean'}},
                                              'required': ['credentials', 'force'],
                                              'type': 'object'},
                     'UpdateCredentialModelResult': {'additionalProperties': False,
                                                     'properties': {'errors': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                               'type': 'array'},
                                                                    'name': {'type': 'string'},
                                                                    'uuid': {'type': 'string'}},
                                                     'required': ['uuid', 'name'],
                                                     'type': 'object'},
                     'UpdateCredentialResult': {'additionalProperties': False,
                                                'properties': {'error': {'$ref': '#/definitions/Error'},
                                                               'models': {'items': {'$ref': '#/definitions/UpdateCredentialModelResult'},
                                                                          'type': 'array'},
                                                               'tag': {'type': 'string'}},
                                                'required': ['tag'],
                                                'type': 'object'},
                     'UpdateCredentialResults': {'additionalProperties': False,
                                                 'properties': {'results': {'items': {'$ref': '#/definitions/UpdateCredentialResult'},
                                                                            'type': 'array'}},
                                                 'type': 'object'},
                     'UserCloud': {'additionalProperties': False,
                                   'properties': {'cloud-tag': {'type': 'string'},
                                                  'user-tag': {'type': 'string'}},
                                   'required': ['user-tag', 'cloud-tag'],
                                   'type': 'object'},
                     'UserClouds': {'additionalProperties': False,
                                    'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
                                                                   'type': 'array'}},
                                    'type': 'object'},
                     'Value': {'additionalProperties': False,
                               'properties': {'allocate-public-ip': {'type': 'boolean'},
                                              'arch': {'type': 'string'},
                                              'container': {'type': 'string'},
                                              'cores': {'type': 'integer'},
                                              'cpu-power': {'type': 'integer'},
                                              'image-id': {'type': 'string'},
                                              'instance-role': {'type': 'string'},
                                              'instance-type': {'type': 'string'},
                                              'mem': {'type': 'integer'},
                                              'root-disk': {'type': 'integer'},
                                              'root-disk-source': {'type': 'string'},
                                              'spaces': {'items': {'type': 'string'},
                                                         'type': 'array'},
                                              'tags': {'items': {'type': 'string'},
                                                       'type': 'array'},
                                              'virt-type': {'type': 'string'},
                                              'zones': {'items': {'type': 'string'},
                                                        'type': 'array'}},
                               'type': 'object'}},
     'properties': {'AddCloud': {'description': 'AddCloud adds a new cloud, '
                                                'different from the one managed by '
                                                'the controller.',
                                 'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
                                 'type': 'object'},
                    'AddCredentials': {'description': 'AddCredentials adds new '
                                                      'credentials.\n'
                                                      'In contrast to '
                                                      'UpdateCredentials() below, '
                                                      'the new credentials can be\n'
                                                      'for a cloud that the '
                                                      'controller does not manage '
                                                      '(this is required\n'
                                                      'for CAAS models)',
                                       'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                      'Result': {'$ref': '#/definitions/ErrorResults'}},
                                       'type': 'object'},
                    'CheckCredentialsModels': {'description': 'CheckCredentialsModels '
                                                              'validates supplied '
                                                              "cloud credentials' "
                                                              'content against\n'
                                                              'models that '
                                                              'currently use these '
                                                              'credentials.\n'
                                                              'If there are any '
                                                              'models that are '
                                                              'using a credential '
                                                              'and these models or '
                                                              'their\n'
                                                              'cloud instances are '
                                                              'not going to be '
                                                              'accessible with '
                                                              'corresponding '
                                                              'credential,\n'
                                                              'there will be '
                                                              'detailed validation '
                                                              'errors per model.\n'
                                                              "There's no Juju API "
                                                              'client which uses '
                                                              'this, but JAAS '
                                                              'does,',
                                               'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                              'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                               'type': 'object'},
                    'Cloud': {'description': 'Cloud returns the cloud definitions '
                                             'for the specified clouds.',
                              'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                             'Result': {'$ref': '#/definitions/CloudResults'}},
                              'type': 'object'},
                    'CloudInfo': {'description': 'CloudInfo returns information '
                                                 'about the specified clouds.',
                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                 'Result': {'$ref': '#/definitions/CloudInfoResults'}},
                                  'type': 'object'},
                    'Clouds': {'description': 'Clouds returns the definitions of '
                                              'all clouds supported by the '
                                              'controller\n'
                                              'that the logged in user can see.',
                               'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
                               'type': 'object'},
                    'Credential': {'description': 'Credential returns the '
                                                  'specified cloud credential for '
                                                  'each tag, minus secrets.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
                                   'type': 'object'},
                    'CredentialContents': {'description': 'CredentialContents '
                                                          'returns the specified '
                                                          'cloud credentials,\n'
                                                          'including the secrets '
                                                          'if requested.\n'
                                                          'If no specific '
                                                          'credential name/cloud '
                                                          'was passed in, all '
                                                          'credentials for this '
                                                          'user\n'
                                                          'are returned.\n'
                                                          'Only credential owner '
                                                          'can see its contents as '
                                                          'well as what models use '
                                                          'it.\n'
                                                          'Controller admin has no '
                                                          'special superpowers '
                                                          'here and is treated the '
                                                          'same as all other '
                                                          'users.',
                                           'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'},
                                                          'Result': {'$ref': '#/definitions/CredentialContentResults'}},
                                           'type': 'object'},
                    'InstanceTypes': {'description': 'InstanceTypes returns '
                                                     'instance type information '
                                                     'for the cloud and region\n'
                                                     'in which the current model '
                                                     'is deployed.',
                                      'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
                                      'type': 'object'},
                    'ListCloudInfo': {'description': 'ListCloudInfo returns clouds '
                                                     'that the specified user has '
                                                     'access to.\n'
                                                     'Controller admins '
                                                     '(superuser) can list clouds '
                                                     'for any user.\n'
                                                     'Other users can only ask '
                                                     'about their own clouds.',
                                      'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'},
                                                     'Result': {'$ref': '#/definitions/ListCloudInfoResults'}},
                                      'type': 'object'},
                    'ModifyCloudAccess': {'description': 'ModifyCloudAccess '
                                                         'changes the model access '
                                                         'granted to users.',
                                          'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'},
                                                         'Result': {'$ref': '#/definitions/ErrorResults'}},
                                          'type': 'object'},
                    'RemoveClouds': {'description': 'RemoveClouds removes the '
                                                    'specified clouds from the '
                                                    'controller.\n'
                                                    'If a cloud is in use (has '
                                                    'models deployed to it), the '
                                                    'removal will fail.',
                                     'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                     'type': 'object'},
                    'RevokeCredentialsCheckModels': {'description': 'RevokeCredentialsCheckModels '
                                                                    'revokes a set '
                                                                    'of cloud '
                                                                    'credentials.\n'
                                                                    'If the '
                                                                    'credentials '
                                                                    'are used by '
                                                                    'any of the '
                                                                    'models, the '
                                                                    'credential '
                                                                    'deletion will '
                                                                    'be aborted.\n'
                                                                    'If '
                                                                    'credential-in-use '
                                                                    'needs to be '
                                                                    'revoked '
                                                                    'nonetheless, '
                                                                    'this method '
                                                                    'allows the '
                                                                    'use of force.',
                                                     'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                                     'type': 'object'},
                    'UpdateCloud': {'description': 'UpdateCloud updates an '
                                                   'existing cloud that the '
                                                   'controller knows about.',
                                    'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'},
                                                   'Result': {'$ref': '#/definitions/ErrorResults'}},
                                    'type': 'object'},
                    'UpdateCredentialsCheckModels': {'description': 'UpdateCredentialsCheckModels '
                                                                    'updates a set '
                                                                    'of cloud '
                                                                    "credentials' "
                                                                    'content.\n'
                                                                    'If there are '
                                                                    'any models '
                                                                    'that are '
                                                                    'using a '
                                                                    'credential '
                                                                    'and these '
                                                                    'models\n'
                                                                    'are not going '
                                                                    'to be visible '
                                                                    'with updated '
                                                                    'credential '
                                                                    'content,\n'
                                                                    'there will be '
                                                                    'detailed '
                                                                    'validation '
                                                                    'errors per '
                                                                    'model.  Such '
                                                                    'model errors '
                                                                    'are returned\n'
                                                                    'separately '
                                                                    'and do not '
                                                                    'contribute to '
                                                                    'the overall '
                                                                    'method error '
                                                                    'status.\n'
                                                                    'Controller '
                                                                    'admins can '
                                                                    "'force' an "
                                                                    'update of the '
                                                                    'credential\n'
                                                                    'regardless of '
                                                                    'whether it is '
                                                                    'deemed valid '
                                                                    'or not.',
                                                     'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                                     'type': 'object'},
                    'UserCredentials': {'description': 'UserCredentials returns '
                                                       'the cloud credentials for '
                                                       'a set of users.',
                                        'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
                                                       'Result': {'$ref': '#/definitions/StringsResults'}},
                                        'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(None)
    async def AddCloud(self, cloud=None, force=None, name=None):
        '''
        AddCloud adds a new cloud, different from the one managed by the controller.

        cloud : Cloud
        force : bool
        name : str
        Returns -> None
        '''
        if cloud is not None and not isinstance(cloud, (dict, Cloud)):
            raise Exception("Expected cloud to be a Cloud, received: {}".format(type(cloud)))

        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

        if name is not None and not isinstance(name, (bytes, str)):
            raise Exception("Expected name to be a str, received: {}".format(type(name)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='AddCloud',
                   version=7,
                   params=_params)
        _params['cloud'] = cloud
        _params['force'] = force
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def AddCredentials(self, credentials=None):
        '''
        AddCredentials adds new credentials.
        In contrast to UpdateCredentials() below, the new credentials can be
        for a cloud that the controller does not manage (this is required
        for CAAS models)

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> ErrorResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='AddCredentials',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        '''
        CheckCredentialsModels validates supplied cloud credentials' content against
        models that currently use these credentials.
        If there are any models that are using a credential and these models or their
        cloud instances are not going to be accessible with corresponding credential,
        there will be detailed validation errors per model.
        There's no Juju API client which uses this, but JAAS does,

        credentials : typing.Sequence[~TaggedCredential]
        Returns -> UpdateCredentialResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CheckCredentialsModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        '''
        Cloud returns the cloud definitions for the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Cloud',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        '''
        CloudInfo returns information about the specified clouds.

        entities : typing.Sequence[~Entity]
        Returns -> CloudInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CloudInfo',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        '''
        Clouds returns the definitions of all clouds supported by the controller
        that the logged in user can see.


        Returns -> CloudsResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Clouds',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        '''
        Credential returns the specified cloud credential for each tag, minus secrets.

        entities : typing.Sequence[~Entity]
        Returns -> CloudCredentialResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='Credential',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        '''
        CredentialContents returns the specified cloud credentials,
        including the secrets if requested.
        If no specific credential name/cloud was passed in, all credentials for this user
        are returned.
        Only credential owner can see its contents as well as what models use it.
        Controller admin has no special superpowers here and is treated the same as all other users.

        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> CredentialContentResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        if include_secrets is not None and not isinstance(include_secrets, bool):
            raise Exception("Expected include_secrets to be a bool, received: {}".format(type(include_secrets)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='CredentialContents',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        _params['include-secrets'] = include_secrets
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        '''
        InstanceTypes returns instance type information for the cloud and region
        in which the current model is deployed.

        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> InstanceTypesResults
        '''
        if constraints is not None and not isinstance(constraints, (bytes, str, list)):
            raise Exception("Expected constraints to be a Sequence, received: {}".format(type(constraints)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='InstanceTypes',
                   version=7,
                   params=_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        '''
        ListCloudInfo returns clouds that the specified user has access to.
        Controller admins (superuser) can list clouds for any user.
        Other users can only ask about their own clouds.

        all_ : bool
        user_tag : str
        Returns -> ListCloudInfoResults
        '''
        if all_ is not None and not isinstance(all_, bool):
            raise Exception("Expected all_ to be a bool, received: {}".format(type(all_)))

        if user_tag is not None and not isinstance(user_tag, (bytes, str)):
            raise Exception("Expected user_tag to be a str, received: {}".format(type(user_tag)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='ListCloudInfo',
                   version=7,
                   params=_params)
        _params['all'] = all_
        _params['user-tag'] = user_tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def ModifyCloudAccess(self, changes=None):
        '''
        ModifyCloudAccess changes the model access granted to users.

        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> ErrorResults
        '''
        if changes is not None and not isinstance(changes, (bytes, str, list)):
            raise Exception("Expected changes to be a Sequence, received: {}".format(type(changes)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='ModifyCloudAccess',
                   version=7,
                   params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        '''
        RemoveClouds removes the specified clouds from the controller.
        If a cloud is in use (has models deployed to it), the removal will fail.

        entities : typing.Sequence[~Entity]
        Returns -> ErrorResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='RemoveClouds',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        '''
        RevokeCredentialsCheckModels revokes a set of cloud credentials.
        If the credentials are used by any of the models, the credential deletion will be aborted.
        If credential-in-use needs to be revoked nonetheless, this method allows the use of force.

        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> ErrorResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='RevokeCredentialsCheckModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        '''
        UpdateCloud updates an existing cloud that the controller knows about.

        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> ErrorResults
        '''
        if clouds is not None and not isinstance(clouds, (bytes, str, list)):
            raise Exception("Expected clouds to be a Sequence, received: {}".format(type(clouds)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UpdateCloud',
                   version=7,
                   params=_params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        '''
        UpdateCredentialsCheckModels updates a set of cloud credentials' content.
        If there are any models that are using a credential and these models
        are not going to be visible with updated credential content,
        there will be detailed validation errors per model.  Such model errors are returned
        separately and do not contribute to the overall method error status.
        Controller admins can 'force' an update of the credential
        regardless of whether it is deemed valid or not.

        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> UpdateCredentialResults
        '''
        if credentials is not None and not isinstance(credentials, (bytes, str, list)):
            raise Exception("Expected credentials to be a Sequence, received: {}".format(type(credentials)))

        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UpdateCredentialsCheckModels',
                   version=7,
                   params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        '''
        UserCredentials returns the cloud credentials for a set of users.

        user_clouds : typing.Sequence[~UserCloud]
        Returns -> StringsResults
        '''
        if user_clouds is not None and not isinstance(user_clouds, (bytes, str, list)):
            raise Exception("Expected user_clouds to be a Sequence, received: {}".format(type(user_clouds)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='UserCredentials',
                   version=7,
                   params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply



class FirewallerFacade(Type):
    name = 'Firewaller'
    version = 7
    schema =     {'definitions': {'BoolResult': {'additionalProperties': False,
                                    'properties': {'error': {'$ref': '#/definitions/Error'},
                                                   'result': {'type': 'boolean'}},
                                    'required': ['result'],
                                    'type': 'object'},
                     'BoolResults': {'additionalProperties': False,
                                     'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
                                                                'type': 'array'}},
                                     'required': ['results'],
                                     'type': 'object'},
                     'CloudCredential': {'additionalProperties': False,
                                         'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
                                                                  'type': 'object'},
                                                        'auth-type': {'type': 'string'},
                                                        'redacted': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                         'required': ['auth-type'],
                                         'type': 'object'},
                     'CloudSpec': {'additionalProperties': False,
                                   'properties': {'cacertificates': {'items': {'type': 'string'},
                                                                     'type': 'array'},
                                                  'credential': {'$ref': '#/definitions/CloudCredential'},
                                                  'endpoint': {'type': 'string'},
                                                  'identity-endpoint': {'type': 'string'},
                                                  'is-controller-cloud': {'type': 'boolean'},
                                                  'name': {'type': 'string'},
                                                  'region': {'type': 'string'},
                                                  'skip-tls-verify': {'type': 'boolean'},
                                                  'storage-endpoint': {'type': 'string'},
                                                  'type': {'type': 'string'}},
                                   'required': ['type', 'name'],
                                   'type': 'object'},
                     'CloudSpecResult': {'additionalProperties': False,
                                         'properties': {'error': {'$ref': '#/definitions/Error'},
                                                        'result': {'$ref': '#/definitions/CloudSpec'}},
                                         'type': 'object'},
                     'CloudSpecResults': {'additionalProperties': False,
                                          'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
                                                                     'type': 'array'}},
                                          'type': 'object'},
                     'ControllerAPIInfoResult': {'additionalProperties': False,
                                                 'properties': {'addresses': {'items': {'type': 'string'},
                                                                              'type': 'array'},
                                                                'cacert': {'type': 'string'},
                                                                'error': {'$ref': '#/definitions/Error'}},
                                                 'required': ['addresses',
                                                              'cacert'],
                                                 'type': 'object'},
                     'ControllerAPIInfoResults': {'additionalProperties': False,
                                                  'properties': {'results': {'items': {'$ref': '#/definitions/ControllerAPIInfoResult'},
                                                                             'type': 'array'}},
                                                  'required': ['results'],
                                                  'type': 'object'},
                     'ControllerConfigResult': {'additionalProperties': False,
                                                'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                       'type': 'object'}},
                                                                          'type': 'object'}},
                                                'required': ['config'],
                                                'type': 'object'},
                     'Entities': {'additionalProperties': False,
                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
                                                              'type': 'array'}},
                                  'required': ['entities'],
                                  'type': 'object'},
                     'Entity': {'additionalProperties': False,
                                'properties': {'tag': {'type': 'string'}},
                                'required': ['tag'],
                                'type': 'object'},
                     'EntityStatusArgs': {'additionalProperties': False,
                                          'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                               'type': 'object'}},
                                                                  'type': 'object'},
                                                         'info': {'type': 'string'},
                                                         'status': {'type': 'string'},
                                                         'tag': {'type': 'string'}},
                                          'required': ['tag',
                                                       'status',
                                                       'info',
                                                       'data'],
                                          'type': 'object'},
                     'Error': {'additionalProperties': False,
                               'properties': {'code': {'type': 'string'},
                                              'info': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                    'type': 'object'}},
                                                       'type': 'object'},
                                              'message': {'type': 'string'}},
                               'required': ['message', 'code'],
                               'type': 'object'},
                     'ErrorResult': {'additionalProperties': False,
                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
                                     'type': 'object'},
                     'ErrorResults': {'additionalProperties': False,
                                      'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
                                                                 'type': 'array'}},
                                      'required': ['results'],
                                      'type': 'object'},
                     'ExposeInfoResult': {'additionalProperties': False,
                                          'properties': {'error': {'$ref': '#/definitions/Error'},
                                                         'exposed': {'type': 'boolean'},
                                                         'exposed-endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/ExposedEndpoint'}},
                                                                               'type': 'object'}},
                                          'type': 'object'},
                     'ExposeInfoResults': {'additionalProperties': False,
                                           'properties': {'results': {'items': {'$ref': '#/definitions/ExposeInfoResult'},
                                                                      'type': 'array'}},
                                           'required': ['results'],
                                           'type': 'object'},
                     'ExposedEndpoint': {'additionalProperties': False,
                                         'properties': {'expose-to-cidrs': {'items': {'type': 'string'},
                                                                            'type': 'array'},
                                                        'expose-to-spaces': {'items': {'type': 'string'},
                                                                             'type': 'array'}},
                                         'type': 'object'},
                     'FanConfigEntry': {'additionalProperties': False,
                                        'properties': {'overlay': {'type': 'string'},
                                                       'underlay': {'type': 'string'}},
                                        'required': ['underlay', 'overlay'],
                                        'type': 'object'},
                     'IngressRule': {'additionalProperties': False,
                                     'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
                                                    'source-cidrs': {'items': {'type': 'string'},
                                                                     'type': 'array'}},
                                     'required': ['port-range', 'source-cidrs'],
                                     'type': 'object'},
                     'IngressRulesResult': {'additionalProperties': False,
                                            'properties': {'error': {'$ref': '#/definitions/Error'},
                                                           'rules': {'items': {'$ref': '#/definitions/IngressRule'},
                                                                     'type': 'array'}},
                                            'required': ['rules'],
                                            'type': 'object'},
                     'LifeResult': {'additionalProperties': False,
                                    'properties': {'error': {'$ref': '#/definitions/Error'},
                                                   'life': {'type': 'string'}},
                                    'required': ['life'],
                                    'type': 'object'},
                     'LifeResults': {'additionalProperties': False,
                                     'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
                                                                'type': 'array'}},
                                     'required': ['results'],
                                     'type': 'object'},
                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
                     'MacaroonResult': {'additionalProperties': False,
                                        'properties': {'error': {'$ref': '#/definitions/Error'},
                                                       'result': {'$ref': '#/definitions/Macaroon'}},
                                        'type': 'object'},
                     'MacaroonResults': {'additionalProperties': False,
                                         'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
                                                                    'type': 'array'}},
                                         'required': ['results'],
                                         'type': 'object'},
                     'ModelConfigResult': {'additionalProperties': False,
                                           'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                  'type': 'object'}},
                                                                     'type': 'object'}},
                                           'required': ['config'],
                                           'type': 'object'},
                     'ModelTag': {'additionalProperties': False, 'type': 'object'},
                     'NotifyWatchResult': {'additionalProperties': False,
                                           'properties': {'NotifyWatcherId': {'type': 'string'},
                                                          'error': {'$ref': '#/definitions/Error'}},
                                           'required': ['NotifyWatcherId'],
                                           'type': 'object'},
                     'NotifyWatchResults': {'additionalProperties': False,
                                            'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
                                                                       'type': 'array'}},
                                            'required': ['results'],
                                            'type': 'object'},
                     'OpenMachinePortRangesResult': {'additionalProperties': False,
                                                     'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                    'unit-port-ranges': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/OpenUnitPortRanges'},
                                                                                                                      'type': 'array'}},
                                                                                         'type': 'object'}},
                                                     'required': ['unit-port-ranges'],
                                                     'type': 'object'},
                     'OpenMachinePortRangesResults': {'additionalProperties': False,
                                                      'properties': {'results': {'items': {'$ref': '#/definitions/OpenMachinePortRangesResult'},
                                                                                 'type': 'array'}},
                                                      'required': ['results'],
                                                      'type': 'object'},
                     'OpenUnitPortRanges': {'additionalProperties': False,
                                            'properties': {'endpoint': {'type': 'string'},
                                                           'port-ranges': {'items': {'$ref': '#/definitions/PortRange'},
                                                                           'type': 'array'},
                                                           'subnet-cidrs': {'items': {'type': 'string'},
                                                                            'type': 'array'}},
                                            'required': ['endpoint',
                                                         'port-ranges',
                                                         'subnet-cidrs'],
                                            'type': 'object'},
                     'PortRange': {'additionalProperties': False,
                                   'properties': {'from-port': {'type': 'integer'},
                                                  'protocol': {'type': 'string'},
                                                  'to-port': {'type': 'integer'}},
                                   'required': ['from-port', 'to-port', 'protocol'],
                                   'type': 'object'},
                     'SetStatus': {'additionalProperties': False,
                                   'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
                                                               'type': 'array'}},
                                   'required': ['entities'],
                                   'type': 'object'},
                     'SpaceInfo': {'additionalProperties': False,
                                   'properties': {'id': {'type': 'string'},
                                                  'name': {'type': 'string'},
                                                  'provider-id': {'type': 'string'},
                                                  'subnets': {'items': {'$ref': '#/definitions/SubnetV3'},
                                                              'type': 'array'}},
                                   'required': ['id', 'name'],
                                   'type': 'object'},
                     'SpaceInfos': {'additionalProperties': False,
                                    'properties': {'space-infos': {'items': {'$ref': '#/definitions/SpaceInfo'},
                                                                   'type': 'array'}},
                                    'type': 'object'},
                     'SpaceInfosParams': {'additionalProperties': False,
                                          'properties': {'space-ids': {'items': {'type': 'string'},
                                                                       'type': 'array'}},
                                          'type': 'object'},
                     'StringResult': {'additionalProperties': False,
                                      'properties': {'error': {'$ref': '#/definitions/Error'},
                                                     'result': {'type': 'string'}},
                                      'required': ['result'],
                                      'type': 'object'},
                     'StringResults': {'additionalProperties': False,
                                       'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
                                                                  'type': 'array'}},
                                       'required': ['results'],
                                       'type': 'object'},
                     'StringsWatchResult': {'additionalProperties': False,
                                            'properties': {'changes': {'items': {'type': 'string'},
                                                                       'type': 'array'},
                                                           'error': {'$ref': '#/definitions/Error'},
                                                           'watcher-id': {'type': 'string'}},
                                            'required': ['watcher-id'],
                                            'type': 'object'},
                     'StringsWatchResults': {'additionalProperties': False,
                                             'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
                                                                        'type': 'array'}},
                                             'required': ['results'],
                                             'type': 'object'},
                     'Subnet': {'additionalProperties': False,
                                'properties': {'cidr': {'type': 'string'},
                                               'life': {'type': 'string'},
                                               'provider-id': {'type': 'string'},
                                               'provider-network-id': {'type': 'string'},
                                               'provider-space-id': {'type': 'string'},
                                               'space-tag': {'type': 'string'},
                                               'status': {'type': 'string'},
                                               'vlan-tag': {'type': 'integer'},
                                               'zones': {'items': {'type': 'string'},
                                                         'type': 'array'}},
                                'required': ['cidr',
                                             'vlan-tag',
                                             'life',
                                             'space-tag',
                                             'zones'],
                                'type': 'object'},
                     'SubnetV2': {'additionalProperties': False,
                                  'properties': {'Subnet': {'$ref': '#/definitions/Subnet'},
                                                 'cidr': {'type': 'string'},
                                                 'id': {'type': 'string'},
                                                 'life': {'type': 'string'},
                                                 'provider-id': {'type': 'string'},
                                                 'provider-network-id': {'type': 'string'},
                                                 'provider-space-id': {'type': 'string'},
                                                 'space-tag': {'type': 'string'},
                                                 'status': {'type': 'string'},
                                                 'vlan-tag': {'type': 'integer'},
                                                 'zones': {'items': {'type': 'string'},
                                                           'type': 'array'}},
                                  'required': ['cidr',
                                               'vlan-tag',
                                               'life',
                                               'space-tag',
                                               'zones',
                                               'Subnet'],
                                  'type': 'object'},
                     'SubnetV3': {'additionalProperties': False,
                                  'properties': {'Subnet': {'$ref': '#/definitions/Subnet'},
                                                 'SubnetV2': {'$ref': '#/definitions/SubnetV2'},
                                                 'cidr': {'type': 'string'},
                                                 'fan-info': {'$ref': '#/definitions/FanConfigEntry'},
                                                 'id': {'type': 'string'},
                                                 'is-public': {'type': 'boolean'},
                                                 'life': {'type': 'string'},
                                                 'provider-id': {'type': 'string'},
                                                 'provider-network-id': {'type': 'string'},
                                                 'provider-space-id': {'type': 'string'},
                                                 'space-id': {'type': 'string'},
                                                 'space-tag': {'type': 'string'},
                                                 'status': {'type': 'string'},
                                                 'vlan-tag': {'type': 'integer'},
                                                 'zones': {'items': {'type': 'string'},
                                                           'type': 'array'}},
                                  'required': ['cidr',
                                               'vlan-tag',
                                               'life',
                                               'space-tag',
                                               'zones',
                                               'Subnet',
                                               'SubnetV2',
                                               'space-id'],
                                  'type': 'object'}},
     'properties': {'AreManuallyProvisioned': {'description': 'AreManuallyProvisioned '
                                                              'returns whether '
                                                              'each given entity '
                                                              'is\n'
                                                              'manually '
                                                              'provisioned or not. '
                                                              'Only machine tags '
                                                              'are accepted.',
                                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                              'Result': {'$ref': '#/definitions/BoolResults'}},
                                               'type': 'object'},
                    'CloudSpec': {'description': "CloudSpec returns the model's "
                                                 'cloud spec.',
                                  'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
                                  'type': 'object'},
                    'ControllerAPIInfoForModels': {'description': 'ControllerAPIInfoForModels '
                                                                  'returns the '
                                                                  'controller api '
                                                                  'connection '
                                                                  'details for the '
                                                                  'specified '
                                                                  'models.',
                                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                  'Result': {'$ref': '#/definitions/ControllerAPIInfoResults'}},
                                                   'type': 'object'},
                    'ControllerConfig': {'description': 'ControllerConfig returns '
                                                        "the controller's "
                                                        'configuration.',
                                         'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
                                         'type': 'object'},
                    'GetAssignedMachine': {'description': 'GetAssignedMachine '
                                                          'returns the assigned '
                                                          'machine tag (if any) '
                                                          'for\n'
                                                          'each given unit.',
                                           'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                          'Result': {'$ref': '#/definitions/StringResults'}},
                                           'type': 'object'},
                    'GetCloudSpec': {'description': 'GetCloudSpec constructs the '
                                                    'CloudSpec for a validated and '
                                                    'authorized model.',
                                     'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
                                                    'Result': {'$ref': '#/definitions/CloudSpecResult'}},
                                     'type': 'object'},
                    'GetExposeInfo': {'description': 'GetExposeInfo returns the '
                                                     'expose flag and per-endpoint '
                                                     'expose settings\n'
                                                     'for the specified '
                                                     'applications.',
                                      'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                     'Result': {'$ref': '#/definitions/ExposeInfoResults'}},
                                      'type': 'object'},
                    'InstanceId': {'description': 'InstanceId returns the provider '
                                                  'specific instance id for each '
                                                  'given\n'
                                                  'machine or an '
                                                  'CodeNotProvisioned error, if '
                                                  'not set.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/StringResults'}},
                                   'type': 'object'},
                    'Life': {'description': 'Life returns the life status of every '
                                            'supplied entity, where available.',
                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                            'Result': {'$ref': '#/definitions/LifeResults'}},
                             'type': 'object'},
                    'MacaroonForRelations': {'description': 'MacaroonForRelations '
                                                            'returns the macaroon '
                                                            'for the specified '
                                                            'relations.',
                                             'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                            'Result': {'$ref': '#/definitions/MacaroonResults'}},
                                             'type': 'object'},
                    'ModelConfig': {'description': 'ModelConfig returns the '
                                                   "current model's configuration.",
                                    'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
                                    'type': 'object'},
                    'ModelFirewallRules': {'description': 'ModelFirewallRules '
                                                          'returns the firewall '
                                                          'rules that this model '
                                                          'is\n'
                                                          'configured to open',
                                           'properties': {'Result': {'$ref': '#/definitions/IngressRulesResult'}},
                                           'type': 'object'},
                    'OpenedMachinePortRanges': {'description': 'OpenedMachinePortRanges '
                                                               'returns a list of '
                                                               'the opened port '
                                                               'ranges for the\n'
                                                               'specified machines '
                                                               'where each result '
                                                               'is broken down by '
                                                               'unit. The list of\n'
                                                               'opened ports for '
                                                               'each unit is '
                                                               'further grouped by '
                                                               'endpoint name and '
                                                               'includes\n'
                                                               'the subnet CIDRs '
                                                               'that belong to the '
                                                               'space that each '
                                                               'endpoint is bound '
                                                               'to.',
                                                'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                               'Result': {'$ref': '#/definitions/OpenMachinePortRangesResults'}},
                                                'type': 'object'},
                    'SetRelationsStatus': {'description': 'SetRelationsStatus sets '
                                                          'the status for the '
                                                          'specified relations.',
                                           'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
                                                          'Result': {'$ref': '#/definitions/ErrorResults'}},
                                           'type': 'object'},
                    'SpaceInfos': {'description': 'SpaceInfos returns a '
                                                  'comprehensive representation of '
                                                  'either all spaces or\n'
                                                  'a filtered subset of the known '
                                                  'spaces and their associated '
                                                  'subnet details.',
                                   'properties': {'Params': {'$ref': '#/definitions/SpaceInfosParams'},
                                                  'Result': {'$ref': '#/definitions/SpaceInfos'}},
                                   'type': 'object'},
                    'Watch': {'description': 'Watch starts an NotifyWatcher for '
                                             'each given entity.',
                              'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                             'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                              'type': 'object'},
                    'WatchCloudSpecsChanges': {'description': 'WatchCloudSpecsChanges '
                                                              'returns a watcher '
                                                              'for cloud spec '
                                                              'changes.',
                                               'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                              'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                                               'type': 'object'},
                    'WatchEgressAddressesForRelations': {'description': 'WatchEgressAddressesForRelations '
                                                                        'creates a '
                                                                        'watcher '
                                                                        'that '
                                                                        'notifies '
                                                                        'when '
                                                                        'addresses, '
                                                                        'from '
                                                                        'which\n'
                                                                        'connections '
                                                                        'will '
                                                                        'originate '
                                                                        'for the '
                                                                        'relation, '
                                                                        'change.\n'
                                                                        'Each '
                                                                        'event '
                                                                        'contains '
                                                                        'the '
                                                                        'entire '
                                                                        'set of '
                                                                        'addresses '
                                                                        'which are '
                                                                        'required '
                                                                        'for '
                                                                        'ingress '
                                                                        'for the '
                                                                        'relation.',
                                                         'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                        'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                                         'type': 'object'},
                    'WatchForModelConfigChanges': {'description': 'WatchForModelConfigChanges '
                                                                  'returns a '
                                                                  'NotifyWatcher '
                                                                  'that observes\n'
                                                                  'changes to the '
                                                                  'model '
                                                                  'configuration.\n'
                                                                  'Note that '
                                                                  'although the '
                                                                  'NotifyWatchResult '
                                                                  'contains an '
                                                                  'Error field,\n'
                                                                  "it's not used "
                                                                  'because we are '
                                                                  'only returning '
                                                                  'a single '
                                                                  'watcher,\n'
                                                                  'so we use the '
                                                                  'regular error '
                                                                  'return.',
                                                   'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
                                                   'type': 'object'},
                    'WatchIngressAddressesForRelations': {'description': 'WatchIngressAddressesForRelations '
                                                                         'creates '
                                                                         'a '
                                                                         'watcher '
                                                                         'that '
                                                                         'returns '
                                                                         'the '
                                                                         'ingress '
                                                                         'networks\n'
                                                                         'that '
                                                                         'have '
                                                                         'been '
                                                                         'recorded '
                                                                         'against '
                                                                         'the '
                                                                         'specified '
                                                                         'relations.',
                                                          'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                         'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                                          'type': 'object'},
                    'WatchModelFirewallRules': {'description': 'WatchModelFirewallRules '
                                                               'returns a '
                                                               'NotifyWatcher that '
                                                               'notifies of\n'
                                                               'potential changes '
                                                               "to a model's "
                                                               'configured '
                                                               'firewall rules',
                                                'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
                                                'type': 'object'},
                    'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes '
                                                                   'watches the '
                                                                   'non-container '
                                                                   'machines in '
                                                                   'the model\n'
                                                                   'for changes to '
                                                                   'the Life or '
                                                                   'AgentStartTime '
                                                                   'fields and '
                                                                   'reports them '
                                                                   'as a batch.',
                                                    'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                                    'type': 'object'},
                    'WatchModelMachines': {'description': 'WatchModelMachines '
                                                          'returns a '
                                                          'StringsWatcher that '
                                                          'notifies of\n'
                                                          'changes to the life '
                                                          'cycles of the top level '
                                                          'machines in the '
                                                          'current\n'
                                                          'model.',
                                           'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                           'type': 'object'},
                    'WatchOpenedPorts': {'description': 'WatchOpenedPorts returns '
                                                        'a new StringsWatcher for '
                                                        'each given\n'
                                                        'model tag.',
                                         'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                        'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                         'type': 'object'},
                    'WatchSubnets': {'description': 'WatchSubnets returns a new '
                                                    'StringsWatcher that watches '
                                                    'the specified\n'
                                                    'subnet tags or all tags if no '
                                                    'entities are specified.',
                                     'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                    'Result': {'$ref': '#/definitions/StringsWatchResult'}},
                                     'type': 'object'},
                    'WatchUnits': {'description': 'WatchUnits starts a '
                                                  'StringsWatcher to watch all '
                                                  'units belonging to\n'
                                                  'to any entity (machine or '
                                                  'service) passed in args.',
                                   'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/StringsWatchResults'}},
                                   'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(BoolResults)
    async def AreManuallyProvisioned(self, entities=None):
        '''
        AreManuallyProvisioned returns whether each given entity is
        manually provisioned or not. Only machine tags are accepted.

        entities : typing.Sequence[~Entity]
        Returns -> BoolResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='AreManuallyProvisioned',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudSpecResults)
    async def CloudSpec(self, entities=None):
        '''
        CloudSpec returns the model's cloud spec.

        entities : typing.Sequence[~Entity]
        Returns -> CloudSpecResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='CloudSpec',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ControllerAPIInfoResults)
    async def ControllerAPIInfoForModels(self, entities=None):
        '''
        ControllerAPIInfoForModels returns the controller api connection details for the specified models.

        entities : typing.Sequence[~Entity]
        Returns -> ControllerAPIInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ControllerAPIInfoForModels',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ControllerConfigResult)
    async def ControllerConfig(self):
        '''
        ControllerConfig returns the controller's configuration.


        Returns -> ControllerConfigResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ControllerConfig',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringResults)
    async def GetAssignedMachine(self, entities=None):
        '''
        GetAssignedMachine returns the assigned machine tag (if any) for
        each given unit.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetAssignedMachine',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudSpecResult)
    async def GetCloudSpec(self):
        '''
        GetCloudSpec constructs the CloudSpec for a validated and authorized model.


        Returns -> CloudSpecResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetCloudSpec',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ExposeInfoResults)
    async def GetExposeInfo(self, entities=None):
        '''
        GetExposeInfo returns the expose flag and per-endpoint expose settings
        for the specified applications.

        entities : typing.Sequence[~Entity]
        Returns -> ExposeInfoResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='GetExposeInfo',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringResults)
    async def InstanceId(self, entities=None):
        '''
        InstanceId returns the provider specific instance id for each given
        machine or an CodeNotProvisioned error, if not set.

        entities : typing.Sequence[~Entity]
        Returns -> StringResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='InstanceId',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(LifeResults)
    async def Life(self, entities=None):
        '''
        Life returns the life status of every supplied entity, where available.

        entities : typing.Sequence[~Entity]
        Returns -> LifeResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='Life',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(MacaroonResults)
    async def MacaroonForRelations(self, entities=None):
        '''
        MacaroonForRelations returns the macaroon for the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> MacaroonResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='MacaroonForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ModelConfigResult)
    async def ModelConfig(self):
        '''
        ModelConfig returns the current model's configuration.


        Returns -> ModelConfigResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ModelConfig',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(IngressRulesResult)
    async def ModelFirewallRules(self):
        '''
        ModelFirewallRules returns the firewall rules that this model is
        configured to open


        Returns -> IngressRulesResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='ModelFirewallRules',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(OpenMachinePortRangesResults)
    async def OpenedMachinePortRanges(self, entities=None):
        '''
        OpenedMachinePortRanges returns a list of the opened port ranges for the
        specified machines where each result is broken down by unit. The list of
        opened ports for each unit is further grouped by endpoint name and includes
        the subnet CIDRs that belong to the space that each endpoint is bound to.

        entities : typing.Sequence[~Entity]
        Returns -> OpenMachinePortRangesResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='OpenedMachinePortRanges',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def SetRelationsStatus(self, entities=None):
        '''
        SetRelationsStatus sets the status for the specified relations.

        entities : typing.Sequence[~EntityStatusArgs]
        Returns -> ErrorResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='SetRelationsStatus',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(SpaceInfos)
    async def SpaceInfos(self, space_ids=None):
        '''
        SpaceInfos returns a comprehensive representation of either all spaces or
        a filtered subset of the known spaces and their associated subnet details.

        space_ids : typing.Sequence[str]
        Returns -> SpaceInfos
        '''
        if space_ids is not None and not isinstance(space_ids, (bytes, str, list)):
            raise Exception("Expected space_ids to be a Sequence, received: {}".format(type(space_ids)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='SpaceInfos',
                   version=7,
                   params=_params)
        _params['space-ids'] = space_ids
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def Watch(self, entities=None):
        '''
        Watch starts an NotifyWatcher for each given entity.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='Watch',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def WatchCloudSpecsChanges(self, entities=None):
        '''
        WatchCloudSpecsChanges returns a watcher for cloud spec changes.

        entities : typing.Sequence[~Entity]
        Returns -> NotifyWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchCloudSpecsChanges',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchEgressAddressesForRelations(self, entities=None):
        '''
        WatchEgressAddressesForRelations creates a watcher that notifies when addresses, from which
        connections will originate for the relation, change.
        Each event contains the entire set of addresses which are required for ingress for the relation.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchEgressAddressesForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResult)
    async def WatchForModelConfigChanges(self):
        '''
        WatchForModelConfigChanges returns a NotifyWatcher that observes
        changes to the model configuration.
        Note that although the NotifyWatchResult contains an Error field,
        it's not used because we are only returning a single watcher,
        so we use the regular error return.


        Returns -> NotifyWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchForModelConfigChanges',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchIngressAddressesForRelations(self, entities=None):
        '''
        WatchIngressAddressesForRelations creates a watcher that returns the ingress networks
        that have been recorded against the specified relations.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchIngressAddressesForRelations',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResult)
    async def WatchModelFirewallRules(self):
        '''
        WatchModelFirewallRules returns a NotifyWatcher that notifies of
        potential changes to a model's configured firewall rules


        Returns -> NotifyWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelFirewallRules',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachineStartTimes(self):
        '''
        WatchModelMachineStartTimes watches the non-container machines in the model
        for changes to the Life or AgentStartTime fields and reports them as a batch.


        Returns -> StringsWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelMachineStartTimes',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchModelMachines(self):
        '''
        WatchModelMachines returns a StringsWatcher that notifies of
        changes to the life cycles of the top level machines in the current
        model.


        Returns -> StringsWatchResult
        '''

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchModelMachines',
                   version=7,
                   params=_params)

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchOpenedPorts(self, entities=None):
        '''
        WatchOpenedPorts returns a new StringsWatcher for each given
        model tag.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchOpenedPorts',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResult)
    async def WatchSubnets(self, entities=None):
        '''
        WatchSubnets returns a new StringsWatcher that watches the specified
        subnet tags or all tags if no entities are specified.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResult
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchSubnets',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsWatchResults)
    async def WatchUnits(self, entities=None):
        '''
        WatchUnits starts a StringsWatcher to watch all units belonging to
        to any entity (machine or service) passed in args.

        entities : typing.Sequence[~Entity]
        Returns -> StringsWatchResults
        '''
        if entities is not None and not isinstance(entities, (bytes, str, list)):
            raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Firewaller',
                   request='WatchUnits',
                   version=7,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply


