#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
#ifndef APPSTOCKSDK_SWIFT_H
#define APPSTOCKSDK_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 CoreFoundation;
@import Foundation;
@import ObjectiveC;
@import UIKit;
#endif

#import <AppstockSDK/AppstockSDK.h>

#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="AppstockSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif

#if defined(__OBJC__)

@class NSString;
SWIFT_CLASS("_TtC11AppstockSDK14APSServerEvent")
@interface APSServerEvent : NSObject
- (nonnull instancetype)initWithUrl:(NSString * _Nonnull)url expectedEventType:(APSTrackingEvent)expectedEventType OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class APSVideoVerificationParameters;
SWIFT_CLASS("_TtC11AppstockSDK21APSServerEventTracker")
@interface APSServerEventTracker : NSObject <APSEventTrackerProtocol>
@property (nonatomic, readonly, copy) NSArray<APSServerEvent *> * _Nonnull serverEvents;
- (nonnull instancetype)initWithServerEvents:(NSArray<APSServerEvent *> * _Nonnull)serverEvents OBJC_DESIGNATED_INITIALIZER;
- (void)trackEvent:(APSTrackingEvent)event;
- (void)trackVideoAdLoaded:(APSVideoVerificationParameters * _Null_unspecified)parameters;
- (void)trackStartVideoWithDuration:(CGFloat)duration volume:(CGFloat)volume;
- (void)trackVolumeChanged:(CGFloat)playerVolume deviceVolume:(CGFloat)deviceVolume;
- (void)addServerEvents:(NSArray<APSServerEvent *> * _Nonnull)serverEvents;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS_NAMED("AutoRefreshCountConfig")
@interface APSAutoRefreshCountConfig : NSObject
/// The number of times the AppstockAdView has been refreshed.
@property (nonatomic) NSInteger numRefreshes;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class AppstockAdFormat;
@class NSNumber;
@class APSRewardedConfig;
@class APSVideoControlsConfiguration;
/// Contains all the data needed to load an ad.
SWIFT_CLASS_NAMED("AdConfiguration")
@interface APSAdConfiguration : APSAutoRefreshCountConfig
@property (nonatomic, copy) NSSet<AppstockAdFormat *> * _Nonnull adFormats;
@property (nonatomic) BOOL shouldSendSKAdNExtension;
/// Whether or not this ad configuration is intended to represent an intersitial ad.
/// Setting this to true will disable auto refresh.
@property (nonatomic) BOOL isInterstitialAd;
/// Whether or not this ad configuration is intended to represent an ad as an intersitial one (regardless of original designation).
/// Overrides <code>isInterstitialAd</code>
/// Setting this to true will disable auto refresh.
@property (nonatomic, strong) NSNumber * _Nullable forceInterstitialPresentation;
/// Whether or not this ad configuration is intended to represent an intersitial ad.
/// Returns the effective result by combining <code>isInterstitialAd</code> and <code>forceInterstitialPresentation</code>
@property (nonatomic, readonly) BOOL presentAsInterstitial;
/// Interstitial layout
@property (nonatomic) APSInterstitialLayout interstitialLayout;
/// Sizes for the ad.
@property (nonatomic, copy) NSArray<NSValue *> * _Nullable adSizes;
/// Sets a video interstitial ad unit as an opt-in video
@property (nonatomic) BOOL isRewarded;
/// Indicates whether the ad is built-in video e.g. 300x250.
@property (nonatomic) BOOL isBuiltInVideo;
/// This property indicated winning bid ad format (ext.mobilesdk.type)
@property (nonatomic, strong) AppstockAdFormat * _Nullable winningBidAdFormat;
/// Server-side configuration for rewarded ads (bid.ext.rwdd)
@property (nonatomic, strong) APSRewardedConfig * _Nullable rewardedConfig;
/// This property represents video controls custom configuration.
@property (nonatomic, strong) APSVideoControlsConfiguration * _Nonnull videoControlsConfig;
@property (nonatomic) NSTimeInterval pollFrequency;
@property (nonatomic) NSInteger viewableArea;
@property (nonatomic) NSInteger viewableDuration;
@property (nonatomic, copy) void (^ _Nullable clickHandlerOverride)(SWIFT_NOESCAPE void (^ _Nonnull)(void));
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class APSAdLoadFlowController;
SWIFT_PROTOCOL_NAMED("AdLoadFlowControllerDelegate")
@protocol APSAdLoadFlowControllerDelegate <NSObject>
- (void)adLoadFlowController:(APSAdLoadFlowController * _Nonnull)adLoadFlowController failedWithError:(NSError * _Nullable)error;
- (void)adLoadFlowControllerWillSendBidRequest:(APSAdLoadFlowController * _Nonnull)adLoadFlowController;
- (void)adLoadFlowControllerWillRequestPrimaryAd:(APSAdLoadFlowController * _Nonnull)adLoadFlowController;
- (BOOL)adLoadFlowControllerShouldContinue:(APSAdLoadFlowController * _Nonnull)adLoadFlowController SWIFT_WARN_UNUSED_RESULT;
@end

SWIFT_CLASS_NAMED("AdRequestURLManager")
@interface APSAdRequestURLManager : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSAdRequestURLManager * _Nonnull shared;)
+ (APSAdRequestURLManager * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nullable adRequestURL;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
- (void)setPartnerKey:(NSString * _Nonnull)partnerKey;
@end

SWIFT_CLASS_NAMED("AdUnit")
@interface APSAdUnit : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

enum AppstockAdPosition : NSInteger;
@class APSNativeAdConfiguration;
SWIFT_CLASS_NAMED("AdUnitConfig")
@interface APSAdUnitConfig : NSObject <NSCopying>
@property (nonatomic, copy) NSString * _Nullable placementID;
@property (nonatomic, copy) NSString * _Nullable endpointID;
@property (nonatomic, readonly, strong) APSAdConfiguration * _Nonnull adConfiguration;
@property (nonatomic, copy) NSSet<AppstockAdFormat *> * _Nonnull adFormats;
@property (nonatomic) enum AppstockAdPosition adPosition;
@property (nonatomic, strong) APSNativeAdConfiguration * _Nullable nativeAdConfiguration;
@property (nonatomic, copy) NSArray<NSValue *> * _Nullable adSizes;
@property (nonatomic) NSTimeInterval refreshInterval;
@property (nonatomic, copy) NSString * _Nullable gpid;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
@end

@class UIButton;
enum AppstockPosition : NSInteger;
@class UIImage;
@class UIView;
SWIFT_CLASS_NAMED("AdViewButtonDecorator")
@interface APSAdViewButtonDecorator : NSObject
@property (nonatomic, strong) UIButton * _Nonnull button;
@property (nonatomic) enum AppstockPosition buttonPosition;
@property (nonatomic) CGRect customButtonPosition;
@property (nonatomic) double buttonArea;
@property (nonatomic) BOOL isMRAID;
@property (nonatomic, copy) APSVoidBlock _Nullable buttonTouchUpInsideBlock;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (void)setImage:(UIImage * _Nonnull)image;
- (void)addButtonTo:(UIView * _Nonnull)view displayView:(UIView * _Nonnull)displayView;
- (void)removeButtonFromSuperview;
- (void)bringButtonToFront;
- (void)sendSubviewToBack;
- (void)updateButtonConstraints;
- (CGFloat)getButtonConstraintConstant SWIFT_WARN_UNUSED_RESULT;
- (CGSize)getButtonSize SWIFT_WARN_UNUSED_RESULT;
- (void)buttonTappedAction;
@end

@protocol APSAdViewEventLoadingDelegate;
@protocol APSAdViewEventInteractionDelegate;
SWIFT_PROTOCOL_NAMED("AdViewEventHandler")
@protocol APSAdViewEventHandler <APSPrimaryAdRequesterProtocol>
/// Delegate for custom event handler to inform the Appstock SDK about the events related to the ad server communication.
@property (nonatomic, weak) id <APSAdViewEventLoadingDelegate> _Nullable loadingDelegate;
/// Delegate for custom event handler to inform the Appstock SDK about the events related to the user’s interaction with the ad.
@property (nonatomic, weak) id <APSAdViewEventInteractionDelegate> _Nullable interactionDelegate;
/// The array of the CGRect entries for each valid ad sizes.
/// The first size is treated as a frame for related ad unit.
@property (nonatomic, readonly, copy) NSArray<NSValue *> * _Nonnull adSizes;
- (void)trackImpression;
@end

@class APSBidResponse;
SWIFT_CLASS_NAMED("AdViewEventHandlerStandalone")
@interface APSAdViewEventHandlerStandalone : NSObject <APSAdViewEventHandler>
@property (nonatomic, weak) id <APSAdViewEventLoadingDelegate> _Nullable loadingDelegate;
@property (nonatomic, weak) id <APSAdViewEventInteractionDelegate> _Nullable interactionDelegate;
@property (nonatomic, copy) NSArray<NSValue *> * _Nonnull adSizes;
- (void)requestAdWithBidResponse:(APSBidResponse * _Nullable)bidResponse;
- (void)trackImpression;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class UIViewController;
SWIFT_PROTOCOL_NAMED("AdViewEventInteractionDelegate")
@protocol APSAdViewEventInteractionDelegate <NSObject>
- (void)willPresentModal;
- (void)didDismissModal;
- (void)willLeaveApp;
@property (nonatomic, readonly, strong) UIViewController * _Nullable viewControllerForPresentingModal;
@end

SWIFT_PROTOCOL_NAMED("AdViewEventLoadingDelegate")
@protocol APSAdViewEventLoadingDelegate <NSObject>
- (void)sdkDidWin;
- (void)adServerDidWin:(UIView * _Nonnull)view adSize:(CGSize)adSize;
- (void)failedWithError:(NSError * _Nullable)error;
@end

@class APSAdViewLoader;
@class APSDisplayView;
SWIFT_PROTOCOL_NAMED("AdViewLoaderDelegate")
@protocol APSAdViewLoaderDelegate <NSObject>
- (void)adViewLoader:(APSAdViewLoader * _Nonnull)adViewLoader loadedAdView:(UIView * _Nonnull)adView adSize:(CGSize)adSize bidResponse:(APSBidResponse * _Nullable)bidResponse;
- (void)adViewLoader:(APSAdViewLoader * _Nonnull)adViewLoader createdDisplayView:(APSDisplayView * _Nonnull)displayView;
@end

@class APSLogLevel;
@class AppstockExternalUserId;
SWIFT_CLASS("_TtC11AppstockSDK8Appstock")
@interface Appstock : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Appstock * _Nonnull shared;)
+ (Appstock * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic) BOOL timeoutUpdated;
@property (nonatomic) BOOL debugRequests;
/// Unique identifier generated on the platform’s UI.
/// Object:Imp.ext.mobilesdk?.endpointId
@property (nonatomic, copy) NSString * _Nullable endpointID;
/// This property is set by the developer when he is willing to assign the assetID for Native ad.
@property (nonatomic) BOOL shouldAssignNativeAssetID;
/// This property is set by the developer when he is willing to share the location for better ad targeting
@property (nonatomic) BOOL shareGeoLocation;
/// Set the desidered verbosity of the logs
@property (nonatomic, strong) APSLogLevel * _Nonnull logLevel;
/// Array  containing objects that hold External UserId parameters.
@property (nonatomic, copy) NSArray<AppstockExternalUserId *> * _Nonnull externalUserIdArray;
@property (nonatomic, readonly, copy) NSString * _Nonnull version;
@property (nonatomic, readonly, copy) NSString * _Nonnull omsdkVersion;
@property (nonatomic) NSInteger timeoutMillis;
@property (nonatomic, strong) NSNumber * _Nullable timeoutMillisDynamic;
@property (nonatomic) NSTimeInterval adRequestTimeout;
@property (nonatomic) NSTimeInterval adRequestTimeoutPreRenderContent;
/// Returns <code>true</code> if the SDK was properly initialized.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) BOOL isSDKInitialized;)
+ (BOOL)isSDKInitialized SWIFT_WARN_UNUSED_RESULT;
/// Initializes AppstockSDK SDK.
/// \param partnerKey required to determine the advertising server URL
///
+ (void)initializeSDKWith:(NSString * _Nonnull)partnerKey;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK16AppstockAdFormat")
@interface AppstockAdFormat : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockAdFormat * _Nonnull banner;)
+ (AppstockAdFormat * _Nonnull)banner SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockAdFormat * _Nonnull video;)
+ (AppstockAdFormat * _Nonnull)video SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockAdFormat * _Nonnull native;)
+ (AppstockAdFormat * _Nonnull)native SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<AppstockAdFormat *> * _Nonnull allCases;)
+ (NSArray<AppstockAdFormat *> * _Nonnull)allCases SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) NSInteger rawValue;
@property (nonatomic, readonly, copy) NSString * _Nullable stringEquivalent;
- (nonnull instancetype)initWithRawValue:(NSInteger)rawValue stringEquivalent:(NSString * _Nonnull)stringEquivalent;
- (nonnull instancetype)initWithRawValue:(NSInteger)rawValue OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

