All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mparticle.sdk.model.eventprocessing.consent.ConsentState Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.mparticle.sdk.model.eventprocessing.consent;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.HashMap;
import java.util.Map;

public final class ConsentState {

    /**
     * The default consent purpose for CCPA.
     * For more, reference: https://docs.mparticle.com/guides/consent-management#consent-properties
     */
    public static final String DEFAULT_CCPA_CONSENT_PURPOSE = "data_sale_opt_out";

    @JsonProperty("gdpr_consent_state")
    private Map GDPR;

    @JsonProperty("ccpa_consent_state")
    private Map CCPA;

    public Map getGDPR() {
        return GDPR;
    }

    public void setGDPR(Map GDPR) {
        this.GDPR = GDPR;
    }

    public Map getCCPA() {
        return CCPA;
    }

    /**
     * Set-up the map with the default CCPA consent purpose.
     * @param CCPA
     */
    public void setCCPA(CCPAConsent CCPA) {
        Map ccpaConsentMap = new HashMap<>();
        ccpaConsentMap.put(DEFAULT_CCPA_CONSENT_PURPOSE, CCPA);

        this.setCCPA(ccpaConsentMap);
    }

    public void setCCPA(Map CCPA) {
        this.CCPA = CCPA;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy