Source code for juju.client._definitions

# 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


[docs]class APIHostPortsResult(Type): _toSchema = {'servers': 'servers'} _toPy = {'servers': 'servers'} def __init__(self, servers=None, **unknown_fields): ''' servers : typing.Sequence[~HostPort] ''' servers_ = [HostPort.from_json(o) for o in servers or []] # Validate arguments against known Juju API types. if servers_ is not None and not isinstance(servers_, (bytes, str, list)): raise Exception("Expected servers_ to be a Sequence, received: {}".format(type(servers_))) self.servers = servers_ self.unknown_fields = unknown_fields
[docs]class Action(Type): _toSchema = {'name': 'name', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'} _toPy = {'name': 'name', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'} def __init__(self, name=None, parameters=None, receiver=None, tag=None, **unknown_fields): ''' name : str parameters : typing.Mapping[str, typing.Any] receiver : str tag : str ''' name_ = name parameters_ = parameters receiver_ = receiver tag_ = tag # Validate arguments against known Juju API types. if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if parameters_ is not None and not isinstance(parameters_, dict): raise Exception("Expected parameters_ to be a Mapping, received: {}".format(type(parameters_))) if receiver_ is not None and not isinstance(receiver_, (bytes, str)): raise Exception("Expected receiver_ to be a str, received: {}".format(type(receiver_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.name = name_ self.parameters = parameters_ self.receiver = receiver_ self.tag = tag_ self.unknown_fields = unknown_fields
[docs]class ActionExecutionResult(Type): _toSchema = {'action_tag': 'action-tag', 'message': 'message', 'results': 'results', 'status': 'status'} _toPy = {'action-tag': 'action_tag', 'message': 'message', 'results': 'results', 'status': 'status'} def __init__(self, action_tag=None, message=None, results=None, status=None, **unknown_fields): ''' action_tag : str message : str results : typing.Mapping[str, typing.Any] status : str ''' action_tag_ = action_tag message_ = message results_ = results status_ = status # Validate arguments against known Juju API types. if action_tag_ is not None and not isinstance(action_tag_, (bytes, str)): raise Exception("Expected action_tag_ to be a str, received: {}".format(type(action_tag_))) if message_ is not None and not isinstance(message_, (bytes, str)): raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) if results_ is not None and not isinstance(results_, dict): raise Exception("Expected results_ to be a Mapping, received: {}".format(type(results_))) if status_ is not None and not isinstance(status_, (bytes, str)): raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) self.action_tag = action_tag_ self.message = message_ self.results = results_ self.status = status_ self.unknown_fields = unknown_fields
[docs]class ActionExecutionResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ActionExecutionResult] ''' results_ = [ActionExecutionResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ActionPruneArgs(Type): _toSchema = {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'} _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'} def __init__(self, max_history_mb=None, max_history_time=None, **unknown_fields): ''' max_history_mb : int max_history_time : int ''' max_history_mb_ = max_history_mb max_history_time_ = max_history_time # Validate arguments against known Juju API types. if max_history_mb_ is not None and not isinstance(max_history_mb_, int): raise Exception("Expected max_history_mb_ to be a int, received: {}".format(type(max_history_mb_))) if max_history_time_ is not None and not isinstance(max_history_time_, int): raise Exception("Expected max_history_time_ to be a int, received: {}".format(type(max_history_time_))) self.max_history_mb = max_history_mb_ self.max_history_time = max_history_time_ self.unknown_fields = unknown_fields
[docs]class ActionResult(Type): _toSchema = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'} _toPy = {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'} def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None, **unknown_fields): ''' action : Action completed : str enqueued : str error : Error message : str output : typing.Mapping[str, typing.Any] started : str status : str ''' action_ = Action.from_json(action) if action else None completed_ = completed enqueued_ = enqueued error_ = Error.from_json(error) if error else None message_ = message output_ = output started_ = started status_ = status # Validate arguments against known Juju API types. if action_ is not None and not isinstance(action_, (dict, Action)): raise Exception("Expected action_ to be a Action, received: {}".format(type(action_))) if completed_ is not None and not isinstance(completed_, (bytes, str)): raise Exception("Expected completed_ to be a str, received: {}".format(type(completed_))) if enqueued_ is not None and not isinstance(enqueued_, (bytes, str)): raise Exception("Expected enqueued_ to be a str, received: {}".format(type(enqueued_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if message_ is not None and not isinstance(message_, (bytes, str)): raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) if output_ is not None and not isinstance(output_, dict): raise Exception("Expected output_ to be a Mapping, received: {}".format(type(output_))) if started_ is not None and not isinstance(started_, (bytes, str)): raise Exception("Expected started_ to be a str, received: {}".format(type(started_))) if status_ is not None and not isinstance(status_, (bytes, str)): raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) self.action = action_ self.completed = completed_ self.enqueued = enqueued_ self.error = error_ self.message = message_ self.output = output_ self.started = started_ self.status = status_ self.unknown_fields = unknown_fields
[docs]class ActionResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ActionResult] ''' results_ = [ActionResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ActionSpec(Type): _toSchema = {'description': 'description', 'params': 'params'} _toPy = {'description': 'description', 'params': 'params'} def __init__(self, description=None, params=None, **unknown_fields): ''' description : str params : typing.Mapping[str, typing.Any] ''' description_ = description params_ = params # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if params_ is not None and not isinstance(params_, dict): raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) self.description = description_ self.params = params_ self.unknown_fields = unknown_fields
[docs]class Actions(Type): _toSchema = {'actions': 'actions'} _toPy = {'actions': 'actions'} def __init__(self, actions=None, **unknown_fields): ''' actions : typing.Sequence[~Action] ''' actions_ = [Action.from_json(o) for o in actions or []] # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (bytes, str, list)): raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) self.actions = actions_ self.unknown_fields = unknown_fields
[docs]class ActionsByName(Type): _toSchema = {'actions': 'actions', 'error': 'error', 'name': 'name'} _toPy = {'actions': 'actions', 'error': 'error', 'name': 'name'} def __init__(self, actions=None, error=None, name=None, **unknown_fields): ''' actions : typing.Sequence[~ActionResult] error : Error name : str ''' actions_ = [ActionResult.from_json(o) for o in actions or []] error_ = Error.from_json(error) if error else None name_ = name # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (bytes, str, list)): raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) self.actions = actions_ self.error = error_ self.name = name_ self.unknown_fields = unknown_fields
[docs]class ActionsByNames(Type): _toSchema = {'actions': 'actions'} _toPy = {'actions': 'actions'} def __init__(self, actions=None, **unknown_fields): ''' actions : typing.Sequence[~ActionsByName] ''' actions_ = [ActionsByName.from_json(o) for o in actions or []] # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (bytes, str, list)): raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) self.actions = actions_ self.unknown_fields = unknown_fields
[docs]class ActionsByReceiver(Type): _toSchema = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'} _toPy = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'} def __init__(self, actions=None, error=None, receiver=None, **unknown_fields): ''' actions : typing.Sequence[~ActionResult] error : Error receiver : str ''' actions_ = [ActionResult.from_json(o) for o in actions or []] error_ = Error.from_json(error) if error else None receiver_ = receiver # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (bytes, str, list)): raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if receiver_ is not None and not isinstance(receiver_, (bytes, str)): raise Exception("Expected receiver_ to be a str, received: {}".format(type(receiver_))) self.actions = actions_ self.error = error_ self.receiver = receiver_ self.unknown_fields = unknown_fields
[docs]class ActionsByReceivers(Type): _toSchema = {'actions': 'actions'} _toPy = {'actions': 'actions'} def __init__(self, actions=None, **unknown_fields): ''' actions : typing.Sequence[~ActionsByReceiver] ''' actions_ = [ActionsByReceiver.from_json(o) for o in actions or []] # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (bytes, str, list)): raise Exception("Expected actions_ to be a Sequence, received: {}".format(type(actions_))) self.actions = actions_ self.unknown_fields = unknown_fields
[docs]class AddApplicationOffer(Type): _toSchema = {'application_description': 'application-description', 'application_name': 'application-name', 'endpoints': 'endpoints', 'model_tag': 'model-tag', 'offer_name': 'offer-name'} _toPy = {'application-description': 'application_description', 'application-name': 'application_name', 'endpoints': 'endpoints', 'model-tag': 'model_tag', 'offer-name': 'offer_name'} def __init__(self, application_description=None, application_name=None, endpoints=None, model_tag=None, offer_name=None, **unknown_fields): ''' application_description : str application_name : str endpoints : typing.Mapping[str, str] model_tag : str offer_name : str ''' application_description_ = application_description application_name_ = application_name endpoints_ = endpoints model_tag_ = model_tag offer_name_ = offer_name # Validate arguments against known Juju API types. if application_description_ is not None and not isinstance(application_description_, (bytes, str)): raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) if application_name_ is not None and not isinstance(application_name_, (bytes, str)): raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) if endpoints_ is not None and not isinstance(endpoints_, dict): raise Exception("Expected endpoints_ to be a Mapping, received: {}".format(type(endpoints_))) if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) self.application_description = application_description_ self.application_name = application_name_ self.endpoints = endpoints_ self.model_tag = model_tag_ self.offer_name = offer_name_ self.unknown_fields = unknown_fields
[docs]class AddApplicationOffers(Type): _toSchema = {'offers': 'Offers'} _toPy = {'Offers': 'offers'} def __init__(self, offers=None, **unknown_fields): ''' offers : typing.Sequence[~AddApplicationOffer] ''' offers_ = [AddApplicationOffer.from_json(o) for o in offers or []] # Validate arguments against known Juju API types. if offers_ is not None and not isinstance(offers_, (bytes, str, list)): raise Exception("Expected offers_ to be a Sequence, received: {}".format(type(offers_))) self.offers = offers_ self.unknown_fields = unknown_fields
[docs]class AddApplicationUnits(Type): _toSchema = {'application': 'application', 'attach_storage': 'attach-storage', 'num_units': 'num-units', 'placement': 'placement', 'policy': 'policy'} _toPy = {'application': 'application', 'attach-storage': 'attach_storage', 'num-units': 'num_units', 'placement': 'placement', 'policy': 'policy'} def __init__(self, application=None, attach_storage=None, num_units=None, placement=None, policy=None, **unknown_fields): ''' application : str attach_storage : typing.Sequence[str] num_units : int placement : typing.Sequence[~Placement] policy : str ''' application_ = application attach_storage_ = attach_storage num_units_ = num_units placement_ = [Placement.from_json(o) for o in placement or []] policy_ = policy # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if attach_storage_ is not None and not isinstance(attach_storage_, (bytes, str, list)): raise Exception("Expected attach_storage_ to be a Sequence, received: {}".format(type(attach_storage_))) if num_units_ is not None and not isinstance(num_units_, int): raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) if placement_ is not None and not isinstance(placement_, (bytes, str, list)): raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) if policy_ is not None and not isinstance(policy_, (bytes, str)): raise Exception("Expected policy_ to be a str, received: {}".format(type(policy_))) self.application = application_ self.attach_storage = attach_storage_ self.num_units = num_units_ self.placement = placement_ self.policy = policy_ self.unknown_fields = unknown_fields
[docs]class AddApplicationUnitsResults(Type): _toSchema = {'units': 'units'} _toPy = {'units': 'units'} def __init__(self, units=None, **unknown_fields): ''' units : typing.Sequence[str] ''' units_ = units # Validate arguments against known Juju API types. if units_ is not None and not isinstance(units_, (bytes, str, list)): raise Exception("Expected units_ to be a Sequence, received: {}".format(type(units_))) self.units = units_ self.unknown_fields = unknown_fields
[docs]class AddCharm(Type): _toSchema = {'channel': 'channel', 'force': 'force', 'url': 'url'} _toPy = {'channel': 'channel', 'force': 'force', 'url': 'url'} def __init__(self, channel=None, force=None, url=None, **unknown_fields): ''' channel : str force : bool url : str ''' channel_ = channel force_ = force url_ = url # Validate arguments against known Juju API types. if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if force_ is not None and not isinstance(force_, bool): raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.channel = channel_ self.force = force_ self.url = url_ self.unknown_fields = unknown_fields
[docs]class AddCharmWithAuthorization(Type): _toSchema = {'channel': 'channel', 'force': 'force', 'macaroon': 'macaroon', 'url': 'url'} _toPy = {'channel': 'channel', 'force': 'force', 'macaroon': 'macaroon', 'url': 'url'} def __init__(self, channel=None, force=None, macaroon=None, url=None, **unknown_fields): ''' channel : str force : bool macaroon : Macaroon url : str ''' channel_ = channel force_ = force macaroon_ = Macaroon.from_json(macaroon) if macaroon else None url_ = url # Validate arguments against known Juju API types. if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if force_ is not None and not isinstance(force_, bool): raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.channel = channel_ self.force = force_ self.macaroon = macaroon_ self.url = url_ self.unknown_fields = unknown_fields
[docs]class AddCloudArgs(Type): _toSchema = {'cloud': 'cloud', 'name': 'name'} _toPy = {'cloud': 'cloud', 'name': 'name'} def __init__(self, cloud=None, name=None, **unknown_fields): ''' cloud : Cloud name : str ''' cloud_ = Cloud.from_json(cloud) if cloud else None name_ = name # Validate arguments against known Juju API types. if cloud_ is not None and not isinstance(cloud_, (dict, Cloud)): raise Exception("Expected cloud_ to be a Cloud, received: {}".format(type(cloud_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) self.cloud = cloud_ self.name = name_ self.unknown_fields = unknown_fields
[docs]class AddMachineParams(Type): _toSchema = {'addresses': 'addresses', 'constraints': 'constraints', 'container_type': 'container-type', 'disks': 'disks', 'hardware_characteristics': 'hardware-characteristics', 'instance_id': 'instance-id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent_id': 'parent-id', 'placement': 'placement', 'series': 'series'} _toPy = {'addresses': 'addresses', 'constraints': 'constraints', 'container-type': 'container_type', 'disks': 'disks', 'hardware-characteristics': 'hardware_characteristics', 'instance-id': 'instance_id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent-id': 'parent_id', 'placement': 'placement', 'series': 'series'} def __init__(self, addresses=None, constraints=None, container_type=None, disks=None, hardware_characteristics=None, instance_id=None, jobs=None, nonce=None, parent_id=None, placement=None, series=None, **unknown_fields): ''' addresses : typing.Sequence[~Address] constraints : Value container_type : str disks : typing.Sequence[~Constraints] hardware_characteristics : HardwareCharacteristics instance_id : str jobs : typing.Sequence[str] nonce : str parent_id : str placement : Placement series : str ''' addresses_ = [Address.from_json(o) for o in addresses or []] constraints_ = Value.from_json(constraints) if constraints else None container_type_ = container_type disks_ = [Constraints.from_json(o) for o in disks or []] hardware_characteristics_ = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None instance_id_ = instance_id jobs_ = jobs nonce_ = nonce parent_id_ = parent_id placement_ = Placement.from_json(placement) if placement else None series_ = series # Validate arguments against known Juju API types. if addresses_ is not None and not isinstance(addresses_, (bytes, str, list)): raise Exception("Expected addresses_ to be a Sequence, received: {}".format(type(addresses_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if container_type_ is not None and not isinstance(container_type_, (bytes, str)): raise Exception("Expected container_type_ to be a str, received: {}".format(type(container_type_))) if disks_ is not None and not isinstance(disks_, (bytes, str, list)): raise Exception("Expected disks_ to be a Sequence, received: {}".format(type(disks_))) if hardware_characteristics_ is not None and not isinstance(hardware_characteristics_, (dict, HardwareCharacteristics)): raise Exception("Expected hardware_characteristics_ to be a HardwareCharacteristics, received: {}".format(type(hardware_characteristics_))) if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) if nonce_ is not None and not isinstance(nonce_, (bytes, str)): raise Exception("Expected nonce_ to be a str, received: {}".format(type(nonce_))) if parent_id_ is not None and not isinstance(parent_id_, (bytes, str)): raise Exception("Expected parent_id_ to be a str, received: {}".format(type(parent_id_))) if placement_ is not None and not isinstance(placement_, (dict, Placement)): raise Exception("Expected placement_ to be a Placement, received: {}".format(type(placement_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) self.addresses = addresses_ self.constraints = constraints_ self.container_type = container_type_ self.disks = disks_ self.hardware_characteristics = hardware_characteristics_ self.instance_id = instance_id_ self.jobs = jobs_ self.nonce = nonce_ self.parent_id = parent_id_ self.placement = placement_ self.series = series_ self.unknown_fields = unknown_fields
[docs]class AddMachines(Type): _toSchema = {'params': 'params'} _toPy = {'params': 'params'} def __init__(self, params=None, **unknown_fields): ''' params : typing.Sequence[~AddMachineParams] ''' params_ = [AddMachineParams.from_json(o) for o in params or []] # Validate arguments against known Juju API types. if params_ is not None and not isinstance(params_, (bytes, str, list)): raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) self.params = params_ self.unknown_fields = unknown_fields
[docs]class AddMachinesResult(Type): _toSchema = {'error': 'error', 'machine': 'machine'} _toPy = {'error': 'error', 'machine': 'machine'} def __init__(self, error=None, machine=None, **unknown_fields): ''' error : Error machine : str ''' error_ = Error.from_json(error) if error else None machine_ = machine # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if machine_ is not None and not isinstance(machine_, (bytes, str)): raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) self.error = error_ self.machine = machine_ self.unknown_fields = unknown_fields
[docs]class AddMachinesResults(Type): _toSchema = {'machines': 'machines'} _toPy = {'machines': 'machines'} def __init__(self, machines=None, **unknown_fields): ''' machines : typing.Sequence[~AddMachinesResult] ''' machines_ = [AddMachinesResult.from_json(o) for o in machines or []] # Validate arguments against known Juju API types. if machines_ is not None and not isinstance(machines_, (bytes, str, list)): raise Exception("Expected machines_ to be a Sequence, received: {}".format(type(machines_))) self.machines = machines_ self.unknown_fields = unknown_fields
[docs]class AddPendingResourcesArgs(Type): _toSchema = {'addcharmwithauthorization': 'AddCharmWithAuthorization', 'channel': 'channel', 'entity': 'Entity', 'force': 'force', 'macaroon': 'macaroon', 'resources': 'resources', 'tag': 'tag', 'url': 'url'} _toPy = {'AddCharmWithAuthorization': 'addcharmwithauthorization', 'Entity': 'entity', 'channel': 'channel', 'force': 'force', 'macaroon': 'macaroon', 'resources': 'resources', 'tag': 'tag', 'url': 'url'} def __init__(self, addcharmwithauthorization=None, entity=None, channel=None, force=None, macaroon=None, resources=None, tag=None, url=None, **unknown_fields): ''' addcharmwithauthorization : AddCharmWithAuthorization entity : Entity channel : str force : bool macaroon : Macaroon resources : typing.Sequence[~CharmResource] tag : str url : str ''' addcharmwithauthorization_ = AddCharmWithAuthorization.from_json(addcharmwithauthorization) if addcharmwithauthorization else None entity_ = Entity.from_json(entity) if entity else None channel_ = channel force_ = force macaroon_ = Macaroon.from_json(macaroon) if macaroon else None resources_ = [CharmResource.from_json(o) for o in resources or []] tag_ = tag url_ = url # Validate arguments against known Juju API types. if addcharmwithauthorization_ is not None and not isinstance(addcharmwithauthorization_, (dict, AddCharmWithAuthorization)): raise Exception("Expected addcharmwithauthorization_ to be a AddCharmWithAuthorization, received: {}".format(type(addcharmwithauthorization_))) if entity_ is not None and not isinstance(entity_, (dict, Entity)): raise Exception("Expected entity_ to be a Entity, received: {}".format(type(entity_))) if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if force_ is not None and not isinstance(force_, bool): raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) if macaroon_ is not None and not isinstance(macaroon_, (dict, Macaroon)): raise Exception("Expected macaroon_ to be a Macaroon, received: {}".format(type(macaroon_))) if resources_ is not None and not isinstance(resources_, (bytes, str, list)): raise Exception("Expected resources_ to be a Sequence, received: {}".format(type(resources_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.addcharmwithauthorization = addcharmwithauthorization_ self.entity = entity_ self.channel = channel_ self.force = force_ self.macaroon = macaroon_ self.resources = resources_ self.tag = tag_ self.url = url_ self.unknown_fields = unknown_fields
[docs]class AddPendingResourcesResult(Type): _toSchema = {'error': 'error', 'errorresult': 'ErrorResult', 'pending_ids': 'pending-ids'} _toPy = {'ErrorResult': 'errorresult', 'error': 'error', 'pending-ids': 'pending_ids'} def __init__(self, errorresult=None, error=None, pending_ids=None, **unknown_fields): ''' errorresult : ErrorResult error : Error pending_ids : typing.Sequence[str] ''' errorresult_ = ErrorResult.from_json(errorresult) if errorresult else None error_ = Error.from_json(error) if error else None pending_ids_ = pending_ids # Validate arguments against known Juju API types. if errorresult_ is not None and not isinstance(errorresult_, (dict, ErrorResult)): raise Exception("Expected errorresult_ to be a ErrorResult, received: {}".format(type(errorresult_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if pending_ids_ is not None and not isinstance(pending_ids_, (bytes, str, list)): raise Exception("Expected pending_ids_ to be a Sequence, received: {}".format(type(pending_ids_))) self.errorresult = errorresult_ self.error = error_ self.pending_ids = pending_ids_ self.unknown_fields = unknown_fields
[docs]class AddRelation(Type): _toSchema = {'endpoints': 'endpoints', 'via_cidrs': 'via-cidrs'} _toPy = {'endpoints': 'endpoints', 'via-cidrs': 'via_cidrs'} def __init__(self, endpoints=None, via_cidrs=None, **unknown_fields): ''' endpoints : typing.Sequence[str] via_cidrs : typing.Sequence[str] ''' endpoints_ = endpoints via_cidrs_ = via_cidrs # Validate arguments against known Juju API types. if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) if via_cidrs_ is not None and not isinstance(via_cidrs_, (bytes, str, list)): raise Exception("Expected via_cidrs_ to be a Sequence, received: {}".format(type(via_cidrs_))) self.endpoints = endpoints_ self.via_cidrs = via_cidrs_ self.unknown_fields = unknown_fields
[docs]class AddRelationResults(Type): _toSchema = {'endpoints': 'endpoints'} _toPy = {'endpoints': 'endpoints'} def __init__(self, endpoints=None, **unknown_fields): ''' endpoints : typing.Mapping[str, ~CharmRelation] ''' endpoints_ = endpoints # Validate arguments against known Juju API types. if endpoints_ is not None and not isinstance(endpoints_, dict): raise Exception("Expected endpoints_ to be a Mapping, received: {}".format(type(endpoints_))) self.endpoints = endpoints_ self.unknown_fields = unknown_fields
[docs]class AddStorageDetails(Type): _toSchema = {'storage_tags': 'storage-tags'} _toPy = {'storage-tags': 'storage_tags'} def __init__(self, storage_tags=None, **unknown_fields): ''' storage_tags : typing.Sequence[str] ''' storage_tags_ = storage_tags # Validate arguments against known Juju API types. if storage_tags_ is not None and not isinstance(storage_tags_, (bytes, str, list)): raise Exception("Expected storage_tags_ to be a Sequence, received: {}".format(type(storage_tags_))) self.storage_tags = storage_tags_ self.unknown_fields = unknown_fields
[docs]class AddStorageResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : AddStorageDetails ''' error_ = Error.from_json(error) if error else None result_ = AddStorageDetails.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, AddStorageDetails)): raise Exception("Expected result_ to be a AddStorageDetails, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class AddStorageResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~AddStorageResult] ''' results_ = [AddStorageResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class AddSubnetParams(Type): _toSchema = {'provider_network_id': 'provider-network-id', 'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'vlan_tag': 'vlan-tag', 'zones': 'zones'} _toPy = {'provider-network-id': 'provider_network_id', 'space-tag': 'space_tag', 'subnet-provider-id': 'subnet_provider_id', 'subnet-tag': 'subnet_tag', 'vlan-tag': 'vlan_tag', 'zones': 'zones'} def __init__(self, provider_network_id=None, space_tag=None, subnet_provider_id=None, subnet_tag=None, vlan_tag=None, zones=None, **unknown_fields): ''' provider_network_id : str space_tag : str subnet_provider_id : str subnet_tag : str vlan_tag : int zones : typing.Sequence[str] ''' provider_network_id_ = provider_network_id space_tag_ = space_tag subnet_provider_id_ = subnet_provider_id subnet_tag_ = subnet_tag vlan_tag_ = vlan_tag zones_ = zones # Validate arguments against known Juju API types. if provider_network_id_ is not None and not isinstance(provider_network_id_, (bytes, str)): raise Exception("Expected provider_network_id_ to be a str, received: {}".format(type(provider_network_id_))) if space_tag_ is not None and not isinstance(space_tag_, (bytes, str)): raise Exception("Expected space_tag_ to be a str, received: {}".format(type(space_tag_))) if subnet_provider_id_ is not None and not isinstance(subnet_provider_id_, (bytes, str)): raise Exception("Expected subnet_provider_id_ to be a str, received: {}".format(type(subnet_provider_id_))) if subnet_tag_ is not None and not isinstance(subnet_tag_, (bytes, str)): raise Exception("Expected subnet_tag_ to be a str, received: {}".format(type(subnet_tag_))) if vlan_tag_ is not None and not isinstance(vlan_tag_, int): raise Exception("Expected vlan_tag_ to be a int, received: {}".format(type(vlan_tag_))) if zones_ is not None and not isinstance(zones_, (bytes, str, list)): raise Exception("Expected zones_ to be a Sequence, received: {}".format(type(zones_))) self.provider_network_id = provider_network_id_ self.space_tag = space_tag_ self.subnet_provider_id = subnet_provider_id_ self.subnet_tag = subnet_tag_ self.vlan_tag = vlan_tag_ self.zones = zones_ self.unknown_fields = unknown_fields
[docs]class AddSubnetsParams(Type): _toSchema = {'subnets': 'subnets'} _toPy = {'subnets': 'subnets'} def __init__(self, subnets=None, **unknown_fields): ''' subnets : typing.Sequence[~AddSubnetParams] ''' subnets_ = [AddSubnetParams.from_json(o) for o in subnets or []] # Validate arguments against known Juju API types. if subnets_ is not None and not isinstance(subnets_, (bytes, str, list)): raise Exception("Expected subnets_ to be a Sequence, received: {}".format(type(subnets_))) self.subnets = subnets_ self.unknown_fields = unknown_fields
[docs]class AddUser(Type): _toSchema = {'display_name': 'display-name', 'password': 'password', 'username': 'username'} _toPy = {'display-name': 'display_name', 'password': 'password', 'username': 'username'} def __init__(self, display_name=None, password=None, username=None, **unknown_fields): ''' display_name : str password : str username : str ''' display_name_ = display_name password_ = password username_ = username # Validate arguments against known Juju API types. if display_name_ is not None and not isinstance(display_name_, (bytes, str)): raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) if password_ is not None and not isinstance(password_, (bytes, str)): raise Exception("Expected password_ to be a str, received: {}".format(type(password_))) if username_ is not None and not isinstance(username_, (bytes, str)): raise Exception("Expected username_ to be a str, received: {}".format(type(username_))) self.display_name = display_name_ self.password = password_ self.username = username_ self.unknown_fields = unknown_fields
[docs]class AddUserResult(Type): _toSchema = {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'} _toPy = {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'} def __init__(self, error=None, secret_key=None, tag=None, **unknown_fields): ''' error : Error secret_key : typing.Sequence[int] tag : str ''' error_ = Error.from_json(error) if error else None secret_key_ = secret_key tag_ = tag # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if secret_key_ is not None and not isinstance(secret_key_, (bytes, str, list)): raise Exception("Expected secret_key_ to be a Sequence, received: {}".format(type(secret_key_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.error = error_ self.secret_key = secret_key_ self.tag = tag_ self.unknown_fields = unknown_fields
[docs]class AddUserResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~AddUserResult] ''' results_ = [AddUserResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class AddUsers(Type): _toSchema = {'users': 'users'} _toPy = {'users': 'users'} def __init__(self, users=None, **unknown_fields): ''' users : typing.Sequence[~AddUser] ''' users_ = [AddUser.from_json(o) for o in users or []] # Validate arguments against known Juju API types. if users_ is not None and not isinstance(users_, (bytes, str, list)): raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) self.users = users_ self.unknown_fields = unknown_fields
[docs]class Address(Type): _toSchema = {'scope': 'scope', 'space_id': 'space-id', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'} _toPy = {'scope': 'scope', 'space-id': 'space_id', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'} def __init__(self, scope=None, space_id=None, space_name=None, type_=None, value=None, **unknown_fields): ''' scope : str space_id : str space_name : str type_ : str value : str ''' scope_ = scope space_id_ = space_id space_name_ = space_name type__ = type_ value_ = value # Validate arguments against known Juju API types. if scope_ is not None and not isinstance(scope_, (bytes, str)): raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) if space_id_ is not None and not isinstance(space_id_, (bytes, str)): raise Exception("Expected space_id_ to be a str, received: {}".format(type(space_id_))) if space_name_ is not None and not isinstance(space_name_, (bytes, str)): raise Exception("Expected space_name_ to be a str, received: {}".format(type(space_name_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) if value_ is not None and not isinstance(value_, (bytes, str)): raise Exception("Expected value_ to be a str, received: {}".format(type(value_))) self.scope = scope_ self.space_id = space_id_ self.space_name = space_name_ self.type_ = type__ self.value = value_ self.unknown_fields = unknown_fields
[docs]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, **unknown_fields): ''' model_tag : str source_controller_version : Number ''' model_tag_ = model_tag source_controller_version_ = Number.from_json(source_controller_version) if source_controller_version else None # Validate arguments against known Juju API types. if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) if source_controller_version_ is not None and not isinstance(source_controller_version_, (dict, Number)): raise Exception("Expected source_controller_version_ to be a Number, received: {}".format(type(source_controller_version_))) self.model_tag = model_tag_ self.source_controller_version = source_controller_version_ self.unknown_fields = unknown_fields
[docs]class AgentGetEntitiesResult(Type): _toSchema = {'container_type': 'container-type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'} _toPy = {'container-type': 'container_type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'} def __init__(self, container_type=None, error=None, jobs=None, life=None, **unknown_fields): ''' container_type : str error : Error jobs : typing.Sequence[str] life : str ''' container_type_ = container_type error_ = Error.from_json(error) if error else None jobs_ = jobs life_ = life # Validate arguments against known Juju API types. if container_type_ is not None and not isinstance(container_type_, (bytes, str)): raise Exception("Expected container_type_ to be a str, received: {}".format(type(container_type_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if jobs_ is not None and not isinstance(jobs_, (bytes, str, list)): raise Exception("Expected jobs_ to be a Sequence, received: {}".format(type(jobs_))) if life_ is not None and not isinstance(life_, (bytes, str)): raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) self.container_type = container_type_ self.error = error_ self.jobs = jobs_ self.life = life_ self.unknown_fields = unknown_fields
[docs]class AgentGetEntitiesResults(Type): _toSchema = {'entities': 'entities'} _toPy = {'entities': 'entities'} def __init__(self, entities=None, **unknown_fields): ''' entities : typing.Sequence[~AgentGetEntitiesResult] ''' entities_ = [AgentGetEntitiesResult.from_json(o) for o in entities or []] # Validate arguments against known Juju API types. if entities_ is not None and not isinstance(entities_, (bytes, str, list)): raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) self.entities = entities_ self.unknown_fields = unknown_fields
[docs]class AgentVersionResult(Type): _toSchema = {'version': 'version'} _toPy = {'version': 'version'} def __init__(self, version=None, **unknown_fields): ''' version : Number ''' version_ = Number.from_json(version) if version else None # Validate arguments against known Juju API types. if version_ is not None and not isinstance(version_, (dict, Number)): raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) self.version = version_ self.unknown_fields = unknown_fields
[docs]class AllWatcherId(Type): _toSchema = {'watcher_id': 'watcher-id'} _toPy = {'watcher-id': 'watcher_id'} def __init__(self, watcher_id=None, **unknown_fields): ''' watcher_id : str ''' watcher_id_ = watcher_id # Validate arguments against known Juju API types. if watcher_id_ is not None and not isinstance(watcher_id_, (bytes, str)): raise Exception("Expected watcher_id_ to be a str, received: {}".format(type(watcher_id_))) self.watcher_id = watcher_id_ self.unknown_fields = unknown_fields
[docs]class AllWatcherNextResults(Type): _toSchema = {'deltas': 'deltas'} _toPy = {'deltas': 'deltas'} def __init__(self, deltas=None, **unknown_fields): ''' deltas : typing.Sequence[~Delta] ''' deltas_ = [Delta.from_json(o) for o in deltas or []] # Validate arguments against known Juju API types. if deltas_ is not None and not isinstance(deltas_, (bytes, str, list)): raise Exception("Expected deltas_ to be a Sequence, received: {}".format(type(deltas_))) self.deltas = deltas_ self.unknown_fields = unknown_fields
[docs]class AnnotationsGetResult(Type): _toSchema = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'} _toPy = {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'} def __init__(self, annotations=None, entity=None, error=None, **unknown_fields): ''' annotations : typing.Mapping[str, str] entity : str error : ErrorResult ''' annotations_ = annotations entity_ = entity error_ = ErrorResult.from_json(error) if error else None # Validate arguments against known Juju API types. if annotations_ is not None and not isinstance(annotations_, dict): raise Exception("Expected annotations_ to be a Mapping, received: {}".format(type(annotations_))) if entity_ is not None and not isinstance(entity_, (bytes, str)): raise Exception("Expected entity_ to be a str, received: {}".format(type(entity_))) if error_ is not None and not isinstance(error_, (dict, ErrorResult)): raise Exception("Expected error_ to be a ErrorResult, received: {}".format(type(error_))) self.annotations = annotations_ self.entity = entity_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class AnnotationsGetResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~AnnotationsGetResult] ''' results_ = [AnnotationsGetResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class AnnotationsSet(Type): _toSchema = {'annotations': 'annotations'} _toPy = {'annotations': 'annotations'} def __init__(self, annotations=None, **unknown_fields): ''' annotations : typing.Sequence[~EntityAnnotations] ''' annotations_ = [EntityAnnotations.from_json(o) for o in annotations or []] # Validate arguments against known Juju API types. if annotations_ is not None and not isinstance(annotations_, (bytes, str, list)): raise Exception("Expected annotations_ to be a Sequence, received: {}".format(type(annotations_))) self.annotations = annotations_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharm(Type): _toSchema = {'charm_modified_version': 'charm-modified-version', 'force_upgrade': 'force-upgrade', 'sha256': 'sha256', 'url': 'url'} _toPy = {'charm-modified-version': 'charm_modified_version', 'force-upgrade': 'force_upgrade', 'sha256': 'sha256', 'url': 'url'} def __init__(self, charm_modified_version=None, force_upgrade=None, sha256=None, url=None, **unknown_fields): ''' charm_modified_version : int force_upgrade : bool sha256 : str url : str ''' charm_modified_version_ = charm_modified_version force_upgrade_ = force_upgrade sha256_ = sha256 url_ = url # Validate arguments against known Juju API types. if charm_modified_version_ is not None and not isinstance(charm_modified_version_, int): raise Exception("Expected charm_modified_version_ to be a int, received: {}".format(type(charm_modified_version_))) if force_upgrade_ is not None and not isinstance(force_upgrade_, bool): raise Exception("Expected force_upgrade_ to be a bool, received: {}".format(type(force_upgrade_))) if sha256_ is not None and not isinstance(sha256_, (bytes, str)): raise Exception("Expected sha256_ to be a str, received: {}".format(type(sha256_))) if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.charm_modified_version = charm_modified_version_ self.force_upgrade = force_upgrade_ self.sha256 = sha256_ self.url = url_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharmActionsResult(Type): _toSchema = {'actions': 'actions', 'application_tag': 'application-tag', 'error': 'error'} _toPy = {'actions': 'actions', 'application-tag': 'application_tag', 'error': 'error'} def __init__(self, actions=None, application_tag=None, error=None, **unknown_fields): ''' actions : typing.Mapping[str, ~ActionSpec] application_tag : str error : Error ''' actions_ = actions application_tag_ = application_tag error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, dict): raise Exception("Expected actions_ to be a Mapping, received: {}".format(type(actions_))) if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) self.actions = actions_ self.application_tag = application_tag_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharmRelations(Type): _toSchema = {'application': 'application'} _toPy = {'application': 'application'} def __init__(self, application=None, **unknown_fields): ''' application : str ''' application_ = application # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) self.application = application_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharmRelationsResults(Type): _toSchema = {'charm_relations': 'charm-relations'} _toPy = {'charm-relations': 'charm_relations'} def __init__(self, charm_relations=None, **unknown_fields): ''' charm_relations : typing.Sequence[str] ''' charm_relations_ = charm_relations # Validate arguments against known Juju API types. if charm_relations_ is not None and not isinstance(charm_relations_, (bytes, str, list)): raise Exception("Expected charm_relations_ to be a Sequence, received: {}".format(type(charm_relations_))) self.charm_relations = charm_relations_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharmResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : ApplicationCharm ''' error_ = Error.from_json(error) if error else None result_ = ApplicationCharm.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, ApplicationCharm)): raise Exception("Expected result_ to be a ApplicationCharm, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class ApplicationCharmResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationCharmResult] ''' results_ = [ApplicationCharmResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationConfigSet(Type): _toSchema = {'application': 'application', 'config': 'config', 'generation': 'generation'} _toPy = {'application': 'application', 'config': 'config', 'generation': 'generation'} def __init__(self, application=None, config=None, generation=None, **unknown_fields): ''' application : str config : typing.Mapping[str, str] generation : str ''' application_ = application config_ = config generation_ = generation # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if generation_ is not None and not isinstance(generation_, (bytes, str)): raise Exception("Expected generation_ to be a str, received: {}".format(type(generation_))) self.application = application_ self.config = config_ self.generation = generation_ self.unknown_fields = unknown_fields
[docs]class ApplicationConfigSetArgs(Type): _toSchema = {'args': 'Args'} _toPy = {'Args': 'args'} def __init__(self, args=None, **unknown_fields): ''' args : typing.Sequence[~ApplicationConfigSet] ''' args_ = [ApplicationConfigSet.from_json(o) for o in args or []] # Validate arguments against known Juju API types. if args_ is not None and not isinstance(args_, (bytes, str, list)): raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) self.args = args_ self.unknown_fields = unknown_fields
[docs]class ApplicationConfigUnsetArgs(Type): _toSchema = {'args': 'Args'} _toPy = {'Args': 'args'} def __init__(self, args=None, **unknown_fields): ''' args : typing.Sequence[~ApplicationUnset] ''' args_ = [ApplicationUnset.from_json(o) for o in args or []] # Validate arguments against known Juju API types. if args_ is not None and not isinstance(args_, (bytes, str, list)): raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) self.args = args_ self.unknown_fields = unknown_fields
[docs]class ApplicationConstraint(Type): _toSchema = {'constraints': 'constraints', 'error': 'error'} _toPy = {'constraints': 'constraints', 'error': 'error'} def __init__(self, constraints=None, error=None, **unknown_fields): ''' constraints : Value error : Error ''' constraints_ = Value.from_json(constraints) if constraints else None error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) self.constraints = constraints_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class ApplicationDeploy(Type): _toSchema = {'application': 'application', 'attach_storage': 'attach-storage', 'channel': 'channel', 'charm_url': 'charm-url', 'config': 'config', 'config_yaml': 'config-yaml', 'constraints': 'constraints', 'devices': 'devices', 'endpoint_bindings': 'endpoint-bindings', 'num_units': 'num-units', 'placement': 'placement', 'policy': 'policy', 'resources': 'resources', 'series': 'series', 'storage': 'storage'} _toPy = {'application': 'application', 'attach-storage': 'attach_storage', 'channel': 'channel', 'charm-url': 'charm_url', 'config': 'config', 'config-yaml': 'config_yaml', 'constraints': 'constraints', 'devices': 'devices', 'endpoint-bindings': 'endpoint_bindings', 'num-units': 'num_units', 'placement': 'placement', 'policy': 'policy', 'resources': 'resources', 'series': 'series', 'storage': 'storage'} def __init__(self, application=None, attach_storage=None, channel=None, charm_url=None, config=None, config_yaml=None, constraints=None, devices=None, endpoint_bindings=None, num_units=None, placement=None, policy=None, resources=None, series=None, storage=None, **unknown_fields): ''' application : str attach_storage : typing.Sequence[str] channel : str charm_url : str config : typing.Mapping[str, str] config_yaml : str constraints : Value devices : typing.Mapping[str, ~Constraints] endpoint_bindings : typing.Mapping[str, str] num_units : int placement : typing.Sequence[~Placement] policy : str resources : typing.Mapping[str, str] series : str storage : typing.Mapping[str, ~Constraints] ''' application_ = application attach_storage_ = attach_storage channel_ = channel charm_url_ = charm_url config_ = config config_yaml_ = config_yaml constraints_ = Value.from_json(constraints) if constraints else None devices_ = devices endpoint_bindings_ = endpoint_bindings num_units_ = num_units placement_ = [Placement.from_json(o) for o in placement or []] policy_ = policy resources_ = resources series_ = series storage_ = storage # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if attach_storage_ is not None and not isinstance(attach_storage_, (bytes, str, list)): raise Exception("Expected attach_storage_ to be a Sequence, received: {}".format(type(attach_storage_))) if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if config_yaml_ is not None and not isinstance(config_yaml_, (bytes, str)): raise Exception("Expected config_yaml_ to be a str, received: {}".format(type(config_yaml_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if devices_ is not None and not isinstance(devices_, dict): raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) if num_units_ is not None and not isinstance(num_units_, int): raise Exception("Expected num_units_ to be a int, received: {}".format(type(num_units_))) if placement_ is not None and not isinstance(placement_, (bytes, str, list)): raise Exception("Expected placement_ to be a Sequence, received: {}".format(type(placement_))) if policy_ is not None and not isinstance(policy_, (bytes, str)): raise Exception("Expected policy_ to be a str, received: {}".format(type(policy_))) if resources_ is not None and not isinstance(resources_, dict): raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) if storage_ is not None and not isinstance(storage_, dict): raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) self.application = application_ self.attach_storage = attach_storage_ self.channel = channel_ self.charm_url = charm_url_ self.config = config_ self.config_yaml = config_yaml_ self.constraints = constraints_ self.devices = devices_ self.endpoint_bindings = endpoint_bindings_ self.num_units = num_units_ self.placement = placement_ self.policy = policy_ self.resources = resources_ self.series = series_ self.storage = storage_ self.unknown_fields = unknown_fields
[docs]class ApplicationDestroy(Type): _toSchema = {'application': 'application'} _toPy = {'application': 'application'} def __init__(self, application=None, **unknown_fields): ''' application : str ''' application_ = application # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) self.application = application_ self.unknown_fields = unknown_fields
[docs]class ApplicationExpose(Type): _toSchema = {'application': 'application'} _toPy = {'application': 'application'} def __init__(self, application=None, **unknown_fields): ''' application : str ''' application_ = application # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) self.application = application_ self.unknown_fields = unknown_fields
[docs]class ApplicationGet(Type): _toSchema = {'application': 'application', 'branch': 'branch'} _toPy = {'application': 'application', 'branch': 'branch'} def __init__(self, application=None, branch=None, **unknown_fields): ''' application : str branch : str ''' application_ = application branch_ = branch # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) self.application = application_ self.branch = branch_ self.unknown_fields = unknown_fields
[docs]class ApplicationGetArgs(Type): _toSchema = {'args': 'args'} _toPy = {'args': 'args'} def __init__(self, args=None, **unknown_fields): ''' args : typing.Sequence[~ApplicationGet] ''' args_ = [ApplicationGet.from_json(o) for o in args or []] # Validate arguments against known Juju API types. if args_ is not None and not isinstance(args_, (bytes, str, list)): raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) self.args = args_ self.unknown_fields = unknown_fields
[docs]class ApplicationGetConfigResults(Type): _toSchema = {'results': 'Results'} _toPy = {'Results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ConfigResult] ''' results_ = [ConfigResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationGetConstraintsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationConstraint] ''' results_ = [ApplicationConstraint.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationGetResults(Type): _toSchema = {'application': 'application', 'application_config': 'application-config', 'channel': 'channel', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'} _toPy = {'application': 'application', 'application-config': 'application_config', 'channel': 'channel', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'} def __init__(self, application=None, application_config=None, channel=None, charm=None, config=None, constraints=None, series=None, **unknown_fields): ''' application : str application_config : typing.Mapping[str, typing.Any] channel : str charm : str config : typing.Mapping[str, typing.Any] constraints : Value series : str ''' application_ = application application_config_ = application_config channel_ = channel charm_ = charm config_ = config constraints_ = Value.from_json(constraints) if constraints else None series_ = series # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if application_config_ is not None and not isinstance(application_config_, dict): raise Exception("Expected application_config_ to be a Mapping, received: {}".format(type(application_config_))) if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if charm_ is not None and not isinstance(charm_, (bytes, str)): raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) self.application = application_ self.application_config = application_config_ self.channel = channel_ self.charm = charm_ self.config = config_ self.constraints = constraints_ self.series = series_ self.unknown_fields = unknown_fields
[docs]class ApplicationInfo(Type): _toSchema = {'channel': 'channel', 'charm': 'charm', 'constraints': 'constraints', 'endpoint_bindings': 'endpoint-bindings', 'exposed': 'exposed', 'principal': 'principal', 'remote': 'remote', 'series': 'series', 'tag': 'tag'} _toPy = {'channel': 'channel', 'charm': 'charm', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'exposed': 'exposed', 'principal': 'principal', 'remote': 'remote', 'series': 'series', 'tag': 'tag'} def __init__(self, channel=None, charm=None, constraints=None, endpoint_bindings=None, exposed=None, principal=None, remote=None, series=None, tag=None, **unknown_fields): ''' channel : str charm : str constraints : Value endpoint_bindings : typing.Mapping[str, str] exposed : bool principal : bool remote : bool series : str tag : str ''' channel_ = channel charm_ = charm constraints_ = Value.from_json(constraints) if constraints else None endpoint_bindings_ = endpoint_bindings exposed_ = exposed principal_ = principal remote_ = remote series_ = series tag_ = tag # Validate arguments against known Juju API types. if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if charm_ is not None and not isinstance(charm_, (bytes, str)): raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) if exposed_ is not None and not isinstance(exposed_, bool): raise Exception("Expected exposed_ to be a bool, received: {}".format(type(exposed_))) if principal_ is not None and not isinstance(principal_, bool): raise Exception("Expected principal_ to be a bool, received: {}".format(type(principal_))) if remote_ is not None and not isinstance(remote_, bool): raise Exception("Expected remote_ to be a bool, received: {}".format(type(remote_))) 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_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.channel = channel_ self.charm = charm_ self.constraints = constraints_ self.endpoint_bindings = endpoint_bindings_ self.exposed = exposed_ self.principal = principal_ self.remote = remote_ self.series = series_ self.tag = tag_ self.unknown_fields = unknown_fields
[docs]class ApplicationInfoResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : ApplicationInfo ''' error_ = Error.from_json(error) if error else None result_ = ApplicationInfo.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, ApplicationInfo)): raise Exception("Expected result_ to be a ApplicationInfo, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class ApplicationInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationInfoResult] ''' results_ = [ApplicationInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationMetricCredential(Type): _toSchema = {'application': 'application', 'metrics_credentials': 'metrics-credentials'} _toPy = {'application': 'application', 'metrics-credentials': 'metrics_credentials'} def __init__(self, application=None, metrics_credentials=None, **unknown_fields): ''' application : str metrics_credentials : typing.Sequence[int] ''' application_ = application metrics_credentials_ = metrics_credentials # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if metrics_credentials_ is not None and not isinstance(metrics_credentials_, (bytes, str, list)): raise Exception("Expected metrics_credentials_ to be a Sequence, received: {}".format(type(metrics_credentials_))) self.application = application_ self.metrics_credentials = metrics_credentials_ self.unknown_fields = unknown_fields
[docs]class ApplicationMetricCredentials(Type): _toSchema = {'creds': 'creds'} _toPy = {'creds': 'creds'} def __init__(self, creds=None, **unknown_fields): ''' creds : typing.Sequence[~ApplicationMetricCredential] ''' creds_ = [ApplicationMetricCredential.from_json(o) for o in creds or []] # Validate arguments against known Juju API types. if creds_ is not None and not isinstance(creds_, (bytes, str, list)): raise Exception("Expected creds_ to be a Sequence, received: {}".format(type(creds_))) self.creds = creds_ self.unknown_fields = unknown_fields
[docs]class ApplicationOffer(Type): _toSchema = {'access': 'access', 'application_description': 'application-description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces'} _toPy = {'access': 'access', 'application-description': 'application_description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces'} def __init__(self, access=None, application_description=None, bindings=None, endpoints=None, offer_name=None, offer_url=None, source_model_tag=None, spaces=None, **unknown_fields): ''' access : str application_description : str bindings : typing.Mapping[str, str] endpoints : typing.Sequence[~RemoteEndpoint] offer_name : str offer_url : str source_model_tag : str spaces : typing.Sequence[~RemoteSpace] ''' access_ = access application_description_ = application_description bindings_ = bindings endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] offer_name_ = offer_name offer_url_ = offer_url source_model_tag_ = source_model_tag spaces_ = [RemoteSpace.from_json(o) for o in spaces or []] # Validate arguments against known Juju API types. if access_ is not None and not isinstance(access_, (bytes, str)): raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) if application_description_ is not None and not isinstance(application_description_, (bytes, str)): raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) if bindings_ is not None and not isinstance(bindings_, dict): raise Exception("Expected bindings_ to be a Mapping, received: {}".format(type(bindings_))) if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) self.access = access_ self.application_description = application_description_ self.bindings = bindings_ self.endpoints = endpoints_ self.offer_name = offer_name_ self.offer_url = offer_url_ self.source_model_tag = source_model_tag_ self.spaces = spaces_ self.unknown_fields = unknown_fields
[docs]class ApplicationOfferAdminDetails(Type): _toSchema = {'application_description': 'application-description', 'application_name': 'application-name', 'applicationofferdetails': 'ApplicationOfferDetails', 'bindings': 'bindings', 'charm_url': 'charm-url', 'connections': 'connections', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces', 'users': 'users'} _toPy = {'ApplicationOfferDetails': 'applicationofferdetails', 'application-description': 'application_description', 'application-name': 'application_name', 'bindings': 'bindings', 'charm-url': 'charm_url', 'connections': 'connections', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces', 'users': 'users'} def __init__(self, applicationofferdetails=None, application_description=None, application_name=None, bindings=None, charm_url=None, connections=None, endpoints=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, spaces=None, users=None, **unknown_fields): ''' applicationofferdetails : ApplicationOfferDetails application_description : str application_name : str bindings : typing.Mapping[str, str] charm_url : str connections : typing.Sequence[~OfferConnection] endpoints : typing.Sequence[~RemoteEndpoint] offer_name : str offer_url : str offer_uuid : str source_model_tag : str spaces : typing.Sequence[~RemoteSpace] users : typing.Sequence[~OfferUserDetails] ''' applicationofferdetails_ = ApplicationOfferDetails.from_json(applicationofferdetails) if applicationofferdetails else None application_description_ = application_description application_name_ = application_name bindings_ = bindings charm_url_ = charm_url connections_ = [OfferConnection.from_json(o) for o in connections or []] endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] offer_name_ = offer_name offer_url_ = offer_url offer_uuid_ = offer_uuid source_model_tag_ = source_model_tag spaces_ = [RemoteSpace.from_json(o) for o in spaces or []] users_ = [OfferUserDetails.from_json(o) for o in users or []] # Validate arguments against known Juju API types. if applicationofferdetails_ is not None and not isinstance(applicationofferdetails_, (dict, ApplicationOfferDetails)): raise Exception("Expected applicationofferdetails_ to be a ApplicationOfferDetails, received: {}".format(type(applicationofferdetails_))) if application_description_ is not None and not isinstance(application_description_, (bytes, str)): raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) if application_name_ is not None and not isinstance(application_name_, (bytes, str)): raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) if bindings_ is not None and not isinstance(bindings_, dict): raise Exception("Expected bindings_ to be a Mapping, received: {}".format(type(bindings_))) if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) if connections_ is not None and not isinstance(connections_, (bytes, str, list)): raise Exception("Expected connections_ to be a Sequence, received: {}".format(type(connections_))) if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) if users_ is not None and not isinstance(users_, (bytes, str, list)): raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) self.applicationofferdetails = applicationofferdetails_ self.application_description = application_description_ self.application_name = application_name_ self.bindings = bindings_ self.charm_url = charm_url_ self.connections = connections_ self.endpoints = endpoints_ self.offer_name = offer_name_ self.offer_url = offer_url_ self.offer_uuid = offer_uuid_ self.source_model_tag = source_model_tag_ self.spaces = spaces_ self.users = users_ self.unknown_fields = unknown_fields
[docs]class ApplicationOfferDetails(Type): _toSchema = {'application_description': 'application-description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer_name': 'offer-name', 'offer_url': 'offer-url', 'offer_uuid': 'offer-uuid', 'source_model_tag': 'source-model-tag', 'spaces': 'spaces', 'users': 'users'} _toPy = {'application-description': 'application_description', 'bindings': 'bindings', 'endpoints': 'endpoints', 'offer-name': 'offer_name', 'offer-url': 'offer_url', 'offer-uuid': 'offer_uuid', 'source-model-tag': 'source_model_tag', 'spaces': 'spaces', 'users': 'users'} def __init__(self, application_description=None, bindings=None, endpoints=None, offer_name=None, offer_url=None, offer_uuid=None, source_model_tag=None, spaces=None, users=None, **unknown_fields): ''' application_description : str bindings : typing.Mapping[str, str] endpoints : typing.Sequence[~RemoteEndpoint] offer_name : str offer_url : str offer_uuid : str source_model_tag : str spaces : typing.Sequence[~RemoteSpace] users : typing.Sequence[~OfferUserDetails] ''' application_description_ = application_description bindings_ = bindings endpoints_ = [RemoteEndpoint.from_json(o) for o in endpoints or []] offer_name_ = offer_name offer_url_ = offer_url offer_uuid_ = offer_uuid source_model_tag_ = source_model_tag spaces_ = [RemoteSpace.from_json(o) for o in spaces or []] users_ = [OfferUserDetails.from_json(o) for o in users or []] # Validate arguments against known Juju API types. if application_description_ is not None and not isinstance(application_description_, (bytes, str)): raise Exception("Expected application_description_ to be a str, received: {}".format(type(application_description_))) if bindings_ is not None and not isinstance(bindings_, dict): raise Exception("Expected bindings_ to be a Mapping, received: {}".format(type(bindings_))) if endpoints_ is not None and not isinstance(endpoints_, (bytes, str, list)): raise Exception("Expected endpoints_ to be a Sequence, received: {}".format(type(endpoints_))) if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) if offer_url_ is not None and not isinstance(offer_url_, (bytes, str)): raise Exception("Expected offer_url_ to be a str, received: {}".format(type(offer_url_))) if offer_uuid_ is not None and not isinstance(offer_uuid_, (bytes, str)): raise Exception("Expected offer_uuid_ to be a str, received: {}".format(type(offer_uuid_))) if source_model_tag_ is not None and not isinstance(source_model_tag_, (bytes, str)): raise Exception("Expected source_model_tag_ to be a str, received: {}".format(type(source_model_tag_))) if spaces_ is not None and not isinstance(spaces_, (bytes, str, list)): raise Exception("Expected spaces_ to be a Sequence, received: {}".format(type(spaces_))) if users_ is not None and not isinstance(users_, (bytes, str, list)): raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) self.application_description = application_description_ self.bindings = bindings_ self.endpoints = endpoints_ self.offer_name = offer_name_ self.offer_url = offer_url_ self.offer_uuid = offer_uuid_ self.source_model_tag = source_model_tag_ self.spaces = spaces_ self.users = users_ self.unknown_fields = unknown_fields
[docs]class ApplicationOfferResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : ApplicationOfferAdminDetails ''' error_ = Error.from_json(error) if error else None result_ = ApplicationOfferAdminDetails.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, ApplicationOfferAdminDetails)): raise Exception("Expected result_ to be a ApplicationOfferAdminDetails, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class ApplicationOfferStatus(Type): _toSchema = {'active_connected_count': 'active-connected-count', 'application_name': 'application-name', 'charm': 'charm', 'endpoints': 'endpoints', 'err': 'err', 'offer_name': 'offer-name', 'total_connected_count': 'total-connected-count'} _toPy = {'active-connected-count': 'active_connected_count', 'application-name': 'application_name', 'charm': 'charm', 'endpoints': 'endpoints', 'err': 'err', 'offer-name': 'offer_name', 'total-connected-count': 'total_connected_count'} def __init__(self, active_connected_count=None, application_name=None, charm=None, endpoints=None, err=None, offer_name=None, total_connected_count=None, **unknown_fields): ''' active_connected_count : int application_name : str charm : str endpoints : typing.Mapping[str, ~RemoteEndpoint] err : Error offer_name : str total_connected_count : int ''' active_connected_count_ = active_connected_count application_name_ = application_name charm_ = charm endpoints_ = endpoints err_ = Error.from_json(err) if err else None offer_name_ = offer_name total_connected_count_ = total_connected_count # Validate arguments against known Juju API types. if active_connected_count_ is not None and not isinstance(active_connected_count_, int): raise Exception("Expected active_connected_count_ to be a int, received: {}".format(type(active_connected_count_))) if application_name_ is not None and not isinstance(application_name_, (bytes, str)): raise Exception("Expected application_name_ to be a str, received: {}".format(type(application_name_))) if charm_ is not None and not isinstance(charm_, (bytes, str)): raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) if endpoints_ is not None and not isinstance(endpoints_, dict): raise Exception("Expected endpoints_ to be a Mapping, received: {}".format(type(endpoints_))) if err_ is not None and not isinstance(err_, (dict, Error)): raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) if offer_name_ is not None and not isinstance(offer_name_, (bytes, str)): raise Exception("Expected offer_name_ to be a str, received: {}".format(type(offer_name_))) if total_connected_count_ is not None and not isinstance(total_connected_count_, int): raise Exception("Expected total_connected_count_ to be a int, received: {}".format(type(total_connected_count_))) self.active_connected_count = active_connected_count_ self.application_name = application_name_ self.charm = charm_ self.endpoints = endpoints_ self.err = err_ self.offer_name = offer_name_ self.total_connected_count = total_connected_count_ self.unknown_fields = unknown_fields
[docs]class ApplicationOffersResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationOfferResult] ''' results_ = [ApplicationOfferResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationRelationsChange(Type): _toSchema = {'changed': 'changed', 'removed': 'removed'} _toPy = {'changed': 'changed', 'removed': 'removed'} def __init__(self, changed=None, removed=None, **unknown_fields): ''' changed : typing.Sequence[~RelationChange] removed : typing.Sequence[int] ''' changed_ = [RelationChange.from_json(o) for o in changed or []] removed_ = removed # Validate arguments against known Juju API types. if changed_ is not None and not isinstance(changed_, (bytes, str, list)): raise Exception("Expected changed_ to be a Sequence, received: {}".format(type(changed_))) if removed_ is not None and not isinstance(removed_, (bytes, str, list)): raise Exception("Expected removed_ to be a Sequence, received: {}".format(type(removed_))) self.changed = changed_ self.removed = removed_ self.unknown_fields = unknown_fields
[docs]class ApplicationRelationsWatchResult(Type): _toSchema = {'applicationrelationswatcherid': 'ApplicationRelationsWatcherId', 'changes': 'changes', 'error': 'error'} _toPy = {'ApplicationRelationsWatcherId': 'applicationrelationswatcherid', 'changes': 'changes', 'error': 'error'} def __init__(self, applicationrelationswatcherid=None, changes=None, error=None, **unknown_fields): ''' applicationrelationswatcherid : str changes : ApplicationRelationsChange error : Error ''' applicationrelationswatcherid_ = applicationrelationswatcherid changes_ = ApplicationRelationsChange.from_json(changes) if changes else None error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. if applicationrelationswatcherid_ is not None and not isinstance(applicationrelationswatcherid_, (bytes, str)): raise Exception("Expected applicationrelationswatcherid_ to be a str, received: {}".format(type(applicationrelationswatcherid_))) if changes_ is not None and not isinstance(changes_, (dict, ApplicationRelationsChange)): raise Exception("Expected changes_ to be a ApplicationRelationsChange, received: {}".format(type(changes_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) self.applicationrelationswatcherid = applicationrelationswatcherid_ self.changes = changes_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class ApplicationSet(Type): _toSchema = {'application': 'application', 'branch': 'branch', 'options': 'options'} _toPy = {'application': 'application', 'branch': 'branch', 'options': 'options'} def __init__(self, application=None, branch=None, options=None, **unknown_fields): ''' application : str branch : str options : typing.Mapping[str, str] ''' application_ = application branch_ = branch options_ = options # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) if options_ is not None and not isinstance(options_, dict): raise Exception("Expected options_ to be a Mapping, received: {}".format(type(options_))) self.application = application_ self.branch = branch_ self.options = options_ self.unknown_fields = unknown_fields
[docs]class ApplicationSetCharm(Type): _toSchema = {'application': 'application', 'channel': 'channel', 'charm_url': 'charm-url', 'config_settings': 'config-settings', 'config_settings_yaml': 'config-settings-yaml', 'force': 'force', 'force_series': 'force-series', 'force_units': 'force-units', 'generation': 'generation', 'resource_ids': 'resource-ids', 'storage_constraints': 'storage-constraints'} _toPy = {'application': 'application', 'channel': 'channel', 'charm-url': 'charm_url', 'config-settings': 'config_settings', 'config-settings-yaml': 'config_settings_yaml', 'force': 'force', 'force-series': 'force_series', 'force-units': 'force_units', 'generation': 'generation', 'resource-ids': 'resource_ids', 'storage-constraints': 'storage_constraints'} def __init__(self, application=None, channel=None, charm_url=None, config_settings=None, config_settings_yaml=None, force=None, force_series=None, force_units=None, generation=None, resource_ids=None, storage_constraints=None, **unknown_fields): ''' application : str channel : str charm_url : str config_settings : typing.Mapping[str, str] config_settings_yaml : str force : bool force_series : bool force_units : bool generation : str resource_ids : typing.Mapping[str, str] storage_constraints : typing.Mapping[str, ~StorageConstraints] ''' application_ = application channel_ = channel charm_url_ = charm_url config_settings_ = config_settings config_settings_yaml_ = config_settings_yaml force_ = force force_series_ = force_series force_units_ = force_units generation_ = generation resource_ids_ = resource_ids storage_constraints_ = storage_constraints # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if channel_ is not None and not isinstance(channel_, (bytes, str)): raise Exception("Expected channel_ to be a str, received: {}".format(type(channel_))) if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) if config_settings_ is not None and not isinstance(config_settings_, dict): raise Exception("Expected config_settings_ to be a Mapping, received: {}".format(type(config_settings_))) if config_settings_yaml_ is not None and not isinstance(config_settings_yaml_, (bytes, str)): raise Exception("Expected config_settings_yaml_ to be a str, received: {}".format(type(config_settings_yaml_))) if force_ is not None and not isinstance(force_, bool): raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) if force_series_ is not None and not isinstance(force_series_, bool): raise Exception("Expected force_series_ to be a bool, received: {}".format(type(force_series_))) if force_units_ is not None and not isinstance(force_units_, bool): raise Exception("Expected force_units_ to be a bool, received: {}".format(type(force_units_))) if generation_ is not None and not isinstance(generation_, (bytes, str)): raise Exception("Expected generation_ to be a str, received: {}".format(type(generation_))) if resource_ids_ is not None and not isinstance(resource_ids_, dict): raise Exception("Expected resource_ids_ to be a Mapping, received: {}".format(type(resource_ids_))) if storage_constraints_ is not None and not isinstance(storage_constraints_, dict): raise Exception("Expected storage_constraints_ to be a Mapping, received: {}".format(type(storage_constraints_))) self.application = application_ self.channel = channel_ self.charm_url = charm_url_ self.config_settings = config_settings_ self.config_settings_yaml = config_settings_yaml_ self.force = force_ self.force_series = force_series_ self.force_units = force_units_ self.generation = generation_ self.resource_ids = resource_ids_ self.storage_constraints = storage_constraints_ self.unknown_fields = unknown_fields
[docs]class ApplicationSetCharmProfile(Type): _toSchema = {'application': 'application', 'charm_url': 'charm-url'} _toPy = {'application': 'application', 'charm-url': 'charm_url'} def __init__(self, application=None, charm_url=None, **unknown_fields): ''' application : str charm_url : str ''' application_ = application charm_url_ = charm_url # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) self.application = application_ self.charm_url = charm_url_ self.unknown_fields = unknown_fields
[docs]class ApplicationStatus(Type): _toSchema = {'can_upgrade_to': 'can-upgrade-to', 'charm': 'charm', 'charm_profile': 'charm-profile', 'charm_verion': 'charm-verion', 'endpoint_bindings': 'endpoint-bindings', 'err': 'err', 'exposed': 'exposed', 'int_': 'int', 'life': 'life', 'meter_statuses': 'meter-statuses', 'provider_id': 'provider-id', 'public_address': 'public-address', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate_to': 'subordinate-to', 'units': 'units', 'workload_version': 'workload-version'} _toPy = {'can-upgrade-to': 'can_upgrade_to', 'charm': 'charm', 'charm-profile': 'charm_profile', 'charm-verion': 'charm_verion', 'endpoint-bindings': 'endpoint_bindings', 'err': 'err', 'exposed': 'exposed', 'int': 'int_', 'life': 'life', 'meter-statuses': 'meter_statuses', 'provider-id': 'provider_id', 'public-address': 'public_address', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate-to': 'subordinate_to', 'units': 'units', 'workload-version': 'workload_version'} def __init__(self, can_upgrade_to=None, charm=None, charm_profile=None, charm_verion=None, endpoint_bindings=None, err=None, exposed=None, int_=None, life=None, meter_statuses=None, provider_id=None, public_address=None, relations=None, series=None, status=None, subordinate_to=None, units=None, workload_version=None, **unknown_fields): ''' can_upgrade_to : str charm : str charm_profile : str charm_verion : str endpoint_bindings : typing.Mapping[str, str] err : Error exposed : bool int_ : int life : str meter_statuses : typing.Mapping[str, ~MeterStatus] provider_id : str public_address : str relations : typing.Sequence[str] series : str status : DetailedStatus subordinate_to : typing.Sequence[str] units : typing.Mapping[str, ~UnitStatus] workload_version : str ''' can_upgrade_to_ = can_upgrade_to charm_ = charm charm_profile_ = charm_profile charm_verion_ = charm_verion endpoint_bindings_ = endpoint_bindings err_ = Error.from_json(err) if err else None exposed_ = exposed int__ = int_ life_ = life meter_statuses_ = meter_statuses provider_id_ = provider_id public_address_ = public_address relations_ = relations series_ = series status_ = DetailedStatus.from_json(status) if status else None subordinate_to_ = subordinate_to units_ = units workload_version_ = workload_version # Validate arguments against known Juju API types. if can_upgrade_to_ is not None and not isinstance(can_upgrade_to_, (bytes, str)): raise Exception("Expected can_upgrade_to_ to be a str, received: {}".format(type(can_upgrade_to_))) if charm_ is not None and not isinstance(charm_, (bytes, str)): raise Exception("Expected charm_ to be a str, received: {}".format(type(charm_))) if charm_profile_ is not None and not isinstance(charm_profile_, (bytes, str)): raise Exception("Expected charm_profile_ to be a str, received: {}".format(type(charm_profile_))) if charm_verion_ is not None and not isinstance(charm_verion_, (bytes, str)): raise Exception("Expected charm_verion_ to be a str, received: {}".format(type(charm_verion_))) if endpoint_bindings_ is not None and not isinstance(endpoint_bindings_, dict): raise Exception("Expected endpoint_bindings_ to be a Mapping, received: {}".format(type(endpoint_bindings_))) if err_ is not None and not isinstance(err_, (dict, Error)): raise Exception("Expected err_ to be a Error, received: {}".format(type(err_))) if exposed_ is not None and not isinstance(exposed_, bool): raise Exception("Expected exposed_ to be a bool, received: {}".format(type(exposed_))) if int__ is not None and not isinstance(int__, int): raise Exception("Expected int__ to be a int, received: {}".format(type(int__))) if life_ is not None and not isinstance(life_, (bytes, str)): raise Exception("Expected life_ to be a str, received: {}".format(type(life_))) if meter_statuses_ is not None and not isinstance(meter_statuses_, dict): raise Exception("Expected meter_statuses_ to be a Mapping, received: {}".format(type(meter_statuses_))) if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) if public_address_ is not None and not isinstance(public_address_, (bytes, str)): raise Exception("Expected public_address_ to be a str, received: {}".format(type(public_address_))) if relations_ is not None and not isinstance(relations_, (bytes, str, list)): raise Exception("Expected relations_ to be a Sequence, received: {}".format(type(relations_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) if status_ is not None and not isinstance(status_, (dict, DetailedStatus)): raise Exception("Expected status_ to be a DetailedStatus, received: {}".format(type(status_))) if subordinate_to_ is not None and not isinstance(subordinate_to_, (bytes, str, list)): raise Exception("Expected subordinate_to_ to be a Sequence, received: {}".format(type(subordinate_to_))) if units_ is not None and not isinstance(units_, dict): raise Exception("Expected units_ to be a Mapping, received: {}".format(type(units_))) if workload_version_ is not None and not isinstance(workload_version_, (bytes, str)): raise Exception("Expected workload_version_ to be a str, received: {}".format(type(workload_version_))) self.can_upgrade_to = can_upgrade_to_ self.charm = charm_ self.charm_profile = charm_profile_ self.charm_verion = charm_verion_ self.endpoint_bindings = endpoint_bindings_ self.err = err_ self.exposed = exposed_ self.int_ = int__ self.life = life_ self.meter_statuses = meter_statuses_ self.provider_id = provider_id_ self.public_address = public_address_ self.relations = relations_ self.series = series_ self.status = status_ self.subordinate_to = subordinate_to_ self.units = units_ self.workload_version = workload_version_ self.unknown_fields = unknown_fields
[docs]class ApplicationStatusResult(Type): _toSchema = {'application': 'application', 'error': 'error', 'units': 'units'} _toPy = {'application': 'application', 'error': 'error', 'units': 'units'} def __init__(self, application=None, error=None, units=None, **unknown_fields): ''' application : StatusResult error : Error units : typing.Mapping[str, ~StatusResult] ''' application_ = StatusResult.from_json(application) if application else None error_ = Error.from_json(error) if error else None units_ = units # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (dict, StatusResult)): raise Exception("Expected application_ to be a StatusResult, received: {}".format(type(application_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if units_ is not None and not isinstance(units_, dict): raise Exception("Expected units_ to be a Mapping, received: {}".format(type(units_))) self.application = application_ self.error = error_ self.units = units_ self.unknown_fields = unknown_fields
[docs]class ApplicationStatusResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationStatusResult] ''' results_ = [ApplicationStatusResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationTag(Type): _toSchema = {'name': 'Name'} _toPy = {'Name': 'name'} def __init__(self, name=None, **unknown_fields): ''' name : str ''' name_ = name # Validate arguments against known Juju API types. if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) self.name = name_ self.unknown_fields = unknown_fields
[docs]class ApplicationURLs(Type): _toSchema = {'application_urls': 'application-urls'} _toPy = {'application-urls': 'application_urls'} def __init__(self, application_urls=None, **unknown_fields): ''' application_urls : typing.Sequence[str] ''' application_urls_ = application_urls # Validate arguments against known Juju API types. if application_urls_ is not None and not isinstance(application_urls_, (bytes, str, list)): raise Exception("Expected application_urls_ to be a Sequence, received: {}".format(type(application_urls_))) self.application_urls = application_urls_ self.unknown_fields = unknown_fields
[docs]class ApplicationUnexpose(Type): _toSchema = {'application': 'application'} _toPy = {'application': 'application'} def __init__(self, application=None, **unknown_fields): ''' application : str ''' application_ = application # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) self.application = application_ self.unknown_fields = unknown_fields
[docs]class ApplicationUnitParams(Type): _toSchema = {'address': 'address', 'data': 'data', 'filesystem_info': 'filesystem-info', 'info': 'info', 'ports': 'ports', 'provider_id': 'provider-id', 'stateful': 'stateful', 'status': 'status', 'unit_tag': 'unit-tag'} _toPy = {'address': 'address', 'data': 'data', 'filesystem-info': 'filesystem_info', 'info': 'info', 'ports': 'ports', 'provider-id': 'provider_id', 'stateful': 'stateful', 'status': 'status', 'unit-tag': 'unit_tag'} def __init__(self, address=None, data=None, filesystem_info=None, info=None, ports=None, provider_id=None, stateful=None, status=None, unit_tag=None, **unknown_fields): ''' address : str data : typing.Mapping[str, typing.Any] filesystem_info : typing.Sequence[~KubernetesFilesystemInfo] info : str ports : typing.Sequence[str] provider_id : str stateful : bool status : str unit_tag : str ''' address_ = address data_ = data filesystem_info_ = [KubernetesFilesystemInfo.from_json(o) for o in filesystem_info or []] info_ = info ports_ = ports provider_id_ = provider_id stateful_ = stateful status_ = status unit_tag_ = unit_tag # Validate arguments against known Juju API types. if address_ is not None and not isinstance(address_, (bytes, str)): raise Exception("Expected address_ to be a str, received: {}".format(type(address_))) if data_ is not None and not isinstance(data_, dict): raise Exception("Expected data_ to be a Mapping, received: {}".format(type(data_))) if filesystem_info_ is not None and not isinstance(filesystem_info_, (bytes, str, list)): raise Exception("Expected filesystem_info_ to be a Sequence, received: {}".format(type(filesystem_info_))) if info_ is not None and not isinstance(info_, (bytes, str)): raise Exception("Expected info_ to be a str, received: {}".format(type(info_))) if ports_ is not None and not isinstance(ports_, (bytes, str, list)): raise Exception("Expected ports_ to be a Sequence, received: {}".format(type(ports_))) if provider_id_ is not None and not isinstance(provider_id_, (bytes, str)): raise Exception("Expected provider_id_ to be a str, received: {}".format(type(provider_id_))) if stateful_ is not None and not isinstance(stateful_, bool): raise Exception("Expected stateful_ to be a bool, received: {}".format(type(stateful_))) if status_ is not None and not isinstance(status_, (bytes, str)): raise Exception("Expected status_ to be a str, received: {}".format(type(status_))) if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) self.address = address_ self.data = data_ self.filesystem_info = filesystem_info_ self.info = info_ self.ports = ports_ self.provider_id = provider_id_ self.stateful = stateful_ self.status = status_ self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields
[docs]class ApplicationUnset(Type): _toSchema = {'application': 'application', 'branch': 'branch', 'options': 'options'} _toPy = {'application': 'application', 'branch': 'branch', 'options': 'options'} def __init__(self, application=None, branch=None, options=None, **unknown_fields): ''' application : str branch : str options : typing.Sequence[str] ''' application_ = application branch_ = branch options_ = options # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) if options_ is not None and not isinstance(options_, (bytes, str, list)): raise Exception("Expected options_ to be a Sequence, received: {}".format(type(options_))) self.application = application_ self.branch = branch_ self.options = options_ self.unknown_fields = unknown_fields
[docs]class ApplicationUpdate(Type): _toSchema = {'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'force': 'force', 'force_charm_url': 'force-charm-url', 'force_series': 'force-series', 'generation': 'generation', 'min_units': 'min-units', 'settings': 'settings', 'settings_yaml': 'settings-yaml'} _toPy = {'application': 'application', 'charm-url': 'charm_url', 'constraints': 'constraints', 'force': 'force', 'force-charm-url': 'force_charm_url', 'force-series': 'force_series', 'generation': 'generation', 'min-units': 'min_units', 'settings': 'settings', 'settings-yaml': 'settings_yaml'} def __init__(self, application=None, charm_url=None, constraints=None, force=None, force_charm_url=None, force_series=None, generation=None, min_units=None, settings=None, settings_yaml=None, **unknown_fields): ''' application : str charm_url : str constraints : Value force : bool force_charm_url : bool force_series : bool generation : str min_units : int settings : typing.Mapping[str, str] settings_yaml : str ''' application_ = application charm_url_ = charm_url constraints_ = Value.from_json(constraints) if constraints else None force_ = force force_charm_url_ = force_charm_url force_series_ = force_series generation_ = generation min_units_ = min_units settings_ = settings settings_yaml_ = settings_yaml # Validate arguments against known Juju API types. if application_ is not None and not isinstance(application_, (bytes, str)): raise Exception("Expected application_ to be a str, received: {}".format(type(application_))) if charm_url_ is not None and not isinstance(charm_url_, (bytes, str)): raise Exception("Expected charm_url_ to be a str, received: {}".format(type(charm_url_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if force_ is not None and not isinstance(force_, bool): raise Exception("Expected force_ to be a bool, received: {}".format(type(force_))) if force_charm_url_ is not None and not isinstance(force_charm_url_, bool): raise Exception("Expected force_charm_url_ to be a bool, received: {}".format(type(force_charm_url_))) if force_series_ is not None and not isinstance(force_series_, bool): raise Exception("Expected force_series_ to be a bool, received: {}".format(type(force_series_))) if generation_ is not None and not isinstance(generation_, (bytes, str)): raise Exception("Expected generation_ to be a str, received: {}".format(type(generation_))) if min_units_ is not None and not isinstance(min_units_, int): raise Exception("Expected min_units_ to be a int, received: {}".format(type(min_units_))) if settings_ is not None and not isinstance(settings_, dict): raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) if settings_yaml_ is not None and not isinstance(settings_yaml_, (bytes, str)): raise Exception("Expected settings_yaml_ to be a str, received: {}".format(type(settings_yaml_))) self.application = application_ self.charm_url = charm_url_ self.constraints = constraints_ self.force = force_ self.force_charm_url = force_charm_url_ self.force_series = force_series_ self.generation = generation_ self.min_units = min_units_ self.settings = settings_ self.settings_yaml = settings_yaml_ self.unknown_fields = unknown_fields
[docs]class ApplicationsCharmActionsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationCharmActionsResult] ''' results_ = [ApplicationCharmActionsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ApplicationsDeploy(Type): _toSchema = {'applications': 'applications'} _toPy = {'applications': 'applications'} def __init__(self, applications=None, **unknown_fields): ''' applications : typing.Sequence[~ApplicationDeploy] ''' applications_ = [ApplicationDeploy.from_json(o) for o in applications or []] # Validate arguments against known Juju API types. if applications_ is not None and not isinstance(applications_, (bytes, str, list)): raise Exception("Expected applications_ to be a Sequence, received: {}".format(type(applications_))) self.applications = applications_ self.unknown_fields = unknown_fields
[docs]class BackupsCreateArgs(Type): _toSchema = {'keep_copy': 'keep-copy', 'no_download': 'no-download', 'notes': 'notes'} _toPy = {'keep-copy': 'keep_copy', 'no-download': 'no_download', 'notes': 'notes'} def __init__(self, keep_copy=None, no_download=None, notes=None, **unknown_fields): ''' keep_copy : bool no_download : bool notes : str ''' keep_copy_ = keep_copy no_download_ = no_download notes_ = notes # Validate arguments against known Juju API types. if keep_copy_ is not None and not isinstance(keep_copy_, bool): raise Exception("Expected keep_copy_ to be a bool, received: {}".format(type(keep_copy_))) if no_download_ is not None and not isinstance(no_download_, bool): raise Exception("Expected no_download_ to be a bool, received: {}".format(type(no_download_))) if notes_ is not None and not isinstance(notes_, (bytes, str)): raise Exception("Expected notes_ to be a str, received: {}".format(type(notes_))) self.keep_copy = keep_copy_ self.no_download = no_download_ self.notes = notes_ self.unknown_fields = unknown_fields
[docs]class BackupsInfoArgs(Type): _toSchema = {'id_': 'id'} _toPy = {'id': 'id_'} def __init__(self, id_=None, **unknown_fields): ''' id_ : str ''' id__ = id_ # Validate arguments against known Juju API types. if id__ is not None and not isinstance(id__, (bytes, str)): raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) self.id_ = id__ self.unknown_fields = unknown_fields
[docs]class BackupsListArgs(Type): _toSchema = {} _toPy = {} def __init__(self, **unknown_fields): ''' ''' self.unknown_fields = unknown_fields
[docs]class BackupsListResult(Type): _toSchema = {'list_': 'list'} _toPy = {'list': 'list_'} def __init__(self, list_=None, **unknown_fields): ''' list_ : typing.Sequence[~BackupsMetadataResult] ''' list__ = [BackupsMetadataResult.from_json(o) for o in list_ or []] # Validate arguments against known Juju API types. if list__ is not None and not isinstance(list__, (bytes, str, list)): raise Exception("Expected list__ to be a Sequence, received: {}".format(type(list__))) self.list_ = list__ self.unknown_fields = unknown_fields
[docs]class BackupsMetadataResult(Type): _toSchema = {'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key', 'checksum': 'checksum', 'checksum_format': 'checksum-format', 'filename': 'filename', 'finished': 'finished', 'hostname': 'hostname', 'id_': 'id', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'} _toPy = {'ca-cert': 'ca_cert', 'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'checksum-format': 'checksum_format', 'filename': 'filename', 'finished': 'finished', 'hostname': 'hostname', 'id': 'id_', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'} def __init__(self, ca_cert=None, ca_private_key=None, checksum=None, checksum_format=None, filename=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, series=None, size=None, started=None, stored=None, version=None, **unknown_fields): ''' ca_cert : str ca_private_key : str checksum : str checksum_format : str filename : str finished : str hostname : str id_ : str machine : str model : str notes : str series : str size : int started : str stored : str version : Number ''' ca_cert_ = ca_cert ca_private_key_ = ca_private_key checksum_ = checksum checksum_format_ = checksum_format filename_ = filename finished_ = finished hostname_ = hostname id__ = id_ machine_ = machine model_ = model notes_ = notes series_ = series size_ = size started_ = started stored_ = stored version_ = Number.from_json(version) if version else None # Validate arguments against known Juju API types. if ca_cert_ is not None and not isinstance(ca_cert_, (bytes, str)): raise Exception("Expected ca_cert_ to be a str, received: {}".format(type(ca_cert_))) if ca_private_key_ is not None and not isinstance(ca_private_key_, (bytes, str)): raise Exception("Expected ca_private_key_ to be a str, received: {}".format(type(ca_private_key_))) if checksum_ is not None and not isinstance(checksum_, (bytes, str)): raise Exception("Expected checksum_ to be a str, received: {}".format(type(checksum_))) if checksum_format_ is not None and not isinstance(checksum_format_, (bytes, str)): raise Exception("Expected checksum_format_ to be a str, received: {}".format(type(checksum_format_))) if filename_ is not None and not isinstance(filename_, (bytes, str)): raise Exception("Expected filename_ to be a str, received: {}".format(type(filename_))) if finished_ is not None and not isinstance(finished_, (bytes, str)): raise Exception("Expected finished_ to be a str, received: {}".format(type(finished_))) if hostname_ is not None and not isinstance(hostname_, (bytes, str)): raise Exception("Expected hostname_ to be a str, received: {}".format(type(hostname_))) if id__ is not None and not isinstance(id__, (bytes, str)): raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) if machine_ is not None and not isinstance(machine_, (bytes, str)): raise Exception("Expected machine_ to be a str, received: {}".format(type(machine_))) if model_ is not None and not isinstance(model_, (bytes, str)): raise Exception("Expected model_ to be a str, received: {}".format(type(model_))) if notes_ is not None and not isinstance(notes_, (bytes, str)): raise Exception("Expected notes_ to be a str, received: {}".format(type(notes_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) if size_ is not None and not isinstance(size_, int): raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) if started_ is not None and not isinstance(started_, (bytes, str)): raise Exception("Expected started_ to be a str, received: {}".format(type(started_))) if stored_ is not None and not isinstance(stored_, (bytes, str)): raise Exception("Expected stored_ to be a str, received: {}".format(type(stored_))) if version_ is not None and not isinstance(version_, (dict, Number)): raise Exception("Expected version_ to be a Number, received: {}".format(type(version_))) self.ca_cert = ca_cert_ self.ca_private_key = ca_private_key_ self.checksum = checksum_ self.checksum_format = checksum_format_ self.filename = filename_ self.finished = finished_ self.hostname = hostname_ self.id_ = id__ self.machine = machine_ self.model = model_ self.notes = notes_ self.series = series_ self.size = size_ self.started = started_ self.stored = stored_ self.version = version_ self.unknown_fields = unknown_fields
[docs]class BackupsRemoveArgs(Type): _toSchema = {'ids': 'ids'} _toPy = {'ids': 'ids'} def __init__(self, ids=None, **unknown_fields): ''' ids : typing.Sequence[str] ''' ids_ = ids # Validate arguments against known Juju API types. if ids_ is not None and not isinstance(ids_, (bytes, str, list)): raise Exception("Expected ids_ to be a Sequence, received: {}".format(type(ids_))) self.ids = ids_ self.unknown_fields = unknown_fields
class Binary(Type): _toSchema = {'arch': 'Arch', 'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'number': 'Number', 'patch': 'Patch', 'series': 'Series', 'tag': 'Tag'} _toPy = {'Arch': 'arch', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Number': 'number', 'Patch': 'patch', 'Series': 'series', 'Tag': 'tag'} def __init__(self, arch=None, build=None, major=None, minor=None, number=None, patch=None, series=None, tag=None, **unknown_fields): ''' arch : str build : int major : int minor : int number : Number patch : int series : str tag : str ''' arch_ = arch build_ = build major_ = major minor_ = minor number_ = Number.from_json(number) if number else None patch_ = patch series_ = series tag_ = tag # Validate arguments against known Juju API types. if arch_ is not None and not isinstance(arch_, (bytes, str)): raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) if build_ is not None and not isinstance(build_, int): raise Exception("Expected build_ to be a int, received: {}".format(type(build_))) if major_ is not None and not isinstance(major_, int): raise Exception("Expected major_ to be a int, received: {}".format(type(major_))) if minor_ is not None and not isinstance(minor_, int): raise Exception("Expected minor_ to be a int, received: {}".format(type(minor_))) if number_ is not None and not isinstance(number_, (dict, Number)): raise Exception("Expected number_ to be a Number, received: {}".format(type(number_))) if patch_ is not None and not isinstance(patch_, int): raise Exception("Expected patch_ to be a int, received: {}".format(type(patch_))) 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_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) self.arch = arch_ self.build = build_ self.major = major_ self.minor = minor_ self.number = number_ self.patch = patch_ self.series = series_ self.tag = tag_ self.unknown_fields = unknown_fields
[docs]class Block(Type): _toSchema = {'id_': 'id', 'message': 'message', 'tag': 'tag', 'type_': 'type'} _toPy = {'id': 'id_', 'message': 'message', 'tag': 'tag', 'type': 'type_'} def __init__(self, id_=None, message=None, tag=None, type_=None, **unknown_fields): ''' id_ : str message : str tag : str type_ : str ''' id__ = id_ message_ = message tag_ = tag type__ = type_ # Validate arguments against known Juju API types. if id__ is not None and not isinstance(id__, (bytes, str)): raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) if message_ is not None and not isinstance(message_, (bytes, str)): raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.id_ = id__ self.message = message_ self.tag = tag_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class BlockDevice(Type): _toSchema = {'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'devicename': 'DeviceName', 'filesystemtype': 'FilesystemType', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'label': 'Label', 'mountpoint': 'MountPoint', 'size': 'Size', 'uuid': 'UUID', 'wwn': 'WWN'} _toPy = {'BusAddress': 'busaddress', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'HardwareId': 'hardwareid', 'InUse': 'inuse', 'Label': 'label', 'MountPoint': 'mountpoint', 'Size': 'size', 'UUID': 'uuid', 'WWN': 'wwn'} def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None, wwn=None, **unknown_fields): ''' busaddress : str devicelinks : typing.Sequence[str] devicename : str filesystemtype : str hardwareid : str inuse : bool label : str mountpoint : str size : int uuid : str wwn : str ''' busaddress_ = busaddress devicelinks_ = devicelinks devicename_ = devicename filesystemtype_ = filesystemtype hardwareid_ = hardwareid inuse_ = inuse label_ = label mountpoint_ = mountpoint size_ = size uuid_ = uuid wwn_ = wwn # Validate arguments against known Juju API types. if busaddress_ is not None and not isinstance(busaddress_, (bytes, str)): raise Exception("Expected busaddress_ to be a str, received: {}".format(type(busaddress_))) if devicelinks_ is not None and not isinstance(devicelinks_, (bytes, str, list)): raise Exception("Expected devicelinks_ to be a Sequence, received: {}".format(type(devicelinks_))) if devicename_ is not None and not isinstance(devicename_, (bytes, str)): raise Exception("Expected devicename_ to be a str, received: {}".format(type(devicename_))) if filesystemtype_ is not None and not isinstance(filesystemtype_, (bytes, str)): raise Exception("Expected filesystemtype_ to be a str, received: {}".format(type(filesystemtype_))) if hardwareid_ is not None and not isinstance(hardwareid_, (bytes, str)): raise Exception("Expected hardwareid_ to be a str, received: {}".format(type(hardwareid_))) if inuse_ is not None and not isinstance(inuse_, bool): raise Exception("Expected inuse_ to be a bool, received: {}".format(type(inuse_))) if label_ is not None and not isinstance(label_, (bytes, str)): raise Exception("Expected label_ to be a str, received: {}".format(type(label_))) if mountpoint_ is not None and not isinstance(mountpoint_, (bytes, str)): raise Exception("Expected mountpoint_ to be a str, received: {}".format(type(mountpoint_))) if size_ is not None and not isinstance(size_, int): raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) if uuid_ is not None and not isinstance(uuid_, (bytes, str)): raise Exception("Expected uuid_ to be a str, received: {}".format(type(uuid_))) if wwn_ is not None and not isinstance(wwn_, (bytes, str)): raise Exception("Expected wwn_ to be a str, received: {}".format(type(wwn_))) self.busaddress = busaddress_ self.devicelinks = devicelinks_ self.devicename = devicename_ self.filesystemtype = filesystemtype_ self.hardwareid = hardwareid_ self.inuse = inuse_ self.label = label_ self.mountpoint = mountpoint_ self.size = size_ self.uuid = uuid_ self.wwn = wwn_ self.unknown_fields = unknown_fields
[docs]class BlockDeviceResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : BlockDevice ''' error_ = Error.from_json(error) if error else None result_ = BlockDevice.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, BlockDevice)): raise Exception("Expected result_ to be a BlockDevice, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class BlockDeviceResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~BlockDeviceResult] ''' results_ = [BlockDeviceResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class BlockResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : Block ''' error_ = Error.from_json(error) if error else None result_ = Block.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, Block)): raise Exception("Expected result_ to be a Block, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class BlockResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~BlockResult] ''' results_ = [BlockResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class BlockSwitchParams(Type): _toSchema = {'message': 'message', 'type_': 'type'} _toPy = {'message': 'message', 'type': 'type_'} def __init__(self, message=None, type_=None, **unknown_fields): ''' message : str type_ : str ''' message_ = message type__ = type_ # Validate arguments against known Juju API types. if message_ is not None and not isinstance(message_, (bytes, str)): raise Exception("Expected message_ to be a str, received: {}".format(type(message_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.message = message_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class BoolResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : bool ''' error_ = Error.from_json(error) if error else None result_ = result # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, bool): raise Exception("Expected result_ to be a bool, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class BoolResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~BoolResult] ''' results_ = [BoolResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class BranchArg(Type): _toSchema = {'branch': 'branch'} _toPy = {'branch': 'branch'} def __init__(self, branch=None, **unknown_fields): ''' branch : str ''' branch_ = branch # Validate arguments against known Juju API types. if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) self.branch = branch_ self.unknown_fields = unknown_fields
[docs]class BranchInfoArgs(Type): _toSchema = {'branches': 'branches', 'detailed': 'detailed'} _toPy = {'branches': 'branches', 'detailed': 'detailed'} def __init__(self, branches=None, detailed=None, **unknown_fields): ''' branches : typing.Sequence[str] detailed : bool ''' branches_ = branches detailed_ = detailed # Validate arguments against known Juju API types. if branches_ is not None and not isinstance(branches_, (bytes, str, list)): raise Exception("Expected branches_ to be a Sequence, received: {}".format(type(branches_))) if detailed_ is not None and not isinstance(detailed_, bool): raise Exception("Expected detailed_ to be a bool, received: {}".format(type(detailed_))) self.branches = branches_ self.detailed = detailed_ self.unknown_fields = unknown_fields
[docs]class BranchStatus(Type): _toSchema = {'assigned_units': 'assigned-units', 'created': 'created'} _toPy = {'assigned-units': 'assigned_units', 'created': 'created'} def __init__(self, assigned_units=None, created=None, **unknown_fields): ''' assigned_units : typing.Sequence[str] created : int ''' assigned_units_ = assigned_units created_ = created # Validate arguments against known Juju API types. if assigned_units_ is not None and not isinstance(assigned_units_, (bytes, str, list)): raise Exception("Expected assigned_units_ to be a Sequence, received: {}".format(type(assigned_units_))) if created_ is not None and not isinstance(created_, int): raise Exception("Expected created_ to be a int, received: {}".format(type(created_))) self.assigned_units = assigned_units_ self.created = created_ self.unknown_fields = unknown_fields
[docs]class BranchTrackArg(Type): _toSchema = {'branch': 'branch', 'entities': 'entities'} _toPy = {'branch': 'branch', 'entities': 'entities'} def __init__(self, branch=None, entities=None, **unknown_fields): ''' branch : str entities : typing.Sequence[~Entity] ''' branch_ = branch entities_ = [Entity.from_json(o) for o in entities or []] # Validate arguments against known Juju API types. if branch_ is not None and not isinstance(branch_, (bytes, str)): raise Exception("Expected branch_ to be a str, received: {}".format(type(branch_))) if entities_ is not None and not isinstance(entities_, (bytes, str, list)): raise Exception("Expected entities_ to be a Sequence, received: {}".format(type(entities_))) self.branch = branch_ self.entities = entities_ self.unknown_fields = unknown_fields
[docs]class BulkImportStorageParams(Type): _toSchema = {'storage': 'storage'} _toPy = {'storage': 'storage'} def __init__(self, storage=None, **unknown_fields): ''' storage : typing.Sequence[~ImportStorageParams] ''' storage_ = [ImportStorageParams.from_json(o) for o in storage or []] # Validate arguments against known Juju API types. if storage_ is not None and not isinstance(storage_, (bytes, str, list)): raise Exception("Expected storage_ to be a Sequence, received: {}".format(type(storage_))) self.storage = storage_ self.unknown_fields = unknown_fields
[docs]class BundleChange(Type): _toSchema = {'args': 'args', 'id_': 'id', 'method': 'method', 'requires': 'requires'} _toPy = {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'} def __init__(self, args=None, id_=None, method=None, requires=None, **unknown_fields): ''' args : typing.Sequence[typing.Any] id_ : str method : str requires : typing.Sequence[str] ''' args_ = args id__ = id_ method_ = method requires_ = requires # Validate arguments against known Juju API types. if args_ is not None and not isinstance(args_, (bytes, str, list)): raise Exception("Expected args_ to be a Sequence, received: {}".format(type(args_))) if id__ is not None and not isinstance(id__, (bytes, str)): raise Exception("Expected id__ to be a str, received: {}".format(type(id__))) if method_ is not None and not isinstance(method_, (bytes, str)): raise Exception("Expected method_ to be a str, received: {}".format(type(method_))) if requires_ is not None and not isinstance(requires_, (bytes, str, list)): raise Exception("Expected requires_ to be a Sequence, received: {}".format(type(requires_))) self.args = args_ self.id_ = id__ self.method = method_ self.requires = requires_ self.unknown_fields = unknown_fields
[docs]class BundleChangesParams(Type): _toSchema = {'bundleurl': 'bundleURL', 'yaml': 'yaml'} _toPy = {'bundleURL': 'bundleurl', 'yaml': 'yaml'} def __init__(self, bundleurl=None, yaml=None, **unknown_fields): ''' bundleurl : str yaml : str ''' bundleurl_ = bundleurl yaml_ = yaml # Validate arguments against known Juju API types. if bundleurl_ is not None and not isinstance(bundleurl_, (bytes, str)): raise Exception("Expected bundleurl_ to be a str, received: {}".format(type(bundleurl_))) if yaml_ is not None and not isinstance(yaml_, (bytes, str)): raise Exception("Expected yaml_ to be a str, received: {}".format(type(yaml_))) self.bundleurl = bundleurl_ self.yaml = yaml_ self.unknown_fields = unknown_fields
[docs]class BundleChangesResults(Type): _toSchema = {'changes': 'changes', 'errors': 'errors'} _toPy = {'changes': 'changes', 'errors': 'errors'} def __init__(self, changes=None, errors=None, **unknown_fields): ''' changes : typing.Sequence[~BundleChange] errors : typing.Sequence[str] ''' changes_ = [BundleChange.from_json(o) for o in changes or []] errors_ = errors # Validate arguments against known Juju API types. if changes_ is not None and not isinstance(changes_, (bytes, str, list)): raise Exception("Expected changes_ to be a Sequence, received: {}".format(type(changes_))) if errors_ is not None and not isinstance(errors_, (bytes, str, list)): raise Exception("Expected errors_ to be a Sequence, received: {}".format(type(errors_))) self.changes = changes_ self.errors = errors_ self.unknown_fields = unknown_fields
[docs]class BytesResult(Type): _toSchema = {'result': 'result'} _toPy = {'result': 'result'} def __init__(self, result=None, **unknown_fields): ''' result : typing.Sequence[int] ''' result_ = result # Validate arguments against known Juju API types. if result_ is not None and not isinstance(result_, (bytes, str, list)): raise Exception("Expected result_ to be a Sequence, received: {}".format(type(result_))) self.result = result_ self.unknown_fields = unknown_fields
[docs]class ChangeModelCredentialParams(Type): _toSchema = {'credential_tag': 'credential-tag', 'model_tag': 'model-tag'} _toPy = {'credential-tag': 'credential_tag', 'model-tag': 'model_tag'} def __init__(self, credential_tag=None, model_tag=None, **unknown_fields): ''' credential_tag : str model_tag : str ''' credential_tag_ = credential_tag model_tag_ = model_tag # Validate arguments against known Juju API types. if credential_tag_ is not None and not isinstance(credential_tag_, (bytes, str)): raise Exception("Expected credential_tag_ to be a str, received: {}".format(type(credential_tag_))) if model_tag_ is not None and not isinstance(model_tag_, (bytes, str)): raise Exception("Expected model_tag_ to be a str, received: {}".format(type(model_tag_))) self.credential_tag = credential_tag_ self.model_tag = model_tag_ self.unknown_fields = unknown_fields
[docs]class ChangeModelCredentialsParams(Type): _toSchema = {'model_credentials': 'model-credentials'} _toPy = {'model-credentials': 'model_credentials'} def __init__(self, model_credentials=None, **unknown_fields): ''' model_credentials : typing.Sequence[~ChangeModelCredentialParams] ''' model_credentials_ = [ChangeModelCredentialParams.from_json(o) for o in model_credentials or []] # Validate arguments against known Juju API types. if model_credentials_ is not None and not isinstance(model_credentials_, (bytes, str, list)): raise Exception("Expected model_credentials_ to be a Sequence, received: {}".format(type(model_credentials_))) self.model_credentials = model_credentials_ self.unknown_fields = unknown_fields
[docs]class CharmActionSpec(Type): _toSchema = {'description': 'description', 'params': 'params'} _toPy = {'description': 'description', 'params': 'params'} def __init__(self, description=None, params=None, **unknown_fields): ''' description : str params : typing.Mapping[str, typing.Any] ''' description_ = description params_ = params # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if params_ is not None and not isinstance(params_, dict): raise Exception("Expected params_ to be a Mapping, received: {}".format(type(params_))) self.description = description_ self.params = params_ self.unknown_fields = unknown_fields
[docs]class CharmActions(Type): _toSchema = {'specs': 'specs'} _toPy = {'specs': 'specs'} def __init__(self, specs=None, **unknown_fields): ''' specs : typing.Mapping[str, ~CharmActionSpec] ''' specs_ = specs # Validate arguments against known Juju API types. if specs_ is not None and not isinstance(specs_, dict): raise Exception("Expected specs_ to be a Mapping, received: {}".format(type(specs_))) self.specs = specs_ self.unknown_fields = unknown_fields
[docs]class CharmDevice(Type): _toSchema = {'countmax': 'CountMax', 'countmin': 'CountMin', 'description': 'Description', 'name': 'Name', 'type_': 'Type'} _toPy = {'CountMax': 'countmax', 'CountMin': 'countmin', 'Description': 'description', 'Name': 'name', 'Type': 'type_'} def __init__(self, countmax=None, countmin=None, description=None, name=None, type_=None, **unknown_fields): ''' countmax : int countmin : int description : str name : str type_ : str ''' countmax_ = countmax countmin_ = countmin description_ = description name_ = name type__ = type_ # Validate arguments against known Juju API types. if countmax_ is not None and not isinstance(countmax_, int): raise Exception("Expected countmax_ to be a int, received: {}".format(type(countmax_))) if countmin_ is not None and not isinstance(countmin_, int): raise Exception("Expected countmin_ to be a int, received: {}".format(type(countmin_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.countmax = countmax_ self.countmin = countmin_ self.description = description_ self.name = name_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmInfo(Type): _toSchema = {'actions': 'actions', 'config': 'config', 'lxd_profile': 'lxd-profile', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} _toPy = {'actions': 'actions', 'config': 'config', 'lxd-profile': 'lxd_profile', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'} def __init__(self, actions=None, config=None, lxd_profile=None, meta=None, metrics=None, revision=None, url=None, **unknown_fields): ''' actions : CharmActions config : typing.Mapping[str, ~CharmOption] lxd_profile : CharmLXDProfile meta : CharmMeta metrics : CharmMetrics revision : int url : str ''' actions_ = CharmActions.from_json(actions) if actions else None config_ = config lxd_profile_ = CharmLXDProfile.from_json(lxd_profile) if lxd_profile else None meta_ = CharmMeta.from_json(meta) if meta else None metrics_ = CharmMetrics.from_json(metrics) if metrics else None revision_ = revision url_ = url # Validate arguments against known Juju API types. if actions_ is not None and not isinstance(actions_, (dict, CharmActions)): raise Exception("Expected actions_ to be a CharmActions, received: {}".format(type(actions_))) if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if lxd_profile_ is not None and not isinstance(lxd_profile_, (dict, CharmLXDProfile)): raise Exception("Expected lxd_profile_ to be a CharmLXDProfile, received: {}".format(type(lxd_profile_))) if meta_ is not None and not isinstance(meta_, (dict, CharmMeta)): raise Exception("Expected meta_ to be a CharmMeta, received: {}".format(type(meta_))) if metrics_ is not None and not isinstance(metrics_, (dict, CharmMetrics)): raise Exception("Expected metrics_ to be a CharmMetrics, received: {}".format(type(metrics_))) if revision_ is not None and not isinstance(revision_, int): raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.actions = actions_ self.config = config_ self.lxd_profile = lxd_profile_ self.meta = meta_ self.metrics = metrics_ self.revision = revision_ self.url = url_ self.unknown_fields = unknown_fields
[docs]class CharmLXDProfile(Type): _toSchema = {'config': 'config', 'description': 'description', 'devices': 'devices'} _toPy = {'config': 'config', 'description': 'description', 'devices': 'devices'} def __init__(self, config=None, description=None, devices=None, **unknown_fields): ''' config : typing.Mapping[str, str] description : str devices : typing.Mapping[str, typing.Any] ''' config_ = config description_ = description devices_ = devices # Validate arguments against known Juju API types. if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if devices_ is not None and not isinstance(devices_, dict): raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) self.config = config_ self.description = description_ self.devices = devices_ self.unknown_fields = unknown_fields
[docs]class CharmMeta(Type): _toSchema = {'categories': 'categories', 'description': 'description', 'devices': 'devices', 'extra_bindings': 'extra-bindings', 'min_juju_version': 'min-juju-version', 'name': 'name', 'payload_classes': 'payload-classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} _toPy = {'categories': 'categories', 'description': 'description', 'devices': 'devices', 'extra-bindings': 'extra_bindings', 'min-juju-version': 'min_juju_version', 'name': 'name', 'payload-classes': 'payload_classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'} def __init__(self, categories=None, description=None, devices=None, extra_bindings=None, min_juju_version=None, name=None, payload_classes=None, peers=None, provides=None, requires=None, resources=None, series=None, storage=None, subordinate=None, summary=None, tags=None, terms=None, **unknown_fields): ''' categories : typing.Sequence[str] description : str devices : typing.Mapping[str, ~CharmDevice] extra_bindings : typing.Mapping[str, str] min_juju_version : str name : str payload_classes : typing.Mapping[str, ~CharmPayloadClass] peers : typing.Mapping[str, ~CharmRelation] provides : typing.Mapping[str, ~CharmRelation] requires : typing.Mapping[str, ~CharmRelation] resources : typing.Mapping[str, ~CharmResourceMeta] series : typing.Sequence[str] storage : typing.Mapping[str, ~CharmStorage] subordinate : bool summary : str tags : typing.Sequence[str] terms : typing.Sequence[str] ''' categories_ = categories description_ = description devices_ = devices extra_bindings_ = extra_bindings min_juju_version_ = min_juju_version name_ = name payload_classes_ = payload_classes peers_ = peers provides_ = provides requires_ = requires resources_ = resources series_ = series storage_ = storage subordinate_ = subordinate summary_ = summary tags_ = tags terms_ = terms # Validate arguments against known Juju API types. if categories_ is not None and not isinstance(categories_, (bytes, str, list)): raise Exception("Expected categories_ to be a Sequence, received: {}".format(type(categories_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if devices_ is not None and not isinstance(devices_, dict): raise Exception("Expected devices_ to be a Mapping, received: {}".format(type(devices_))) if extra_bindings_ is not None and not isinstance(extra_bindings_, dict): raise Exception("Expected extra_bindings_ to be a Mapping, received: {}".format(type(extra_bindings_))) if min_juju_version_ is not None and not isinstance(min_juju_version_, (bytes, str)): raise Exception("Expected min_juju_version_ to be a str, received: {}".format(type(min_juju_version_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if payload_classes_ is not None and not isinstance(payload_classes_, dict): raise Exception("Expected payload_classes_ to be a Mapping, received: {}".format(type(payload_classes_))) if peers_ is not None and not isinstance(peers_, dict): raise Exception("Expected peers_ to be a Mapping, received: {}".format(type(peers_))) if provides_ is not None and not isinstance(provides_, dict): raise Exception("Expected provides_ to be a Mapping, received: {}".format(type(provides_))) if requires_ is not None and not isinstance(requires_, dict): raise Exception("Expected requires_ to be a Mapping, received: {}".format(type(requires_))) if resources_ is not None and not isinstance(resources_, dict): raise Exception("Expected resources_ to be a Mapping, received: {}".format(type(resources_))) if series_ is not None and not isinstance(series_, (bytes, str, list)): raise Exception("Expected series_ to be a Sequence, received: {}".format(type(series_))) if storage_ is not None and not isinstance(storage_, dict): raise Exception("Expected storage_ to be a Mapping, received: {}".format(type(storage_))) if subordinate_ is not None and not isinstance(subordinate_, bool): raise Exception("Expected subordinate_ to be a bool, received: {}".format(type(subordinate_))) if summary_ is not None and not isinstance(summary_, (bytes, str)): raise Exception("Expected summary_ to be a str, received: {}".format(type(summary_))) if tags_ is not None and not isinstance(tags_, (bytes, str, list)): raise Exception("Expected tags_ to be a Sequence, received: {}".format(type(tags_))) if terms_ is not None and not isinstance(terms_, (bytes, str, list)): raise Exception("Expected terms_ to be a Sequence, received: {}".format(type(terms_))) self.categories = categories_ self.description = description_ self.devices = devices_ self.extra_bindings = extra_bindings_ self.min_juju_version = min_juju_version_ self.name = name_ self.payload_classes = payload_classes_ self.peers = peers_ self.provides = provides_ self.requires = requires_ self.resources = resources_ self.series = series_ self.storage = storage_ self.subordinate = subordinate_ self.summary = summary_ self.tags = tags_ self.terms = terms_ self.unknown_fields = unknown_fields
[docs]class CharmMetric(Type): _toSchema = {'description': 'description', 'type_': 'type'} _toPy = {'description': 'description', 'type': 'type_'} def __init__(self, description=None, type_=None, **unknown_fields): ''' description : str type_ : str ''' description_ = description type__ = type_ # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.description = description_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmMetrics(Type): _toSchema = {'metrics': 'metrics', 'plan': 'plan'} _toPy = {'metrics': 'metrics', 'plan': 'plan'} def __init__(self, metrics=None, plan=None, **unknown_fields): ''' metrics : typing.Mapping[str, ~CharmMetric] plan : CharmPlan ''' metrics_ = metrics plan_ = CharmPlan.from_json(plan) if plan else None # Validate arguments against known Juju API types. if metrics_ is not None and not isinstance(metrics_, dict): raise Exception("Expected metrics_ to be a Mapping, received: {}".format(type(metrics_))) if plan_ is not None and not isinstance(plan_, (dict, CharmPlan)): raise Exception("Expected plan_ to be a CharmPlan, received: {}".format(type(plan_))) self.metrics = metrics_ self.plan = plan_ self.unknown_fields = unknown_fields
[docs]class CharmOption(Type): _toSchema = {'default': 'default', 'description': 'description', 'type_': 'type'} _toPy = {'default': 'default', 'description': 'description', 'type': 'type_'} def __init__(self, default=None, description=None, type_=None, **unknown_fields): ''' default : Any description : str type_ : str ''' default_ = default description_ = description type__ = type_ # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.default = default_ self.description = description_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmPayloadClass(Type): _toSchema = {'name': 'name', 'type_': 'type'} _toPy = {'name': 'name', 'type': 'type_'} def __init__(self, name=None, type_=None, **unknown_fields): ''' name : str type_ : str ''' name_ = name type__ = type_ # Validate arguments against known Juju API types. if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.name = name_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmPlan(Type): _toSchema = {'required': 'required'} _toPy = {'required': 'required'} def __init__(self, required=None, **unknown_fields): ''' required : bool ''' required_ = required # Validate arguments against known Juju API types. if required_ is not None and not isinstance(required_, bool): raise Exception("Expected required_ to be a bool, received: {}".format(type(required_))) self.required = required_ self.unknown_fields = unknown_fields
[docs]class CharmProfilingInfoResult(Type): _toSchema = {'current_profiles': 'current-profiles', 'error': 'error', 'instance_id': 'instance-id', 'model_name': 'model-name', 'profile_changes': 'profile-changes'} _toPy = {'current-profiles': 'current_profiles', 'error': 'error', 'instance-id': 'instance_id', 'model-name': 'model_name', 'profile-changes': 'profile_changes'} def __init__(self, current_profiles=None, error=None, instance_id=None, model_name=None, profile_changes=None, **unknown_fields): ''' current_profiles : typing.Sequence[str] error : Error instance_id : str model_name : str profile_changes : typing.Sequence[~ProfileInfoResult] ''' current_profiles_ = current_profiles error_ = Error.from_json(error) if error else None instance_id_ = instance_id model_name_ = model_name profile_changes_ = [ProfileInfoResult.from_json(o) for o in profile_changes or []] # Validate arguments against known Juju API types. if current_profiles_ is not None and not isinstance(current_profiles_, (bytes, str, list)): raise Exception("Expected current_profiles_ to be a Sequence, received: {}".format(type(current_profiles_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if instance_id_ is not None and not isinstance(instance_id_, (bytes, str)): raise Exception("Expected instance_id_ to be a str, received: {}".format(type(instance_id_))) if model_name_ is not None and not isinstance(model_name_, (bytes, str)): raise Exception("Expected model_name_ to be a str, received: {}".format(type(model_name_))) if profile_changes_ is not None and not isinstance(profile_changes_, (bytes, str, list)): raise Exception("Expected profile_changes_ to be a Sequence, received: {}".format(type(profile_changes_))) self.current_profiles = current_profiles_ self.error = error_ self.instance_id = instance_id_ self.model_name = model_name_ self.profile_changes = profile_changes_ self.unknown_fields = unknown_fields
[docs]class CharmRelation(Type): _toSchema = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} _toPy = {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'} def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None, **unknown_fields): ''' interface : str limit : int name : str optional : bool role : str scope : str ''' interface_ = interface limit_ = limit name_ = name optional_ = optional role_ = role scope_ = scope # Validate arguments against known Juju API types. if interface_ is not None and not isinstance(interface_, (bytes, str)): raise Exception("Expected interface_ to be a str, received: {}".format(type(interface_))) if limit_ is not None and not isinstance(limit_, int): raise Exception("Expected limit_ to be a int, received: {}".format(type(limit_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if optional_ is not None and not isinstance(optional_, bool): raise Exception("Expected optional_ to be a bool, received: {}".format(type(optional_))) if role_ is not None and not isinstance(role_, (bytes, str)): raise Exception("Expected role_ to be a str, received: {}".format(type(role_))) if scope_ is not None and not isinstance(scope_, (bytes, str)): raise Exception("Expected scope_ to be a str, received: {}".format(type(scope_))) self.interface = interface_ self.limit = limit_ self.name = name_ self.optional = optional_ self.role = role_ self.scope = scope_ self.unknown_fields = unknown_fields
[docs]class CharmResource(Type): _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'} _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'} def __init__(self, description=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None, **unknown_fields): ''' description : str fingerprint : typing.Sequence[int] name : str origin : str path : str revision : int size : int type_ : str ''' description_ = description fingerprint_ = fingerprint name_ = name origin_ = origin path_ = path revision_ = revision size_ = size type__ = type_ # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if fingerprint_ is not None and not isinstance(fingerprint_, (bytes, str, list)): raise Exception("Expected fingerprint_ to be a Sequence, received: {}".format(type(fingerprint_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if origin_ is not None and not isinstance(origin_, (bytes, str)): raise Exception("Expected origin_ to be a str, received: {}".format(type(origin_))) if path_ is not None and not isinstance(path_, (bytes, str)): raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) if revision_ is not None and not isinstance(revision_, int): raise Exception("Expected revision_ to be a int, received: {}".format(type(revision_))) if size_ is not None and not isinstance(size_, int): raise Exception("Expected size_ to be a int, received: {}".format(type(size_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.description = description_ self.fingerprint = fingerprint_ self.name = name_ self.origin = origin_ self.path = path_ self.revision = revision_ self.size = size_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmResourceMeta(Type): _toSchema = {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'} _toPy = {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'} def __init__(self, description=None, name=None, path=None, type_=None, **unknown_fields): ''' description : str name : str path : str type_ : str ''' description_ = description name_ = name path_ = path type__ = type_ # Validate arguments against known Juju API types. if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if path_ is not None and not isinstance(path_, (bytes, str)): raise Exception("Expected path_ to be a str, received: {}".format(type(path_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.description = description_ self.name = name_ self.path = path_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmStorage(Type): _toSchema = {'count_max': 'count-max', 'count_min': 'count-min', 'description': 'description', 'location': 'location', 'minimum_size': 'minimum-size', 'name': 'name', 'properties': 'properties', 'read_only': 'read-only', 'shared': 'shared', 'type_': 'type'} _toPy = {'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'minimum-size': 'minimum_size', 'name': 'name', 'properties': 'properties', 'read-only': 'read_only', 'shared': 'shared', 'type': 'type_'} def __init__(self, count_max=None, count_min=None, description=None, location=None, minimum_size=None, name=None, properties=None, read_only=None, shared=None, type_=None, **unknown_fields): ''' count_max : int count_min : int description : str location : str minimum_size : int name : str properties : typing.Sequence[str] read_only : bool shared : bool type_ : str ''' count_max_ = count_max count_min_ = count_min description_ = description location_ = location minimum_size_ = minimum_size name_ = name properties_ = properties read_only_ = read_only shared_ = shared type__ = type_ # Validate arguments against known Juju API types. if count_max_ is not None and not isinstance(count_max_, int): raise Exception("Expected count_max_ to be a int, received: {}".format(type(count_max_))) if count_min_ is not None and not isinstance(count_min_, int): raise Exception("Expected count_min_ to be a int, received: {}".format(type(count_min_))) if description_ is not None and not isinstance(description_, (bytes, str)): raise Exception("Expected description_ to be a str, received: {}".format(type(description_))) if location_ is not None and not isinstance(location_, (bytes, str)): raise Exception("Expected location_ to be a str, received: {}".format(type(location_))) if minimum_size_ is not None and not isinstance(minimum_size_, int): raise Exception("Expected minimum_size_ to be a int, received: {}".format(type(minimum_size_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if properties_ is not None and not isinstance(properties_, (bytes, str, list)): raise Exception("Expected properties_ to be a Sequence, received: {}".format(type(properties_))) if read_only_ is not None and not isinstance(read_only_, bool): raise Exception("Expected read_only_ to be a bool, received: {}".format(type(read_only_))) if shared_ is not None and not isinstance(shared_, bool): raise Exception("Expected shared_ to be a bool, received: {}".format(type(shared_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.count_max = count_max_ self.count_min = count_min_ self.description = description_ self.location = location_ self.minimum_size = minimum_size_ self.name = name_ self.properties = properties_ self.read_only = read_only_ self.shared = shared_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CharmURL(Type): _toSchema = {'url': 'url'} _toPy = {'url': 'url'} def __init__(self, url=None, **unknown_fields): ''' url : str ''' url_ = url # Validate arguments against known Juju API types. if url_ is not None and not isinstance(url_, (bytes, str)): raise Exception("Expected url_ to be a str, received: {}".format(type(url_))) self.url = url_ self.unknown_fields = unknown_fields
[docs]class CharmURLs(Type): _toSchema = {'urls': 'urls'} _toPy = {'urls': 'urls'} def __init__(self, urls=None, **unknown_fields): ''' urls : typing.Sequence[~CharmURL] ''' urls_ = [CharmURL.from_json(o) for o in urls or []] # Validate arguments against known Juju API types. if urls_ is not None and not isinstance(urls_, (bytes, str, list)): raise Exception("Expected urls_ to be a Sequence, received: {}".format(type(urls_))) self.urls = urls_ self.unknown_fields = unknown_fields
[docs]class CharmsList(Type): _toSchema = {'names': 'names'} _toPy = {'names': 'names'} def __init__(self, names=None, **unknown_fields): ''' names : typing.Sequence[str] ''' names_ = names # Validate arguments against known Juju API types. if names_ is not None and not isinstance(names_, (bytes, str, list)): raise Exception("Expected names_ to be a Sequence, received: {}".format(type(names_))) self.names = names_ self.unknown_fields = unknown_fields
[docs]class CharmsListResult(Type): _toSchema = {'charm_urls': 'charm-urls'} _toPy = {'charm-urls': 'charm_urls'} def __init__(self, charm_urls=None, **unknown_fields): ''' charm_urls : typing.Sequence[str] ''' charm_urls_ = charm_urls # Validate arguments against known Juju API types. if charm_urls_ is not None and not isinstance(charm_urls_, (bytes, str, list)): raise Exception("Expected charm_urls_ to be a Sequence, received: {}".format(type(charm_urls_))) self.charm_urls = charm_urls_ self.unknown_fields = unknown_fields
[docs]class ClaimLeadershipBulkParams(Type): _toSchema = {'params': 'params'} _toPy = {'params': 'params'} def __init__(self, params=None, **unknown_fields): ''' params : typing.Sequence[~ClaimLeadershipParams] ''' params_ = [ClaimLeadershipParams.from_json(o) for o in params or []] # Validate arguments against known Juju API types. if params_ is not None and not isinstance(params_, (bytes, str, list)): raise Exception("Expected params_ to be a Sequence, received: {}".format(type(params_))) self.params = params_ self.unknown_fields = unknown_fields
[docs]class ClaimLeadershipBulkResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ErrorResult] ''' results_ = [ErrorResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class ClaimLeadershipParams(Type): _toSchema = {'application_tag': 'application-tag', 'duration': 'duration', 'unit_tag': 'unit-tag'} _toPy = {'application-tag': 'application_tag', 'duration': 'duration', 'unit-tag': 'unit_tag'} def __init__(self, application_tag=None, duration=None, unit_tag=None, **unknown_fields): ''' application_tag : str duration : float unit_tag : str ''' application_tag_ = application_tag duration_ = duration unit_tag_ = unit_tag # Validate arguments against known Juju API types. if application_tag_ is not None and not isinstance(application_tag_, (bytes, str)): raise Exception("Expected application_tag_ to be a str, received: {}".format(type(application_tag_))) if duration_ is not None and not isinstance(duration_, float): raise Exception("Expected duration_ to be a float, received: {}".format(type(duration_))) if unit_tag_ is not None and not isinstance(unit_tag_, (bytes, str)): raise Exception("Expected unit_tag_ to be a str, received: {}".format(type(unit_tag_))) self.application_tag = application_tag_ self.duration = duration_ self.unit_tag = unit_tag_ self.unknown_fields = unknown_fields
[docs]class Cloud(Type): _toSchema = {'auth_types': 'auth-types', 'ca_certificates': 'ca-certificates', 'config': 'config', 'endpoint': 'endpoint', 'host_cloud_region': 'host-cloud-region', 'identity_endpoint': 'identity-endpoint', 'region_config': 'region-config', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} _toPy = {'auth-types': 'auth_types', 'ca-certificates': 'ca_certificates', 'config': 'config', 'endpoint': 'endpoint', 'host-cloud-region': 'host_cloud_region', 'identity-endpoint': 'identity_endpoint', 'region-config': 'region_config', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} def __init__(self, auth_types=None, ca_certificates=None, config=None, endpoint=None, host_cloud_region=None, identity_endpoint=None, region_config=None, regions=None, storage_endpoint=None, type_=None, **unknown_fields): ''' auth_types : typing.Sequence[str] ca_certificates : typing.Sequence[str] config : typing.Mapping[str, typing.Any] endpoint : str host_cloud_region : str identity_endpoint : str region_config : typing.Mapping[str, typing.Any] regions : typing.Sequence[~CloudRegion] storage_endpoint : str type_ : str ''' auth_types_ = auth_types ca_certificates_ = ca_certificates config_ = config endpoint_ = endpoint host_cloud_region_ = host_cloud_region identity_endpoint_ = identity_endpoint region_config_ = region_config regions_ = [CloudRegion.from_json(o) for o in regions or []] storage_endpoint_ = storage_endpoint type__ = type_ # Validate arguments against known Juju API types. if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) if ca_certificates_ is not None and not isinstance(ca_certificates_, (bytes, str, list)): raise Exception("Expected ca_certificates_ to be a Sequence, received: {}".format(type(ca_certificates_))) if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) if host_cloud_region_ is not None and not isinstance(host_cloud_region_, (bytes, str)): raise Exception("Expected host_cloud_region_ to be a str, received: {}".format(type(host_cloud_region_))) if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) if region_config_ is not None and not isinstance(region_config_, dict): raise Exception("Expected region_config_ to be a Mapping, received: {}".format(type(region_config_))) if regions_ is not None and not isinstance(regions_, (bytes, str, list)): raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.auth_types = auth_types_ self.ca_certificates = ca_certificates_ self.config = config_ self.endpoint = endpoint_ self.host_cloud_region = host_cloud_region_ self.identity_endpoint = identity_endpoint_ self.region_config = region_config_ self.regions = regions_ self.storage_endpoint = storage_endpoint_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CloudCredential(Type): _toSchema = {'attrs': 'attrs', 'auth_type': 'auth-type', 'redacted': 'redacted'} _toPy = {'attrs': 'attrs', 'auth-type': 'auth_type', 'redacted': 'redacted'} def __init__(self, attrs=None, auth_type=None, redacted=None, **unknown_fields): ''' attrs : typing.Mapping[str, str] auth_type : str redacted : typing.Sequence[str] ''' attrs_ = attrs auth_type_ = auth_type redacted_ = redacted # Validate arguments against known Juju API types. if attrs_ is not None and not isinstance(attrs_, dict): raise Exception("Expected attrs_ to be a Mapping, received: {}".format(type(attrs_))) if auth_type_ is not None and not isinstance(auth_type_, (bytes, str)): raise Exception("Expected auth_type_ to be a str, received: {}".format(type(auth_type_))) if redacted_ is not None and not isinstance(redacted_, (bytes, str, list)): raise Exception("Expected redacted_ to be a Sequence, received: {}".format(type(redacted_))) self.attrs = attrs_ self.auth_type = auth_type_ self.redacted = redacted_ self.unknown_fields = unknown_fields
[docs]class CloudCredentialArg(Type): _toSchema = {'cloud_name': 'cloud-name', 'credential_name': 'credential-name'} _toPy = {'cloud-name': 'cloud_name', 'credential-name': 'credential_name'} def __init__(self, cloud_name=None, credential_name=None, **unknown_fields): ''' cloud_name : str credential_name : str ''' cloud_name_ = cloud_name credential_name_ = credential_name # Validate arguments against known Juju API types. if cloud_name_ is not None and not isinstance(cloud_name_, (bytes, str)): raise Exception("Expected cloud_name_ to be a str, received: {}".format(type(cloud_name_))) if credential_name_ is not None and not isinstance(credential_name_, (bytes, str)): raise Exception("Expected credential_name_ to be a str, received: {}".format(type(credential_name_))) self.cloud_name = cloud_name_ self.credential_name = credential_name_ self.unknown_fields = unknown_fields
[docs]class CloudCredentialArgs(Type): _toSchema = {'credentials': 'credentials', 'include_secrets': 'include-secrets'} _toPy = {'credentials': 'credentials', 'include-secrets': 'include_secrets'} def __init__(self, credentials=None, include_secrets=None, **unknown_fields): ''' credentials : typing.Sequence[~CloudCredentialArg] include_secrets : bool ''' credentials_ = [CloudCredentialArg.from_json(o) for o in credentials or []] include_secrets_ = include_secrets # Validate arguments against known Juju API types. 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_))) self.credentials = credentials_ self.include_secrets = include_secrets_ self.unknown_fields = unknown_fields
[docs]class CloudCredentialResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : CloudCredential ''' error_ = Error.from_json(error) if error else None result_ = CloudCredential.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, CloudCredential)): raise Exception("Expected result_ to be a CloudCredential, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class CloudCredentialResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~CloudCredentialResult] ''' results_ = [CloudCredentialResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class CloudDetails(Type): _toSchema = {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} _toPy = {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None, **unknown_fields): ''' auth_types : typing.Sequence[str] endpoint : str identity_endpoint : str regions : typing.Sequence[~CloudRegion] storage_endpoint : str type_ : str ''' auth_types_ = auth_types endpoint_ = endpoint identity_endpoint_ = identity_endpoint regions_ = [CloudRegion.from_json(o) for o in regions or []] storage_endpoint_ = storage_endpoint type__ = type_ # Validate arguments against known Juju API types. if auth_types_ is not None and not isinstance(auth_types_, (bytes, str, list)): raise Exception("Expected auth_types_ to be a Sequence, received: {}".format(type(auth_types_))) if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) if regions_ is not None and not isinstance(regions_, (bytes, str, list)): raise Exception("Expected regions_ to be a Sequence, received: {}".format(type(regions_))) if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.auth_types = auth_types_ self.endpoint = endpoint_ self.identity_endpoint = identity_endpoint_ self.regions = regions_ self.storage_endpoint = storage_endpoint_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CloudImageMetadata(Type): _toSchema = {'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'root_storage_type': 'root-storage-type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt_type': 'virt-type'} _toPy = {'arch': 'arch', 'image-id': 'image_id', 'priority': 'priority', 'region': 'region', 'root-storage-size': 'root_storage_size', 'root-storage-type': 'root_storage_type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt-type': 'virt_type'} def __init__(self, arch=None, image_id=None, priority=None, region=None, root_storage_size=None, root_storage_type=None, series=None, source=None, stream=None, version=None, virt_type=None, **unknown_fields): ''' arch : str image_id : str priority : int region : str root_storage_size : int root_storage_type : str series : str source : str stream : str version : str virt_type : str ''' arch_ = arch image_id_ = image_id priority_ = priority region_ = region root_storage_size_ = root_storage_size root_storage_type_ = root_storage_type series_ = series source_ = source stream_ = stream version_ = version virt_type_ = virt_type # Validate arguments against known Juju API types. if arch_ is not None and not isinstance(arch_, (bytes, str)): raise Exception("Expected arch_ to be a str, received: {}".format(type(arch_))) if image_id_ is not None and not isinstance(image_id_, (bytes, str)): raise Exception("Expected image_id_ to be a str, received: {}".format(type(image_id_))) if priority_ is not None and not isinstance(priority_, int): raise Exception("Expected priority_ to be a int, received: {}".format(type(priority_))) if region_ is not None and not isinstance(region_, (bytes, str)): raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) if root_storage_size_ is not None and not isinstance(root_storage_size_, int): raise Exception("Expected root_storage_size_ to be a int, received: {}".format(type(root_storage_size_))) if root_storage_type_ is not None and not isinstance(root_storage_type_, (bytes, str)): raise Exception("Expected root_storage_type_ to be a str, received: {}".format(type(root_storage_type_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) if source_ is not None and not isinstance(source_, (bytes, str)): raise Exception("Expected source_ to be a str, received: {}".format(type(source_))) if stream_ is not None and not isinstance(stream_, (bytes, str)): raise Exception("Expected stream_ to be a str, received: {}".format(type(stream_))) if version_ is not None and not isinstance(version_, (bytes, str)): raise Exception("Expected version_ to be a str, received: {}".format(type(version_))) if virt_type_ is not None and not isinstance(virt_type_, (bytes, str)): raise Exception("Expected virt_type_ to be a str, received: {}".format(type(virt_type_))) self.arch = arch_ self.image_id = image_id_ self.priority = priority_ self.region = region_ self.root_storage_size = root_storage_size_ self.root_storage_type = root_storage_type_ self.series = series_ self.source = source_ self.stream = stream_ self.version = version_ self.virt_type = virt_type_ self.unknown_fields = unknown_fields
[docs]class CloudImageMetadataList(Type): _toSchema = {'metadata': 'metadata'} _toPy = {'metadata': 'metadata'} def __init__(self, metadata=None, **unknown_fields): ''' metadata : typing.Sequence[~CloudImageMetadata] ''' metadata_ = [CloudImageMetadata.from_json(o) for o in metadata or []] # Validate arguments against known Juju API types. if metadata_ is not None and not isinstance(metadata_, (bytes, str, list)): raise Exception("Expected metadata_ to be a Sequence, received: {}".format(type(metadata_))) self.metadata = metadata_ self.unknown_fields = unknown_fields
[docs]class CloudInfo(Type): _toSchema = {'clouddetails': 'CloudDetails', 'users': 'users'} _toPy = {'CloudDetails': 'clouddetails', 'users': 'users'} def __init__(self, clouddetails=None, users=None, **unknown_fields): ''' clouddetails : CloudDetails users : typing.Sequence[~CloudUserInfo] ''' clouddetails_ = CloudDetails.from_json(clouddetails) if clouddetails else None users_ = [CloudUserInfo.from_json(o) for o in users or []] # Validate arguments against known Juju API types. if clouddetails_ is not None and not isinstance(clouddetails_, (dict, CloudDetails)): raise Exception("Expected clouddetails_ to be a CloudDetails, received: {}".format(type(clouddetails_))) if users_ is not None and not isinstance(users_, (bytes, str, list)): raise Exception("Expected users_ to be a Sequence, received: {}".format(type(users_))) self.clouddetails = clouddetails_ self.users = users_ self.unknown_fields = unknown_fields
[docs]class CloudInfoResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : CloudInfo ''' error_ = Error.from_json(error) if error else None result_ = CloudInfo.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, CloudInfo)): raise Exception("Expected result_ to be a CloudInfo, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class CloudInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~CloudInfoResult] ''' results_ = [CloudInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class CloudInstanceTypesConstraint(Type): _toSchema = {'cloud_tag': 'cloud-tag', 'constraints': 'constraints', 'region': 'region'} _toPy = {'cloud-tag': 'cloud_tag', 'constraints': 'constraints', 'region': 'region'} def __init__(self, cloud_tag=None, constraints=None, region=None, **unknown_fields): ''' cloud_tag : str constraints : Value region : str ''' cloud_tag_ = cloud_tag constraints_ = Value.from_json(constraints) if constraints else None region_ = region # Validate arguments against known Juju API types. if cloud_tag_ is not None and not isinstance(cloud_tag_, (bytes, str)): raise Exception("Expected cloud_tag_ to be a str, received: {}".format(type(cloud_tag_))) if constraints_ is not None and not isinstance(constraints_, (dict, Value)): raise Exception("Expected constraints_ to be a Value, received: {}".format(type(constraints_))) if region_ is not None and not isinstance(region_, (bytes, str)): raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) self.cloud_tag = cloud_tag_ self.constraints = constraints_ self.region = region_ self.unknown_fields = unknown_fields
[docs]class CloudInstanceTypesConstraints(Type): _toSchema = {'constraints': 'constraints'} _toPy = {'constraints': 'constraints'} def __init__(self, constraints=None, **unknown_fields): ''' constraints : typing.Sequence[~CloudInstanceTypesConstraint] ''' constraints_ = [CloudInstanceTypesConstraint.from_json(o) for o in constraints or []] # Validate arguments against known Juju API types. if constraints_ is not None and not isinstance(constraints_, (bytes, str, list)): raise Exception("Expected constraints_ to be a Sequence, received: {}".format(type(constraints_))) self.constraints = constraints_ self.unknown_fields = unknown_fields
[docs]class CloudRegion(Type): _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'} _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'} def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None, **unknown_fields): ''' endpoint : str identity_endpoint : str name : str storage_endpoint : str ''' endpoint_ = endpoint identity_endpoint_ = identity_endpoint name_ = name storage_endpoint_ = storage_endpoint # Validate arguments against known Juju API types. if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) self.endpoint = endpoint_ self.identity_endpoint = identity_endpoint_ self.name = name_ self.storage_endpoint = storage_endpoint_ self.unknown_fields = unknown_fields
[docs]class CloudResult(Type): _toSchema = {'cloud': 'cloud', 'error': 'error'} _toPy = {'cloud': 'cloud', 'error': 'error'} def __init__(self, cloud=None, error=None, **unknown_fields): ''' cloud : Cloud error : Error ''' cloud_ = Cloud.from_json(cloud) if cloud else None error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. if cloud_ is not None and not isinstance(cloud_, (dict, Cloud)): raise Exception("Expected cloud_ to be a Cloud, received: {}".format(type(cloud_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) self.cloud = cloud_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class CloudResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~CloudResult] ''' results_ = [CloudResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class CloudSpec(Type): _toSchema = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'region': 'region', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'} _toPy = {'cacertificates': 'cacertificates', 'credential': 'credential', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'region': 'region', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'} def __init__(self, cacertificates=None, credential=None, endpoint=None, identity_endpoint=None, name=None, region=None, storage_endpoint=None, type_=None, **unknown_fields): ''' cacertificates : typing.Sequence[str] credential : CloudCredential endpoint : str identity_endpoint : str name : str region : str storage_endpoint : str type_ : str ''' cacertificates_ = cacertificates credential_ = CloudCredential.from_json(credential) if credential else None endpoint_ = endpoint identity_endpoint_ = identity_endpoint name_ = name region_ = region storage_endpoint_ = storage_endpoint type__ = type_ # Validate arguments against known Juju API types. if cacertificates_ is not None and not isinstance(cacertificates_, (bytes, str, list)): raise Exception("Expected cacertificates_ to be a Sequence, received: {}".format(type(cacertificates_))) if credential_ is not None and not isinstance(credential_, (dict, CloudCredential)): raise Exception("Expected credential_ to be a CloudCredential, received: {}".format(type(credential_))) if endpoint_ is not None and not isinstance(endpoint_, (bytes, str)): raise Exception("Expected endpoint_ to be a str, received: {}".format(type(endpoint_))) if identity_endpoint_ is not None and not isinstance(identity_endpoint_, (bytes, str)): raise Exception("Expected identity_endpoint_ to be a str, received: {}".format(type(identity_endpoint_))) if name_ is not None and not isinstance(name_, (bytes, str)): raise Exception("Expected name_ to be a str, received: {}".format(type(name_))) if region_ is not None and not isinstance(region_, (bytes, str)): raise Exception("Expected region_ to be a str, received: {}".format(type(region_))) if storage_endpoint_ is not None and not isinstance(storage_endpoint_, (bytes, str)): raise Exception("Expected storage_endpoint_ to be a str, received: {}".format(type(storage_endpoint_))) if type__ is not None and not isinstance(type__, (bytes, str)): raise Exception("Expected type__ to be a str, received: {}".format(type(type__))) self.cacertificates = cacertificates_ self.credential = credential_ self.endpoint = endpoint_ self.identity_endpoint = identity_endpoint_ self.name = name_ self.region = region_ self.storage_endpoint = storage_endpoint_ self.type_ = type__ self.unknown_fields = unknown_fields
[docs]class CloudSpecResult(Type): _toSchema = {'error': 'error', 'result': 'result'} _toPy = {'error': 'error', 'result': 'result'} def __init__(self, error=None, result=None, **unknown_fields): ''' error : Error result : CloudSpec ''' error_ = Error.from_json(error) if error else None result_ = CloudSpec.from_json(result) if result else None # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if result_ is not None and not isinstance(result_, (dict, CloudSpec)): raise Exception("Expected result_ to be a CloudSpec, received: {}".format(type(result_))) self.error = error_ self.result = result_ self.unknown_fields = unknown_fields
[docs]class CloudSpecResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~CloudSpecResult] ''' results_ = [CloudSpecResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
[docs]class CloudUserInfo(Type): _toSchema = {'access': 'access', 'display_name': 'display-name', 'user': 'user'} _toPy = {'access': 'access', 'display-name': 'display_name', 'user': 'user'} def __init__(self, access=None, display_name=None, user=None, **unknown_fields): ''' access : str display_name : str user : str ''' access_ = access display_name_ = display_name user_ = user # Validate arguments against known Juju API types. if access_ is not None and not isinstance(access_, (bytes, str)): raise Exception("Expected access_ to be a str, received: {}".format(type(access_))) if display_name_ is not None and not isinstance(display_name_, (bytes, str)): raise Exception("Expected display_name_ to be a str, received: {}".format(type(display_name_))) if user_ is not None and not isinstance(user_, (bytes, str)): raise Exception("Expected user_ to be a str, received: {}".format(type(user_))) self.access = access_ self.display_name = display_name_ self.user = user_ self.unknown_fields = unknown_fields
[docs]class CloudsResult(Type): _toSchema = {'clouds': 'clouds'} _toPy = {'clouds': 'clouds'} def __init__(self, clouds=None, **unknown_fields): ''' clouds : typing.Mapping[str, ~Cloud] ''' clouds_ = clouds # Validate arguments against known Juju API types. if clouds_ is not None and not isinstance(clouds_, dict): raise Exception("Expected clouds_ to be a Mapping, received: {}".format(type(clouds_))) self.clouds = clouds_ self.unknown_fields = unknown_fields
[docs]class ConfigResult(Type): _toSchema = {'config': 'config', 'error': 'error'} _toPy = {'config': 'config', 'error': 'error'} def __init__(self, config=None, error=None, **unknown_fields): ''' config : typing.Mapping[str, typing.Any] error : Error ''' config_ = config error_ = Error.from_json(error) if error else None # Validate arguments against known Juju API types. if config_ is not None and not isinstance(config_, dict): raise Exception("Expected config_ to be a Mapping, received: {}".format(type(config_))) if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) self.config = config_ self.error = error_ self.unknown_fields = unknown_fields
[docs]class ConfigSettingsResult(Type): _toSchema = {'error': 'error', 'settings': 'settings'} _toPy = {'error': 'error', 'settings': 'settings'} def __init__(self, error=None, settings=None, **unknown_fields): ''' error : Error settings : typing.Mapping[str, typing.Any] ''' error_ = Error.from_json(error) if error else None settings_ = settings # Validate arguments against known Juju API types. if error_ is not None and not isinstance(error_, (dict, Error)): raise Exception("Expected error_ to be a Error, received: {}".format(type(error_))) if settings_ is not None and not isinstance(settings_, dict): raise Exception("Expected settings_ to be a Mapping, received: {}".format(type(settings_))) self.error = error_ self.settings = settings_ self.unknown_fields = unknown_fields
[docs]class ConfigSettingsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ConfigSettingsResult] ''' results_ = [ConfigSettingsResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields
class ConfigValue(Type): _toSchema = {'source': 'source', 'value': 'value'} _toPy = {'source': 'source', 'value': 'value'} def __init__(self, source=None, value=None, **unknown_fields): ''' source : str value : Any ''' source_ = source value_ = value # Validate arguments against known Juju API types. if sour