/// Utility class that stores details of the received bid.
SWIFT_CLASS("_TtC11AppstockSDK14AppstockAdInfo")
@interface AppstockAdInfo : NSObject
/// Bid price.
@property (nonatomic, readonly, strong) NSNumber * _Nullable price;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

typedef SWIFT_ENUM(NSInteger, AppstockAdPosition, open) {
  AppstockAdPositionUndefined = 0,
  AppstockAdPositionHeader = 4,
  AppstockAdPositionFooter = 5,
  AppstockAdPositionSidebar = 6,
  AppstockAdPositionFullScreen = 7,
};

SWIFT_PROTOCOL_NAMED("DisplayViewInteractionDelegate")
@protocol APSDisplayViewInteractionDelegate <NSObject>
- (void)trackImpressionForDisplayView:(APSDisplayView * _Nonnull)forDisplayView;
- (void)didLeaveAppFrom:(APSDisplayView * _Nonnull)displayView;
- (void)willPresentModalFrom:(APSDisplayView * _Nonnull)displayView;
- (void)didDismissModalFrom:(APSDisplayView * _Nonnull)displayView;
- (UIViewController * _Nullable)viewControllerForModalPresentationFromDisplayView:(APSDisplayView * _Nonnull)fromDisplayView SWIFT_WARN_UNUSED_RESULT;
@end

@protocol AppstockAdViewDelegate;
@class NSCoder;
SWIFT_CLASS("_TtC11AppstockSDK14AppstockAdView")
@interface AppstockAdView : UIView <APSAdLoadFlowControllerDelegate, APSAdViewEventInteractionDelegate, APSAdViewLoaderDelegate, APSDisplayViewInteractionDelegate>
/// Unique identifier generated on the platform’s UI.
/// Mandatory (if <code>endpointID</code> is not included).
/// Object:Imp.ext.mobilesdk?.placementId
@property (nonatomic, copy) NSString * _Nullable placementID;
/// Unique identifier generated on the platform’s UI.
/// Mandatory (if <code>placementID</code> is not included).
/// Object:Imp.ext.mobilesdk?.endpointId
@property (nonatomic, copy) NSString * _Nullable endpointID;
@property (nonatomic) NSTimeInterval refreshInterval;
@property (nonatomic, copy) NSArray<NSValue *> * _Nullable adSizes;
@property (nonatomic, strong) AppstockAdFormat * _Nonnull adFormat;
@property (nonatomic) enum AppstockAdPosition adPosition;
@property (nonatomic, weak) id <AppstockAdViewDelegate> _Nullable delegate;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)loadAd;
- (void)stopAutoRefresh;
- (void)trackImpressionForDisplayView:(APSDisplayView * _Nonnull)forDisplayView;
- (UIViewController * _Nullable)viewControllerForModalPresentationFromDisplayView:(APSDisplayView * _Nonnull)fromDisplayView SWIFT_WARN_UNUSED_RESULT;
- (void)didLeaveAppFrom:(APSDisplayView * _Nonnull)displayView;
- (void)willPresentModalFrom:(APSDisplayView * _Nonnull)displayView;
- (void)didDismissModalFrom:(APSDisplayView * _Nonnull)displayView;
- (void)adViewLoader:(APSAdViewLoader * _Nonnull)adViewLoader loadedAdView:(UIView * _Nonnull)adView adSize:(CGSize)adSize bidResponse:(APSBidResponse * _Nullable)bidResponse;
- (void)adViewLoader:(APSAdViewLoader * _Nonnull)adViewLoader createdDisplayView:(APSDisplayView * _Nonnull)displayView;
- (void)adLoadFlowController:(APSAdLoadFlowController * _Nonnull)adLoadFlowController failedWithError:(NSError * _Nullable)error;
- (void)adLoadFlowControllerWillSendBidRequest:(APSAdLoadFlowController * _Nonnull)adLoadFlowController;
- (void)adLoadFlowControllerWillRequestPrimaryAd:(APSAdLoadFlowController * _Nonnull)adLoadFlowController;
- (BOOL)adLoadFlowControllerShouldContinue:(APSAdLoadFlowController * _Nonnull)adLoadFlowController SWIFT_WARN_UNUSED_RESULT;
- (void)willPresentModal;
- (void)didDismissModal;
- (void)willLeaveApp;
@property (nonatomic, readonly, strong) UIViewController * _Nullable viewControllerForPresentingModal;
@end

SWIFT_PROTOCOL("_TtP11AppstockSDK22AppstockAdViewDelegate_")
@protocol AppstockAdViewDelegate <NSObject>
/// Asks the delegate for a view controller instance to use for presenting modal views
/// as a result of user interaction on an ad. Usual implementation may simply return self,
/// if it is view controller class.
- (UIViewController * _Nullable)adViewPresentationController SWIFT_WARN_UNUSED_RESULT;
@optional
/// Notifies the delegate that an ad has been successfully loaded and rendered. Deprecated.
/// \param adView The AppstockAdView instance sending the message.
///
/// \param adSize Received ad size.
///
- (void)adView:(AppstockAdView * _Nonnull)adView didReceiveAdWithAdSize:(CGSize)adSize SWIFT_DEPRECATED_MSG("Deprecated. Use adView(_:didReceiveAdWithAdSize:adInfo:) instead.");
/// Notifies the delegate that an ad has been successfully loaded and rendered.
/// \param adView The AppstockAdView instance sending the message.
///
/// \param adSize Received ad size.
///
/// \param adInfo Instance that stores information about the received bid.
///
- (void)adView:(AppstockAdView * _Nonnull)adView didReceiveAdWithAdSize:(CGSize)adSize adInfo:(AppstockAdInfo * _Nonnull)adInfo;
/// Notifies the delegate of an error encountered while loading or rendering an ad.
/// \param adView The AppstockAdView instance sending the message.
///
/// \param error The error encountered while attempting to receive or render the ad.
///
- (void)adView:(AppstockAdView * _Nonnull)adView didFailToReceiveAdWith:(NSError * _Nonnull)error;
/// Notifies the delegate whenever current app goes in the background due to user click.
/// \param adView The AppstockAdView instance sending the message.
///
- (void)adViewWillLeaveApplication:(AppstockAdView * _Nonnull)adView;
/// Notifies delegate that the ad view will launch a modal on top of the current view controller, as a result of user interaction.
/// \param adView The AppstockAdView instance sending the message.
///
- (void)adViewWillPresentModal:(AppstockAdView * _Nonnull)adView;
/// Notifies delegate that the ad view has dismissed the modal on top of the current view controller.
/// \param adView The AppstockAdView instance sending the message.
///
- (void)adViewDidDismissModal:(AppstockAdView * _Nonnull)adView;
@end

