Class ConsentState.Builder

  • Enclosing class:
    ConsentState

    public static class ConsentState.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setGDPRConsentState

        @NonNull
        public ConsentState.Builder setGDPRConsentState​(@Nullable
                                                        java.util.Map<java.lang.String,​GDPRConsent> consentState)
        Set/replace the entire GDPR consent state of this builder.

        Note that all purpose keys will be lower-cased and trimmed.

        Parameters:
        consentState -
      • addGDPRConsentState

        @NonNull
        public ConsentState.Builder addGDPRConsentState​(@NonNull
                                                        java.lang.String purpose,
                                                        @NonNull
                                                        GDPRConsent consent)
        Add or override a single GDPR consent state for this builder.

        Note that all purpose keys will be lower-cased and trimmed.

        Parameters:
        purpose -
        consent -
      • removeGDPRConsentState

        @NonNull
        public ConsentState.Builder removeGDPRConsentState​(@NonNull
                                                           java.lang.String purpose)
        Remove a single GDPR consent state for this builder.

        Note that all purpose keys will be lower-cased and trimmed.

        Parameters:
        purpose -
      • removeCCPAConsent

        @Deprecated
        @NonNull
        public ConsentState.Builder removeCCPAConsent()
        Deprecated.
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object