+ _params = dict()
+ msg = dict(type='Application', request='Update', version=3, params=_params)
+ _params['application'] = application
+ _params['charm-url'] = charm_url
+ _params['constraints'] = constraints
+ _params['force-charm-url'] = force_charm_url
+ _params['force-series'] = force_series
+ _params['min-units'] = min_units
+ _params['settings'] = settings
+ _params['settings-yaml'] = settings_yaml
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ApplicationRelationsWatcherFacade(Type):
+ name = 'ApplicationRelationsWatcher'
+ version = 1
+ schema = {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
+ 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
+ 'type': 'array'},
+ 'removed': {'items': {'type': 'integer'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ApplicationRelationsWatchResult': {'additionalProperties': False,
+ 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
+ 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['ApplicationRelationsWatcherId'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'RelationChange': {'additionalProperties': False,
+ 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
+ 'type': 'object'},
+ 'departedunits': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'id': {'type': 'integer'},
+ 'life': {'type': 'string'}},
+ 'required': ['id', 'life'],
+ 'type': 'object'},
+ 'RelationUnitChange': {'additionalProperties': False,
+ 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
+ 'type': 'object'},
+ 'Stop': {'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ApplicationRelationsWatchResult)
+ async def Next(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ _params = dict()
+ msg = dict(type='ApplicationRelationsWatcher', request='Next', version=1, params=_params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Stop(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ _params = dict()
+ msg = dict(type='ApplicationRelationsWatcher', request='Stop', version=1, params=_params)
+