SWIFT_CLASS("_TtC11AppstockSDK17AppstockConstants")
@interface AppstockConstants : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull sdkVersion;)
+ (NSString * _Nonnull)sdkVersion SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull companionHTMLTemplate;)
+ (NSString * _Nonnull)companionHTMLTemplate SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS_NAMED("SingleContainerInt")
@interface APSSingleContainerInt : NSObject
@property (nonatomic, readonly) NSInteger value;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) NSUInteger hash;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK22AppstockContextSubType")
@interface AppstockContextSubType : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull General;)
+ (AppstockContextSubType * _Nonnull)General SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Article;)
+ (AppstockContextSubType * _Nonnull)Article SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Video;)
+ (AppstockContextSubType * _Nonnull)Video SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Audio;)
+ (AppstockContextSubType * _Nonnull)Audio SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Image;)
+ (AppstockContextSubType * _Nonnull)Image SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull UserGenerated;)
+ (AppstockContextSubType * _Nonnull)UserGenerated SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Social;)
+ (AppstockContextSubType * _Nonnull)Social SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull email;)
+ (AppstockContextSubType * _Nonnull)email SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull chatIM;)
+ (AppstockContextSubType * _Nonnull)chatIM SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull SellingProduct;)
+ (AppstockContextSubType * _Nonnull)SellingProduct SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull AppStore;)
+ (AppstockContextSubType * _Nonnull)AppStore SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull ReviewSite;)
+ (AppstockContextSubType * _Nonnull)ReviewSite SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextSubType * _Nonnull Custom;)
+ (AppstockContextSubType * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK19AppstockContextType")
@interface AppstockContextType : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextType * _Nonnull Content;)
+ (AppstockContextType * _Nonnull)Content SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextType * _Nonnull Social;)
+ (AppstockContextType * _Nonnull)Social SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextType * _Nonnull Product;)
+ (AppstockContextType * _Nonnull)Product SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextType * _Nonnull Custom;)
+ (AppstockContextType * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

typedef SWIFT_ENUM(NSInteger, AppstockDataAsset, open) {
  AppstockDataAssetSponsored = 1,
  AppstockDataAssetDescription = 2,
  AppstockDataAssetRating = 3,
  AppstockDataAssetLikes = 4,
  AppstockDataAssetDownloads = 5,
  AppstockDataAssetPrice = 6,
  AppstockDataAssetSaleprice = 7,
  AppstockDataAssetPhone = 8,
  AppstockDataAssetAddress = 9,
  AppstockDataAssetDescription2 = 10,
  AppstockDataAssetDisplayurl = 11,
  AppstockDataAssetCtatext = 12,
  AppstockDataAssetCustom = 13,
};

SWIFT_CLASS("_TtC11AppstockSDK21AppstockEventTracking")
@interface AppstockEventTracking : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventTracking * _Nonnull Image;)
+ (AppstockEventTracking * _Nonnull)Image SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventTracking * _Nonnull js;)
+ (AppstockEventTracking * _Nonnull)js SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventTracking * _Nonnull Custom;)
+ (AppstockEventTracking * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK17AppstockEventType")
@interface AppstockEventType : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventType * _Nonnull Impression;)
+ (AppstockEventType * _Nonnull)Impression SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventType * _Nonnull ViewableImpression50;)
+ (AppstockEventType * _Nonnull)ViewableImpression50 SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventType * _Nonnull ViewableImpression100;)
+ (AppstockEventType * _Nonnull)ViewableImpression100 SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventType * _Nonnull ViewableVideoImpression50;)
+ (AppstockEventType * _Nonnull)ViewableVideoImpression50 SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockEventType * _Nonnull Custom;)
+ (AppstockEventType * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

/// Defines the User Id Object from an External Thrid Party Source
SWIFT_CLASS("_TtC11AppstockSDK22AppstockExternalUserId")
@interface AppstockExternalUserId : NSObject <NSSecureCoding>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) BOOL supportsSecureCoding;)
+ (BOOL)supportsSecureCoding SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, copy) NSString * _Nonnull source;
@property (nonatomic, copy) NSString * _Nonnull identifier;
@property (nonatomic, strong) NSNumber * _Nullable atype;
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
/// Initialize ExternalUserId Class
/// \param source Source of the External User Id String.
///
/// \param identifier String of the External User Id.
///
/// \param atype (Optional) Int of the External User Id.
///
/// \param ext (Optional) Dictionary of the External User Id.
///
- (nonnull instancetype)initWithSource:(NSString * _Nonnull)source identifier:(NSString * _Nonnull)identifier atype:(NSNumber * _Nullable)atype ext:(NSDictionary<NSString *, id> * _Nullable)ext OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
- (void)encodeWithCoder:(NSCoder * _Nonnull)coder;
- (NSDictionary * _Nonnull)toJsonDictionary SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK18AppstockImageAsset")
@interface AppstockImageAsset : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockImageAsset * _Nonnull Icon;)
+ (AppstockImageAsset * _Nonnull)Icon SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockImageAsset * _Nonnull Main;)
+ (AppstockImageAsset * _Nonnull)Main SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockContextType * _Nonnull Custom;)
+ (AppstockContextType * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK24AppstockImagesRepository")
@interface AppstockImagesRepository : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull whiteMuteDisabled;)
+ (NSString * _Nonnull)whiteMuteDisabled SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull whiteMuteEnabled;)
+ (NSString * _Nonnull)whiteMuteEnabled SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull whiteCloseButton;)
+ (NSString * _Nonnull)whiteCloseButton SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull whiteSkipButton;)
+ (NSString * _Nonnull)whiteSkipButton SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@protocol AppstockInterstitialAdUnitDelegate;
SWIFT_CLASS("_TtC11AppstockSDK26AppstockInterstitialAdUnit")
@interface AppstockInterstitialAdUnit : NSObject
@property (nonatomic, weak) id <AppstockInterstitialAdUnitDelegate> _Nullable delegate;
/// Indicated whether ad is ready to be shown
@property (nonatomic, readonly) BOOL isReady;
/// Unique identifier generated on the platform’s UI.
/// imp.ext.mobilesdk.placementId
@property (nonatomic, copy) NSString * _Nullable placementID;
/// Unique identifier generated on the platform’s UI.
/// imp[].ext.mobilesdk.endpointId
@property (nonatomic, copy) NSString * _Nullable endpointID;
@property (nonatomic, copy) NSSet<AppstockAdFormat *> * _Nonnull adFormats;
@property (nonatomic, copy) NSArray<NSValue *> * _Nullable adSizes;
@property (nonatomic) double skipButtonArea;
@property (nonatomic) enum AppstockPosition skipButtonPosition;
@property (nonatomic) double skipDelay;
@property (nonatomic) BOOL isMuted;
@property (nonatomic) BOOL isSoundButtonVisible;
@property (nonatomic) double closeButtonArea;
@property (nonatomic) enum AppstockPosition closeButtonPosition;
- (void)loadAd;
- (void)showFrom:(UIViewController * _Nonnull)controller;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// Protocol for interaction with the InterstitialAdUnit .
/// All messages will be invoked on the main thread.
SWIFT_PROTOCOL("_TtP11AppstockSDK34AppstockInterstitialAdUnitDelegate_")
@protocol AppstockInterstitialAdUnitDelegate <NSObject>
@optional
/// Called when an ad is loaded and ready for display. Deprecated.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
- (void)interstitialDidReceiveAd:(AppstockInterstitialAdUnit * _Nonnull)interstitial SWIFT_DEPRECATED_MSG("Deprecated. Use interstitialDidReceiveAd(_:adInfo:) instead.");
/// Called when an ad is loaded and ready for display.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
/// \param adInfo Instance that stores information about the received bid.
///
- (void)interstitialDidReceiveAd:(AppstockInterstitialAdUnit * _Nonnull)interstitial adInfo:(AppstockAdInfo * _Nonnull)adInfo;
/// Called when the load process fails to produce a viable ad.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
/// \param error The error encountered while attempting to receive or render the ad.
///
- (void)interstitial:(AppstockInterstitialAdUnit * _Nonnull)interstitial didFailToReceiveAdWithError:(NSError * _Nullable)error;
/// Called when the interstitial view will be launched,  as a result of show() method.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
- (void)interstitialWillPresentAd:(AppstockInterstitialAdUnit * _Nonnull)interstitial;
/// Called when the interstitial is dismissed by the user.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
- (void)interstitialDidDismissAd:(AppstockInterstitialAdUnit * _Nonnull)interstitial;
/// Called when an ad causes the sdk to leave the app.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
- (void)interstitialWillLeaveApplication:(AppstockInterstitialAdUnit * _Nonnull)interstitial;
/// Called when user clicked the ad.
/// \param interstitial The AppstockInterstitialAdUnit instance sending the message.
///
- (void)interstitialDidClickAd:(AppstockInterstitialAdUnit * _Nonnull)interstitial;
@end

