#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
#ifndef CONSENTVIEWCONTROLLER_SWIFT_H
#define CONSENTVIEWCONTROLLER_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"

#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif

#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif

#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
#  define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
#  define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#pragma clang diagnostic pop
#endif

#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
#  include <uchar.h>
# elif !defined(__cplusplus)
typedef unsigned char char8_t;
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2  __attribute__((__ext_vector_type__(2)));
typedef float swift_float3  __attribute__((__ext_vector_type__(3)));
typedef float swift_float4  __attribute__((__ext_vector_type__(4)));
typedef double swift_double2  __attribute__((__ext_vector_type__(2)));
typedef double swift_double3  __attribute__((__ext_vector_type__(3)));
typedef double swift_double4  __attribute__((__ext_vector_type__(4)));
typedef int swift_int2  __attribute__((__ext_vector_type__(2)));
typedef int swift_int3  __attribute__((__ext_vector_type__(3)));
typedef int swift_int4  __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2  __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3  __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4  __attribute__((__ext_vector_type__(4)));
#endif

#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
#  define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
#  define SWIFT_CLASS_PROPERTY(...) 
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
#  define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
#  define SWIFT_RUNTIME_NAME(X) 
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
#  define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
#  define SWIFT_COMPILE_NAME(X) 
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
#  define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
#  define SWIFT_METHOD_FAMILY(X) 
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
#  define SWIFT_NOESCAPE __attribute__((noescape))
# else
#  define SWIFT_NOESCAPE 
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
#  define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
#  define SWIFT_RELEASES_ARGUMENT 
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
#  define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
#  define SWIFT_WARN_UNUSED_RESULT 
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
#  define SWIFT_NORETURN __attribute__((noreturn))
# else
#  define SWIFT_NORETURN 
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA 
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA 
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA 
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
#  define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
#  define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
#  define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
#  define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
#  define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
#  define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
#  define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
#  define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
#  define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
#  define OBJC_DESIGNATED_INITIALIZER 
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
#  define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
#  define SWIFT_ENUM_ATTR(_extensibility) 
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
#  define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
#  define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
#  define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
#  define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction 
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
#  define SWIFT_EXTERN extern "C"
# else
#  define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT 
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
#  define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
#  define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
#  define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL 
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
@import UIKit;
#endif

#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"

#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="ConsentViewController",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif

#if defined(__OBJC__)

SWIFT_CLASS("_TtC21ConsentViewController12AnyEncodable")
@interface AnyEncodable : NSObject
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

/// Indicates the consent status of a given user.
typedef SWIFT_ENUM(NSInteger, CCPAConsentStatus, open) {
/// Indicates the user has rejected none of the vendors or purposes (categories)
  CCPAConsentStatusRejectedNone = 0,
/// Indicates the user has rejected none of the vendors or purposes (categories)
  CCPAConsentStatusRejectedSome = 1,
/// Indicates the user has rejected none of the vendors or purposes (categories)
  CCPAConsentStatusRejectedAll = 2,
/// Indicates the user has <em>explicitly</em> acceted all vendors and purposes (categories).
/// That’s slightly different than <code>RejectNone</code>. By default in the CCPA users are already
/// <code>RejectedNone</code>, the <code>ConsentedAll</code> indicates the user has taken an action to
/// consent to all vendors and purposes.
  CCPAConsentStatusConsentedAll = 3,
  CCPAConsentStatusLinkedNoAction = 4,
/// If there’s a new value introduced in the backend and we don’t know how to parse it
  CCPAConsentStatusUnknown = 5,
};

@class NSString;
enum SPCampaignType : NSInteger;
@class NSCoder;
SWIFT_CLASS("_TtC21ConsentViewController7SPError")
@interface SPError : NSError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic, readonly, copy) NSString * _Nonnull failureReason;
@property (nonatomic) NSError * _Nullable originalError;
@property (nonatomic) enum SPCampaignType campaignType;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code userInfo:(NSDictionary<NSString *, id> * _Nullable)dict SWIFT_UNAVAILABLE;
@end

SWIFT_CLASS("_TtC21ConsentViewController25ClientRequestTimeoutError")
@interface ClientRequestTimeoutError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController19GenericNetworkError")
@interface GenericNetworkError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

/// Invalid Rendering App (JSReceiver) event payloads
SWIFT_CLASS("_TtC21ConsentViewController24InvalidEventPayloadError")
@interface InvalidEventPayloadError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull failureReason;
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController23InvalidJSONEncodeResult")
@interface InvalidJSONEncodeResult : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController32InvalidOnActionEventPayloadError")
@interface InvalidOnActionEventPayloadError : InvalidEventPayloadError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController24InvalidPropertyNameError")
@interface InvalidPropertyNameError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController24InvalidReportActionEvent")
@interface InvalidReportActionEvent : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController23InvalidResponseAPIError")
@interface InvalidResponseAPIError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController38InvalidResponseCCPAPMViewEndpointError")
@interface InvalidResponseCCPAPMViewEndpointError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController26InvalidResponseCustomError")
@interface InvalidResponseCustomError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController32InvalidResponseDeleteCustomError")
@interface InvalidResponseDeleteCustomError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController38InvalidResponseGDPRPMViewEndpointError")
@interface InvalidResponseGDPRPMViewEndpointError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController39InvalidResponseGetMessagesEndpointError")
@interface InvalidResponseGetMessagesEndpointError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController39InvalidResponseMessageCCPAEndpointError")
@interface InvalidResponseMessageCCPAEndpointError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController39InvalidResponseMessageGDPREndpointError")
@interface InvalidResponseMessageGDPREndpointError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController15InvalidURLError")
@interface InvalidURLError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

