public java.lang.String getInstanceId() {
      java.lang.Object ref = instanceId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        instanceId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
<pre>
Required. The ID to use for the instance, which will become the final
component of the instance's resource name.

This value is subject to the following restrictions:

* Must be 4-63 characters in length
* Must begin with a letter or digit
* Must contain only lowercase letters, digits, and hyphens
* Must not end with a hyphen
* Must be unique within a location
</pre>

<code>string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>

@return The instanceId.
java-valkey/proto-google-cloud-valkey-v1/src/main/java/com/google/cloud/memorystore/v1/CreateInstanceRequest.java