def get_resolver_for_resource_type(resource_type):
 if (resource_type == ResourceType.RUNNER):
  resolver_cls = RunnerPermissionsResolver
 elif (resource_type == ResourceType.PACK):
  resolver_cls = PackPermissionsResolver
 elif (resource_type == ResourceType.SENSOR):
  resolver_cls = SensorPermissionsResolver
 elif (resource_type == ResourceType.ACTION):
  resolver_cls = ActionPermissionsResolver
 elif (resource_type == ResourceType.ACTION_ALIAS):
  resolver_cls = ActionAliasPermissionsResolver
 elif (resource_type == ResourceType.RULE):
  resolver_cls = RulePermissionsResolver
 elif (resource_type == ResourceType.EXECUTION):
  resolver_cls = ExecutionPermissionsResolver
 elif (resource_type == ResourceType.KEY_VALUE_PAIR):
  resolver_cls = KeyValuePermissionsResolver
 elif (resource_type == ResourceType.WEBHOOK):
  resolver_cls = WebhookPermissionsResolver
 elif (resource_type == ResourceType.API_KEY):
  resolver_cls = ApiKeyPermissionResolver
 elif (resource_type == ResourceType.RULE_ENFORCEMENT):
  resolver_cls = RuleEnforcementPermissionsResolver
 else:
  raise ValueError(('Unsupported resource: %s' % resource_type))
 resolver_instance = resolver_cls()
 return resolver_instance

def get_resolver_for_resource_type ( resource_type ) : if ( resource_type == ResourceType . RUNNER ) : resolver_cls = RunnerPermissionsResolver elif ( resource_type == ResourceType . PACK ) : resolver_cls = PackPermissionsResolver elif ( resource_type == ResourceType . SENSOR ) : resolver_cls = SensorPermissionsResolver elif ( resource_type == ResourceType . ACTION ) : resolver_cls = ActionPermissionsResolver elif ( resource_type == ResourceType . ACTION_ALIAS ) : resolver_cls = ActionAliasPermissionsResolver elif ( resource_type == ResourceType . RULE ) : resolver_cls = RulePermissionsResolver elif ( resource_type == ResourceType . EXECUTION ) : resolver_cls = ExecutionPermissionsResolver elif ( resource_type == ResourceType . KEY_VALUE_PAIR ) : resolver_cls = KeyValuePermissionsResolver elif ( resource_type == ResourceType . WEBHOOK ) : resolver_cls = WebhookPermissionsResolver elif ( resource_type == ResourceType . API_KEY ) : resolver_cls = ApiKeyPermissionResolver elif ( resource_type == ResourceType . RULE_ENFORCEMENT ) : resolver_cls = RuleEnforcementPermissionsResolver else : raise ValueError ( ( 'Unsupported resource: %s' % resource_type ) ) resolver_instance = resolver_cls ( ) return resolver_instance
return resolver instance for the provided resource type .