@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResource_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, targetResource_);
    }
    for (int i = 0; i < eventTypes_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, eventTypes_.getRaw(i));
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(6, getPayloadOptions());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(7, getNotificationEndpoint());
    }
    if (state_
        != com.google.apps.events.subscriptions.v1.Subscription.State.STATE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(8, state_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, authority_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(11, getCreateTime());
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeMessage(12, getUpdateTime());
    }
    if (expirationCase_ == 13) {
      output.writeMessage(13, (com.google.protobuf.Timestamp) expiration_);
    }
    if (expirationCase_ == 14) {
      output.writeMessage(14, (com.google.protobuf.Duration) expiration_);
    }
    if (reconciling_ != false) {
      output.writeBool(15, reconciling_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, etag_);
    }
    if (suspensionReason_
        != com.google.apps.events.subscriptions.v1.Subscription.ErrorType.ERROR_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(18, suspensionReason_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. This checksum is computed by the server based on the value of
other fields, and might be sent on update requests to ensure the client has
an up-to-date value before proceeding.
</pre>

<code>string etag = 17 [(.google.api.field_behavior) = OPTIONAL];</code>

@return The bytes for etag.
java-workspaceevents/proto-google-cloud-workspaceevents-v1/src/main/java/com/google/apps/events/subscriptions/v1/Subscription.java