@class NSURL;
SWIFT_PROTOCOL("_TtP21ConsentViewController17MessageController_")
@protocol MessageController
- (void)loadMessage;
- (void)loadPrivacyManagerWithUrl:(NSURL * _Nonnull)url;
- (void)closePrivacyManager;
- (void)dismissMessage;
@end

SWIFT_CLASS("_TtC21ConsentViewController21MissingChildPmIdError")
@interface MissingChildPmIdError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

@interface NSObject (SWIFT_EXTENSION(ConsentViewController))
- (NSString * _Nullable)toJSON SWIFT_WARN_UNUSED_RESULT;
@end

/// Network Errors
SWIFT_CLASS("_TtC21ConsentViewController20NoInternetConnection")
@interface NoInternetConnection : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController38PostingCustomConsentWithoutConsentUUID")
@interface PostingCustomConsentWithoutConsentUUID : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@property (nonatomic) enum SPCampaignType campaignType;
@end

SWIFT_CLASS("_TtC21ConsentViewController17RenderingAppError")
@interface RenderingAppError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nullable renderingAppErrorCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController24RenderingAppTimeoutError")
@interface RenderingAppTimeoutError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController17ReportActionError")
@interface ReportActionError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

enum SPActionType : NSInteger;
/// Action consists of <code>SPActionType</code> and an id. Those come from each action the user can take in the ConsentUI
SWIFT_CLASS("_TtC21ConsentViewController8SPAction")
@interface SPAction : NSObject
@property (nonatomic) enum SPActionType type;
@property (nonatomic, readonly) enum SPCampaignType campaignType;
@property (nonatomic, readonly, copy) NSString * _Nullable consentLanguage;
@property (nonatomic, copy) NSURL * _Nullable pmURL;
@property (nonatomic, readonly, copy) NSString * _Nullable pmId;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nonnull publisherData;
/// This property will be renamed to <code>publisherData</code> in the next major release
@property (nonatomic, copy) NSDictionary<NSString *, AnyEncodable *> * _Nonnull encodablePubData;
@property (nonatomic, copy) NSString * _Nullable customActionId;
@property (nonatomic, copy) NSString * _Nullable messageId;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

/// User actions. Its integer representation matches with what SourcePoint’s endpoints expect.
typedef SWIFT_ENUM(NSInteger, SPActionType, open) {
  SPActionTypeSaveAndExit = 1,
  SPActionTypePMCancel = 2,
  SPActionTypeCustom = 9,
  SPActionTypeAcceptAll = 11,
  SPActionTypeShowPrivacyManager = 12,
  SPActionTypeRejectAll = 13,
  SPActionTypeDismiss = 15,
  SPActionTypeRequestATTAccess = 16,
  SPActionTypeIDFAAccepted = 17,
  SPActionTypeIDFADenied = 18,
  SPActionTypeUnknown = 0,
};

enum SPPrivacyManagerTab : NSInteger;
SWIFT_PROTOCOL("_TtP21ConsentViewController6SPCCPA_")
@protocol SPCCPA
@property (nonatomic, readonly) BOOL ccpaApplies;
- (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
@end

/// The UserConsent class encapsulates the consent status, rejected vendor ids and rejected categories (purposes) ids.
/// important:
/// The <code>rejectedVendors</code> and <code>rejectedCategories</code> arrays will only be populated if the <code>status</code> is <code>.Some</code>.
/// That is, if the user has rejected <code>.All</code> or <code>.None</code> vendors/categories, those arrays will be empty.
SWIFT_CLASS("_TtC21ConsentViewController13SPCCPAConsent")
@interface SPCCPAConsent : NSObject <NSCopying>
/// Indicates if the user has rejected <code>.All</code>, <code>.Some</code> or <code>.None</code> of the vendors <em>and</em> categories.
@property (nonatomic) enum CCPAConsentStatus status;
/// The ids of the rejected vendors and categories. These can be found in SourcePoint’s dashboard
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull rejectedVendors;
/// The ids of the rejected vendors and categories. These can be found in SourcePoint’s dashboard
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull rejectedCategories;
/// the US Privacy String as described by the IAB
@property (nonatomic, readonly, copy) NSString * _Nonnull uspstring;
/// that’s the internal Sourcepoint id we give to this consent profile
@property (nonatomic, copy) NSString * _Nullable uuid;
/// Determines if the GDPR legislation applies for this user
@property (nonatomic) BOOL applies;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
+ (SPCCPAConsent * _Nonnull)empty SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class SPGPPConfig;
enum SPOptinalBool : NSInteger;
/// Contains information about the property/campaign.
SWIFT_CLASS("_TtC21ConsentViewController10SPCampaign")
@interface SPCampaign : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithTargetingParams:(NSDictionary<NSString *, NSString *> * _Nonnull)targetingParams groupPmId:(NSString * _Nullable)groupPmId OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithTargetingParams:(NSDictionary<NSString *, NSString *> * _Nonnull)targetingParams groupPmId:(NSString * _Nullable)groupPmId gppConfig:(SPGPPConfig * _Nullable)gppConfig transitionCCPAAuth:(enum SPOptinalBool)transitionCCPAAuth supportLegacyUSPString:(enum SPOptinalBool)supportLegacyUSPString OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

/// Tells the SDK if we should load stage or public campaigns.
/// <ul>
///   <li>
///     0 -> <code>SPCampaignEnv.Stage</code>
///   </li>
///   <li>
///     1 -> <code>SPCampaignEnv.Public</code>
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, SPCampaignEnv, open) {
  SPCampaignEnvStage = 0,
  SPCampaignEnvPublic = 1,
};

