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

        size = 0;
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskType_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, diskType_);
        }
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceSnapshot_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceSnapshot_);
        }
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceImage_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceImage_);
        }
        if (readOnly_ != false) {
          size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, readOnly_);
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSize = size;
        return size;
      }
<pre>
Optional. Whether the disk is read only. If true, the disk may be
shared by multiple VMs and
[source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk.source_snapshot]
must be set.
</pre>

<code>bool read_only = 4 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The readOnly.
java-workstations/proto-google-cloud-workstations-v1beta/src/main/java/com/google/cloud/workstations/v1beta/WorkstationConfig.java