def VersionedParseReplaceAccessLevelsResponse(lro, unused_args): """Parse the Long Running Operation response of the ReplaceAccessLevels call. Args: lro: Long Running Operation response of ReplaceAccessLevels. unused_args: not used. Returns: The replacement Access Levels created by the ReplaceAccessLevels call. Raises: ParseResponseError: if the response could not be parsed into the proper object. """ client = util.GetClient(version=api_version) operation_ref = resources.REGISTRY.Parse( lro.name, collection='accesscontextmanager.operations') poller = common.BulkAPIOperationPoller( client.accessPolicies_accessLevels, client.operations, operation_ref) return waiter.WaitFor( poller, operation_ref, 'Waiting for Replace Access Levels operation [{}]'.format( operation_ref.Name()))
def ParseReplaceServicePerimetersResponseBase(lro, version): """Parse the Long Running Operation response of the ReplaceServicePerimeters call. Args: lro: Long Running Operation response of ReplaceServicePerimeters. version: version of the API. e.g. 'v1beta', 'v1'. Returns: The replacement Service Perimeters created by the ReplaceServicePerimeters call. Raises: ParseResponseError: if the response could not be parsed into the proper object. """ client = util.GetClient(version=version) operation_ref = resources.REGISTRY.Parse( lro.name, collection='accesscontextmanager.operations') poller = common.BulkAPIOperationPoller( client.accessPolicies_servicePerimeters, client.operations, operation_ref) return waiter.WaitFor( poller, operation_ref, 'Waiting for Replace Service Perimeters operation [{}]'.format( operation_ref.Name()))
def __init__(self, client=None, messages=None, version='v1'): self.client = client or util.GetClient(version=version) self.messages = messages or self.client.MESSAGES_MODULE self.include_unrestricted_services = { 'v1': False, 'v1alpha': True, 'v1beta': True }[version]
def __init__(self, client=None, messages=None): self.client = client or util.GetClient() self.messages = messages or self.client.MESSAGES_MODULE
def __init__(self, client=None, messages=None, version='v1'): self.client = client or util.GetClient(version=version) self.messages = messages or self.client.MESSAGES_MODULE