getProviderIdFromResourceName static method

String? getProviderIdFromResourceName(
  1. String resourceName
)

Implementation

static String? getProviderIdFromResourceName(String resourceName) {
  // name is of form projects/project1/inboundSamlConfigs/providerId1
  final matchProviderRes = RegExp(
    r'\/inboundSamlConfigs\/(saml\..*)$',
  ).firstMatch(resourceName);
  if (matchProviderRes == null || matchProviderRes.groupCount < 1) {
    return null;
  }
  return matchProviderRes[1];
}