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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDisk_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDisk_);
    }
    if (mode_ != com.google.cloud.tpu.v2.AttachedDisk.DiskMode.DISK_MODE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mode_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }
<pre>
The mode in which to attach this disk.
If not specified, the default is READ_WRITE mode.
Only applicable to data_disks.
</pre>

<code>.google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4;</code>

@return The mode.
java-tpu/proto-google-cloud-tpu-v2/src/main/java/com/google/cloud/tpu/v2/AttachedDisk.java