google-notebooks/src/main/java/bio/terra/cloudres/google/notebooks/InstanceName.java
/**
   * Parse the parent format with an instance ID to create an {@link InstanceName}.
   *
   * @throws IllegalArgumentException on parse failure.
   * @see #formatParent()
   */
Parse the parent format with an instance ID to create an  InstanceName.
@throws IllegalArgumentException on parse failure.
@see #formatParent()
Parse the parent format with an instance ID to create an InstanceName . @throws IllegalArgumentException on parse failure . @see #formatParent ()
public static InstanceName fromParentAndId(String parent, String instanceId) {
    Matcher matcher = PARENT_PATTERN.matcher(parent);
    if (!matcher.matches()) {
      throw new IllegalArgumentException(
          String.format(
              "PARENT must conform to %s but got '%s'", PARENT_PATTERN.pattern(), parent));
    }
    return InstanceName.builder()
        .projectId(matcher.group(1))
        .location(matcher.group(2))
        .instanceId(instanceId)
        .build();
  }
public static InstanceName fromParentAndId ( String parent , String instanceId ) { Matcher matcher = PARENT_PATTERN . matcher ( parent ) ; if ( ! matcher . matches ( ) ) { throw new IllegalArgumentException ( String . format ( "PARENT must conform to %s but got '%s'" , PARENT_PATTERN . pattern ( ) , parent ) ) ; } return InstanceName . builder ( ) . projectId ( matcher . group ( 1 ) ) . location ( matcher . group ( 2 ) ) . instanceId ( instanceId ) . build ( ) ; }
Parse the parent format with an instance ID to create an {@link InstanceName}.
Parse the parent format with an instance ID to create an { @link InstanceName } .