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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vmName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetProject_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetProject_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeSeries_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, machineTypeSeries_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, machineType_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < networkTags_.size(); i++) {
        dataSize += computeStringSizeNoTag(networkTags_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getNetworkTagsList().size();
    }
    for (int i = 0; i < networkInterfaces_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(7, networkInterfaces_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_);
    }
    if (diskType_
        != com.google.cloud.vmmigration.v1.ComputeEngineDiskType
            .COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, diskType_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, labels__);
    }
    if (licenseType_
        != com.google.cloud.vmmigration.v1.ComputeEngineLicenseType
            .COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, licenseType_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getAppliedLicense());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getComputeScheduling());
    }
    if (secureBoot_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, secureBoot_);
    }
    if (bootOption_
        != com.google.cloud.vmmigration.v1.ComputeEngineBootOption
            .COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, bootOption_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetMetadata().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ =
          MetadataDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, metadata__);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < additionalLicenses_.size(); i++) {
        dataSize += computeStringSizeNoTag(additionalLicenses_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getAdditionalLicensesList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, hostname_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<pre>
The hostname to assign to the VM.
</pre>

<code>string hostname = 18;</code>

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