/* * Copyright 2025 Google. This software is provided as-is, without warranty or representation for any use or purpose. * Your use of it is subject to your agreement with Google. */ package com.example.dto.dialogflow.notification; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.time.Instant; import java.util.Map; import java.util.Objects; /** * Represents a notification record to be stored in Firestore and cached in * Redis. */ @JsonIgnoreProperties(ignoreUnknown = true) // Ignorar campos adicionales durante la deserialización public record NotificationDTO( String idNotificacion, // ID único para esta notificación (ej. el sessionId usado con Dialogflow) String telefono, Instant timestampCreacion, // Momento en que la notificación fue procesada String texto, // 'texto' original de NotificationRequestDTO (si aplica) String nombreEventoDialogflow, // Nombre del evento enviado a Dialogflow (ej. "tu Estado de cuenta listo") String codigoIdiomaDialogflow, // Código de idioma usado para el evento Map parametros, // Parámetros de sesión finales después del procesamiento de// Dialogflow String status ) { public NotificationDTO { Objects.requireNonNull(idNotificacion, "Notification ID cannot be null."); Objects.requireNonNull(timestampCreacion, "Notification timestamp cannot be null."); Objects.requireNonNull(nombreEventoDialogflow, "Dialogflow event name cannot be null."); Objects.requireNonNull(codigoIdiomaDialogflow, "Dialogflow language code cannot be null."); } }