package com.dacrt.SBIABackend.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

public class ScimPatchRequest {
    private List<String> schemas;
    
    // Usamos @JsonProperty para que Jackson sepa que en el JSON viene como "Operations"
    // pero en Java lo manejamos como "operations" (minúscula)
    @JsonProperty("Operations")
    private List<PatchOperation> operations;

    public List<String> getSchemas() { return schemas; }
    public void setSchemas(List<String> schemas) { this.schemas = schemas; }

    // Este es el método que tu Controller no encontraba
    public List<PatchOperation> getOperations() { return operations; }
    public void setOperations(List<PatchOperation> operations) { this.operations = operations; }

    // Clase interna estática
    public static class PatchOperation {
        private String op;
        private String path;
        private Object value; // Importante: Object para soportar Map o List

        public String getOp() { return op; }
        public void setOp(String op) { this.op = op; }

        public String getPath() { return path; }
        public void setPath(String path) { this.path = path; }

        public Object getValue() { return value; }
        public void setValue(Object value) { this.value = value; }
    }
}