package com.infoepoch.pms.agent.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * AI 观测配置。
 */
@ConfigurationProperties(prefix = "pms.observability.ai")
public class AiObservabilityProperties {

    private boolean enabled = true;
    private PayloadMode payloadMode = PayloadMode.FULL;
    private final Http http = new Http();

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public PayloadMode getPayloadMode() {
        return payloadMode;
    }

    public void setPayloadMode(PayloadMode payloadMode) {
        this.payloadMode = payloadMode;
    }

    public Http getHttp() {
        return http;
    }

    public enum PayloadMode {
        PREVIEW,
        FULL,
        OFF
    }

    public static class Http {

        private boolean propagateHeaders = true;

        public boolean isPropagateHeaders() {
            return propagateHeaders;
        }

        public void setPropagateHeaders(boolean propagateHeaders) {
            this.propagateHeaders = propagateHeaders;
        }
    }
}
