package com.saas.voip.dto.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Response DTO for Retell agents.
 * Maps Retell API v2 response schema.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RetellAgentResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonProperty("agent_id")
    private String agentId;

    @JsonProperty("agent_name")
    private String agentName;

    private String description;

    @JsonProperty("llm_model")
    private String llmModel;

    @JsonProperty("system_prompt")
    private String systemPrompt;

    @JsonProperty("begin_message")
    private String beginMessage;

    private VoiceConfig voice;

    @JsonProperty("language_code")
    private String languageCode;

    @JsonProperty("enable_transcription")
    private Boolean enableTranscription;

    @JsonProperty("enable_recording")
    private Boolean enableRecording;

    @JsonProperty("max_duration_minutes")
    private Integer maxDurationMinutes;

    @JsonProperty("created_at")
    private LocalDateTime createdAt;

    @JsonProperty("updated_at")
    private LocalDateTime updatedAt;

    private String status;  // "active", "inactive"

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class VoiceConfig {

        private String provider;

        @JsonProperty("voice_id")
        private String voiceId;

        private Double speed;
    }
}
