@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRegion_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, awsRegion_);
    }
    if (state_
        != com.google.cloud.vmmigration.v1.AwsSourceDetails.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(4, state_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(5, getError());
    }
    for (int i = 0; i < inventorySecurityGroupNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(
          output, 7, inventorySecurityGroupNames_.getRaw(i));
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output,
        internalGetMigrationResourcesUserTags(),
        MigrationResourcesUserTagsDefaultEntryHolder.defaultEntry,
        8);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIp_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, publicIp_);
    }
    for (int i = 0; i < inventoryTagList_.size(); i++) {
      output.writeMessage(10, inventoryTagList_.get(i));
    }
    if (credentialsTypeCase_ == 11) {
      output.writeMessage(
          11,
          (com.google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials) credentialsType_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Output only. The source's public IP. All communication initiated by this
source will originate from this IP.
</pre>

<code>string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>

@return The bytes for publicIp.
java-vmmigration/proto-google-cloud-vmmigration-v1/src/main/java/com/google/cloud/vmmigration/v1/AwsSourceDetails.java