@class AppstockNativeAdMarkup;
@protocol AppstockNativeAdDelegate;
@class AppstockNativeTitle;
@class AppstockNativeData;
@class AppstockNativeImage;
@class AppstockNativeEventTrackerResponse;
enum AppstockNativeDataAssetType : NSInteger;
enum AppstockNativeImageAssetType : NSInteger;
SWIFT_CLASS("_TtC11AppstockSDK16AppstockNativeAd")
@interface AppstockNativeAd : NSObject
@property (nonatomic, strong) AppstockNativeAdMarkup * _Nullable nativeAdMarkup;
@property (nonatomic, weak) id <AppstockNativeAdDelegate> _Nullable delegate;
@property (nonatomic, readonly, copy) NSArray<AppstockNativeTitle *> * _Nonnull titles;
@property (nonatomic, readonly, copy) NSArray<AppstockNativeData *> * _Nonnull dataObjects;
@property (nonatomic, readonly, copy) NSArray<AppstockNativeImage *> * _Nonnull images;
@property (nonatomic, readonly, copy) NSArray<AppstockNativeEventTrackerResponse *> * _Nullable eventTrackers;
- (NSArray<AppstockNativeData *> * _Nonnull)dataObjectsOf:(enum AppstockNativeDataAssetType)dataType SWIFT_WARN_UNUSED_RESULT;
- (NSArray<AppstockNativeImage *> * _Nonnull)imagesOf:(enum AppstockNativeImageAssetType)imageType SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSString * _Nullable title;
@property (nonatomic, readonly, copy) NSString * _Nullable imageUrl;
@property (nonatomic, readonly, copy) NSString * _Nullable iconUrl;
@property (nonatomic, readonly, copy) NSString * _Nullable sponsoredBy;
@property (nonatomic, readonly, copy) NSString * _Nullable text;
@property (nonatomic, readonly, copy) NSString * _Nullable callToAction;
@property (nonatomic, readonly, strong) AppstockAdInfo * _Nullable adInfo;
- (BOOL)registerViewWithView:(UIView * _Nullable)view clickableViews:(NSArray<UIView *> * _Nullable)clickableViews;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_PROTOCOL("_TtP11AppstockSDK24AppstockNativeAdDelegate_")
@protocol AppstockNativeAdDelegate
@optional
/// Sent when the native ad is expired.
- (void)adDidExpireWithAd:(AppstockNativeAd * _Nonnull)ad;
/// Sent when the native view is clicked by the user.
- (void)adWasClickedWithAd:(AppstockNativeAd * _Nonnull)ad;
/// Sent when  an impression is recorded for an native ad
- (void)adDidLogImpressionWithAd:(AppstockNativeAd * _Nonnull)ad;
@end

@class AppstockNativeAdMarkupAsset;
@class AppstockNativeLink;
SWIFT_CLASS("_TtC11AppstockSDK22AppstockNativeAdMarkup")
@interface AppstockNativeAdMarkup : NSObject
/// Version of the Native Markup version in use.
@property (nonatomic, copy) NSString * _Nullable version;
/// List of native ad’s assets.
/// Required if no assetsurl.
/// Recommended as fallback even if assetsurl is provided.
@property (nonatomic, copy) NSArray<AppstockNativeAdMarkupAsset *> * _Nullable assets;
/// URL of an alternate source for the assets object.
/// The expected response is a JSON object mirroring the assets object in the bid response,
/// subject to certain requirements as specified in the individual objects.
/// Where present, overrides the asset object in the response.
@property (nonatomic, copy) NSString * _Nullable assetsurl;
/// URL where a dynamic creative specification may be found for populating this ad, per the Dynamic Content Ads Specification.
/// Note this is a beta option as the interpretation of the Dynamic Content Ads Specification and how to assign those elements
/// into a native ad is outside the scope of this spec and must be agreed offline between the parties
/// or as may be specified in a future revision of the Dynamic Content Ads spec.
/// Where present, overrides the asset object in the response.
@property (nonatomic, copy) NSString * _Nullable dcourl;
/// Destination Link.
/// This is default link object for the ad.
/// Individual assets can also have a link object which applies if the asset is activated(clicked).
/// If the asset doesn’t have a link object, the parent link object applies.
/// See LinkObject Definition
@property (nonatomic, strong) AppstockNativeLink * _Nullable link;
/// Array of impression tracking URLs, expected to return a 1x1 image or 204 response - typically only passed when using 3rd party trackers.
/// To be deprecated - replaced with eventtrackers.
@property (nonatomic, copy) NSArray<NSString *> * _Nullable imptrackers;
/// Optional JavaScript impression tracker.
/// This is a valid HTML, Javascript is already wrapped in <script> tags.
/// It should be executed at impression time where it can be supported.
/// To be deprecated - replaced with eventtrackers.
@property (nonatomic, copy) NSString * _Nullable jstracker;
/// Array of tracking objects to run with the ad, in response to the declared supported methods in the request.
/// Replaces imptrackers and jstracker, to be deprecated.
@property (nonatomic, copy) NSArray<AppstockNativeEventTrackerResponse *> * _Nullable eventtrackers;
/// If support was indicated in the request, URL of a page informing the user about the buyer’s targeting activity.
@property (nonatomic, copy) NSString * _Nullable privacy;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nullable instancetype)initWithJsonString:(NSString * _Nullable)jsonString;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK27AppstockNativeAdMarkupAsset")
@interface AppstockNativeAdMarkupAsset : NSObject
/// Title object for title assets.
/// See TitleObject definition.
@property (nonatomic, strong) AppstockNativeTitle * _Nullable title;
/// Image object for image assets.
/// See ImageObject definition.
@property (nonatomic, strong) AppstockNativeImage * _Nullable img;
/// Data object for ratings, prices etc.
@property (nonatomic, strong) AppstockNativeData * _Nullable data;
/// Link object for call to actions.
/// The link object applies if the asset item is activated (clicked).
/// If there is no link object on the asset, the parent link object on the bid response applies.
@property (nonatomic, strong) AppstockNativeLink * _Nullable link;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support
/// flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class AppstockNativeParameters;
SWIFT_CLASS("_TtC11AppstockSDK20AppstockNativeAdUnit")
@interface AppstockNativeAdUnit : APSAdUnit
@property (nonatomic, strong) AppstockNativeParameters * _Nullable parameters;
/// Unique identifier generated on the platform’s UI.
/// imp[].ext.mobilesdk.placementId
@property (nonatomic, copy) NSString * _Nullable placementID;
/// Unique identifier generated on the platform’s UI.
/// imp[].ext.mobilesdk.endpointId
@property (nonatomic, copy) NSString * _Nullable endpointID;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (void)loadAdWithCompletion:(void (^ _Nonnull)(AppstockNativeAd * _Nullable, NSError * _Nullable))completion;
- (NSDictionary * _Nullable)getNativeRequestObject SWIFT_WARN_UNUSED_RESULT;
@end

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

SWIFT_CLASS("_TtC11AppstockSDK23AppstockNativeAssetData")
@interface AppstockNativeAssetData : AppstockNativeAsset
@property (nonatomic, strong) id _Nullable ext;
- (nonnull instancetype)initWithType:(enum AppstockDataAsset)type required:(BOOL)required OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithIsRequired:(BOOL)isRequired SWIFT_UNAVAILABLE;
@end

SWIFT_CLASS("_TtC11AppstockSDK24AppstockNativeAssetImage")
@interface AppstockNativeAssetImage : AppstockNativeAsset
@property (nonatomic, strong) AppstockImageAsset * _Nullable type;
@property (nonatomic, copy) NSArray<NSString *> * _Nullable mimes;
@property (nonatomic, strong) id _Nullable ext;
- (nonnull instancetype)initWithMinimumWidth:(NSInteger)minimumWidth minimumHeight:(NSInteger)minimumHeight required:(BOOL)required;
- (nonnull instancetype)initWithIsRequired:(BOOL)isRequired OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK24AppstockNativeAssetTitle")
@interface AppstockNativeAssetTitle : AppstockNativeAsset
@property (nonatomic, strong) id _Nullable ext;
- (nonnull instancetype)initWithLength:(NSInteger)length required:(BOOL)required OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithIsRequired:(BOOL)isRequired SWIFT_UNAVAILABLE;
@end

SWIFT_CLASS("_TtC11AppstockSDK18AppstockNativeData")
@interface AppstockNativeData : NSObject
/// The formatted string of data to be displayed.
/// Can contain a formatted value such as “5 stars” or “$10” or “3.4 stars out of 5”.
@property (nonatomic, copy) NSString * _Nullable value;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support
/// flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

