# 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 CloudFacade(Type):
    name = 'Cloud'
    version = 6
    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'},
                                              'region-config': {'patternProperties': {'.*': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                                                          'type': 'object'}},
                                                                                             'type': 'object'}},
                                                                'type': 'object'},
                                              'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
                                                          'type': 'array'},
                                              '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': {'arch': {'type': 'string'},
                                              'container': {'type': 'string'},
                                              'cores': {'type': 'integer'},
                                              'cpu-power': {'type': 'integer'},
                                              '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': {'properties': {'Params': {'$ref': '#/definitions/AddCloudArgs'}},
                                 'type': 'object'},
                    'AddCredentials': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                      'Result': {'$ref': '#/definitions/ErrorResults'}},
                                       'type': 'object'},
                    'CheckCredentialsModels': {'properties': {'Params': {'$ref': '#/definitions/TaggedCredentials'},
                                                              'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                               'type': 'object'},
                    'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                             'Result': {'$ref': '#/definitions/CloudResults'}},
                              'type': 'object'},
                    'CloudInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                 'Result': {'$ref': '#/definitions/CloudInfoResults'}},
                                  'type': 'object'},
                    'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
                               'type': 'object'},
                    'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                  'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
                                   'type': 'object'},
                    'CredentialContents': {'properties': {'Params': {'$ref': '#/definitions/CloudCredentialArgs'},
                                                          'Result': {'$ref': '#/definitions/CredentialContentResults'}},
                                           'type': 'object'},
                    'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
                                      'type': 'object'},
                    'ListCloudInfo': {'properties': {'Params': {'$ref': '#/definitions/ListCloudsRequest'},
                                                     'Result': {'$ref': '#/definitions/ListCloudInfoResults'}},
                                      'type': 'object'},
                    'ModifyCloudAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyCloudAccessRequest'},
                                                         'Result': {'$ref': '#/definitions/ErrorResults'}},
                                          'type': 'object'},
                    'RemoveClouds': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                     'type': 'object'},
                    'RevokeCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/RevokeCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/ErrorResults'}},
                                                     'type': 'object'},
                    'UpdateCloud': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudArgs'},
                                                   'Result': {'$ref': '#/definitions/ErrorResults'}},
                                    'type': 'object'},
                    'UpdateCredentialsCheckModels': {'properties': {'Params': {'$ref': '#/definitions/UpdateCredentialArgs'},
                                                                    'Result': {'$ref': '#/definitions/UpdateCredentialResults'}},
                                                     'type': 'object'},
                    'UserCredentials': {'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):
        '''
        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=6,
                   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):
        '''
        credentials : typing.Sequence[~TaggedCredential]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        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=6,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def CheckCredentialsModels(self, credentials=None):
        '''
        credentials : typing.Sequence[~TaggedCredential]
        Returns -> typing.Sequence[~UpdateCredentialResult]
        '''
        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=6,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudResults)
    async def Cloud(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~CloudResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudInfoResults)
    async def CloudInfo(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~CloudInfoResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudsResult)
    async def Clouds(self):
        '''

        Returns -> typing.Mapping[str, ~Cloud]
        '''

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

        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CloudCredentialResults)
    async def Credential(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~CloudCredentialResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(CredentialContentResults)
    async def CredentialContents(self, credentials=None, include_secrets=None):
        '''
        credentials : typing.Sequence[~CloudCredentialArg]
        include_secrets : bool
        Returns -> typing.Sequence[~CredentialContentResult]
        '''
        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=6,
                   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):
        '''
        constraints : typing.Sequence[~CloudInstanceTypesConstraint]
        Returns -> typing.Sequence[~InstanceTypesResult]
        '''
        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=6,
                   params=_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ListCloudInfoResults)
    async def ListCloudInfo(self, all_=None, user_tag=None):
        '''
        all_ : bool
        user_tag : str
        Returns -> typing.Sequence[~ListCloudInfoResult]
        '''
        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=6,
                   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):
        '''
        changes : typing.Sequence[~ModifyCloudAccess]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        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=6,
                   params=_params)
        _params['changes'] = changes
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RemoveClouds(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RevokeCredentialsCheckModels(self, credentials=None):
        '''
        credentials : typing.Sequence[~RevokeCredentialArg]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        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=6,
                   params=_params)
        _params['credentials'] = credentials
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def UpdateCloud(self, clouds=None):
        '''
        clouds : typing.Sequence[~AddCloudArgs]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        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=6,
                   params=_params)
        _params['clouds'] = clouds
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpdateCredentialResults)
    async def UpdateCredentialsCheckModels(self, credentials=None, force=None):
        '''
        credentials : typing.Sequence[~TaggedCredential]
        force : bool
        Returns -> typing.Sequence[~UpdateCredentialResult]
        '''
        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=6,
                   params=_params)
        _params['credentials'] = credentials
        _params['force'] = force
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsResults)
    async def UserCredentials(self, user_clouds=None):
        '''
        user_clouds : typing.Sequence[~UserCloud]
        Returns -> typing.Sequence[~StringsResult]
        '''
        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=6,
                   params=_params)
        _params['user-clouds'] = user_clouds
        reply = await self.rpc(msg)
        return reply



class MachineManagerFacade(Type):
    name = 'MachineManager'
    version = 6
    schema =     {'definitions': {'AddMachineParams': {'additionalProperties': False,
                                          'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
                                                                       'type': 'array'},
                                                         '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': ['series',
                                                       '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': {'scope': {'type': 'string'},
                                                'space-id': {'type': 'string'},
                                                'space-name': {'type': 'string'},
                                                'type': {'type': 'string'},
                                                'value': {'type': 'string'}},
                                 'required': ['value', 'type', 'scope'],
                                 '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-storage': {'items': {'$ref': '#/definitions/Entity'},
                                                                                 'type': 'array'},
                                                           'destroyed-units': {'items': {'$ref': '#/definitions/Entity'},
                                                                               'type': 'array'},
                                                           'detached-storage': {'items': {'$ref': '#/definitions/Entity'},
                                                                                'type': 'array'}},
                                            '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'},
                     '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'},
                     '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'},
                     'UpdateSeriesArg': {'additionalProperties': False,
                                         'properties': {'force': {'type': 'boolean'},
                                                        'series': {'type': 'string'},
                                                        'tag': {'$ref': '#/definitions/Entity'}},
                                         'required': ['tag', 'force', 'series'],
                                         'type': 'object'},
                     'UpdateSeriesArgs': {'additionalProperties': False,
                                          'properties': {'args': {'items': {'$ref': '#/definitions/UpdateSeriesArg'},
                                                                  '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': {'arch': {'type': 'string'},
                                              'container': {'type': 'string'},
                                              'cores': {'type': 'integer'},
                                              'cpu-power': {'type': 'integer'},
                                              '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': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
                                                   'Result': {'$ref': '#/definitions/AddMachinesResults'}},
                                    'type': 'object'},
                    'DestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                      'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                       'type': 'object'},
                    'DestroyMachineWithParams': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachinesParams'},
                                                                'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                                 'type': 'object'},
                    'ForceDestroyMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                           'Result': {'$ref': '#/definitions/DestroyMachineResults'}},
                                            'type': 'object'},
                    'GetUpgradeSeriesMessages': {'properties': {'Params': {'$ref': '#/definitions/UpgradeSeriesNotificationParams'},
                                                                'Result': {'$ref': '#/definitions/StringsResults'}},
                                                 'type': 'object'},
                    'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
                                      'type': 'object'},
                    'UpgradeSeriesComplete': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
                                                             'Result': {'$ref': '#/definitions/ErrorResult'}},
                                              'type': 'object'},
                    'UpgradeSeriesPrepare': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArg'},
                                                            'Result': {'$ref': '#/definitions/ErrorResult'}},
                                             'type': 'object'},
                    'UpgradeSeriesValidate': {'properties': {'Params': {'$ref': '#/definitions/UpdateSeriesArgs'},
                                                             'Result': {'$ref': '#/definitions/UpgradeSeriesUnitsResults'}},
                                              'type': 'object'},
                    'WatchUpgradeSeriesNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                       'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
                                                        'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(AddMachinesResults)
    async def AddMachines(self, params=None):
        '''
        params : typing.Sequence[~AddMachineParams]
        Returns -> typing.Sequence[~AddMachinesResult]
        '''
        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=6,
                   params=_params)
        _params['params'] = params
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(DestroyMachineResults)
    async def DestroyMachine(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~DestroyMachineResult]
        '''
        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=6,
                   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):
        '''
        force : bool
        keep : bool
        machine_tags : typing.Sequence[str]
        max_wait : int
        Returns -> typing.Sequence[~DestroyMachineResult]
        '''
        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=6,
                   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):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~DestroyMachineResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StringsResults)
    async def GetUpgradeSeriesMessages(self, params=None):
        '''
        params : typing.Sequence[~UpgradeSeriesNotificationParam]
        Returns -> typing.Sequence[~StringsResult]
        '''
        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=6,
                   params=_params)
        _params['params'] = params
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(InstanceTypesResults)
    async def InstanceTypes(self, constraints=None):
        '''
        constraints : typing.Sequence[~ModelInstanceTypesConstraint]
        Returns -> typing.Sequence[~InstanceTypesResult]
        '''
        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=6,
                   params=_params)
        _params['constraints'] = constraints
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResult)
    async def UpgradeSeriesComplete(self, force=None, series=None, tag=None):
        '''
        force : bool
        series : str
        tag : Entity
        Returns -> Error
        '''
        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=6,
                   params=_params)
        _params['force'] = force
        _params['series'] = series
        _params['tag'] = tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResult)
    async def UpgradeSeriesPrepare(self, force=None, series=None, tag=None):
        '''
        force : bool
        series : str
        tag : Entity
        Returns -> Error
        '''
        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=6,
                   params=_params)
        _params['force'] = force
        _params['series'] = series
        _params['tag'] = tag
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(UpgradeSeriesUnitsResults)
    async def UpgradeSeriesValidate(self, args=None):
        '''
        args : typing.Sequence[~UpdateSeriesArg]
        Returns -> typing.Sequence[~UpgradeSeriesUnitsResult]
        '''
        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=6,
                   params=_params)
        _params['args'] = args
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(NotifyWatchResults)
    async def WatchUpgradeSeriesNotifications(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~NotifyWatchResult]
        '''
        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=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



class StorageFacade(Type):
    name = 'Storage'
    version = 6
    schema =     {'definitions': {'AddStorageDetails': {'additionalProperties': False,
                                           'properties': {'storage-tags': {'items': {'type': 'string'},
                                                                           'type': 'array'}},
                                           'required': ['storage-tags'],
                                           'type': 'object'},
                     'AddStorageResult': {'additionalProperties': False,
                                          'properties': {'error': {'$ref': '#/definitions/Error'},
                                                         'result': {'$ref': '#/definitions/AddStorageDetails'}},
                                          'type': 'object'},
                     'AddStorageResults': {'additionalProperties': False,
                                           'properties': {'results': {'items': {'$ref': '#/definitions/AddStorageResult'},
                                                                      'type': 'array'}},
                                           'required': ['results'],
                                           'type': 'object'},
                     'BulkImportStorageParams': {'additionalProperties': False,
                                                 'properties': {'storage': {'items': {'$ref': '#/definitions/ImportStorageParams'},
                                                                            'type': 'array'}},
                                                 'required': ['storage'],
                                                 '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'},
                     'EntityStatus': {'additionalProperties': False,
                                      'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'},
                                                     'info': {'type': 'string'},
                                                     'since': {'format': 'date-time',
                                                               'type': 'string'},
                                                     'status': {'type': 'string'}},
                                      'required': ['status', 'info', 'since'],
                                      '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'},
                     'FilesystemAttachmentDetails': {'additionalProperties': False,
                                                     'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
                                                                    'life': {'type': 'string'},
                                                                    'mount-point': {'type': 'string'},
                                                                    'read-only': {'type': 'boolean'}},
                                                     'required': ['FilesystemAttachmentInfo'],
                                                     'type': 'object'},
                     'FilesystemAttachmentInfo': {'additionalProperties': False,
                                                  'properties': {'mount-point': {'type': 'string'},
                                                                 'read-only': {'type': 'boolean'}},
                                                  'type': 'object'},
                     'FilesystemDetails': {'additionalProperties': False,
                                           'properties': {'filesystem-tag': {'type': 'string'},
                                                          'info': {'$ref': '#/definitions/FilesystemInfo'},
                                                          'life': {'type': 'string'},
                                                          'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
                                                                                  'type': 'object'},
                                                          'status': {'$ref': '#/definitions/EntityStatus'},
                                                          'storage': {'$ref': '#/definitions/StorageDetails'},
                                                          'unit-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}},
                                                                               'type': 'object'},
                                                          'volume-tag': {'type': 'string'}},
                                           'required': ['filesystem-tag',
                                                        'info',
                                                        'status'],
                                           'type': 'object'},
                     'FilesystemDetailsListResult': {'additionalProperties': False,
                                                     'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                    'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
                                                                               'type': 'array'}},
                                                     'type': 'object'},
                     'FilesystemDetailsListResults': {'additionalProperties': False,
                                                      'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
                                                                                 'type': 'array'}},
                                                      'type': 'object'},
                     'FilesystemFilter': {'additionalProperties': False,
                                          'properties': {'machines': {'items': {'type': 'string'},
                                                                      'type': 'array'}},
                                          'type': 'object'},
                     'FilesystemFilters': {'additionalProperties': False,
                                           'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
                                                                      'type': 'array'}},
                                           'type': 'object'},
                     'FilesystemInfo': {'additionalProperties': False,
                                        'properties': {'filesystem-id': {'type': 'string'},
                                                       'pool': {'type': 'string'},
                                                       'size': {'type': 'integer'}},
                                        'required': ['filesystem-id',
                                                     'pool',
                                                     'size'],
                                        'type': 'object'},
                     'ImportStorageDetails': {'additionalProperties': False,
                                              'properties': {'storage-tag': {'type': 'string'}},
                                              'required': ['storage-tag'],
                                              'type': 'object'},
                     'ImportStorageParams': {'additionalProperties': False,
                                             'properties': {'kind': {'type': 'integer'},
                                                            'pool': {'type': 'string'},
                                                            'provider-id': {'type': 'string'},
                                                            'storage-name': {'type': 'string'}},
                                             'required': ['kind',
                                                          'pool',
                                                          'provider-id',
                                                          'storage-name'],
                                             'type': 'object'},
                     'ImportStorageResult': {'additionalProperties': False,
                                             'properties': {'error': {'$ref': '#/definitions/Error'},
                                                            'result': {'$ref': '#/definitions/ImportStorageDetails'}},
                                             'type': 'object'},
                     'ImportStorageResults': {'additionalProperties': False,
                                              'properties': {'results': {'items': {'$ref': '#/definitions/ImportStorageResult'},
                                                                         'type': 'array'}},
                                              'required': ['results'],
                                              'type': 'object'},
                     'RemoveStorage': {'additionalProperties': False,
                                       'properties': {'storage': {'items': {'$ref': '#/definitions/RemoveStorageInstance'},
                                                                  'type': 'array'}},
                                       'required': ['storage'],
                                       'type': 'object'},
                     'RemoveStorageInstance': {'additionalProperties': False,
                                               'properties': {'destroy-attachments': {'type': 'boolean'},
                                                              'destroy-storage': {'type': 'boolean'},
                                                              'force': {'type': 'boolean'},
                                                              'max-wait': {'type': 'integer'},
                                                              'tag': {'type': 'string'}},
                                               'required': ['tag'],
                                               'type': 'object'},
                     'StorageAddParams': {'additionalProperties': False,
                                          'properties': {'name': {'type': 'string'},
                                                         'storage': {'$ref': '#/definitions/StorageConstraints'},
                                                         'unit': {'type': 'string'}},
                                          'required': ['unit', 'name', 'storage'],
                                          'type': 'object'},
                     'StorageAttachmentDetails': {'additionalProperties': False,
                                                  'properties': {'life': {'type': 'string'},
                                                                 'location': {'type': 'string'},
                                                                 'machine-tag': {'type': 'string'},
                                                                 'storage-tag': {'type': 'string'},
                                                                 'unit-tag': {'type': 'string'}},
                                                  'required': ['storage-tag',
                                                               'unit-tag',
                                                               'machine-tag'],
                                                  'type': 'object'},
                     'StorageAttachmentId': {'additionalProperties': False,
                                             'properties': {'storage-tag': {'type': 'string'},
                                                            'unit-tag': {'type': 'string'}},
                                             'required': ['storage-tag',
                                                          'unit-tag'],
                                             'type': 'object'},
                     'StorageAttachmentIds': {'additionalProperties': False,
                                              'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
                                                                     'type': 'array'}},
                                              'required': ['ids'],
                                              'type': 'object'},
                     'StorageConstraints': {'additionalProperties': False,
                                            'properties': {'count': {'type': 'integer'},
                                                           'pool': {'type': 'string'},
                                                           'size': {'type': 'integer'}},
                                            'type': 'object'},
                     'StorageDetachmentParams': {'additionalProperties': False,
                                                 'properties': {'force': {'type': 'boolean'},
                                                                'ids': {'$ref': '#/definitions/StorageAttachmentIds'},
                                                                'max-wait': {'type': 'integer'}},
                                                 'required': ['ids'],
                                                 'type': 'object'},
                     'StorageDetails': {'additionalProperties': False,
                                        'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
                                                                       'type': 'object'},
                                                       'kind': {'type': 'integer'},
                                                       'life': {'type': 'string'},
                                                       'owner-tag': {'type': 'string'},
                                                       'persistent': {'type': 'boolean'},
                                                       'status': {'$ref': '#/definitions/EntityStatus'},
                                                       'storage-tag': {'type': 'string'}},
                                        'required': ['storage-tag',
                                                     'owner-tag',
                                                     'kind',
                                                     'status',
                                                     'persistent'],
                                        'type': 'object'},
                     'StorageDetailsListResult': {'additionalProperties': False,
                                                  'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
                                                                            'type': 'array'}},
                                                  'type': 'object'},
                     'StorageDetailsListResults': {'additionalProperties': False,
                                                   'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
                                                                              'type': 'array'}},
                                                   'type': 'object'},
                     'StorageDetailsResult': {'additionalProperties': False,
                                              'properties': {'error': {'$ref': '#/definitions/Error'},
                                                             'result': {'$ref': '#/definitions/StorageDetails'}},
                                              'type': 'object'},
                     'StorageDetailsResults': {'additionalProperties': False,
                                               'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
                                                                          'type': 'array'}},
                                               'type': 'object'},
                     'StorageFilter': {'additionalProperties': False,
                                       'type': 'object'},
                     'StorageFilters': {'additionalProperties': False,
                                        'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
                                                                   'type': 'array'}},
                                        'type': 'object'},
                     'StoragePool': {'additionalProperties': False,
                                     'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                           'type': 'object'}},
                                                              'type': 'object'},
                                                    'name': {'type': 'string'},
                                                    'provider': {'type': 'string'}},
                                     'required': ['name', 'provider', 'attrs'],
                                     'type': 'object'},
                     'StoragePoolArgs': {'additionalProperties': False,
                                         'properties': {'pools': {'items': {'$ref': '#/definitions/StoragePool'},
                                                                  'type': 'array'}},
                                         'required': ['pools'],
                                         'type': 'object'},
                     'StoragePoolDeleteArg': {'additionalProperties': False,
                                              'properties': {'name': {'type': 'string'}},
                                              'required': ['name'],
                                              'type': 'object'},
                     'StoragePoolDeleteArgs': {'additionalProperties': False,
                                               'properties': {'pools': {'items': {'$ref': '#/definitions/StoragePoolDeleteArg'},
                                                                        'type': 'array'}},
                                               'required': ['pools'],
                                               'type': 'object'},
                     'StoragePoolFilter': {'additionalProperties': False,
                                           'properties': {'names': {'items': {'type': 'string'},
                                                                    'type': 'array'},
                                                          'providers': {'items': {'type': 'string'},
                                                                        'type': 'array'}},
                                           'type': 'object'},
                     'StoragePoolFilters': {'additionalProperties': False,
                                            'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
                                                                       'type': 'array'}},
                                            'type': 'object'},
                     'StoragePoolsResult': {'additionalProperties': False,
                                            'properties': {'error': {'$ref': '#/definitions/Error'},
                                                           'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
                                                                             'type': 'array'}},
                                            'type': 'object'},
                     'StoragePoolsResults': {'additionalProperties': False,
                                             'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
                                                                        'type': 'array'}},
                                             'type': 'object'},
                     'StoragesAddParams': {'additionalProperties': False,
                                           'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
                                                                       'type': 'array'}},
                                           'required': ['storages'],
                                           'type': 'object'},
                     'VolumeAttachmentDetails': {'additionalProperties': False,
                                                 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'},
                                                                'bus-address': {'type': 'string'},
                                                                'device-link': {'type': 'string'},
                                                                'device-name': {'type': 'string'},
                                                                'life': {'type': 'string'},
                                                                'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'},
                                                                'read-only': {'type': 'boolean'}},
                                                 'required': ['VolumeAttachmentInfo'],
                                                 'type': 'object'},
                     'VolumeAttachmentInfo': {'additionalProperties': False,
                                              'properties': {'bus-address': {'type': 'string'},
                                                             'device-link': {'type': 'string'},
                                                             'device-name': {'type': 'string'},
                                                             'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'},
                                                             'read-only': {'type': 'boolean'}},
                                              'type': 'object'},
                     'VolumeAttachmentPlanInfo': {'additionalProperties': False,
                                                  'properties': {'device-attributes': {'patternProperties': {'.*': {'type': 'string'}},
                                                                                       'type': 'object'},
                                                                 'device-type': {'type': 'string'}},
                                                  'type': 'object'},
                     'VolumeDetails': {'additionalProperties': False,
                                       'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
                                                      'life': {'type': 'string'},
                                                      'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
                                                                              'type': 'object'},
                                                      'status': {'$ref': '#/definitions/EntityStatus'},
                                                      'storage': {'$ref': '#/definitions/StorageDetails'},
                                                      'unit-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}},
                                                                           'type': 'object'},
                                                      'volume-tag': {'type': 'string'}},
                                       'required': ['volume-tag', 'info', 'status'],
                                       'type': 'object'},
                     'VolumeDetailsListResult': {'additionalProperties': False,
                                                 'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
                                                                           'type': 'array'}},
                                                 'type': 'object'},
                     'VolumeDetailsListResults': {'additionalProperties': False,
                                                  'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
                                                                             'type': 'array'}},
                                                  'type': 'object'},
                     'VolumeFilter': {'additionalProperties': False,
                                      'properties': {'machines': {'items': {'type': 'string'},
                                                                  'type': 'array'}},
                                      'type': 'object'},
                     'VolumeFilters': {'additionalProperties': False,
                                       'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
                                                                  'type': 'array'}},
                                       'type': 'object'},
                     'VolumeInfo': {'additionalProperties': False,
                                    'properties': {'hardware-id': {'type': 'string'},
                                                   'persistent': {'type': 'boolean'},
                                                   'pool': {'type': 'string'},
                                                   'size': {'type': 'integer'},
                                                   'volume-id': {'type': 'string'},
                                                   'wwn': {'type': 'string'}},
                                    'required': ['volume-id', 'size', 'persistent'],
                                    'type': 'object'}},
     'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
                                                 'Result': {'$ref': '#/definitions/AddStorageResults'}},
                                  'type': 'object'},
                    'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
                                              'Result': {'$ref': '#/definitions/ErrorResults'}},
                               'type': 'object'},
                    'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolArgs'},
                                                  'Result': {'$ref': '#/definitions/ErrorResults'}},
                                   'type': 'object'},
                    'DetachStorage': {'properties': {'Params': {'$ref': '#/definitions/StorageDetachmentParams'},
                                                     'Result': {'$ref': '#/definitions/ErrorResults'}},
                                      'type': 'object'},
                    'Import': {'properties': {'Params': {'$ref': '#/definitions/BulkImportStorageParams'},
                                              'Result': {'$ref': '#/definitions/ImportStorageResults'}},
                               'type': 'object'},
                    'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
                                                       'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
                                        'type': 'object'},
                    'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
                                                 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
                                  'type': 'object'},
                    'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
                                                          'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
                                           'type': 'object'},
                    'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
                                                   'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
                                    'type': 'object'},
                    'Remove': {'properties': {'Params': {'$ref': '#/definitions/RemoveStorage'},
                                              'Result': {'$ref': '#/definitions/ErrorResults'}},
                               'type': 'object'},
                    'RemovePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolDeleteArgs'},
                                                  'Result': {'$ref': '#/definitions/ErrorResults'}},
                                   'type': 'object'},
                    'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                      'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
                                       'type': 'object'},
                    'UpdatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolArgs'},
                                                  'Result': {'$ref': '#/definitions/ErrorResults'}},
                                   'type': 'object'}},
     'type': 'object'}
    

    @ReturnMapping(AddStorageResults)
    async def AddToUnit(self, storages=None):
        '''
        storages : typing.Sequence[~StorageAddParams]
        Returns -> typing.Sequence[~AddStorageResult]
        '''
        if storages is not None and not isinstance(storages, (bytes, str, list)):
            raise Exception("Expected storages to be a Sequence, received: {}".format(type(storages)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='AddToUnit',
                   version=6,
                   params=_params)
        _params['storages'] = storages
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def Attach(self, ids=None):
        '''
        ids : typing.Sequence[~StorageAttachmentId]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if ids is not None and not isinstance(ids, (bytes, str, list)):
            raise Exception("Expected ids to be a Sequence, received: {}".format(type(ids)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='Attach',
                   version=6,
                   params=_params)
        _params['ids'] = ids
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def CreatePool(self, pools=None):
        '''
        pools : typing.Sequence[~StoragePool]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if pools is not None and not isinstance(pools, (bytes, str, list)):
            raise Exception("Expected pools to be a Sequence, received: {}".format(type(pools)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='CreatePool',
                   version=6,
                   params=_params)
        _params['pools'] = pools
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def DetachStorage(self, force=None, ids=None, max_wait=None):
        '''
        force : bool
        ids : StorageAttachmentIds
        max_wait : int
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if force is not None and not isinstance(force, bool):
            raise Exception("Expected force to be a bool, received: {}".format(type(force)))

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

        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='Storage',
                   request='DetachStorage',
                   version=6,
                   params=_params)
        _params['force'] = force
        _params['ids'] = ids
        _params['max-wait'] = max_wait
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ImportStorageResults)
    async def Import(self, storage=None):
        '''
        storage : typing.Sequence[~ImportStorageParams]
        Returns -> typing.Sequence[~ImportStorageResult]
        '''
        if storage is not None and not isinstance(storage, (bytes, str, list)):
            raise Exception("Expected storage to be a Sequence, received: {}".format(type(storage)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='Import',
                   version=6,
                   params=_params)
        _params['storage'] = storage
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(FilesystemDetailsListResults)
    async def ListFilesystems(self, filters=None):
        '''
        filters : typing.Sequence[~FilesystemFilter]
        Returns -> typing.Sequence[~FilesystemDetailsListResult]
        '''
        if filters is not None and not isinstance(filters, (bytes, str, list)):
            raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='ListFilesystems',
                   version=6,
                   params=_params)
        _params['filters'] = filters
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StoragePoolsResults)
    async def ListPools(self, filters=None):
        '''
        filters : typing.Sequence[~StoragePoolFilter]
        Returns -> typing.Sequence[~StoragePoolsResult]
        '''
        if filters is not None and not isinstance(filters, (bytes, str, list)):
            raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='ListPools',
                   version=6,
                   params=_params)
        _params['filters'] = filters
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StorageDetailsListResults)
    async def ListStorageDetails(self, filters=None):
        '''
        filters : typing.Sequence[~StorageFilter]
        Returns -> typing.Sequence[~StorageDetailsListResult]
        '''
        if filters is not None and not isinstance(filters, (bytes, str, list)):
            raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='ListStorageDetails',
                   version=6,
                   params=_params)
        _params['filters'] = filters
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(VolumeDetailsListResults)
    async def ListVolumes(self, filters=None):
        '''
        filters : typing.Sequence[~VolumeFilter]
        Returns -> typing.Sequence[~VolumeDetailsListResult]
        '''
        if filters is not None and not isinstance(filters, (bytes, str, list)):
            raise Exception("Expected filters to be a Sequence, received: {}".format(type(filters)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='ListVolumes',
                   version=6,
                   params=_params)
        _params['filters'] = filters
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def Remove(self, storage=None):
        '''
        storage : typing.Sequence[~RemoveStorageInstance]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if storage is not None and not isinstance(storage, (bytes, str, list)):
            raise Exception("Expected storage to be a Sequence, received: {}".format(type(storage)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='Remove',
                   version=6,
                   params=_params)
        _params['storage'] = storage
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def RemovePool(self, pools=None):
        '''
        pools : typing.Sequence[~StoragePoolDeleteArg]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if pools is not None and not isinstance(pools, (bytes, str, list)):
            raise Exception("Expected pools to be a Sequence, received: {}".format(type(pools)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='RemovePool',
                   version=6,
                   params=_params)
        _params['pools'] = pools
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(StorageDetailsResults)
    async def StorageDetails(self, entities=None):
        '''
        entities : typing.Sequence[~Entity]
        Returns -> typing.Sequence[~StorageDetailsResult]
        '''
        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='Storage',
                   request='StorageDetails',
                   version=6,
                   params=_params)
        _params['entities'] = entities
        reply = await self.rpc(msg)
        return reply



    @ReturnMapping(ErrorResults)
    async def UpdatePool(self, pools=None):
        '''
        pools : typing.Sequence[~StoragePool]
        Returns -> typing.Sequence[~ErrorResult]
        '''
        if pools is not None and not isinstance(pools, (bytes, str, list)):
            raise Exception("Expected pools to be a Sequence, received: {}".format(type(pools)))

        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='UpdatePool',
                   version=6,
                   params=_params)
        _params['pools'] = pools
        reply = await self.rpc(msg)
        return reply


