+ self.machinetag = machinetag
+
+
+class WatchContainers(Type):
+ _toSchema = {'params': 'Params'}
+ _toPy = {'Params': 'params'}
+ def __init__(self, params=None):
+ '''
+ params : typing.Sequence[~WatchContainer]
+ '''
+ self.params = [WatchContainer.from_json(o) for o in params or []]
+
+
+class ProxyConfig(Type):
+ _toSchema = {'http': 'HTTP', 'ftp': 'FTP', 'noproxy': 'NoProxy', 'https': 'HTTPS'}
+ _toPy = {'HTTP': 'http', 'FTP': 'ftp', 'HTTPS': 'https', 'NoProxy': 'noproxy'}
+ def __init__(self, ftp=None, http=None, https=None, noproxy=None):
+ '''
+ ftp : str
+ http : str
+ https : str
+ noproxy : str
+ '''
+ self.ftp = ftp
+ self.http = http
+ self.https = https
+ self.noproxy = noproxy
+
+
+class ProxyConfigResult(Type):
+ _toSchema = {'proxysettings': 'ProxySettings', 'error': 'Error', 'aptproxysettings': 'APTProxySettings'}
+ _toPy = {'Error': 'error', 'ProxySettings': 'proxysettings', 'APTProxySettings': 'aptproxysettings'}
+ def __init__(self, aptproxysettings=None, error=None, proxysettings=None):
+ '''
+ aptproxysettings : ProxyConfig
+ error : Error
+ proxysettings : ProxyConfig
+ '''
+ self.aptproxysettings = ProxyConfig.from_json(aptproxysettings)
+ self.error = Error.from_json(error)
+ self.proxysettings = ProxyConfig.from_json(proxysettings)
+
+
+class ProxyConfigResults(Type):
+ _toSchema = {'results': 'Results'}
+ _toPy = {'Results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence[~ProxyConfigResult]
+ '''
+ self.results = [ProxyConfigResult.from_json(o) for o in results or []]
+
+
+class RebootActionResult(Type):
+ _toSchema = {'error': 'error', 'result': 'result'}
+ _toPy = {'error': 'error', 'result': 'result'}
+ def __init__(self, error=None, result=None):
+ '''
+ error : Error
+ result : str
+ '''
+ self.error = Error.from_json(error)
+ self.result = result
+
+
+class RebootActionResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence[~RebootActionResult]
+ '''
+ self.results = [RebootActionResult.from_json(o) for o in results or []]
+
+
+class RelationUnitsChange(Type):
+ _toSchema = {'changed': 'Changed', 'departed': 'Departed'}
+ _toPy = {'Changed': 'changed', 'Departed': 'departed'}
+ def __init__(self, changed=None, departed=None):
+ '''
+ changed : typing.Mapping[str, ~UnitSettings]
+ departed : typing.Sequence[str]
+ '''
+ self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()}
+ self.departed = departed
+
+
+class RelationUnitsWatchResult(Type):
+ _toSchema = {'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId', 'error': 'Error'}
+ _toPy = {'RelationUnitsWatcherId': 'relationunitswatcherid', 'Error': 'error', 'Changes': 'changes'}
+ def __init__(self, changes=None, error=None, relationunitswatcherid=None):
+ '''
+ changes : RelationUnitsChange
+ error : Error
+ relationunitswatcherid : str
+ '''
+ self.changes = RelationUnitsChange.from_json(changes)
+ self.error = Error.from_json(error)
+ self.relationunitswatcherid = relationunitswatcherid
+
+
+class UnitSettings(Type):
+ _toSchema = {'version': 'Version'}
+ _toPy = {'Version': 'version'}
+ def __init__(self, version=None):
+ '''
+ version : int
+ '''
+ self.version = version
+
+
+class RetryStrategy(Type):
+ _toSchema = {'jitterretrytime': 'JitterRetryTime', 'shouldretry': 'ShouldRetry', 'retrytimefactor': 'RetryTimeFactor', 'minretrytime': 'MinRetryTime', 'maxretrytime': 'MaxRetryTime'}
+ _toPy = {'MaxRetryTime': 'maxretrytime', 'JitterRetryTime': 'jitterretrytime', 'MinRetryTime': 'minretrytime', 'ShouldRetry': 'shouldretry', 'RetryTimeFactor': 'retrytimefactor'}
+ def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None):
+ '''
+ jitterretrytime : bool
+ maxretrytime : int
+ minretrytime : int
+ retrytimefactor : int
+ shouldretry : bool
+ '''
+ self.jitterretrytime = jitterretrytime
+ self.maxretrytime = maxretrytime
+ self.minretrytime = minretrytime
+ self.retrytimefactor = retrytimefactor
+ self.shouldretry = shouldretry
+
+
+class RetryStrategyResult(Type):
+ _toSchema = {'error': 'Error', 'result': 'Result'}
+ _toPy = {'Error': 'error', 'Result': 'result'}
+ def __init__(self, error=None, result=None):
+ '''
+ error : Error
+ result : RetryStrategy
+ '''
+ self.error = Error.from_json(error)
+ self.result = RetryStrategy.from_json(result)
+
+
+class RetryStrategyResults(Type):
+ _toSchema = {'results': 'Results'}
+ _toPy = {'Results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence[~RetryStrategyResult]
+ '''
+ self.results = [RetryStrategyResult.from_json(o) for o in results or []]
+
+
+class SSHAddressResult(Type):
+ _toSchema = {'error': 'error', 'address': 'address'}
+ _toPy = {'error': 'error', 'address': 'address'}
+ def __init__(self, address=None, error=None):
+ '''
+ address : str
+ error : Error
+ '''
+ self.address = address
+ self.error = Error.from_json(error)
+
+
+class SSHAddressResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence[~SSHAddressResult]
+ '''
+ self.results = [SSHAddressResult.from_json(o) for o in results or []]
+
+
+class SSHProxyResult(Type):
+ _toSchema = {'use_proxy': 'use-proxy'}
+ _toPy = {'use-proxy': 'use_proxy'}
+ def __init__(self, use_proxy=None):
+ '''
+ use_proxy : bool
+ '''
+ self.use_proxy = use_proxy
+
+
+class SSHPublicKeysResult(Type):
+ _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
+ _toPy = {'public-keys': 'public_keys', 'error': 'error'}
+ def __init__(self, error=None, public_keys=None):
+ '''
+ error : Error
+ public_keys : typing.Sequence[str]
+ '''
+ self.error = Error.from_json(error)
+ self.public_keys = public_keys
+
+
+class SSHPublicKeysResults(Type):
+ _toSchema = {'results': 'results'}
+ _toPy = {'results': 'results'}
+ def __init__(self, results=None):
+ '''
+ results : typing.Sequence[~SSHPublicKeysResult]
+ '''
+ self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
+
+
+class AddRelation(Type):
+ _toSchema = {'endpoints': 'Endpoints'}
+ _toPy = {'Endpoints': 'endpoints'}
+ def __init__(self, endpoints=None):
+ '''
+ endpoints : typing.Sequence[str]
+ '''
+ self.endpoints = endpoints
+
+
+class AddRelationResults(Type):
+ _toSchema = {'endpoints': 'Endpoints'}
+ _toPy = {'Endpoints': 'endpoints'}
+ def __init__(self, endpoints=None):
+ '''
+ endpoints : typing.Mapping[str, ~Relation]
+ '''
+ self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()}
+
+
+class AddServiceUnits(Type):
+ _toSchema = {'servicename': 'ServiceName', 'placement': 'Placement', 'numunits': 'NumUnits'}
+ _toPy = {'NumUnits': 'numunits', 'Placement': 'placement', 'ServiceName': 'servicename'}
+ def __init__(self, numunits=None, placement=None, servicename=None):
+ '''
+ numunits : int
+ placement : typing.Sequence[~Placement]
+ servicename : str
+ '''
+ self.numunits = numunits
+ self.placement = [Placement.from_json(o) for o in placement or []]
+ self.servicename = servicename
+
+
+class AddServiceUnitsResults(Type):
+ _toSchema = {'units': 'Units'}
+ _toPy = {'Units': 'units'}
+ def __init__(self, units=None):
+ '''
+ units : typing.Sequence[str]
+ '''
+ self.units = units
+
+
+class DestroyRelation(Type):
+ _toSchema = {'endpoints': 'Endpoints'}
+ _toPy = {'Endpoints': 'endpoints'}
+ def __init__(self, endpoints=None):
+ '''
+ endpoints : typing.Sequence[str]
+ '''
+ self.endpoints = endpoints
+
+
+class DestroyServiceUnits(Type):
+ _toSchema = {'unitnames': 'UnitNames'}
+ _toPy = {'UnitNames': 'unitnames'}
+ def __init__(self, unitnames=None):
+ '''
+ unitnames : typing.Sequence[str]
+ '''
+ self.unitnames = unitnames
+
+
+class GetServiceConstraints(Type):
+ _toSchema = {'servicename': 'ServiceName'}
+ _toPy = {'ServiceName': 'servicename'}
+ def __init__(self, servicename=None):
+ '''
+ servicename : str
+ '''
+ self.servicename = servicename
+
+
+class Relation(Type):
+ _toSchema = {'scope': 'Scope', 'name': 'Name', 'optional': 'Optional', 'role': 'Role', 'interface': 'Interface', 'limit': 'Limit'}
+ _toPy = {'Interface': 'interface', 'Scope': 'scope', 'Role': 'role', 'Name': 'name', 'Limit': 'limit', 'Optional': 'optional'}
+ def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
+ '''
+ interface : str
+ limit : int
+ name : str
+ optional : bool
+ role : str
+ scope : str
+ '''
+ self.interface = interface
+ self.limit = limit
+ self.name = name
+ self.optional = optional
+ self.role = role
+ self.scope = scope
+
+
+class ServiceCharmRelations(Type):
+ _toSchema = {'servicename': 'ServiceName'}
+ _toPy = {'ServiceName': 'servicename'}
+ def __init__(self, servicename=None):
+ '''
+ servicename : str
+ '''
+ self.servicename = servicename
+
+
+class ServiceCharmRelationsResults(Type):
+ _toSchema = {'charmrelations': 'CharmRelations'}
+ _toPy = {'CharmRelations': 'charmrelations'}
+ def __init__(self, charmrelations=None):
+ '''
+ charmrelations : typing.Sequence[str]
+ '''
+ self.charmrelations = charmrelations
+
+
+class ServiceDeploy(Type):
+ _toSchema = {'placement': 'Placement', 'numunits': 'NumUnits', 'endpointbindings': 'EndpointBindings', 'servicename': 'ServiceName', 'storage': 'Storage', 'resources': 'Resources', 'charmurl': 'CharmUrl', 'configyaml': 'ConfigYAML', 'series': 'Series', 'channel': 'Channel', 'config': 'Config', 'constraints': 'Constraints'}
+ _toPy = {'Constraints': 'constraints', 'Channel': 'channel', 'Config': 'config', 'Placement': 'placement', 'Resources': 'resources', 'Storage': 'storage', 'CharmUrl': 'charmurl', 'ConfigYAML': 'configyaml', 'NumUnits': 'numunits', 'ServiceName': 'servicename', 'EndpointBindings': 'endpointbindings', 'Series': 'series'}
+ def __init__(self, channel=None, charmurl=None, config=None, configyaml=None, constraints=None, endpointbindings=None, numunits=None, placement=None, resources=None, series=None, servicename=None, storage=None):
+ '''
+ channel : str
+ charmurl : str
+ config : typing.Mapping[str, str]
+ configyaml : str
+ constraints : Value
+ endpointbindings : typing.Mapping[str, str]
+ numunits : int
+ placement : typing.Sequence[~Placement]
+ resources : typing.Mapping[str, str]
+ series : str
+ servicename : str
+ storage : typing.Mapping[str, ~Constraints]
+ '''
+ self.channel = channel
+ self.charmurl = charmurl
+ self.config = config
+ self.configyaml = configyaml
+ self.constraints = Value.from_json(constraints)
+ self.endpointbindings = endpointbindings
+ self.numunits = numunits
+ self.placement = [Placement.from_json(o) for o in placement or []]
+ self.resources = resources
+ self.series = series
+ self.servicename = servicename
+ self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()}