typedef SWIFT_ENUM(NSInteger, AppstockNativeDataAssetType, open) {
  AppstockNativeDataAssetTypeUndefined = 0,
  AppstockNativeDataAssetTypeSponsored = 1,
/// Sponsored By message where response should contain the brand name of the sponsor.
  AppstockNativeDataAssetTypeDesc = 2,
/// Descriptive text associated with the product or service being advertised. Longer length of text in response may be truncated or ellipsed by the exchange.
  AppstockNativeDataAssetTypeRating = 3,
/// Rating of the product being offered to the user. For example an app’s rating in an app store from 0-5.
  AppstockNativeDataAssetTypeLikes = 4,
/// Number of social ratings or “likes” of the product being offered to the user.
  AppstockNativeDataAssetTypeDownloads = 5,
/// Number downloads/installs of this product
  AppstockNativeDataAssetTypePrice = 6,
/// Price for product / app / in-app purchase. Value should include currency symbol in localised format.
  AppstockNativeDataAssetTypeSalePrice = 7,
/// Sale price that can be used together with price to indicate a discounted price compared to a regular price. Value should include currency symbol in localised format.
  AppstockNativeDataAssetTypePhone = 8,
/// Phone number
  AppstockNativeDataAssetTypeAddress = 9,
/// Address
  AppstockNativeDataAssetTypeDesc2 = 10,
/// Additional descriptive text associated text with the product or service being advertised
  AppstockNativeDataAssetTypeDisplayURL = 11,
/// Display URL for the text ad. To be used when sponsoring entity doesn’t own the content. IE sponsored by BRAND on SITE (where SITE is transmitted in this field).
  AppstockNativeDataAssetTypeCtaText = 12,
/// CTA description - descriptive text describing a ‘call to action’ button for the destination URL.
  AppstockNativeDataAssetTypeCustom = 500,
};

SWIFT_CLASS("_TtC11AppstockSDK26AppstockNativeEventTracker")
@interface AppstockNativeEventTracker : NSObject
- (nonnull instancetype)initWithEvent:(AppstockEventType * _Nonnull)event methods:(NSArray<AppstockEventTracking *> * _Nonnull)methods OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK34AppstockNativeEventTrackerResponse")
@interface AppstockNativeEventTrackerResponse : NSObject
/// The URL of the image or js.
/// Required for image or js, optional for custom.
@property (nonatomic, copy) NSString * _Nullable url;
/// To be agreed individually with the exchange, an array of key:value objects for custom tracking,
/// for example the account number of the DSP with a tracking company. IE {“accountnumber”:”123”}.
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable customdata;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK19AppstockNativeImage")
@interface AppstockNativeImage : NSObject
/// URL of the image asset.
@property (nonatomic, copy) NSString * _Nullable url;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support
/// flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

typedef SWIFT_ENUM(NSInteger, AppstockNativeImageAssetType, open) {
  AppstockNativeImageAssetTypeIcon = 1,
  AppstockNativeImageAssetTypeMain = 3,
  AppstockNativeImageAssetTypeCustom = 500,
};

SWIFT_CLASS("_TtC11AppstockSDK18AppstockNativeLink")
@interface AppstockNativeLink : NSObject
/// Landing URL of the clickable link.
@property (nonatomic, copy) NSString * _Nullable url;
/// List of third-party tracker URLs to be fired on click of the URL.
@property (nonatomic, copy) NSArray<NSString *> * _Nullable clicktrackers;
/// Fallback URL for deeplink.
/// To be used if the URL given in url is not supported by the device.
@property (nonatomic, copy) NSString * _Nullable fallback;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class AppstockPlacementType;
SWIFT_CLASS("_TtC11AppstockSDK24AppstockNativeParameters")
@interface AppstockNativeParameters : NSObject
@property (nonatomic, copy) NSArray<AppstockNativeAsset *> * _Nullable assets;
@property (nonatomic, copy) NSArray<AppstockNativeEventTracker *> * _Nullable eventtrackers;
@property (nonatomic, copy) NSString * _Nonnull version;
@property (nonatomic, strong) AppstockContextType * _Nullable context;
@property (nonatomic, strong) AppstockContextSubType * _Nullable contextSubType;
@property (nonatomic, strong) AppstockPlacementType * _Nullable placementType;
@property (nonatomic) NSInteger placementCount;
@property (nonatomic) NSInteger sequence;
@property (nonatomic) NSInteger asseturlsupport;
@property (nonatomic) NSInteger durlsupport;
@property (nonatomic) NSInteger privacy;
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK19AppstockNativeTitle")
@interface AppstockNativeTitle : NSObject
/// The text associated with the text element.
@property (nonatomic, copy) NSString * _Nullable text;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support
/// flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)initWithJsonDictionary:(NSDictionary<NSString *, id> * _Nonnull)jsonDictionary OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK21AppstockPlacementType")
@interface AppstockPlacementType : APSSingleContainerInt
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockPlacementType * _Nonnull FeedContent;)
+ (AppstockPlacementType * _Nonnull)FeedContent SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockPlacementType * _Nonnull AtomicContent;)
+ (AppstockPlacementType * _Nonnull)AtomicContent SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockPlacementType * _Nonnull OutsideContent;)
+ (AppstockPlacementType * _Nonnull)OutsideContent SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockPlacementType * _Nonnull RecommendationWidget;)
+ (AppstockPlacementType * _Nonnull)RecommendationWidget SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockPlacementType * _Nonnull Custom;)
+ (AppstockPlacementType * _Nonnull)Custom SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithIntegerLiteral:(NSInteger)value OBJC_DESIGNATED_INITIALIZER;
@end

typedef SWIFT_ENUM(NSInteger, AppstockPosition, open) {
  AppstockPositionUndefined = -1,
  AppstockPositionTopLeft = 0,
  AppstockPositionTopCenter = 1,
  AppstockPositionTopRight = 2,
  AppstockPositionCenter = 3,
  AppstockPositionBottomLeft = 4,
  AppstockPositionBottomCenter = 5,
  AppstockPositionBottomRight = 6,
  AppstockPositionCustom = 7,
};

SWIFT_CLASS("_TtC11AppstockSDK14AppstockReward")
@interface AppstockReward : NSObject
@property (nonatomic, copy) NSString * _Nullable type;
@property (nonatomic, strong) NSNumber * _Nullable count;
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@protocol AppstockRewardedAdUnitDelegate;
SWIFT_CLASS("_TtC11AppstockSDK22AppstockRewardedAdUnit")
@interface AppstockRewardedAdUnit : NSObject
@property (nonatomic, weak) id <AppstockRewardedAdUnitDelegate> _Nullable delegate;
/// Indicated whether ad is ready to be shown
@property (nonatomic, readonly) BOOL isReady;
/// Unique identifier generated on the platform’s UI.
/// imp.ext.mobilesdk.placementId
@property (nonatomic, copy) NSString * _Nullable placementID;
/// Unique identifier generated on the platform’s UI.
/// imp[].ext.mobilesdk.endpointId
@property (nonatomic, copy) NSString * _Nullable endpointID;
@property (nonatomic, copy) NSSet<AppstockAdFormat *> * _Nonnull adFormats;
@property (nonatomic, copy) NSArray<NSValue *> * _Nullable adSizes;
@property (nonatomic) BOOL isMuted;
@property (nonatomic) BOOL isSoundButtonVisible;
@property (nonatomic) double closeButtonArea;
@property (nonatomic) enum AppstockPosition closeButtonPosition;
/// Start loading rewarded ad.
- (void)loadAd;
/// Show ad from view controller.
- (void)showFrom:(UIViewController * _Nonnull)controller;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// Protocol for interaction with the AppstockRewardedAdUnit.
/// All messages will be invoked on the main thread.
SWIFT_PROTOCOL("_TtP11AppstockSDK30AppstockRewardedAdUnitDelegate_")
@protocol AppstockRewardedAdUnitDelegate <NSObject>
@optional
/// Called when an ad is loaded and ready for display.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
- (void)rewardedAdDidReceiveAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd SWIFT_DEPRECATED_MSG("Deprecated. Use rewardedAdDidReceiveAd(_:adInfo:) instead.");
/// Called when an ad is loaded and ready for display.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
/// \param adInfo Instance that stores information about the received bid.
///
- (void)rewardedAdDidReceiveAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd adInfo:(AppstockAdInfo * _Nonnull)adInfo;
/// Called when the load process fails to produce a viable ad.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
/// \param error The error encountered while attempting to receive or render the ad.
///
- (void)rewardedAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd didFailToReceiveAdWithError:(NSError * _Nullable)error;
/// Called when the interstitial view will be launched,  as a result of show() method.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
- (void)rewardedAdWillPresentAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd;
/// Called when the interstial is dismissed by the user.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
- (void)rewardedAdDidDismissAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd;
/// Called when an ad causes the sdk to leave the app.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
- (void)rewardedAdWillLeaveApplication:(AppstockRewardedAdUnit * _Nonnull)rewardedAd;
/// Called when user clicked the ad.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
- (void)rewardedAdDidClickAd:(AppstockRewardedAdUnit * _Nonnull)rewardedAd;
/// Called when user is able to receive a reward from the app.
/// \param rewardedAd The AppstockRewardedAdUnit instance sending the message.
///
/// \param reward Instance that stores information about the reward.
///
- (void)rewardedAdUserDidEarnReward:(AppstockRewardedAdUnit * _Nonnull)rewardedAd reward:(AppstockReward * _Nonnull)reward;
@end

