objc2-store-kit 0.3.2

Bindings to the StoreKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skadimpression?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct SKAdImpression;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for SKAdImpression {}
);

impl SKAdImpression {
    extern_methods!(
        /// The App Store item identifier for the source app.
        #[unsafe(method(sourceAppStoreItemIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn sourceAppStoreItemIdentifier(&self) -> Retained<NSNumber>;

        /// Setter for [`sourceAppStoreItemIdentifier`][Self::sourceAppStoreItemIdentifier].
        #[unsafe(method(setSourceAppStoreItemIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSourceAppStoreItemIdentifier(
            &self,
            source_app_store_item_identifier: &NSNumber,
        );

        /// The App Store item identifier for the app being advertised.
        #[unsafe(method(advertisedAppStoreItemIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn advertisedAppStoreItemIdentifier(&self) -> Retained<NSNumber>;

        /// Setter for [`advertisedAppStoreItemIdentifier`][Self::advertisedAppStoreItemIdentifier].
        #[unsafe(method(setAdvertisedAppStoreItemIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdvertisedAppStoreItemIdentifier(
            &self,
            advertised_app_store_item_identifier: &NSNumber,
        );

        /// The identifier for the ad network.
        #[unsafe(method(adNetworkIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn adNetworkIdentifier(&self) -> Retained<NSString>;

        /// Setter for [`adNetworkIdentifier`][Self::adNetworkIdentifier].
        #[unsafe(method(setAdNetworkIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdNetworkIdentifier(&self, ad_network_identifier: &NSString);

        /// The ad campaign identifier.
        #[unsafe(method(adCampaignIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn adCampaignIdentifier(&self) -> Retained<NSNumber>;

        /// Setter for [`adCampaignIdentifier`][Self::adCampaignIdentifier].
        #[unsafe(method(setAdCampaignIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdCampaignIdentifier(&self, ad_campaign_identifier: &NSNumber);

        /// The source identifier
        #[unsafe(method(sourceIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn sourceIdentifier(&self) -> Retained<NSNumber>;

        /// Setter for [`sourceIdentifier`][Self::sourceIdentifier].
        #[unsafe(method(setSourceIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSourceIdentifier(&self, source_identifier: &NSNumber);

        /// The nonce used to generate the signature.
        #[unsafe(method(adImpressionIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn adImpressionIdentifier(&self) -> Retained<NSString>;

        /// Setter for [`adImpressionIdentifier`][Self::adImpressionIdentifier].
        #[unsafe(method(setAdImpressionIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdImpressionIdentifier(&self, ad_impression_identifier: &NSString);

        /// The type of ad being presented.
        #[unsafe(method(adType))]
        #[unsafe(method_family = none)]
        pub unsafe fn adType(&self) -> Option<Retained<NSString>>;

        /// Setter for [`adType`][Self::adType].
        #[unsafe(method(setAdType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdType(&self, ad_type: Option<&NSString>);

        /// The description of the ad.
        #[unsafe(method(adDescription))]
        #[unsafe(method_family = none)]
        pub unsafe fn adDescription(&self) -> Option<Retained<NSString>>;

        /// Setter for [`adDescription`][Self::adDescription].
        #[unsafe(method(setAdDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdDescription(&self, ad_description: Option<&NSString>);

        /// Name of entity that purchased the ad being presented.
        #[unsafe(method(adPurchaserName))]
        #[unsafe(method_family = none)]
        pub unsafe fn adPurchaserName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`adPurchaserName`][Self::adPurchaserName].
        #[unsafe(method(setAdPurchaserName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAdPurchaserName(&self, ad_purchaser_name: Option<&NSString>);

        /// The timestamp of the start and end call.
        #[unsafe(method(timestamp))]
        #[unsafe(method_family = none)]
        pub unsafe fn timestamp(&self) -> Retained<NSNumber>;

        /// Setter for [`timestamp`][Self::timestamp].
        #[unsafe(method(setTimestamp:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTimestamp(&self, timestamp: &NSNumber);

        /// The signature of the impression.
        #[unsafe(method(signature))]
        #[unsafe(method_family = none)]
        pub unsafe fn signature(&self) -> Retained<NSString>;

        /// Setter for [`signature`][Self::signature].
        #[unsafe(method(setSignature:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSignature(&self, signature: &NSString);

        /// The version of SKAdNetwork being used.
        #[unsafe(method(version))]
        #[unsafe(method_family = none)]
        pub unsafe fn version(&self) -> Retained<NSString>;

        /// Setter for [`version`][Self::version].
        #[unsafe(method(setVersion:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVersion(&self, version: &NSString);
    );
}

/// Methods declared on superclass `NSObject`.
impl SKAdImpression {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}