google-iam/src/main/java/bio/terra/cloudres/google/iam/ServiceAccountName.java
/**
   * Parse the name format to create a {@link ServiceAccountName}.
   *
   * @throws IllegalArgumentException on parse failure.
   * @see #formatName()
   */
Parse the name format to create a  ServiceAccountName.
@throws IllegalArgumentException on parse failure.
@see #formatName()
Parse the name format to create a ServiceAccountName . @throws IllegalArgumentException on parse failure . @see #formatName ()
public static ServiceAccountName fromNameFormat(String name) {
    Matcher matcher = NAME_PATTERN.matcher(name);
    if (!matcher.matches()) {
      throw new IllegalArgumentException(
          String.format("Name must conform to %s but got '%s'", NAME_PATTERN.pattern(), name));
    }
    return ServiceAccountName.builder().projectId(matcher.group(1)).email(matcher.group(2)).build();
  }
public static ServiceAccountName fromNameFormat ( String name ) { Matcher matcher = NAME_PATTERN . matcher ( name ) ; if ( ! matcher . matches ( ) ) { throw new IllegalArgumentException ( String . format ( "Name must conform to %s but got '%s'" , NAME_PATTERN . pattern ( ) , name ) ) ; } return ServiceAccountName . builder ( ) . projectId ( matcher . group ( 1 ) ) . email ( matcher . group ( 2 ) ) . build ( ) ; }
Parse the name format to create a {@link ServiceAccountName}.
Parse the name format to create a { @link ServiceAccountName } .