@class APSUserAgentService;
@class AppstockServerResponse;
@class NSData;
SWIFT_PROTOCOL("_TtP11AppstockSDK32AppstockServerConnectionProtocol_")
@protocol AppstockServerConnectionProtocol
@property (nonatomic, readonly, strong) APSUserAgentService * _Nonnull userAgentService;
- (void)fireAndForget:(NSString * _Nullable)resourceURL;
- (void)head:(NSString * _Nullable)resourceURL timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)get:(NSString * _Nullable)resourceURL timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)post:(NSString * _Nullable)resourceURL data:(NSData * _Nullable)data timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)post:(NSString * _Nullable)resourceURL contentType:(NSString * _Nullable)contentType data:(NSData * _Nullable)data timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)download:(NSString * _Nullable)resourceURL callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
@end

SWIFT_CLASS("_TtC11AppstockSDK24AppstockServerConnection")
@interface AppstockServerConnection : NSObject <AppstockServerConnectionProtocol, NSURLSessionDelegate>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AppstockServerConnection * _Nonnull shared;)
+ (AppstockServerConnection * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, strong) APSUserAgentService * _Nonnull userAgentService;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull userAgentHeaderKey;)
+ (NSString * _Nonnull)userAgentHeaderKey SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull contentTypeKey;)
+ (NSString * _Nonnull)contentTypeKey SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull contentTypeVal;)
+ (NSString * _Nonnull)contentTypeVal SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithUserAgentService:(APSUserAgentService * _Nonnull)userAgentService;
- (void)fireAndForget:(NSString * _Nullable)resourceURL;
- (void)head:(NSString * _Nullable)resourceURL timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)get:(NSString * _Nullable)resourceURL timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)post:(NSString * _Nullable)resourceURL data:(NSData * _Nullable)data timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)post:(NSString * _Nullable)resourceURL contentType:(NSString * _Nullable)contentType data:(NSData * _Nullable)data timeout:(NSTimeInterval)timeout callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (void)download:(NSString * _Nullable)resourceURL callback:(void (^ _Nonnull)(AppstockServerResponse * _Nonnull))callback;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS("_TtC11AppstockSDK22AppstockServerResponse")
@interface AppstockServerResponse : NSObject
@property (nonatomic, readonly) BOOL isOKStatusCode;
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable jsonDict;
@property (nonatomic, copy) NSData * _Nullable rawData;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nullable requestHeaders;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nullable responseHeaders;
@property (nonatomic, copy) NSString * _Nullable requestURL;
@property (nonatomic) NSError * _Nullable error;
@property (nonatomic) NSInteger statusCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class NSValue;
SWIFT_CLASS("_TtC11AppstockSDK17AppstockTargeting")
@interface AppstockTargeting : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AppstockTargeting * _Nonnull shared;)
+ (AppstockTargeting * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
+ (void)setShared:(AppstockTargeting * _Nonnull)value;
/// Optional feature to pass bidder data that was set in the
/// exchange’s cookie. The string must be in base85 cookie safe
/// characters and be in any format. Proper JSON encoding must
/// be used to include “escaped” quotation marks.
/// ORTB: user.customdata
@property (nonatomic, copy) NSString * _Nullable userCustomData;
/// Placeholder for User Identity Links.
/// ORTB: usr.ext.eids
@property (nonatomic, copy) NSArray<NSDictionary<NSString *, NSObject *> *> * _Nullable eids;
/// Defines the User Id Object from an External Thrid Party Source.
/// ORTB: usr.ext.eids
@property (nonatomic, copy) NSArray<AppstockExternalUserId *> * _Nonnull externalUserIds;
/// Placeholder for exchange-specific extensions to OpenRTB.
/// ORTB: user.ext
@property (nonatomic, copy) NSDictionary<NSString *, NSObject *> * _Nullable userExt;
/// App’s publisher name.
/// ORTB: app.publisher.name
@property (nonatomic, copy) NSString * _Nullable publisherName;
/// ID of publisher app in Apple’s App Store.
/// ORTB: imp[].ext.skadn.sourceapp
@property (nonatomic, copy) NSString * _Nullable sourceapp;
/// ORTB: app.storeurl
@property (nonatomic, copy) NSString * _Nullable storeURL;
/// ORTB: app.domain
@property (nonatomic, copy) NSString * _Nullable domain;
/// The itunes app id for targeting.
/// ORTB: app.bundle
@property (nonatomic, copy) NSString * _Nullable itunesID;
/// CLLocationCoordinate2D. See CoreLocation framework documentation.
/// ORTB: user.geo.lat, user.geo.lon
@property (nonatomic, strong) NSValue * _Nullable coordinate;
/// Integer flag indicating if this request is subject to the COPPA regulations established by the USA FTC, where 0 = no, 1 = yes. Objective-C bridge.
/// ORTB: regs.coppa
@property (nonatomic, strong) NSNumber * _Nullable subjectToCOPPAObjc;
- (void)addAppKeyword:(NSString * _Nonnull)newElement;
- (NSArray<NSString *> * _Nonnull)getAppKeywords SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// Timer that stops in background and resumes in foreground. Fires callback on timer completion.
/// Can execute only one task at a time.
SWIFT_CLASS_NAMED("BackgroundAwareTimer")
@interface APSBackgroundAwareTimer : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (void)startTimerWith:(NSTimeInterval)interval completion:(void (^ _Nonnull)(void))completion;
- (void)invalidateTimer;
@end

@class APSORTBBidExtSkadn;
@class APSORTBAdConfiguration;
@class APSORTBSDKConfiguration;
@class APSORTBExtMobileSDKEvents;
@class APSORTBBidExtRewarded;
@class APSORTBBidExt;
SWIFT_CLASS_NAMED("Bid")
@interface APSBid : NSObject
/// Bid price expressed as CPM although the actual transaction is for a unit impression only.
/// Note that while the type indicates float, integer math is highly recommended
/// when handling currencies (e.g., BigDecimal in Java).
@property (nonatomic, readonly) float price;
/// Win notice URL called by the exchange if the bid wins (not necessarily indicative of a delivered,
/// viewed, or billable ad); optional means of serving ad markup.
/// Substitution macros (Section 4.4) may be included in both the URL and optionally returned markup.
@property (nonatomic, readonly, copy) NSString * _Nullable nurl;
/// Optional means of conveying ad markup in case the bid wins; supersedes the win notice
/// if markup is included in both.
/// Substitution macros (Section 4.4) may be included.
@property (nonatomic, readonly, copy) NSString * _Nullable adm;
/// Ad size
@property (nonatomic, readonly) CGSize size;
/// SKAdNetwork parameters about an App Store product.
/// Used in the StoreKit
@property (nonatomic, readonly, strong) APSORTBBidExtSkadn * _Nullable skadn;
/// Appstock ad format
@property (nonatomic, readonly, strong) AppstockAdFormat * _Nullable adFormat;
/// Appstock video ad configuration
@property (nonatomic, readonly, strong) APSORTBAdConfiguration * _Nullable videoAdConfiguration;
@property (nonatomic, readonly, strong) APSORTBSDKConfiguration * _Nullable sdkConfiguration;
/// Returns YES if this bid is intented for display.
@property (nonatomic, readonly) BOOL isWinning;
@property (nonatomic, readonly, strong) APSORTBExtMobileSDKEvents * _Nullable events;
@property (nonatomic, readonly, strong) APSORTBBidExtRewarded * _Nullable rewardedConfig;
@property (nonatomic, readonly, strong) APSORTBBid<APSORTBBidExt *> * _Nonnull bid;
- (nonnull instancetype)initWithBid:(APSORTBBid<APSORTBBidExt *> * _Nonnull)bid OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class APSORTBBidResponseExt;
SWIFT_CLASS_NAMED("BidResponse")
@interface APSBidResponse : NSObject
@property (nonatomic, copy) NSString * _Nullable adUnitId;
@property (nonatomic, readonly, copy) NSArray<APSBid *> * _Nullable allBids;
@property (nonatomic, readonly, strong) APSBid * _Nullable winningBid;
@property (nonatomic, readonly, strong) NSNumber * _Nullable tmaxrequest;
@property (nonatomic, readonly, strong) APSORTBBidResponseExt * _Nullable ext;
- (nonnull instancetype)initWithAdUnitId:(NSString * _Nullable)adUnitId;
- (nonnull instancetype)initWithJsonDictionary:(JsonDictionary * _Nonnull)jsonDictionary;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_PROTOCOL_NAMED("DisplayViewLoadingDelegate")
@protocol APSDisplayViewLoadingDelegate <NSObject>
- (void)displayViewDidLoadAd:(APSDisplayView * _Nonnull)displayView;
- (void)displayView:(APSDisplayView * _Nonnull)displayView didFailWithError:(NSError * _Nonnull)error;
@end

/// This class is a proxy container for event trackers.
/// You can add (and remove) any quantity of trackers.
/// Each tracker must correspond to APSEventTrackerProtocol the EventTracker Protocol.
/// EventManager implements APSEventTrackerProtocol.
/// It broadcasts protocol calls to the all registered trackers.
SWIFT_CLASS_NAMED("EventManager")
@interface APSEventManager : NSObject <APSEventTrackerProtocol>
- (void)registerTracker:(id <APSEventTrackerProtocol> _Nonnull)tracker;
- (void)unregisterTracker:(id <APSEventTrackerProtocol> _Nonnull)tracker;
- (void)trackEvent:(APSTrackingEvent)event;
- (void)trackVideoAdLoaded:(APSVideoVerificationParameters * _Null_unspecified)parameters;
- (void)trackStartVideoWithDuration:(CGFloat)duration volume:(CGFloat)volume;
- (void)trackVolumeChanged:(CGFloat)playerVolume deviceVolume:(CGFloat)deviceVolume;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class WKWebView;
SWIFT_CLASS_NAMED("HiddenWebViewManager")
@interface APSHiddenWebViewManager : NSObject
- (nonnull instancetype)initWithWebView:(WKWebView * _Nonnull)webView landingPageString:(NSString * _Nonnull)landingPageString OBJC_DESIGNATED_INITIALIZER;
- (void)openHiddenWebView;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@protocol APSInterstitialControllerLoadingDelegate;
@protocol APSInterstitialControllerInteractionDelegate;
@class APSAdDetails;
@class APSInterstitialDisplayProperties;
SWIFT_CLASS_NAMED("InterstitialController")
@interface APSInterstitialController : NSObject <APSAdViewManagerDelegate>
@property (nonatomic, copy) NSSet<AppstockAdFormat *> * _Nonnull adFormats;
/// Sets a video interstitial ad unit as an opt-in video
@property (nonatomic) BOOL isRewarded;
@property (nonatomic, strong) APSVideoControlsConfiguration * _Nonnull videoControlsConfig;
@property (nonatomic, weak) id <APSInterstitialControllerLoadingDelegate> _Nullable loadingDelegate;
@property (nonatomic, weak) id <APSInterstitialControllerInteractionDelegate> _Nullable interactionDelegate;
- (nonnull instancetype)initWithBid:(APSBid * _Nonnull)bid adConfiguration:(APSAdUnitConfig * _Nonnull)adConfiguration OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithBid:(APSBid * _Nonnull)bid;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
- (void)loadAd;
- (void)show;
- (UIViewController * _Nullable)viewControllerForModalPresentation SWIFT_WARN_UNUSED_RESULT;
- (void)adLoaded:(APSAdDetails * _Nonnull)tbAdDetails;
- (void)failedToLoad:(NSError * _Nonnull)error;
- (void)adDidComplete;
- (void)adDidDisplay;
- (void)adWasClicked;
- (void)adViewWasClicked;
- (void)adDidExpand;
- (void)adDidCollapse;
- (void)adDidLeaveApp;
- (void)adClickthroughDidClose;
- (void)adDidClose;
- (void)adDidSendRewardedEvent;
- (APSInterstitialDisplayProperties * _Nonnull)interstitialDisplayProperties SWIFT_WARN_UNUSED_RESULT;
@end

SWIFT_PROTOCOL_NAMED("InterstitialControllerInteractionDelegate")
@protocol APSInterstitialControllerInteractionDelegate <NSObject>
- (void)trackImpressionForInterstitialController:(APSInterstitialController * _Nonnull)forInterstitialController;
- (void)interstitialControllerDidClickAd:(APSInterstitialController * _Nonnull)interstitialController;
- (void)interstitialControllerDidCloseAd:(APSInterstitialController * _Nonnull)interstitialController;
- (void)interstitialControllerDidLeaveApp:(APSInterstitialController * _Nonnull)interstitialController;
- (void)interstitialControllerDidDisplay:(APSInterstitialController * _Nonnull)interstitialController;
- (void)interstitialControllerDidComplete:(APSInterstitialController * _Nonnull)interstitialController;
- (UIViewController * _Nullable)viewControllerForModalPresentationFromInterstitialController:(APSInterstitialController * _Nonnull)fromInterstitialController SWIFT_WARN_UNUSED_RESULT;
@end

SWIFT_PROTOCOL_NAMED("InterstitialControllerLoadingDelegate")
@protocol APSInterstitialControllerLoadingDelegate <NSObject>
- (void)interstitialControllerDidLoadAd:(APSInterstitialController * _Nonnull)interstitialController;
- (void)interstitialController:(APSInterstitialController * _Nonnull)interstitialController didFailWithError:(NSError * _Nonnull)error;
@end

@protocol APSInterstitialEventLoadingDelegate;
@protocol APSInterstitialEventInteractionDelegate;
SWIFT_PROTOCOL_NAMED("InterstitialEventHandlerProtocol")
@protocol APSInterstitialEventHandlerProtocol <APSInterstitialAd>
/// Delegate for custom event handler to inform the Appstock SDK about the events related to the ad server communication.
@property (nonatomic, weak) id <APSInterstitialEventLoadingDelegate> _Nullable loadingDelegate;
/// Delegate for custom event handler to inform the Appstock SDK about the events related to the user’s interaction with the ad.
@property (nonatomic, weak) id <APSInterstitialEventInteractionDelegate> _Nullable interactionDelegate;
@end

SWIFT_CLASS_NAMED("InterstitialEventHandlerStandalone")
@interface APSInterstitialEventHandlerStandalone : NSObject <APSInterstitialEventHandlerProtocol>
@property (nonatomic, weak) id <APSInterstitialEventLoadingDelegate> _Nullable loadingDelegate;
@property (nonatomic, weak) id <APSInterstitialEventInteractionDelegate> _Nullable interactionDelegate;
@property (nonatomic, readonly) BOOL isReady;
- (void)showFromViewController:(UIViewController * _Nullable)controller;
- (void)requestAdWithBidResponse:(APSBidResponse * _Nullable)bidResponse;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_PROTOCOL_NAMED("InterstitialEventInteractionDelegate")
@protocol APSInterstitialEventInteractionDelegate <NSObject>
- (void)willPresentAd;
- (void)didDismissAd;
- (void)willLeaveApp;
- (void)didClickAd;
@end

SWIFT_PROTOCOL_NAMED("InterstitialEventLoadingDelegate")
@protocol APSInterstitialEventLoadingDelegate <NSObject>
- (void)sdkDidWin;
- (void)adServerDidWin;
- (void)failedWithError:(NSError * _Nullable)error;
@end

SWIFT_CLASS_NAMED("JSLibrary")
@interface APSJSLibrary : NSObject
@property (nonatomic, copy) NSString * _Nullable downloadURLString;
@property (nonatomic, copy) NSString * _Nonnull name;
- (nonnull instancetype)initWithName:(NSString * _Nonnull)name downloadURLString:(NSString * _Nullable)downloadURLString OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS_NAMED("JSLibraryManager")
@interface APSJSLibraryManager : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSJSLibraryManager * _Nonnull shared;)
+ (APSJSLibraryManager * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
- (void)downloadLibraries;
- (NSString * _Nullable)getMRAIDLibrary SWIFT_WARN_UNUSED_RESULT;
- (NSString * _Nullable)getOMSDKLibrary SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class NSDateFormatter;
SWIFT_CLASS_NAMED("Log")
@interface APSLog : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSString * _Nonnull dateFormat;)
+ (NSString * _Nonnull)dateFormat SWIFT_WARN_UNUSED_RESULT;
+ (void)setDateFormat:(NSString * _Nonnull)value;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSDateFormatter * _Nonnull dateFormatter;)
+ (NSDateFormatter * _Nonnull)dateFormatter SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) APSLogLevel * _Nonnull logLevel;)
+ (APSLogLevel * _Nonnull)logLevel SWIFT_WARN_UNUSED_RESULT;
+ (void)setLogLevel:(APSLogLevel * _Nonnull)value;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL logToFile;)
+ (BOOL)logToFile SWIFT_WARN_UNUSED_RESULT;
+ (void)setLogToFile:(BOOL)value;
+ (void)error:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)info:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)debug:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)verbose:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)warn:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)severe:(id _Nonnull)object filename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)whereAmIWithFilename:(NSString * _Nonnull)filename line:(NSInteger)line function:(NSString * _Nonnull)function;
+ (void)serialWriteToLog:(NSString * _Nonnull)message;
+ (void)writeToLogFile:(NSString * _Nonnull)message;
+ (NSString * _Nullable)getLogFileAsString SWIFT_WARN_UNUSED_RESULT;
+ (void)clearLogFile;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS_NAMED("LogLevel")
@interface APSLogLevel : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull debug;)
+ (APSLogLevel * _Nonnull)debug SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull verbose;)
+ (APSLogLevel * _Nonnull)verbose SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull info;)
+ (APSLogLevel * _Nonnull)info SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull warn;)
+ (APSLogLevel * _Nonnull)warn SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull error;)
+ (APSLogLevel * _Nonnull)error SWIFT_WARN_UNUSED_RESULT;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSLogLevel * _Nonnull severe;)
+ (APSLogLevel * _Nonnull)severe SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic) NSInteger rawValue;
@property (nonatomic, copy) NSString * _Nonnull stringValue;
- (nonnull instancetype)initWithStringValue:(NSString * _Nonnull)stringValue rawValue:(NSInteger)rawValue;
- (nonnull instancetype)initWithRawValue:(NSInteger)rawValue OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@interface NSString (SWIFT_EXTENSION(AppstockSDK))
@property (nonatomic, readonly, strong) UIImage * _Nullable base64DecodedImage;
@end

