google-notebooks/src/main/java/bio/terra/cloudres/google/notebooks/InstanceName.java
/**
   * Parse the name format to create an {@link InstanceName}.
   *
   * @throws IllegalArgumentException on parse failure.
   * @see #formatName()
   */
Parse the name format to create an  InstanceName.
@throws IllegalArgumentException on parse failure.
@see #formatName()
Parse the name format to create an InstanceName . @throws IllegalArgumentException on parse failure . @see #formatName ()
public static InstanceName 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 InstanceName.builder()
        .projectId(matcher.group(1))
        .location(matcher.group(2))
        .instanceId(matcher.group(3))
        .build();
  }
public static InstanceName 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 InstanceName . builder ( ) . projectId ( matcher . group ( 1 ) ) . location ( matcher . group ( 2 ) ) . instanceId ( matcher . group ( 3 ) ) . build ( ) ; }
Parse the name format to create an {@link InstanceName}.
Parse the name format to create an { @link InstanceName } .