typedef SWIFT_ENUM(NSInteger, SPCampaignType, open) {
  SPCampaignTypeGdpr = 0,
  SPCampaignTypeIos14 = 1,
  SPCampaignTypeCcpa = 2,
  SPCampaignTypeUsnat = 3,
  SPCampaignTypeGlobalcmp = 4,
  SPCampaignTypePreferences = 5,
  SPCampaignTypeUnknown = 6,
};

/// It’s important to notice the campaign you passed as parameter needs to have
/// a active vendor list of that legislation.
SWIFT_CLASS("_TtC21ConsentViewController11SPCampaigns")
@interface SPCampaigns : NSObject
@property (nonatomic, readonly) enum SPCampaignEnv environment;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable gdpr;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable ccpa;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable usnat;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable ios14;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable globalcmp;
@property (nonatomic, readonly, strong) SPCampaign * _Nullable preferences;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithGdpr:(SPCampaign * _Nullable)gdpr ccpa:(SPCampaign * _Nullable)ccpa usnat:(SPCampaign * _Nullable)usnat ios14:(SPCampaign * _Nullable)ios14 globalcmp:(SPCampaign * _Nullable)globalcmp preferences:(SPCampaign * _Nullable)preferences environment:(enum SPCampaignEnv)environment OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class UIViewController;
@class SPNativeMessage;
@class SPUserData;
SWIFT_PROTOCOL("_TtP21ConsentViewController17SPConsentDelegate_")
@protocol SPConsentDelegate
/// called when there’s a consent Message to be shown
- (void)onSPUIReady:(UIViewController * _Nonnull)controller;
@optional
/// called when the native message object is received and ready to be used
- (void)onSPNativeMessageReady:(SPNativeMessage * _Nonnull)message;
@required
/// called when the SP UI is finished and can be dismissed
- (void)onSPUIFinished:(UIViewController * _Nonnull)controller;
@optional
/// called after the user takes an action and the SDK receives consent data back from the server
/// <ul>
///   <li>
///     Parameters:
///   </li>
///   <li>
///     userData: is the consent profile
///   </li>
/// </ul>
- (void)onConsentReadyWithUserData:(SPUserData * _Nonnull)userData;
/// called when the SDK is done. That will happen if there’s no more messages to be displayed and all network requests are done.
/// <ul>
///   <li>
///     Parameters:
///   </li>
///   <li>
///     userData: is the consent profile
///   </li>
/// </ul>
- (void)onSPFinishedWithUserData:(SPUserData * _Nonnull)userData;
/// called if something goes wrong during the entire lifecycle of the SDK
- (void)onErrorWithError:(SPError * _Nonnull)error;
/// called when the user is inactive
- (void)onMessageInactivityTimeout;
@end