@class APSNativeMarkupRequest;
SWIFT_CLASS_NAMED("NativeAdConfiguration")
@interface APSNativeAdConfiguration : NSObject
/// Version of the Native Markup version in use.
@property (nonatomic, copy) NSString * _Nonnull version;
@property (nonatomic, strong) APSNativeMarkupRequest * _Nonnull markupRequest;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

SWIFT_CLASS_NAMED("NativeMarkupRequest")
@interface APSNativeMarkupRequest : NSObject <APSJsonCodable, NSCopying>
/// [Recommended]
/// [Integer]
/// The context in which the ad appears.
/// See NativeContextType
@property (nonatomic, strong) AppstockContextType * _Nullable context;
/// [Integer]
/// A more detailed context in which the ad appears.
/// See NativeContextSubtype
@property (nonatomic, strong) AppstockContextSubType * _Nullable contextsubtype;
/// [Recommended]
/// [Integer]
/// The design/format/layout of the ad unit being offered.
/// See NativePlacementType
@property (nonatomic, strong) AppstockPlacementType * _Nullable plcmttype;
/// [Integer]
/// The number of identical placements in this Layout. Refer Section 8.1 Multiplacement Bid Requests for further detail.
@property (nonatomic) NSInteger plcmtcnt;
/// [Integer]
/// 0 for the first ad, 1 for the second ad, and so on.
/// Note this would generally NOT be used in combination with plcmtcnt -
/// either you are auctioning multiple identical placements (in which case plcmtcnt>1, seq=0)
/// or you are holding separate auctions for distinct items in the feed (in which case plcmtcnt=1, seq=>=1)
@property (nonatomic) NSInteger seq;
/// [Required]
/// An array of Asset Objects. Any objects bid response must comply with the array of elements expressed in the bid request.
@property (nonatomic, copy) NSArray<AppstockNativeAsset *> * _Nullable assets;
/// [Integer]
/// Whether the supply source / impression supports returning an assetsurl instead of an asset object. 0 or the absence of the field indicates no such support.
@property (nonatomic) NSInteger aurlsupport;
/// [Integer]
/// Whether the supply source / impression supports returning a dco url instead of an asset object. 0 or the absence of the field indicates no such support.
/// Beta feature.
@property (nonatomic) NSInteger durlsupport;
/// Specifies what type of event objects tracking is supported - see Event Trackers Request Object
@property (nonatomic, copy) NSArray<AppstockNativeEventTracker *> * _Nullable eventtrackers;
/// [Recommended]
/// [Integer]
/// Set to 1 when the native ad supports buyer-specific privacy notice. Set to 0 (or field absent) when the native ad doesn’t support custom privacy links or if support is unknown.
@property (nonatomic) NSInteger privacy;
/// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable ext;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nullable jsonDictionary;
- (NSString * _Nullable)toJsonStringWithError:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
@end

