# 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 MachineManagerFacade(Type):
    name = 'MachineManager'
    version = 8
    schema =     {'definitions': {'AddMachineParams': {'additionalProperties': False,
                                          'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
                                                                       'type': 'array'},
                                                         'base': {'$ref': '#/definitions/Base'},
                                                         'constraints': {'$ref': '#/definitions/Value'},
                                                         'container-type': {'type': 'string'},
                                                         'disks': {'items': {'$ref': '#/definitions/Constraints'},
                                                                   'type': 'array'},
                                                         'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
                                                         'instance-id': {'type': 'string'},
                                                         'jobs': {'items': {'type': 'string'},
                                                                  'type': 'array'},
                                                         'nonce': {'type': 'string'},
                                                         'parent-id': {'type': 'string'},
                                                         'placement': {'$ref': '#/definitions/Placement'},
                                                         'series': {'type': 'string'}},
                                          'required': ['constraints',
                                                       'jobs',
                                                       'parent-id',
                                                       'container-type',
                                                       'instance-id',
                                                       'nonce',
                                                       'hardware-characteristics',
                                                       'addresses'],
                                          'type': 'object'},
                     'AddMachines': {'additionalProperties': False,
                                     'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
                                                               'type': 'array'}},
                                     'required': ['params'],
                                     'type': 'object'},
                     'AddMachinesResult': {'additionalProperties': False,
                                           'properties': {'error': {'$ref': '#/definitions/Error'},
                                                          'machine': {'type': 'string'}},
                                           'required': ['machine'],
                                           'type': 'object'},
                     'AddMachinesResults': {'additionalProperties': False,
                                            'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
                                                                        'type': 'array'}},
                                            'required': ['machines'],
                                            'type': 'object'},
                     'Address': {'additionalProperties': False,
                                 'properties': {'cidr': {'type': 'string'},
                                                'config-type': {'type': 'string'},
                                                'is-secondary': {'type': 'boolean'},
                                                'scope': {'type': 'string'},
                                                'space-id': {'type': 'string'},
                                                'space-name': {'type': 'string'},
                                                'type': {'type': 'string'},
                                                'value': {'type': 'string'}},
                                 'required': ['value', 'type', 'scope'],
                                 'type': 'object'},
                     'Base': {'additionalProperties': False,
                              'properties': {'channel': {'type': 'string'},
                                             'name': {'type': 'string'}},
                              'required': ['name', 'channel'],
                              'type': 'object'},
                     'Constraints': {'additionalProperties': False,
                                     'properties': {'Count': {'type': 'integer'},
                                                    'Pool': {'type': 'string'},
                                                    'Size': {'type': 'integer'}},
                                     'required': ['Pool', 'Size', 'Count'],
                                     'type': 'object'},
                     'DestroyMachineInfo': {'additionalProperties': False,
                                            'properties': {'destroyed-containers': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
                                                                                    'type': 'array'},
                                                           'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'},
                                                                                 'type': 'array'},
                                                           'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
                                                                               'type': 'array'},
                                                           'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
                                                                                'type': 'array'},
                                                           'machine-id': {'type': 'string'}},
                                            'required': ['machine-id'],
                                            'type': 'object'},
                     'DestroyMachineResult': {'additionalProperties': False,
                                              'properties': {'error': {'$ref': '#/definitions/Error'},
                                                             'info': {'$ref': '#/definitions/DestroyMachineInfo'}},
                                              'type': 'object'},
                     'DestroyMachineResults': {'additionalProperties': False,
                                               'properties': {'results': {'items': {'$ref': '#/definitions/DestroyMachineResult'},
                                                                          'type': 'array'}},
                                               'type': 'object'},
                     'DestroyMachinesParams': {'additionalProperties': False,
                                               'properties': {'force': {'type': 'boolean'},
                                                              'keep': {'type': 'boolean'},
                                                              'machine-tags': {'items': {'type': 'string'},
                                                                               'type': 'array'},
                                                              'max-wait': {'type': 'integer'}},
                                               'required': ['machine-tags'],
                                               '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'},
                     'HardwareCharacteristics': {'additionalProperties': False,
                                                 'properties': {'arch': {'type': 'string'},
                                                                'availability-zone': {'type': 'string'},
                                                                'cpu-cores': {'type': 'integer'},
                                                                'cpu-power': {'type': 'integer'},
                                                                'mem': {'type': 'integer'},
                                                                'root-disk': {'type': 'integer'},
                                                                'root-disk-source': {'type': 'string'},
                                                                'tags': {'items': {'type': 'string'},
                                                                         'type': 'array'}},
                                                 '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'},
                     'ModelInstanceTypesConstraint': {'additionalProperties': False,
                                                      'properties': {'value': {'$ref': '#/definitions/Value'}},
                                                      'type': 'object'},
                     'ModelInstanceTypesConstraints': {'additionalProperties': False,
                                                       'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
                                                                                      'type': 'array'}},
                                                       'required': ['constraints'],
                                                       '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'},
                     'Placement': {'additionalProperties': False,
                                   'properties': {'directive': {'type': 'string'},
                                                  'scope': {'type': 'string'}},
                                   'required': ['scope', 'directive'],
                                   'type': 'object'},
                     'ProvisioningScriptParams': {'additionalProperties': False,
                                                  'properties': {'data-dir': {'type': 'string'},
                                                                 'disable-package-commands': {'type': 'boolean'},
                                                                 'machine-id': {'type': 'string'},
                                                                 'nonce': {'type': 'string'}},
                                                  'required': ['machine-id',
                                                               'nonce',
                                                               'data-dir',
                                                               'disable-package-commands'],
                                                  'type': 'object'},
                     'ProvisioningScriptResult': {'additionalProperties': False,
                                                  'properties': {'script': {'type': 'string'}},
                                                  'required': ['script'],
                                                  'type': 'object'},
                     'RetryProvisioningArgs': {'additionalProperties': False,
                                               'properties': {'all': {'type': 'boolean'},
                                                              'machines': {'items': {'type': 'string'},
                                                                           'type': 'array'}},
                                               'required': ['all'],
                                               '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'},
                     'UpdateChannelArg': {'additionalProperties': False,
                                          'properties': {'channel': {'type': 'string'},
                                                         'force': {'type': 'boolean'},
                                                         'series': {'type': 'string'},
                                                         'tag': {'$ref': '#/definitions/Entity'}},
                                          'required': ['tag',
                                                       'force',
                                                       'series',
                                                       'channel'],
                                          'type': 'object'},
                     'UpdateChannelArgs': {'additionalProperties': False,
                                           'properties': {'args': {'items': {'$ref': '#/definitions/UpdateChannelArg'},
                                                                   'type': 'array'}},
                                           'required': ['args'],
                                           'type': 'object'},
                     'UpgradeSeriesNotificationParam': {'additionalProperties': False,
                                                        'properties': {'entity': {'$ref': '#/definitions/Entity'},
                                                                       'watcher-id': {'type': 'string'}},
                                                        'required': ['entity',
                                                                     'watcher-id'],
                                                        'type': 'object'},
                     'UpgradeSeriesNotificationParams': {'additionalProperties': False,
                                                         'properties': {'params': {'items': {'$ref': '#/definitions/UpgradeSeriesNotificationParam'},
                                                                                   'type': 'array'}},
                                                         'required': ['params'],
                                                         'type': 'object'},
                     'UpgradeSeriesUnitsResult': {'additionalProperties': False,
                                                  'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                 'unit-names': {'items': {'type': 'string'},
                                                                                'type': 'array'}},
                                                  'required': ['unit-names'],
                                                  'type': 'object'},
                     'UpgradeSeriesUnitsResults': {'additionalProperties': False,
                                                   'properties': {'Results': {'items': {'$ref': '#/definitions/UpgradeSeriesUnitsResult'},
                                                                              'type': 'array'}},
                                                   'required': ['Results'],
                                                   'type': 'object'},
                     'Value': {'additionalProperties': False,
                               'properties': {'allocate-public-ip': {'type': 'boolean'},
                                              'arch': {'type': 'string'},
                                              'container': {'type': 'string'},
                                              'cores': {'type': 'integer'},
                                              'cpu-power': {'type': 'integer'},
                                              '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': {'AddMachines': {'description': 'AddMachines adds new machines '
                                                   'with the supplied parameters.\n'
                                                   'The args will contain Base '
                                                   'info.',
                                    'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
                                                   'Result': {'$ref': '#/definitions/AddMachinesResults'}},
                                    'type': 'object'},
                    'DestroyMachine': {'description': 'DestroyMachine removes a '
                                                      'set of machines from the '
                                                      'model.\n'
                                                      'TODO(juju3) - remove',
                                       'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                      'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                       'type': 'object'},
                    'DestroyMachineWithParams': {'description': 'DestroyMachineWithParams '
                                                                'removes a set of '
                                                                'machines from the '
                                                                'model.',
                                                 'properties': {'Params': {'$ref': '#/definitions/DestroyMachinesParams'},
                                                                'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                                 'type': 'object'},
                    'ForceDestroyMachine': {'description': 'ForceDestroyMachine '
                                                           'forcibly removes a set '
                                                           'of machines from the '
                                                           'model.\n'
                                                           'TODO(juju3) - remove\n'
                                                           'Also from ModelManger '
                                                           'v6 this call is less '
                                                           'useful as it does not '
                                                           'support MaxWait '
                                                           'customisation.',
                                            'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                           'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                            'type': 'object'},
                    'GetUpgradeSeriesMessages': {'description': 'GetUpgradeSeriesMessages '
                                                                'returns all new '
                                                                'messages '
                                                                'associated with '
                                                                'upgrade\n'
                                                                'series events. '
                                                                'Messages that '
                                                                'have already been '
                                                                'retrieved once '
                                                                'are not\n'
                                                                'returned by this '
                                                                'method.',
                                                 'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesNotificationParams'},
                                                                'Result': {'$ref': '#/definitions/StringsResults'}},
                                                 '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/ModelInstanceTypesConstraints'},
                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
                                      'type': 'object'},
                    'ProvisioningScript': {'description': 'ProvisioningScript '
                                                          'returns a shell script '
                                                          'that, when run,\n'
                                                          'provisions a machine '
                                                          'agent on the machine '
                                                          'executing the script.',
                                           'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
                                                          'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
                                           'type': 'object'},
                    'RetryProvisioning': {'description': 'RetryProvisioning marks '
                                                         'a provisioning error as '
                                                         'transient on the '
                                                         'machines.',
                                          'properties': {'Params': {'$ref': '#/definitions/RetryProvisioningArgs'},
                                                         'Result': {'$ref': '#/definitions/ErrorResults'}},
                                          'type': 'object'},
                    'UpgradeSeriesComplete': {'description': 'UpgradeSeriesComplete '
                                                             'marks a machine as '
                                                             'having completed a '
                                                             'managed series\n'
                                                             'upgrade.',
                                              'properties': {'Params': {'$ref': '#/definitions/UpdateChannelArg'},
                                                             'Result': {'$ref': '#/definitions/ErrorResult'}},
                                              'type': 'object'},
                    'UpgradeSeriesPrepare': {'description': 'UpgradeSeriesPrepare '
                                                            'prepares a machine '
                                                            'for a OS series '
                                                            'upgrade.',
                                             'properties': {'Params': {'$ref': '#/definitions/UpdateChannelArg'},
                                                            'Result': {'$ref': '#/definitions/ErrorResult'}},
                                             'type': 'object'},
                    'UpgradeSeriesValidate': {'description': 'UpgradeSeriesValidate '
                                                             'validates that the '
                                                             'incoming arguments '
                                                             'correspond to a\n'
                                                             'valid series upgrade '
                                                             'for the target '
                                                             'machine.\n'
                                                             'If they do, a list '
                                                             "of the machine's "
                                                             'current units is '
                                                             'returned for use in\n'
                                                             'soliciting user '
                                                             'confirmation of the '
                                                             'command.',
                                              'properties': {'Params': {'$ref': '#/definitions/UpdateChannelArgs'},
                                                             'Result': {'$ref': '#/definitions/UpgradeSeriesUnitsResults'}},
                                              'type': 'object'},
                    'WatchUpgradeSeriesNotifications': {'description': 'WatchUpgradeSeriesNotifications '
                                                                       'returns a '
                                                                       'watcher '
                                                                       'that fires '
                                                                       'on '
                                                                       'upgrade\n'
                                                                       'series '
                                                                       'events.',
                                                        'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                       'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                                                        'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(AddMachinesResults)
    async def AddMachines(self, params=None):
        '''
        AddMachines adds new machines with the supplied parameters.
        The args will contain Base info.

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

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



    @ReturnMapping(DestroyMachineResults)
    async def DestroyMachine(self, entities=None):
        '''
        DestroyMachine removes a set of machines from the model.
        TODO(juju3) - remove

        entities : typing.Sequence[~Entity]
        Returns -> DestroyMachineResults
        '''
        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='MachineManager',
                   request='DestroyMachine',
                   version=8,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(DestroyMachineResults)
    async def DestroyMachineWithParams(self, force=None, keep=None, machine_tags=None, max_wait=None):
        '''
        DestroyMachineWithParams removes a set of machines from the model.

        force : bool
        keep : bool
        machine_tags : typing.Sequence[str]
        max_wait : int
        Returns -> DestroyMachineResults
        '''
        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

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

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='DestroyMachineWithParams',
                   version=8,
                   params=_params)
        _params['force'] = force
        _params['keep'] = keep
        _params['machine-tags'] = machine_tags
        _params['max-wait'] = max_wait
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(DestroyMachineResults)
    async def ForceDestroyMachine(self, entities=None):
        '''
        ForceDestroyMachine forcibly removes a set of machines from the model.
        TODO(juju3) - remove
        Also from ModelManger v6 this call is less useful as it does not support MaxWait customisation.

        entities : typing.Sequence[~Entity]
        Returns -> DestroyMachineResults
        '''
        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='MachineManager',
                   request='ForceDestroyMachine',
                   version=8,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsResults)
    async def GetUpgradeSeriesMessages(self, params=None):
        '''
        GetUpgradeSeriesMessages returns all new messages associated with upgrade
        series events. Messages that have already been retrieved once are not
        returned by this method.

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='GetUpgradeSeriesMessages',
                   version=8,
                   params=_params)
        _params['params'] = params
        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[~ModelInstanceTypesConstraint]
        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='MachineManager',
                   request='InstanceTypes',
                   version=8,
                   params=_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ProvisioningScriptResult)
    async def ProvisioningScript(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None):
        '''
        ProvisioningScript returns a shell script that, when run,
        provisions a machine agent on the machine executing the script.

        data_dir : str
        disable_package_commands : bool
        machine_id : str
        nonce : str
        Returns -> ProvisioningScriptResult
        '''
        if data_dir is not None and not isinstance(data_dir, (bytes, str)):
            raise Exception("Expected data_dir to be a str, received: {}".format(type(data_dir)))

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

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='ProvisioningScript',
                   version=8,
                   params=_params)
        _params['data-dir'] = data_dir
        _params['disable-package-commands'] = disable_package_commands
        _params['machine-id'] = machine_id
        _params['nonce'] = nonce
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RetryProvisioning(self, all_=None, machines=None):
        '''
        RetryProvisioning marks a provisioning error as transient on the machines.

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='RetryProvisioning',
                   version=8,
                   params=_params)
        _params['all'] = all_
        _params['machines'] = machines
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResult)
    async def UpgradeSeriesComplete(self, channel=None, force=None, series=None, tag=None):
        '''
        UpgradeSeriesComplete marks a machine as having completed a managed series
        upgrade.

        channel : str
        force : bool
        series : str
        tag : Entity
        Returns -> ErrorResult
        '''
        if channel is not None and not isinstance(channel, (bytes, str)):
            raise Exception("Expected channel to be a str, received: {}".format(type(channel)))

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

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='UpgradeSeriesComplete',
                   version=8,
                   params=_params)
        _params['channel'] = channel
        _params['force'] = force
        _params['series'] = series
        _params['tag'] = tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResult)
    async def UpgradeSeriesPrepare(self, channel=None, force=None, series=None, tag=None):
        '''
        UpgradeSeriesPrepare prepares a machine for a OS series upgrade.

        channel : str
        force : bool
        series : str
        tag : Entity
        Returns -> ErrorResult
        '''
        if channel is not None and not isinstance(channel, (bytes, str)):
            raise Exception("Expected channel to be a str, received: {}".format(type(channel)))

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

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

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='UpgradeSeriesPrepare',
                   version=8,
                   params=_params)
        _params['channel'] = channel
        _params['force'] = force
        _params['series'] = series
        _params['tag'] = tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpgradeSeriesUnitsResults)
    async def UpgradeSeriesValidate(self, args=None):
        '''
        UpgradeSeriesValidate validates that the incoming arguments correspond to a
        valid series upgrade for the target machine.
        If they do, a list of the machine's current units is returned for use in
        soliciting user confirmation of the command.

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

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MachineManager',
                   request='UpgradeSeriesValidate',
                   version=8,
                   params=_params)
        _params['args'] = args
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def WatchUpgradeSeriesNotifications(self, entities=None):
        '''
        WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade
        series events.

        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='MachineManager',
                   request='WatchUpgradeSeriesNotifications',
                   version=8,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply


