@java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRegion_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, awsRegion_);
    }
    if (state_
        != com.google.cloud.vmmigration.v1.AwsSourceDetails.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getError());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < inventorySecurityGroupNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(inventorySecurityGroupNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getInventorySecurityGroupNamesList().size();
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetMigrationResourcesUserTags().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
          migrationResourcesUserTags__ =
              MigrationResourcesUserTagsDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(8, migrationResourcesUserTags__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicIp_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, publicIp_);
    }
    for (int i = 0; i < inventoryTagList_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(10, inventoryTagList_.get(i));
    }
    if (credentialsTypeCase_ == 11) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              11,
              (com.google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials)
                  credentialsType_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<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