typedef SWIFT_ENUM_NAMED(NSInteger, APSNetworkType, "NetworkType", open) {
  APSNetworkTypeUnknown = 0,
  APSNetworkTypeWifi = 2,
  APSNetworkTypeCelluar = 3,
  APSNetworkTypeOffline = 4,
};

SWIFT_CLASS_NAMED("Reachability")
@interface APSReachability : NSObject
/// Shared instance for checking whether the default route is available.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSReachability * _Nonnull shared;)
+ (APSReachability * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic, readonly) enum APSNetworkType currentReachabilityStatus;
/// Returns true is network is reachable otherwise returns false
@property (nonatomic, readonly) BOOL isNetworkReachable;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
- (void)stopNotifier;
/// Starts monitoring of the network status.
/// Calls the reachableBlock when network is restored
- (void)onNetworkRestored:(void (^ _Nonnull)(APSReachability * _Nullable))reachableBlock;
@end

SWIFT_CLASS_NAMED("RewardedConfig")
@interface APSRewardedConfig : NSObject
@property (nonatomic, readonly, strong) AppstockReward * _Nullable reward;
@property (nonatomic, readonly, strong) NSNumber * _Nullable bannerTime;
@property (nonatomic, readonly, copy) NSString * _Nullable bannerEvent;
@property (nonatomic, readonly, strong) NSNumber * _Nullable videoTime;
@property (nonatomic, readonly, copy) NSString * _Nullable videoPlaybackevent;
@property (nonatomic, readonly, strong) NSNumber * _Nullable endcardTime;
@property (nonatomic, readonly, copy) NSString * _Nullable endcardEvent;
@property (nonatomic, readonly, copy) NSString * _Nullable closeAction;
@property (nonatomic, readonly, strong) NSNumber * _Nullable postRewardTime;
/// The timeout duration for rewarded completion, measured in seconds.
@property (nonatomic, readonly, strong) NSNumber * _Nonnull defaultCompletionTime;
/// The playback event when the SDK should send a signal to the application that the user has earned the reward
@property (nonatomic, readonly, copy) NSString * _Nonnull defaultVideoPlaybackEvent;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_PROTOCOL_NAMED("RewardedEventLoadingDelegate")
@protocol APSRewardedEventLoadingDelegate <APSInterstitialEventLoadingDelegate>
@property (nonatomic, weak) NSObject * _Nullable reward;
@end

@class SKAdImpression;
SWIFT_CLASS("_TtC11AppstockSDK17SkadnEventTracker") SWIFT_AVAILABILITY(ios,introduced=14.5)
@interface SkadnEventTracker : NSObject <APSEventTrackerProtocol>
- (nonnull instancetype)initWith:(SKAdImpression * _Nonnull)imp OBJC_DESIGNATED_INITIALIZER;
- (void)trackEvent:(APSTrackingEvent)event;
- (void)trackVideoAdLoaded:(APSVideoVerificationParameters * _Null_unspecified)parameters;
- (void)trackStartVideoWithDuration:(CGFloat)duration volume:(CGFloat)volume;
- (void)trackVolumeChanged:(CGFloat)playerVolume deviceVolume:(CGFloat)deviceVolume;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

SWIFT_CLASS("_TtC11AppstockSDK22SkadnParametersManager")
@interface SkadnParametersManager : NSObject
+ (SKAdImpression * _Nullable)getSkadnImpressionFor:(APSORTBBidExtSkadn * _Nonnull)skadnInfo SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(ios,introduced=14.5);
+ (NSDictionary<NSString *, id> * _Nullable)getSkadnProductParametersFor:(APSORTBBidExtSkadn * _Nonnull)skadnInfo SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// @c UserConsentDataManager is responsible retrieving user consent according to the
/// IAB Transparency & Consent Framework
/// The design of the framework is that a publisher integrated Consent Management
/// Platform (CMP) is responsible for storing user consent applicability and data
/// in @c UserDefaults. All advertising SDKs are to query this data regularly for
/// updates and pass that data downstream and act accordingly.
SWIFT_CLASS_NAMED("UserConsentDataManager")
@interface APSUserConsentDataManager : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) APSUserConsentDataManager * _Nonnull shared;)
+ (APSUserConsentDataManager * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
/// The boolean value set by the user to collect user data.
/// ORTB: regs.ext.gdpr
@property (nonatomic, readonly, strong) NSNumber * _Nullable subjectToGDPR;
/// The consent string for sending the GDPR consent.
/// ORTB: user.ext.consent
@property (nonatomic, readonly, copy) NSString * _Nullable gdprConsentString;
/// Purpose 1 - Store and/or access information on a device.
- (NSNumber * _Nullable)getDeviceAccessConsent SWIFT_WARN_UNUSED_RESULT;
/// Fetch advertising identifier based TCF 2.0 Purpose1 value.
/// ORTB: device.ifa
- (BOOL)isAllowedAccessDeviceData SWIFT_WARN_UNUSED_RESULT;
@end

SWIFT_CLASS_NAMED("VideoControlsConfiguration")
@interface APSVideoControlsConfiguration : NSObject
/// This property indicates maximum video duration.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.maxvideoduration.
@property (nonatomic, readonly, strong) NSNumber * _Nullable maxVideoDuration;
/// This property indicates whether the ad should run playback with sound or not.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.ismuted or set by user.
@property (nonatomic) BOOL isMuted;
/// This property indicates the area which the close button should occupy on the screen.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.closebuttonarea or set by user.
@property (nonatomic) double closeButtonArea;
/// This property indicates the position of the close button on the screen.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.closebuttonposition or set by user.
@property (nonatomic) enum AppstockPosition closeButtonPosition;
/// This property indicates the area which the skip button should occupy on the screen.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.skipbuttonarea or set by user.
@property (nonatomic) double skipButtonArea;
/// This property indicates the position of the skip button on the screen.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.skipbuttonposition or set by user.
@property (nonatomic) enum AppstockPosition skipButtonPosition;
/// This property indicates the number of seconds which should be passed from the start of playback until the skip or close button should be shown.
/// Obtained from the field ext.mobilesdk.passthrough[].adConfiguration.skipdelay or set by user.
@property (nonatomic) double skipDelay;
/// This property indicates whether mute controls is visible on the screen.
@property (nonatomic) BOOL isSoundButtonVisible;
/// Use to initialize video controls with server values.
- (void)initializeWith:(APSORTBAdConfiguration * _Nullable)ortbAdConfiguration;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@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
