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

    if (!getName().equals(other.getName())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (state_ != other.state_) return false;
    if (hasStateInfo() != other.hasStateInfo()) return false;
    if (hasStateInfo()) {
      if (!getStateInfo().equals(other.getStateInfo())) return false;
    }
    if (!getUid().equals(other.getUid())) return false;
    if (hasReplicaCount() != other.hasReplicaCount()) return false;
    if (hasReplicaCount()) {
      if (getReplicaCount() != other.getReplicaCount()) return false;
    }
    if (authorizationMode_ != other.authorizationMode_) return false;
    if (transitEncryptionMode_ != other.transitEncryptionMode_) return false;
    if (getShardCount() != other.getShardCount()) return false;
    if (!getDiscoveryEndpointsList().equals(other.getDiscoveryEndpointsList())) return false;
    if (nodeType_ != other.nodeType_) return false;
    if (hasPersistenceConfig() != other.hasPersistenceConfig()) return false;
    if (hasPersistenceConfig()) {
      if (!getPersistenceConfig().equals(other.getPersistenceConfig())) return false;
    }
    if (!getEngineVersion().equals(other.getEngineVersion())) return false;
    if (!internalGetEngineConfigs().equals(other.internalGetEngineConfigs())) return false;
    if (hasNodeConfig() != other.hasNodeConfig()) return false;
    if (hasNodeConfig()) {
      if (!getNodeConfig().equals(other.getNodeConfig())) return false;
    }
    if (hasZoneDistributionConfig() != other.hasZoneDistributionConfig()) return false;
    if (hasZoneDistributionConfig()) {
      if (!getZoneDistributionConfig().equals(other.getZoneDistributionConfig())) return false;
    }
    if (hasDeletionProtectionEnabled() != other.hasDeletionProtectionEnabled()) return false;
    if (hasDeletionProtectionEnabled()) {
      if (getDeletionProtectionEnabled() != other.getDeletionProtectionEnabled()) return false;
    }
    if (!getPscAutoConnectionsList().equals(other.getPscAutoConnectionsList())) return false;
    if (!getEndpointsList().equals(other.getEndpointsList())) return false;
    if (mode_ != other.mode_) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }
<pre>
Optional. The mode config for the instance.
</pre>

<code>
.google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL];
</code>

@return The mode.
java-valkey/proto-google-cloud-valkey-v1beta/src/main/java/com/google/cloud/memorystore/v1beta/Instance.java