@java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.memorystore.v1.AutomatedBackupConfig)) {
      return super.equals(obj);
    }
    com.google.cloud.memorystore.v1.AutomatedBackupConfig other =
        (com.google.cloud.memorystore.v1.AutomatedBackupConfig) obj;

    if (automatedBackupMode_ != other.automatedBackupMode_) return false;
    if (hasRetention() != other.hasRetention()) return false;
    if (hasRetention()) {
      if (!getRetention().equals(other.getRetention())) return false;
    }
    if (!getScheduleCase().equals(other.getScheduleCase())) return false;
    switch (scheduleCase_) {
      case 2:
        if (!getFixedFrequencySchedule().equals(other.getFixedFrequencySchedule())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }
<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