use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAttributeType(pub NSUInteger);
impl NSAttributeType {
#[doc(alias = "NSUndefinedAttributeType")]
pub const UndefinedAttributeType: Self = Self(0);
#[doc(alias = "NSInteger16AttributeType")]
pub const Integer16AttributeType: Self = Self(100);
#[doc(alias = "NSInteger32AttributeType")]
pub const Integer32AttributeType: Self = Self(200);
#[doc(alias = "NSInteger64AttributeType")]
pub const Integer64AttributeType: Self = Self(300);
#[doc(alias = "NSDecimalAttributeType")]
pub const DecimalAttributeType: Self = Self(400);
#[doc(alias = "NSDoubleAttributeType")]
pub const DoubleAttributeType: Self = Self(500);
#[doc(alias = "NSFloatAttributeType")]
pub const FloatAttributeType: Self = Self(600);
#[doc(alias = "NSStringAttributeType")]
pub const StringAttributeType: Self = Self(700);
#[doc(alias = "NSBooleanAttributeType")]
pub const BooleanAttributeType: Self = Self(800);
#[doc(alias = "NSDateAttributeType")]
pub const DateAttributeType: Self = Self(900);
#[doc(alias = "NSBinaryDataAttributeType")]
pub const BinaryDataAttributeType: Self = Self(1000);
#[doc(alias = "NSUUIDAttributeType")]
pub const UUIDAttributeType: Self = Self(1100);
#[doc(alias = "NSURIAttributeType")]
pub const URIAttributeType: Self = Self(1200);
#[doc(alias = "NSTransformableAttributeType")]
pub const TransformableAttributeType: Self = Self(1800);
#[doc(alias = "NSObjectIDAttributeType")]
pub const ObjectIDAttributeType: Self = Self(2000);
#[doc(alias = "NSCompositeAttributeType")]
pub const CompositeAttributeType: Self = Self(2100);
}
unsafe impl Encode for NSAttributeType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSAttributeType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSPropertyDescription, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSPropertyDescription")]
pub struct NSAttributeDescription;
);
#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
unsafe impl NSCoding for NSAttributeDescription {}
);
#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
unsafe impl NSCopying for NSAttributeDescription {}
);
#[cfg(feature = "NSPropertyDescription")]
unsafe impl CopyingHelper for NSAttributeDescription {
type Result = Self;
}
#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSAttributeDescription {}
);
#[cfg(feature = "NSPropertyDescription")]
impl NSAttributeDescription {
extern_methods!(
#[unsafe(method(attributeType))]
#[unsafe(method_family = none)]
pub unsafe fn attributeType(&self) -> NSAttributeType;
#[unsafe(method(setAttributeType:))]
#[unsafe(method_family = none)]
pub unsafe fn setAttributeType(&self, attribute_type: NSAttributeType);
#[unsafe(method(attributeValueClassName))]
#[unsafe(method_family = none)]
pub unsafe fn attributeValueClassName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setAttributeValueClassName:))]
#[unsafe(method_family = none)]
pub unsafe fn setAttributeValueClassName(
&self,
attribute_value_class_name: Option<&NSString>,
);
#[unsafe(method(defaultValue))]
#[unsafe(method_family = none)]
pub unsafe fn defaultValue(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setDefaultValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setDefaultValue(&self, default_value: Option<&AnyObject>);
#[unsafe(method(versionHash))]
#[unsafe(method_family = none)]
pub unsafe fn versionHash(&self) -> Retained<NSData>;
#[unsafe(method(valueTransformerName))]
#[unsafe(method_family = none)]
pub unsafe fn valueTransformerName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setValueTransformerName:))]
#[unsafe(method_family = none)]
pub unsafe fn setValueTransformerName(&self, value_transformer_name: Option<&NSString>);
#[unsafe(method(allowsExternalBinaryDataStorage))]
#[unsafe(method_family = none)]
pub unsafe fn allowsExternalBinaryDataStorage(&self) -> bool;
#[unsafe(method(setAllowsExternalBinaryDataStorage:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsExternalBinaryDataStorage(
&self,
allows_external_binary_data_storage: bool,
);
#[unsafe(method(preservesValueInHistoryOnDeletion))]
#[unsafe(method_family = none)]
pub unsafe fn preservesValueInHistoryOnDeletion(&self) -> bool;
#[unsafe(method(setPreservesValueInHistoryOnDeletion:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreservesValueInHistoryOnDeletion(
&self,
preserves_value_in_history_on_deletion: bool,
);
#[unsafe(method(allowsCloudEncryption))]
#[unsafe(method_family = none)]
pub unsafe fn allowsCloudEncryption(&self) -> bool;
#[unsafe(method(setAllowsCloudEncryption:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsCloudEncryption(&self, allows_cloud_encryption: bool);
);
}
#[cfg(feature = "NSPropertyDescription")]
impl NSAttributeDescription {
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>;
);
}