@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vmName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetProject_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetProject_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeSeries_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, machineTypeSeries_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, machineType_);
    }
    for (int i = 0; i < networkTags_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, networkTags_.getRaw(i));
    }
    for (int i = 0; i < networkInterfaces_.size(); i++) {
      output.writeMessage(7, networkInterfaces_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_);
    }
    if (diskType_
        != com.google.cloud.vmmigration.v1.ComputeEngineDiskType
            .COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(9, diskType_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10);
    if (licenseType_
        != com.google.cloud.vmmigration.v1.ComputeEngineLicenseType
            .COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT
            .getNumber()) {
      output.writeEnum(11, licenseType_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(12, getAppliedLicense());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(13, getComputeScheduling());
    }
    if (secureBoot_ != false) {
      output.writeBool(14, secureBoot_);
    }
    if (bootOption_
        != com.google.cloud.vmmigration.v1.ComputeEngineBootOption
            .COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(15, bootOption_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 16);
    for (int i = 0; i < additionalLicenses_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, additionalLicenses_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, hostname_);
    }
    getUnknownFields().writeTo(output);
  }
<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