//! 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/coredata/nscompositeattributedescription?language=objc)
    #[unsafe(super(NSAttributeDescription, NSPropertyDescription, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
    pub struct NSCompositeAttributeDescription;
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSCoding for NSCompositeAttributeDescription {}
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSCopying for NSCompositeAttributeDescription {}
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
unsafe impl CopyingHelper for NSCompositeAttributeDescription {
    type Result = Self;
}

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSCompositeAttributeDescription {}
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
impl NSCompositeAttributeDescription {
    extern_methods!(
        #[unsafe(method(elements))]
        #[unsafe(method_family = none)]
        pub unsafe fn elements(&self) -> Retained<NSArray<NSAttributeDescription>>;

        /// Setter for [`elements`][Self::elements].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setElements:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setElements(&self, elements: &NSArray<NSAttributeDescription>);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
impl NSCompositeAttributeDescription {
    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>;
    );
}
