+class PhaseResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
+ '''
+ self.results = [PhaseResult.from_json(o) for o in results or []]
+
+
+class MasterMigrationStatus(Type):
+ _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'spec': 'spec'}
+ _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'spec': 'spec'}
+ def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None):
+ '''
+ migration_id : str
+ phase : str
+ phase_changed_time : str
+ spec : MigrationSpec
+ '''
+ self.migration_id = migration_id
+ self.phase = phase
+ self.phase_changed_time = phase_changed_time
+ self.spec = MigrationSpec.from_json(spec) if spec else None
+
+
+class MigrationModelInfo(Type):
+ _toSchema = {'agent_version': 'agent-version', 'controller_agent_version': 'controller-agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
+ _toPy = {'agent-version': 'agent_version', 'controller-agent-version': 'controller_agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
+ def __init__(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None):
+ '''
+ agent_version : Number
+ controller_agent_version : Number
+ name : str
+ owner_tag : str
+ uuid : str
+ '''
+ self.agent_version = Number.from_json(agent_version) if agent_version else None
+ self.controller_agent_version = Number.from_json(controller_agent_version) if controller_agent_version else None
+ self.name = name
+ self.owner_tag = owner_tag
+ self.uuid = uuid
+
+
+class MinionReports(Type):
+ _toSchema = {'failed': 'failed', 'migration_id': 'migration-id', 'phase': 'phase', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'unknown_sample': 'unknown-sample'}
+ _toPy = {'failed': 'failed', 'migration-id': 'migration_id', 'phase': 'phase', 'success-count': 'success_count', 'unknown-count': 'unknown_count', 'unknown-sample': 'unknown_sample'}
+ def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None):
+ '''
+ failed : typing.Sequence<+T_co>[str]
+ migration_id : str
+ phase : str
+ success_count : int
+ unknown_count : int
+ unknown_sample : typing.Sequence<+T_co>[str]
+ '''
+ self.failed = failed
+ self.migration_id = migration_id
+ self.phase = phase
+ self.success_count = success_count
+ self.unknown_count = unknown_count
+ self.unknown_sample = unknown_sample
+
+
+class SerializedModel(Type):
+ _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
+ _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
+ def __init__(self, bytes_=None, charms=None, resources=None, tools=None):
+ '''
+ bytes_ : typing.Sequence<+T_co>[int]
+ charms : typing.Sequence<+T_co>[str]
+ resources : typing.Sequence<+T_co>[~SerializedModelResource]<~SerializedModelResource>
+ tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
+ '''
+ self.bytes_ = bytes_
+ self.charms = charms
+ self.resources = [SerializedModelResource.from_json(o) for o in resources or []]
+ self.tools = [SerializedModelTools.from_json(o) for o in tools or []]
+
+
+class SerializedModelResource(Type):
+ _toSchema = {'application': 'application', 'application_revision': 'application-revision', 'charmstore_revision': 'charmstore-revision', 'name': 'name', 'unit_revisions': 'unit-revisions'}
+ _toPy = {'application': 'application', 'application-revision': 'application_revision', 'charmstore-revision': 'charmstore_revision', 'name': 'name', 'unit-revisions': 'unit_revisions'}
+ def __init__(self, application=None, application_revision=None, charmstore_revision=None, name=None, unit_revisions=None):
+ '''
+ application : str
+ application_revision : SerializedModelResourceRevision
+ charmstore_revision : SerializedModelResourceRevision
+ name : str
+ unit_revisions : typing.Mapping<~KT, +VT_co>[str, ~SerializedModelResourceRevision]<~SerializedModelResourceRevision>
+ '''
+ self.application = application
+ self.application_revision = SerializedModelResourceRevision.from_json(application_revision) if application_revision else None
+ self.charmstore_revision = SerializedModelResourceRevision.from_json(charmstore_revision) if charmstore_revision else None
+ self.name = name
+ self.unit_revisions = unit_revisions
+
+
+class SerializedModelResourceRevision(Type):
+ _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'}
+ _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'}
+ def __init__(self, description=None, fingerprint=None, origin=None, path=None, revision=None, size=None, timestamp=None, type_=None, username=None):
+ '''
+ description : str
+ fingerprint : str
+ origin : str
+ path : str
+ revision : int
+ size : int
+ timestamp : str
+ type_ : str
+ username : str
+ '''
+ self.description = description
+ self.fingerprint = fingerprint
+ self.origin = origin
+ self.path = path
+ self.revision = revision
+ self.size = size
+ self.timestamp = timestamp
+ self.type_ = type_
+ self.username = username
+
+
+class SerializedModelTools(Type):
+ _toSchema = {'uri': 'uri', 'version': 'version'}
+ _toPy = {'uri': 'uri', 'version': 'version'}
+ def __init__(self, uri=None, version=None):
+ '''
+ uri : str
+ version : str
+ '''
+ self.uri = uri
+ self.version = version
+
+
+class SetMigrationPhaseArgs(Type):
+ _toSchema = {'phase': 'phase'}
+ _toPy = {'phase': 'phase'}
+ def __init__(self, phase=None):
+ '''
+ phase : str
+ '''
+ self.phase = phase
+
+
+class SetMigrationStatusMessageArgs(Type):
+ _toSchema = {'message': 'message'}
+ _toPy = {'message': 'message'}
+ def __init__(self, message=None):
+ '''
+ message : str
+ '''
+ self.message = message
+
+
+class MinionReport(Type):
+ _toSchema = {'migration_id': 'migration-id', 'phase': 'phase', 'success': 'success'}
+ _toPy = {'migration-id': 'migration_id', 'phase': 'phase', 'success': 'success'}
+ def __init__(self, migration_id=None, phase=None, success=None):
+ '''
+ migration_id : str
+ phase : str
+ success : bool
+ '''
+ self.migration_id = migration_id
+ self.phase = phase
+ self.success = success
+
+
+class MigrationStatus(Type):
+ _toSchema = {'attempt': 'attempt', 'external_control': 'external-control', 'migration_id': 'migration-id', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert'}
+ _toPy = {'attempt': 'attempt', 'external-control': 'external_control', 'migration-id': 'migration_id', 'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert'}
+ def __init__(self, attempt=None, external_control=None, migration_id=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
+ '''
+ attempt : int
+ external_control : bool
+ migration_id : str
+ phase : str
+ source_api_addrs : typing.Sequence<+T_co>[str]
+ source_ca_cert : str
+ target_api_addrs : typing.Sequence<+T_co>[str]
+ target_ca_cert : str
+ '''
+ self.attempt = attempt
+ self.external_control = external_control
+ self.migration_id = migration_id
+ self.phase = phase
+ self.source_api_addrs = source_api_addrs
+ self.source_ca_cert = source_ca_cert
+ self.target_api_addrs = target_api_addrs
+ self.target_ca_cert = target_ca_cert
+
+
+class AdoptResourcesArgs(Type):
+ _toSchema = {'model_tag': 'model-tag', 'source_controller_version': 'source-controller-version'}
+ _toPy = {'model-tag': 'model_tag', 'source-controller-version': 'source_controller_version'}
+ def __init__(self, model_tag=None, source_controller_version=None):
+ '''
+ model_tag : str
+ source_controller_version : Number
+ '''
+ self.model_tag = model_tag
+ self.source_controller_version = Number.from_json(source_controller_version) if source_controller_version else None
+
+
+class ModelArgs(Type):
+ _toSchema = {'model_tag': 'model-tag'}
+ _toPy = {'model-tag': 'model_tag'}
+ def __init__(self, model_tag=None):
+ '''
+ model_tag : str
+ '''
+ self.model_tag = model_tag
+
+
+class MapResult(Type):
+ _toSchema = {'error': 'error', 'result': 'result'}
+ _toPy = {'error': 'error', 'result': 'result'}
+ def __init__(self, error=None, result=None):
+ '''
+ error : Error
+ result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ '''
+ self.error = Error.from_json(error) if error else None
+ self.result = result
+
+
+class MapResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
+ '''
+ self.results = [MapResult.from_json(o) for o in results or []]
+
+
+class ModelCreateArgs(Type):
+ _toSchema = {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'}
+ _toPy = {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'}
+ def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None):
+ '''
+ cloud_tag : str
+ config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ credential : str
+ name : str
+ owner_tag : str
+ region : str
+ '''
+ self.cloud_tag = cloud_tag
+ self.config = config
+ self.credential = credential
+ self.name = name
+ self.owner_tag = owner_tag
+ self.region = region
+
+
+class ModelDefaultValues(Type):
+ _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'}
+ _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'}
+ def __init__(self, cloud_region=None, cloud_tag=None, config=None):
+ '''
+ cloud_region : str
+ cloud_tag : str
+ config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ '''
+ self.cloud_region = cloud_region
+ self.cloud_tag = cloud_tag
+ self.config = config
+
+
+class ModelDefaults(Type):
+ _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
+ _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
+ def __init__(self, controller=None, default=None, regions=None):
+ '''
+ controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
+ '''
+ self.controller = controller
+ self.default = default
+ self.regions = [RegionDefaults.from_json(o) for o in regions or []]
+
+
+class ModelDefaultsResult(Type):
+ _toSchema = {'config': 'config'}
+ _toPy = {'config': 'config'}
+ def __init__(self, config=None):
+ '''
+ config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
+ '''
+ self.config = config
+
+
+class ModelInfoResult(Type):
+ _toSchema = {'error': 'error', 'result': 'result'}
+ _toPy = {'error': 'error', 'result': 'result'}
+ def __init__(self, error=None, result=None):
+ '''
+ error : Error
+ result : ModelInfo
+ '''
+ self.error = Error.from_json(error) if error else None
+ self.result = ModelInfo.from_json(result) if result else None
+
+
+class ModelInfoResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
+ '''
+ self.results = [ModelInfoResult.from_json(o) for o in results or []]
+
+
+class ModelUnsetKeys(Type):
+ _toSchema = {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'}
+ _toPy = {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'}
+ def __init__(self, cloud_region=None, cloud_tag=None, keys=None):
+ '''
+ cloud_region : str
+ cloud_tag : str
+ keys : typing.Sequence<+T_co>[str]
+ '''
+ self.cloud_region = cloud_region
+ self.cloud_tag = cloud_tag
+ self.keys = keys
+
+
+class ModifyModelAccess(Type):
+ _toSchema = {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'}
+ _toPy = {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'}
+ def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
+ '''
+ access : str
+ action : str
+ model_tag : str
+ user_tag : str
+ '''
+ self.access = access
+ self.action = action
+ self.model_tag = model_tag
+ self.user_tag = user_tag
+
+
+class ModifyModelAccessRequest(Type):
+ _toSchema = {'changes': 'changes'}
+ _toPy = {'changes': 'changes'}
+ def __init__(self, changes=None):
+ '''
+ changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
+ '''
+ self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
+
+
+class RegionDefaults(Type):
+ _toSchema = {'region_name': 'region-name', 'value': 'value'}
+ _toPy = {'region-name': 'region_name', 'value': 'value'}
+ def __init__(self, region_name=None, value=None):
+ '''
+ region_name : str
+ value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ '''
+ self.region_name = region_name
+ self.value = value
+
+
+class SetModelDefaults(Type):
+ _toSchema = {'config': 'config'}
+ _toPy = {'config': 'config'}
+ def __init__(self, config=None):