public static class VendorConsent.Builder extends Object
| Constructor | Description |
|---|---|
Builder() |
public VendorConsent.Builder withVersion(int version)
version - Version of the Consent String Formatpublic VendorConsent.Builder withConsentRecordCreatedOn(Date consentRecordCreated)
consentRecordCreated - Epoch deciseconds when consent string was first createdpublic VendorConsent.Builder withConsentRecordLastUpdatedOn(Date consentRecordLastUpdated)
consentRecordLastUpdated - Epoch deciseconds when consent string was last updatedpublic VendorConsent.Builder withCmpID(int cmpID)
cmpID - Consent Manager Provider ID that last updated the consent stringpublic VendorConsent.Builder withCmpVersion(int cmpVersion)
cmpVersion - Consent Manager Provider versionpublic VendorConsent.Builder withConsentScreenID(int consentScreenID)
consentScreenID - Screen number in the CMP where consent was givenpublic VendorConsent.Builder withConsentLanguage(String consentLanguage)
consentLanguage - Two-letter ISO639-1 language code that CMP asked for consent in. Each letter should be encoded as
6 bits, A=0..Z=25 . This will result in the base64url-encoded bytes spelling out the language code
(in uppercase).public VendorConsent.Builder withVendorListVersion(int vendorListVersion)
vendorListVersion - Version of vendor list used in most recent consent string updatepublic VendorConsent.Builder withAllowedPurposes(List<Integer> allowedPurposes)
allowedPurposes - For each Purpose, one bit: 0=No Consent 1=Consent Purposes are listed in the global Vendor List.
Resultant consent value is the ?AND? of the applicable bit(s) from this field and a vendor?s
specific consent bit. Purpose #1 maps to the first (most significant) bit, purpose #24 maps to the
last (least significant) bit.public VendorConsent.Builder withMaxVendorId(int maxVendorId)
maxVendorId - The maximum VendorId for which consent values are given.public VendorConsent.Builder withVendorEncodingType(int vendorEncodingType)
vendorEncodingType - 0=BitField 1=Rangepublic VendorConsent.Builder withBitField(List<Integer> bitFieldEntries)
bitFieldEntries - List of VendorIds for which the vendors have consentpublic VendorConsent.Builder withRangeEntries(List<VendorConsent.RangeEntry> rangeEntries)
rangeEntries - List of VendorIds or a range of VendorIds for which the vendors have consentpublic VendorConsent.Builder withDefaultConsent(boolean defaultConsent)
defaultConsent - Default consent for VendorIds not covered by a RangeEntry. 0=No Consent 1=Consentpublic VendorConsent build()