enum SPMessageLanguage : NSInteger;
@class SPPropertyName;
@protocol SPDelegate;
SWIFT_CLASS("_TtC21ConsentViewController16SPConsentManager")
@interface SPConsentManager : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL shouldCallErrorMetrics;)
+ (BOOL)shouldCallErrorMetrics SWIFT_WARN_UNUSED_RESULT;
+ (void)setShouldCallErrorMetrics:(BOOL)value;
/// By default, the SDK preservs all user consent data from UserDefaults in case <code>OnError</code> event happens.
/// Set this flag to <code>true</code> if you wish to opt-out from this behaviour.
/// If set to <code>true</code> will remove all user consent data from UserDefaults, possibly triggering a message to be displayed again next time
@property (nonatomic) BOOL cleanUserDataOnError;
/// The timeout interval in seconds for the message being displayed
@property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
/// Instructs the privacy manager to be displayed with this tab.
/// By default the SDK will use the defult tab of PM
@property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
/// Instructs the message to be displayed in this language. If the translation is missing, the fallback will be English.
/// By default the SDK will use the locale defined by the WebView
@property (nonatomic) enum SPMessageLanguage messageLanguage;
- (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyId:(NSInteger)propertyId propertyName:(SPPropertyName * _Nonnull)propertyName campaigns:(SPCampaigns * _Nonnull)campaigns language:(enum SPMessageLanguage)language delegate:(id <SPDelegate> _Nullable)delegate;
- (void)gracefullyDegradeOnError:(SPError * _Nonnull)error;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController19SPMessageUIDelegate_")
@protocol SPMessageUIDelegate
- (void)loaded:(UIViewController * _Nonnull)controller;
@optional
- (void)loadedWithNativeMessage:(SPNativeMessage * _Nonnull)message;
@required
- (void)action:(SPAction * _Nonnull)action from:(UIViewController * _Nonnull)controller;
- (void)onError:(SPError * _Nonnull)error;
- (void)finished:(UIViewController * _Nonnull)vcFinished;
- (void)onMessageInactivityTimeout SWIFT_AVAILABILITY(tvos,unavailable);
@end

@interface SPConsentManager (SWIFT_EXTENSION(ConsentViewController)) <SPMessageUIDelegate>
- (void)loadedWithNativeMessage:(SPNativeMessage * _Nonnull)message;
- (void)loaded:(UIViewController * _Nonnull)controller;
- (void)finished:(UIViewController * _Nonnull)vcFinished;
- (void)action:(SPAction * _Nonnull)action from:(UIViewController * _Nonnull)controller;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController19SPConsentUIDelegate_")
@protocol SPConsentUIDelegate
/// called when the user takes an action in the SP UI
/// \param action the user action
///
- (void)onAction:(SPAction * _Nonnull)action from:(UIViewController * _Nonnull)controller;
@end

/// Have a look at <a href="https://github.com/SourcePointUSA/CCPA_iOS_SDK/wiki/SDKs-Lifecycle-methods">SDKs Lifecycle</a>
SWIFT_PROTOCOL("_TtP21ConsentViewController10SPDelegate_")
@protocol SPDelegate <SPConsentDelegate, SPConsentUIDelegate>
@end

@interface SPConsentManager (SWIFT_EXTENSION(ConsentViewController)) <SPDelegate>
- (void)onSPUIReady:(UIViewController * _Nonnull)controller;
- (void)onSPNativeMessageReady:(SPNativeMessage * _Nonnull)message;
- (void)onAction:(SPAction * _Nonnull)action from:(UIViewController * _Nonnull)controller;
- (void)onSPUIFinished:(UIViewController * _Nonnull)controller;
- (void)onConsentReadyWithUserData:(SPUserData * _Nonnull)userData;
- (void)onSPFinishedWithUserData:(SPUserData * _Nonnull)userData;
- (void)onError:(SPError * _Nonnull)error;
- (void)onMessageInactivityTimeout;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController13SPPREFERENCES_") SWIFT_AVAILABILITY(ios,introduced=10)
@protocol SPPREFERENCES
- (void)loadPreferenceCenterWithId:(NSString * _Nonnull)id;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController11SPGLOBALCMP_") SWIFT_AVAILABILITY(ios,introduced=10)
@protocol SPGLOBALCMP
@property (nonatomic, readonly) BOOL globalcmpApplies;
- (void)loadGlobalCmpPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController7SPUSNAT_") SWIFT_AVAILABILITY(ios,introduced=10)
@protocol SPUSNAT
@property (nonatomic, readonly) BOOL usnatApplies;
- (void)loadUSNatPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController6SPGDPR_")
@protocol SPGDPR
@property (nonatomic, readonly) BOOL gdprApplies;
- (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
@end

@class SPGDPRConsent;
SWIFT_PROTOCOL("_TtP21ConsentViewController5SPSDK_")
@protocol SPSDK <SPCCPA, SPGDPR, SPGLOBALCMP, SPMessageUIDelegate, SPPREFERENCES, SPUSNAT>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
+ (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic) BOOL cleanUserDataOnError;
@property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
@property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
@property (nonatomic) enum SPMessageLanguage messageLanguage;
@property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
- (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyId:(NSInteger)propertyId propertyName:(SPPropertyName * _Nonnull)propertyName campaigns:(SPCampaigns * _Nonnull)campaigns language:(enum SPMessageLanguage)language delegate:(id <SPDelegate> _Nullable)delegate;
+ (void)clearAllData;
- (void)loadMessageForAuthId:(NSString * _Nullable)authId publisherData:(NSDictionary<NSString *, NSString *> * _Nullable)publisherData;
- (void)loadMessageForAuthId:(NSString * _Nullable)authId spPublisherData:(NSDictionary<NSString *, AnyEncodable *> * _Nullable)publisherData;
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
- (void)deleteCustomConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
- (void)rejectAllWithCampaignType:(enum SPCampaignType)campaignType;
- (void)dismissMessage;
@end

@interface SPConsentManager (SWIFT_EXTENSION(ConsentViewController)) <SPSDK>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
+ (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) BOOL gdprApplies;
@property (nonatomic, readonly) BOOL ccpaApplies;
@property (nonatomic, readonly) BOOL usnatApplies;
@property (nonatomic, readonly) BOOL globalcmpApplies;
/// Returns the user data <em>stored in the <code>UserDefaults</code></em>.
@property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
+ (void)clearAllData;
- (void)loadMessageForAuthId:(NSString * _Nullable)authId publisherData:(NSDictionary<NSString *, NSString *> * _Nullable)publisherData;
- (void)loadMessageForAuthId:(NSString * _Nullable)authId spPublisherData:(NSDictionary<NSString *, AnyEncodable *> * _Nullable)publisherData;
- (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
- (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
- (void)loadUSNatPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
- (void)loadGlobalCmpPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab useGroupPmIfAvailable:(BOOL)useGroupPmIfAvailable;
- (void)loadPreferenceCenterWithId:(NSString * _Nonnull)id;
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
- (void)deleteCustomConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
- (void)rejectAllWithCampaignType:(enum SPCampaignType)campaignType;
- (void)dismissMessage;
@end

SWIFT_CLASS("_TtC21ConsentViewController13SPConsentable")
@interface SPConsentable : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@property (nonatomic, readonly) BOOL consented;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id consented:(BOOL)consented OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

enum SPGCMDataObjc_ObjcStatus : NSInteger;
SWIFT_CLASS("_TtC21ConsentViewController13SPGCMDataObjc")
@interface SPGCMDataObjc : NSObject
@property (nonatomic, readonly) enum SPGCMDataObjc_ObjcStatus adStorage;
@property (nonatomic, readonly) enum SPGCMDataObjc_ObjcStatus analyticsStorage;
@property (nonatomic, readonly) enum SPGCMDataObjc_ObjcStatus adUserData;
@property (nonatomic, readonly) enum SPGCMDataObjc_ObjcStatus adPersonalization;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

typedef SWIFT_ENUM_NAMED(NSInteger, SPGCMDataObjc_ObjcStatus, "ObjcStatus", open) {
  SPGCMDataObjc_ObjcStatusGranted = 0,
  SPGCMDataObjc_ObjcStatusDenied = 1,
  SPGCMDataObjc_ObjcStatusUnset = 2,
};

@class SPGDPRVendorGrant;
/// SPGDPRConsent encapsulates all consent data from a user.
SWIFT_CLASS("_TtC21ConsentViewController13SPGDPRConsent")
@interface SPGDPRConsent : NSObject <NSCopying>
/// The snapshot of user consents. It contains information of all purposes on a vendor per vendor basis.
/// The vendorGrants can be seen as an object in the following shape:
/// \code
///     "vendor1Id": {
///         "granted": true,
///         "purpose1id": true,
///         "purpose2id": true
///         ...
///     },
///     ...
/// }
///
/// \endcodeThe <code>granted</code> attribute indicated whether the vendor has <em>all</em> purposes it needs to be
/// considered fully consented. Either via legitimate interest or explicit user consent.
/// Each key/value pair of <code>"purposeId: Bool</code>, indicates if that purpose has been consented
/// either via leg. interest or explicit user consent.
@property (nonatomic, copy) NSDictionary<NSString *, SPGDPRVendorGrant *> * _Nonnull vendorGrants;
/// The iAB consent string.
@property (nonatomic, copy) NSString * _Nonnull euconsent;
/// That’s the internal Sourcepoint id we give to this consent profile
@property (nonatomic, copy) NSString * _Nullable uuid;
/// Determines if the GDPR legislation applies for this user
@property (nonatomic) BOOL applies;
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull acceptedCategories;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// Convenience initialiser to return an empty consent object.
+ (SPGDPRConsent * _Nonnull)empty SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPGDPRConsent (SWIFT_EXTENSION(ConsentViewController))
@property (nonatomic, readonly, strong) SPGCMDataObjc * _Nullable objcGoogleConsentMode;
@end

/// Encapuslates data about a particular vendor being “granted” based on its purposes
SWIFT_CLASS("_TtC21ConsentViewController17SPGDPRVendorGrant")
@interface SPGDPRVendorGrant : NSObject
/// if all purposes are granted, the vendorGrant will be set to <code>true</code>
@property (nonatomic, readonly) BOOL granted;
@property (nonatomic, readonly, copy) NSDictionary<NSString *, NSNumber *> * _Nonnull purposeGrants;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithGranted:(BOOL)granted purposeGrants:(NSDictionary<NSString *, NSNumber *> * _Nonnull)purposeGrants OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

enum SPMspaBinaryFlag : NSInteger;
enum SPMspaTernaryFlag : NSInteger;
/// Class to encapsulate GPP configuration. This config can be used with CCPA campaigns and have
/// no effect in campaigns of other legislations.
SWIFT_CLASS("_TtC21ConsentViewController11SPGPPConfig")
@interface SPGPPConfig : NSObject
- (nonnull instancetype)initWithMspaCoveredTransaction:(enum SPMspaBinaryFlag)MspaCoveredTransaction MspaOptOutOptionMode:(enum SPMspaTernaryFlag)MspaOptOutOptionMode MspaServiceProviderMode:(enum SPMspaTernaryFlag)MspaServiceProviderMode OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

typedef SWIFT_ENUM(NSInteger, SPMspaBinaryFlag, open) {
  SPMspaBinaryFlagYes = 0,
  SPMspaBinaryFlagNo = 1,
};

typedef SWIFT_ENUM(NSInteger, SPMspaTernaryFlag, open) {
  SPMspaTernaryFlagYes = 0,
  SPMspaTernaryFlagNo = 1,
  SPMspaTernaryFlagNotApplicable = 2,
};

SWIFT_CLASS("_TtC21ConsentViewController18SPGlobalCmpConsent")
@interface SPGlobalCmpConsent : NSObject <NSCopying>
/// A collection of accepted/rejected vendors and their ids
@property (nonatomic, readonly, copy) NSArray<SPConsentable *> * _Nonnull vendors;
/// A collection of accepted/rejected categories (aka. purposes) and their ids
@property (nonatomic, readonly, copy) NSArray<SPConsentable *> * _Nonnull categories;
/// Identifies this globalcmp consent profile
@property (nonatomic, copy) NSString * _Nullable uuid;
/// Whether GlobalCmp applies according to user’s location (inferred from IP lookup) and your Vendor List applies scope setting
@property (nonatomic) BOOL applies;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPGlobalCmpConsent (SWIFT_EXTENSION(ConsentViewController))
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
+ (SPGlobalCmpConsent * _Nonnull)empty SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
@end

/// Maps <code>ATTrackingManager.requestTrackingAuthorization</code> into our own enum.
/// It covers also the case when <code>ATTrackingManager.AuthorizationStatus</code> is not available.
typedef SWIFT_ENUM(NSInteger, SPIDFAStatus, open) {
/// the user hasn’t been prompted about the IDFA yet
  SPIDFAStatusUnknown = 0,
/// the user accepted being tracked
  SPIDFAStatusAccepted = 1,
/// the user denied access to IDFA
  SPIDFAStatusDenied = 2,
/// the IDFA is not available in this version of the OS
  SPIDFAStatusUnavailable = 3,
};

SWIFT_CLASS("_TtC21ConsentViewController18SPIDFAStatusBridge")
@interface SPIDFAStatusBridge : NSObject
+ (enum SPIDFAStatus)current SWIFT_WARN_UNUSED_RESULT;
+ (NSString * _Nonnull)currentString SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// Languages supported by Message and PM
typedef SWIFT_ENUM(NSInteger, SPMessageLanguage, open) {
  SPMessageLanguageAlbanian = 0,
  SPMessageLanguageArabic = 1,
  SPMessageLanguageBasque = 2,
  SPMessageLanguageBosnian_Latin = 3,
  SPMessageLanguageBulgarian = 4,
  SPMessageLanguageCatalan = 5,
  SPMessageLanguageChinese_Simplified = 6,
  SPMessageLanguageChinese_Traditional = 7,
  SPMessageLanguageCroatian = 8,
  SPMessageLanguageCzech = 9,
  SPMessageLanguageDanish = 10,
  SPMessageLanguageDutch = 11,
  SPMessageLanguageEnglish = 12,
  SPMessageLanguageEstonian = 13,
  SPMessageLanguageFinnish = 14,
  SPMessageLanguageFrench = 15,
  SPMessageLanguageGalician = 16,
  SPMessageLanguageGeorgian = 17,
  SPMessageLanguageGerman = 18,
  SPMessageLanguageGreek = 19,
  SPMessageLanguageHebrew = 20,
  SPMessageLanguageHindi = 21,
  SPMessageLanguageHungarian = 22,
  SPMessageLanguageIndonesian = 23,
  SPMessageLanguageItalian = 24,
  SPMessageLanguageJapanese = 25,
  SPMessageLanguageKorean = 26,
  SPMessageLanguageLatvian = 27,
  SPMessageLanguageLithuanian = 28,
  SPMessageLanguageMacedonian = 29,
  SPMessageLanguageMalay = 30,
  SPMessageLanguageMaltese = 31,
  SPMessageLanguageNorwegian = 32,
  SPMessageLanguagePolish = 33,
  SPMessageLanguagePortuguese_Brazil = 34,
  SPMessageLanguagePortuguese_Portugal = 35,
  SPMessageLanguageRomanian = 36,
  SPMessageLanguageRussian = 37,
  SPMessageLanguageSerbian_Cyrillic = 38,
  SPMessageLanguageSerbian_Latin = 39,
  SPMessageLanguageSlovak = 40,
  SPMessageLanguageSlovenian = 41,
  SPMessageLanguageSpanish = 42,
  SPMessageLanguageSwahili = 43,
  SPMessageLanguageSwedish = 44,
  SPMessageLanguageTagalog = 45,
  SPMessageLanguageThai = 46,
  SPMessageLanguageTurkish = 47,
  SPMessageLanguageUkrainian = 48,
  SPMessageLanguageVietnamese = 49,
  SPMessageLanguageWelsh = 50,
  SPMessageLanguageBrowserDefault = 51,
};

SWIFT_PROTOCOL("_TtP21ConsentViewController14SPRenderingApp_")
@protocol SPRenderingApp
- (void)loadMessage;
- (void)loadPrivacyManagerWithUrl:(NSURL * _Nonnull)url;
- (void)closePrivacyManager;
@end

SWIFT_PROTOCOL("_TtP21ConsentViewController13SPMessageView_")
@protocol SPMessageView <MessageController, SPRenderingApp>
@property (nonatomic, strong) id <SPMessageUIDelegate> _Nullable messageUIDelegate;
@property (nonatomic) enum SPCampaignType campaignType;
@property (nonatomic, copy) NSString * _Nonnull messageId;
@property (nonatomic) NSTimeInterval timeout;
@end

@class NSBundle;
SWIFT_CLASS("_TtC21ConsentViewController23SPMessageViewController")
@interface SPMessageViewController : UIViewController <SPMessageView>
@property (nonatomic, weak) id <SPMessageUIDelegate> _Nullable messageUIDelegate;
@property (nonatomic) enum SPCampaignType campaignType;
@property (nonatomic, copy) NSString * _Nonnull messageId;
@property (nonatomic) NSTimeInterval timeout;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)loadMessage;
- (void)loadPrivacyManagerWithUrl:(NSURL * _Nonnull)url;
- (void)closePrivacyManager;
- (void)dismissMessage;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
@end

SWIFT_CLASS("_TtC21ConsentViewController15SPNativeMessage")
@interface SPNativeMessage : NSObject <SPMessageView>
/// Used to notify the <code>SPConsentManager</code> about its different lifecycle events.
@property (nonatomic, weak) id <SPMessageUIDelegate> _Nullable messageUIDelegate;
/// Indicates the type of the campaign for this message
/// <ul>
///   <li>
///     SeeMore: <code>SPCampaignType</code>
///   </li>
/// </ul>
@property (nonatomic) enum SPCampaignType campaignType;
/// The id of the message received from the server
@property (nonatomic, copy) NSString * _Nonnull messageId;
/// Unused by the native message
@property (nonatomic) NSTimeInterval timeout;
- (void)loadMessage;
/// no-op the SPNativeMessage class is not responsible for loading the Privacy Manager
/// The will get a call to <code>onSPUIReady(_ controller: UIViewController)</code> when the PM
/// is ready to be displayed
- (void)loadPrivacyManagerWithUrl:(NSURL * _Nonnull)url;
/// no-op the SPNativeMessage class is not responsible for loading the Privacy Manager
/// The will get a call to <code>onSPUIFinished(_ controller: UIViewController)</code> when the PM
/// is ready to be closed
- (void)closePrivacyManager;
- (void)dismissMessage;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtCC21ConsentViewController15SPNativeMessage14AttributeStyle")
@interface AttributeStyle : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtCC21ConsentViewController15SPNativeMessage9Attribute")
@interface Attribute : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtCC21ConsentViewController15SPNativeMessage6Action")
@interface Action : Attribute
@end

typedef SWIFT_ENUM(NSInteger, SPOptinalBool, open) {
  SPOptinalBoolYes = 0,
  SPOptinalBoolNo = 1,
  SPOptinalBoolUnset = 2,
};

@class Status;
SWIFT_CLASS("_TtC21ConsentViewController20SPPreferencesConsent")
@interface SPPreferencesConsent : NSObject <NSCopying>
@property (nonatomic, copy) NSString * _Nullable uuid;
@property (nonatomic, copy) NSArray<Status *> * _Nonnull status;
@property (nonatomic, copy) NSArray<Status *> * _Nonnull rejectedStatus;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
+ (SPPreferencesConsent * _Nonnull)empty SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPPreferencesConsent (SWIFT_EXTENSION(ConsentViewController))
@end

typedef SWIFT_ENUM(NSInteger, SubType, open) {
  SubTypeAIPolicy = 0,
  SubTypeTermsAndConditions = 1,
  SubTypePrivacyPolicy = 2,
  SubTypeLegalPolicy = 3,
  SubTypeTermsOfSale = 4,
  SubTypeUnknown = 5,
};

/// Supported privacy manager tabs in PM
typedef SWIFT_ENUM(NSInteger, SPPrivacyManagerTab, open) {
  SPPrivacyManagerTabDefault = 0,
  SPPrivacyManagerTabPurposes = 1,
  SPPrivacyManagerTabVendors = 2,
  SPPrivacyManagerTabFeatures = 3,
};

/// SPPropertyName is the exact name of your property as created in SourcePoint’s dashboard.
/// important:
/// notice that it can only contain letters, numbers, . (dots), : (semicolons),
/// <ul>
///   <li>
///     (dashes) and / (slashes). The constructor will validate upon that and throw an error otherwise.
///   </li>
/// </ul>
SWIFT_CLASS("_TtC21ConsentViewController14SPPropertyName")
@interface SPPropertyName : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// \param rawValue the exact name of your property as created in SourcePoint’s dashboard.
///
///
/// throws:
/// <code>InvalidArgumentError</code> if the property name contain anything other than letters, numbers, . (dots), : (semicolons) and / (slashes).
- (nullable instancetype)init:(NSString * _Nonnull)rawValue error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class SPUSNatConsent_ConsentString;
SWIFT_CLASS("_TtC21ConsentViewController14SPUSNatConsent")
@interface SPUSNatConsent : NSObject <NSCopying>
/// A collection of accepted/rejected vendors and their ids
@property (nonatomic, readonly, copy) NSArray<SPConsentable *> * _Nonnull vendors;
/// A collection of accepted/rejected categories (aka. purposes) and their ids
@property (nonatomic, readonly, copy) NSArray<SPConsentable *> * _Nonnull categories;
/// Identifies this usnat consent profile
@property (nonatomic, copy) NSString * _Nullable uuid;
/// Whether USNat applies according to user’s location (inferred from IP lookup) and your Vendor List applies scope setting
@property (nonatomic) BOOL applies;
/// The consent strings related to this user profile
@property (nonatomic, copy) NSArray<SPUSNatConsent_ConsentString *> * _Nonnull consentStrings;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPUSNatConsent (SWIFT_EXTENSION(ConsentViewController))
@end

SWIFT_CLASS_NAMED("ConsentString")
@interface SPUSNatConsent_ConsentString : NSObject
@property (nonatomic, readonly) NSInteger sectionId;
@property (nonatomic, readonly, copy) NSString * _Nonnull sectionName;
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)initWithSectionId:(NSInteger)sectionId sectionName:(NSString * _Nonnull)sectionName consentString:(NSString * _Nonnull)consentString OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class SPUSNatConsent_ObjcStatuses;
@interface SPUSNatConsent (SWIFT_EXTENSION(ConsentViewController))
@property (nonatomic, readonly, strong) SPUSNatConsent_ObjcStatuses * _Nonnull objcStatuses;
@end

SWIFT_CLASS_NAMED("ObjcStatuses")
@interface SPUSNatConsent_ObjcStatuses : NSObject
@property (nonatomic, readonly) BOOL rejectedAny;
@property (nonatomic, readonly) BOOL consentedToAll;
@property (nonatomic, readonly) BOOL consentedToAny;
@property (nonatomic, readonly) BOOL hasConsentData;
@property (nonatomic, readonly) BOOL sellStatus;
@property (nonatomic, readonly) BOOL shareStatus;
@property (nonatomic, readonly) BOOL sensitiveDataStatus;
@property (nonatomic, readonly) BOOL gpcStatus;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPUSNatConsent (SWIFT_EXTENSION(ConsentViewController))
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
+ (SPUSNatConsent * _Nonnull)empty SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
@end

SWIFT_CLASS("_TtC21ConsentViewController10SPUserData")
@interface SPUserData : NSObject <NSCopying>
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface SPUserData (SWIFT_EXTENSION(ConsentViewController))
/// Returns GDPR consent data if any available.
/// seealso:
/// <code>SPGDPRConsent</code>
- (SPGDPRConsent * _Nullable)objcGDPRConsents SWIFT_WARN_UNUSED_RESULT;
/// Indicates whether GDPR applies based on the VendorList configuration.
- (BOOL)objcGDPRApplies SWIFT_WARN_UNUSED_RESULT;
/// Returns CCPA consent data if any available.
/// seealso:
/// <code>SPCCPAConsent</code>
- (SPCCPAConsent * _Nullable)objcCCPAConsents SWIFT_WARN_UNUSED_RESULT;
/// Indicates whether CCPA applies based on the VendorList configuration.
- (BOOL)objcCCPAApplies SWIFT_WARN_UNUSED_RESULT;
/// Returns USNat consent data if any available.
/// seealso:
/// <code>SPUSNatConsent</code>
- (SPUSNatConsent * _Nullable)objcUSNatConsents SWIFT_WARN_UNUSED_RESULT;
/// Indicates whether USNat applies based on the VendorList configuration.
- (BOOL)objcUSNatApplies SWIFT_WARN_UNUSED_RESULT;
/// Returns GlobalCmp consent data if any available.
/// seealso:
/// <code>SPUSNatConsent</code>
- (SPGlobalCmpConsent * _Nullable)objcGlobalCmpConsents SWIFT_WARN_UNUSED_RESULT;
/// Indicates whether GlobalCmp applies based on the VendorList configuration.
- (BOOL)objcGlobalCmpApplies SWIFT_WARN_UNUSED_RESULT;
/// Returns Preferences consent data if any available.
/// seealso:
/// <code>SPPreferencesConsent</code>
- (SPPreferencesConsent * _Nullable)objcPreferencesConsents SWIFT_WARN_UNUSED_RESULT;
@end

@interface NSURLSessionDataTask (SWIFT_EXTENSION(ConsentViewController))
@property (nonatomic) float priority;
@end

SWIFT_CLASS("_TtC21ConsentViewController43UnableToConvertConsentSnapshotIntoJsonError")
@interface UnableToConvertConsentSnapshotIntoJsonError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@end

SWIFT_CLASS("_TtC21ConsentViewController16UnableToFindView")
@interface UnableToFindView : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController37UnableToInjectMessageIntoRenderingApp")
@interface UnableToInjectMessageIntoRenderingApp : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController22UnableToLoadJSReceiver")
@interface UnableToLoadJSReceiver : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController29WebViewConnectionTimeOutError")
@interface WebViewConnectionTimeOutError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

SWIFT_CLASS("_TtC21ConsentViewController12WebViewError")
@interface WebViewError : SPError
@property (nonatomic, readonly, copy) NSString * _Nonnull spCode;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end

#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif

#else
#error unsupported Swift architecture
#endif
