@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getCreateTime());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
    }
    for (int i = 0; i < inputResources_.size(); i++) {
      output.writeMessage(6, inputResources_.get(i));
    }
    for (int i = 0; i < outputResources_.size(); i++) {
      output.writeMessage(7, outputResources_.get(i));
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(8, getUpdateTime());
    }
    if (state_ != com.google.cloud.visionai.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(9, state_);
    }
    if (instanceType_
        != com.google.cloud.visionai.v1.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(10, instanceType_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
State of the instance.
</pre>

<code>.google.cloud.visionai.v1.Instance.State state = 9;</code>

@return The state.
java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Instance.java