@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (automatedBackupMode_
        != com.google.cloud.memorystore.v1.AutomatedBackupConfig.AutomatedBackupMode
            .AUTOMATED_BACKUP_MODE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(1, automatedBackupMode_);
    }
    if (scheduleCase_ == 2) {
      output.writeMessage(
          2,
          (com.google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule) schedule_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(3, getRetention());
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. How long to keep automated backups before the backups are
deleted. The value should be between 1 day and 365 days. If not specified,
the default value is 35 days.
</pre>

<code>.google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
java-valkey/proto-google-cloud-valkey-v1/src/main/java/com/google/cloud/memorystore/v1/AutomatedBackupConfig.java