//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::encode::{Encode, Encoding, RefEncode};
use objc2::rc::{Allocated, Retained};
use objc2::runtime::ProtocolObject;
use objc2::{extern_class, extern_conformance, extern_methods};
use objc2_foundation::{CopyingHelper, NSArray, NSCopying, NSInteger, NSObject, NSObjectProtocol};

use crate::*;

/// Enumerates possible behaviors of how a pipeline maps its logical outputs to its color attachments.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtl4logicaltophysicalcolorattachmentmappingstate?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTL4LogicalToPhysicalColorAttachmentMappingState(pub NSInteger);
impl MTL4LogicalToPhysicalColorAttachmentMappingState {
    /// Treats the logical color attachment descriptor array for render and tile render pipelines to match the physical one.
    ///
    /// This is the default behavior, which produces an identity mapping.
    #[doc(alias = "MTL4LogicalToPhysicalColorAttachmentMappingStateIdentity")]
    pub const IDENTITY: Self = Self(0);
    /// Deduces the color attachment mapping by inheriting it from the color attachment map of the current encoder.
    ///
    /// Use this setting to indicate Metal should inherit the mapping from the ``colorAttachmentMap`` property of the current
    /// ``MTL4RenderCommandEncoder`` or ``MTLRenderCommandEncoder`` in use at draw time.
    #[doc(alias = "MTL4LogicalToPhysicalColorAttachmentMappingStateInherited")]
    pub const INHERITED: Self = Self(1);
}

unsafe impl Encode for MTL4LogicalToPhysicalColorAttachmentMappingState {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for MTL4LogicalToPhysicalColorAttachmentMappingState {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

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

extern_conformance!(
    unsafe impl NSCopying for MTL4RenderPipelineColorAttachmentDescriptor {}
);

unsafe impl CopyingHelper for MTL4RenderPipelineColorAttachmentDescriptor {
    type Result = Self;
}

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

impl MTL4RenderPipelineColorAttachmentDescriptor {
    extern_methods!(
        /// Configures the pixel format.
        ///
        /// This property defaults to ``MTLPixelFormatInvalid``.
        #[unsafe(method(pixelFormat))]
        #[unsafe(method_family = none)]
        pub fn pixel_format(&self) -> MTLPixelFormat;

        /// Setter for [`pixelFormat`][Self::pixelFormat].
        #[unsafe(method(setPixelFormat:))]
        #[unsafe(method_family = none)]
        pub fn set_pixel_format(&self, pixel_format: MTLPixelFormat);

        /// Configure the blend state for color attachments the pipeline state uses.
        ///
        /// This property's default value is ``MTL4BlendStateDisabled``.
        #[unsafe(method(blendingState))]
        #[unsafe(method_family = none)]
        pub fn blending_state(&self) -> MTL4BlendState;

        /// Setter for [`blendingState`][Self::blendingState].
        #[unsafe(method(setBlendingState:))]
        #[unsafe(method_family = none)]
        pub fn set_blending_state(&self, blending_state: MTL4BlendState);

        /// Configures the source RGB blend factor.
        ///
        /// This property defaults to ``MTLBlendFactorOne``.
        #[unsafe(method(sourceRGBBlendFactor))]
        #[unsafe(method_family = none)]
        pub fn source_rgb_blend_factor(&self) -> MTLBlendFactor;

        /// Setter for [`sourceRGBBlendFactor`][Self::sourceRGBBlendFactor].
        #[unsafe(method(setSourceRGBBlendFactor:))]
        #[unsafe(method_family = none)]
        pub fn set_source_rgb_blend_factor(&self, source_rgb_blend_factor: MTLBlendFactor);

        /// Configures the destination RGB blend factor.
        ///
        /// This property defaults to ``MTLBlendFactorZero``.
        #[unsafe(method(destinationRGBBlendFactor))]
        #[unsafe(method_family = none)]
        pub fn destination_rgb_blend_factor(&self) -> MTLBlendFactor;

        /// Setter for [`destinationRGBBlendFactor`][Self::destinationRGBBlendFactor].
        #[unsafe(method(setDestinationRGBBlendFactor:))]
        #[unsafe(method_family = none)]
        pub fn set_destination_rgb_blend_factor(
            &self,
            destination_rgb_blend_factor: MTLBlendFactor,
        );

        /// Configures the RGB blend operation.
        ///
        /// This property defaults to ``MTLBlendOperationAdd``.
        #[unsafe(method(rgbBlendOperation))]
        #[unsafe(method_family = none)]
        pub fn rgb_blend_operation(&self) -> MTLBlendOperation;

        /// Setter for [`rgbBlendOperation`][Self::rgbBlendOperation].
        #[unsafe(method(setRgbBlendOperation:))]
        #[unsafe(method_family = none)]
        pub fn set_rgb_blend_operation(&self, rgb_blend_operation: MTLBlendOperation);

        /// Configures the source-alpha blend factor.
        ///
        /// This property defaults to ``MTLBlendFactorOne``.
        #[unsafe(method(sourceAlphaBlendFactor))]
        #[unsafe(method_family = none)]
        pub fn source_alpha_blend_factor(&self) -> MTLBlendFactor;

        /// Setter for [`sourceAlphaBlendFactor`][Self::sourceAlphaBlendFactor].
        #[unsafe(method(setSourceAlphaBlendFactor:))]
        #[unsafe(method_family = none)]
        pub fn set_source_alpha_blend_factor(
            &self,
            source_alpha_blend_factor: MTLBlendFactor,
        );

        /// Configures the destination-alpha blend factor.
        ///
        /// This property defaults to ``MTLBlendFactorZero``.
        #[unsafe(method(destinationAlphaBlendFactor))]
        #[unsafe(method_family = none)]
        pub fn destination_alpha_blend_factor(&self) -> MTLBlendFactor;

        /// Setter for [`destinationAlphaBlendFactor`][Self::destinationAlphaBlendFactor].
        #[unsafe(method(setDestinationAlphaBlendFactor:))]
        #[unsafe(method_family = none)]
        pub fn set_destination_alpha_blend_factor(
            &self,
            destination_alpha_blend_factor: MTLBlendFactor,
        );

        /// Configures the alpha blending operation.
        ///
        /// This property defaults to ``MTLBlendOperationAdd``.
        #[unsafe(method(alphaBlendOperation))]
        #[unsafe(method_family = none)]
        pub fn alpha_blend_operation(&self) -> MTLBlendOperation;

        /// Setter for [`alphaBlendOperation`][Self::alphaBlendOperation].
        #[unsafe(method(setAlphaBlendOperation:))]
        #[unsafe(method_family = none)]
        pub fn set_alpha_blend_operation(&self, alpha_blend_operation: MTLBlendOperation);

        /// Configures the color write mask.
        ///
        /// This property defaults to ``MTLColorWriteMaskAll``.
        #[unsafe(method(writeMask))]
        #[unsafe(method_family = none)]
        pub fn write_mask(&self) -> MTLColorWriteMask;

        /// Setter for [`writeMask`][Self::writeMask].
        #[unsafe(method(setWriteMask:))]
        #[unsafe(method_family = none)]
        pub fn set_write_mask(&self, write_mask: MTLColorWriteMask);

        /// Resets this descriptor to its default state.
        #[unsafe(method(reset))]
        #[unsafe(method_family = none)]
        pub fn reset(&self);
    );
}

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

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

extern_class!(
    /// An array of color attachment descriptions for a render pipeline.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtl4renderpipelinecolorattachmentdescriptorarray?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MTL4RenderPipelineColorAttachmentDescriptorArray;
);

extern_conformance!(
    unsafe impl NSCopying for MTL4RenderPipelineColorAttachmentDescriptorArray {}
);

unsafe impl CopyingHelper for MTL4RenderPipelineColorAttachmentDescriptorArray {
    type Result = Self;
}

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

impl MTL4RenderPipelineColorAttachmentDescriptorArray {
    extern_methods!(
        /// Accesses a color attachment at a specific index.
        ///
        /// - Parameter attachmentIndex: Index of the attachment to access.
        #[unsafe(method(objectAtIndexedSubscript:))]
        #[unsafe(method_family = none)]
        pub fn object_at_indexed_subscript(
            &self,
            attachment_index: usize,
        ) -> Retained<MTL4RenderPipelineColorAttachmentDescriptor>;

        /// Sets an attachment at an index.
        ///
        /// This function offers 'copy' semantics.
        ///
        /// You can safely set the color attachment at any legal index to nil. This has the effect of resetting that attachment
        /// descriptor's state to its default values.
        ///
        /// - Parameters:
        /// - attachment: the descriptor of the attachment to set.
        /// - attachmentIndex: the index of the attachment within the array.
        #[unsafe(method(setObject:atIndexedSubscript:))]
        #[unsafe(method_family = none)]
        pub fn set_object_at_indexed_subscript(
            &self,
            attachment: Option<&MTL4RenderPipelineColorAttachmentDescriptor>,
            attachment_index: usize,
        );

        /// Resets the elements of the descriptor array
        #[unsafe(method(reset))]
        #[unsafe(method_family = none)]
        pub fn reset(&self);
    );
}

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

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

extern_class!(
    /// Allows you to specify additional binary functions to link to each stage of a render pipeline.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtl4renderpipelinebinaryfunctionsdescriptor?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MTL4RenderPipelineBinaryFunctionsDescriptor;
);

extern_conformance!(
    unsafe impl NSCopying for MTL4RenderPipelineBinaryFunctionsDescriptor {}
);

unsafe impl CopyingHelper for MTL4RenderPipelineBinaryFunctionsDescriptor {
    type Result = Self;
}

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

impl MTL4RenderPipelineBinaryFunctionsDescriptor {
    extern_methods!(
        /// Provides an array of binary functions representing additional binary vertex shader functions.
        #[unsafe(method(vertexAdditionalBinaryFunctions))]
        #[unsafe(method_family = none)]
        pub fn vertex_additional_binary_functions(
            &self,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;

        /// Setter for [`vertexAdditionalBinaryFunctions`][Self::vertexAdditionalBinaryFunctions].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVertexAdditionalBinaryFunctions:))]
        #[unsafe(method_family = none)]
        pub fn set_vertex_additional_binary_functions(
            &self,
            vertex_additional_binary_functions: Option<
                &NSArray<ProtocolObject<dyn MTL4BinaryFunction>>,
            >,
        );

        /// Provides an array of binary functions representing additional binary fragment shader functions.
        #[unsafe(method(fragmentAdditionalBinaryFunctions))]
        #[unsafe(method_family = none)]
        pub fn fragment_additional_binary_functions(
            &self,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;

        /// Setter for [`fragmentAdditionalBinaryFunctions`][Self::fragmentAdditionalBinaryFunctions].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFragmentAdditionalBinaryFunctions:))]
        #[unsafe(method_family = none)]
        pub fn set_fragment_additional_binary_functions(
            &self,
            fragment_additional_binary_functions: Option<
                &NSArray<ProtocolObject<dyn MTL4BinaryFunction>>,
            >,
        );

        /// Provides an array of binary functions representing additional binary tile shader functions.
        #[unsafe(method(tileAdditionalBinaryFunctions))]
        #[unsafe(method_family = none)]
        pub fn tile_additional_binary_functions(
            &self,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;

        /// Setter for [`tileAdditionalBinaryFunctions`][Self::tileAdditionalBinaryFunctions].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setTileAdditionalBinaryFunctions:))]
        #[unsafe(method_family = none)]
        pub fn set_tile_additional_binary_functions(
            &self,
            tile_additional_binary_functions: Option<
                &NSArray<ProtocolObject<dyn MTL4BinaryFunction>>,
            >,
        );

        /// Provides an array of binary functions representing additional binary object shader functions.
        #[unsafe(method(objectAdditionalBinaryFunctions))]
        #[unsafe(method_family = none)]
        pub fn object_additional_binary_functions(
            &self,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;

        /// Setter for [`objectAdditionalBinaryFunctions`][Self::objectAdditionalBinaryFunctions].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setObjectAdditionalBinaryFunctions:))]
        #[unsafe(method_family = none)]
        pub fn set_object_additional_binary_functions(
            &self,
            object_additional_binary_functions: Option<
                &NSArray<ProtocolObject<dyn MTL4BinaryFunction>>,
            >,
        );

        /// Provides an array of binary functions representing additional binary mesh shader functions.
        #[unsafe(method(meshAdditionalBinaryFunctions))]
        #[unsafe(method_family = none)]
        pub fn mesh_additional_binary_functions(
            &self,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn MTL4BinaryFunction>>>>;

        /// Setter for [`meshAdditionalBinaryFunctions`][Self::meshAdditionalBinaryFunctions].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMeshAdditionalBinaryFunctions:))]
        #[unsafe(method_family = none)]
        pub fn set_mesh_additional_binary_functions(
            &self,
            mesh_additional_binary_functions: Option<
                &NSArray<ProtocolObject<dyn MTL4BinaryFunction>>,
            >,
        );

        /// Resets this descriptor to its default state.
        #[unsafe(method(reset))]
        #[unsafe(method_family = none)]
        pub fn reset(&self);
    );
}

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

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

extern_class!(
    /// Groups together properties to create a render pipeline state object.
    ///
    /// Compared to ``MTLRenderPipelineDescriptor``, this interface doesn't offer a mechanism to hint to Metal mutability of
    /// vertex and fragment buffers. Additionally, using this descriptor, you don't specify binary archives.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtl4renderpipelinedescriptor?language=objc)
    #[unsafe(super(MTL4PipelineDescriptor, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MTL4RenderPipelineDescriptor;
);

extern_conformance!(
    unsafe impl NSCopying for MTL4RenderPipelineDescriptor {}
);

unsafe impl CopyingHelper for MTL4RenderPipelineDescriptor {
    type Result = Self;
}

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

impl MTL4RenderPipelineDescriptor {
    extern_methods!(
        /// Assigns the shader function that this pipeline executes for each vertex.
        #[unsafe(method(vertexFunctionDescriptor))]
        #[unsafe(method_family = none)]
        pub fn vertex_function_descriptor(&self)
        -> Option<Retained<MTL4FunctionDescriptor>>;

        /// Setter for [`vertexFunctionDescriptor`][Self::vertexFunctionDescriptor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVertexFunctionDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn set_vertex_function_descriptor(
            &self,
            vertex_function_descriptor: Option<&MTL4FunctionDescriptor>,
        );

        /// Assigns the shader function that this pipeline executes for each fragment.
        ///
        /// When you don't specify a fragment function, you need to disable rasterization by setting property
        /// ``rasterizationEnabled`` to false.
        #[unsafe(method(fragmentFunctionDescriptor))]
        #[unsafe(method_family = none)]
        pub fn fragment_function_descriptor(
            &self,
        ) -> Option<Retained<MTL4FunctionDescriptor>>;

        /// Setter for [`fragmentFunctionDescriptor`][Self::fragmentFunctionDescriptor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFragmentFunctionDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn set_fragment_function_descriptor(
            &self,
            fragment_function_descriptor: Option<&MTL4FunctionDescriptor>,
        );

        /// Configures an optional vertex descriptor for the vertex input.
        ///
        /// A vertex descriptor specifies the layout of your vertex data, allowing your vertex shaders to access the content
        /// in your vertex arrays via the `[[stage_in]]` attribute in Metal Shading Language.
        #[unsafe(method(vertexDescriptor))]
        #[unsafe(method_family = none)]
        pub fn vertex_descriptor(&self) -> Option<Retained<MTLVertexDescriptor>>;

        /// Setter for [`vertexDescriptor`][Self::vertexDescriptor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVertexDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn set_vertex_descriptor(&self, vertex_descriptor: Option<&MTLVertexDescriptor>);

        /// Controls the number of samples this pipeline applies for each fragment.
        #[unsafe(method(rasterSampleCount))]
        #[unsafe(method_family = none)]
        pub fn raster_sample_count(&self) -> usize;

        /// Setter for [`rasterSampleCount`][Self::rasterSampleCount].
        #[unsafe(method(setRasterSampleCount:))]
        #[unsafe(method_family = none)]
        pub fn set_raster_sample_count(&self, raster_sample_count: usize);

        /// Indicates whether to read and use the alpha channel fragment output of color attachments to compute a sample coverage mask.
        #[unsafe(method(alphaToCoverageState))]
        #[unsafe(method_family = none)]
        pub fn alpha_to_coverage_state(&self) -> MTL4AlphaToCoverageState;

        /// Setter for [`alphaToCoverageState`][Self::alphaToCoverageState].
        #[unsafe(method(setAlphaToCoverageState:))]
        #[unsafe(method_family = none)]
        pub fn set_alpha_to_coverage_state(
            &self,
            alpha_to_coverage_state: MTL4AlphaToCoverageState,
        );

        /// Indicates whether the pipeline forces alpha channel values of color attachments to the largest representable value.
        #[unsafe(method(alphaToOneState))]
        #[unsafe(method_family = none)]
        pub fn alpha_to_one_state(&self) -> MTL4AlphaToOneState;

        /// Setter for [`alphaToOneState`][Self::alphaToOneState].
        #[unsafe(method(setAlphaToOneState:))]
        #[unsafe(method_family = none)]
        pub fn set_alpha_to_one_state(&self, alpha_to_one_state: MTL4AlphaToOneState);

        /// Determines whether the pipeline rasterizes primitives.
        ///
        /// By default, this value is
        /// <doc
        /// ://com.apple.documentation/documentation/swift/true>, specifying that this pipeline
        /// rasterizes primitives. Set this property to
        /// <doc
        /// ://com.apple.documentation/documentation/swift/false> when you
        /// don't provide a fragment shader function via function ``fragmentFunctionDescriptor``.
        #[unsafe(method(isRasterizationEnabled))]
        #[unsafe(method_family = none)]
        pub fn is_rasterization_enabled(&self) -> bool;

        /// Setter for [`isRasterizationEnabled`][Self::isRasterizationEnabled].
        #[unsafe(method(setRasterizationEnabled:))]
        #[unsafe(method_family = none)]
        pub fn set_rasterization_enabled(&self, rasterization_enabled: bool);

        /// Determines the maximum value that can you can pass as the pipeline's amplification count.
        ///
        /// This property controls the maximum count you pass to ``MTL4RenderCommandEncoder/setVertexAmplificationCount:viewMappings:``
        /// when using vertex amplification with this pipeline.
        #[unsafe(method(maxVertexAmplificationCount))]
        #[unsafe(method_family = none)]
        pub fn max_vertex_amplification_count(&self) -> usize;

        /// Setter for [`maxVertexAmplificationCount`][Self::maxVertexAmplificationCount].
        #[unsafe(method(setMaxVertexAmplificationCount:))]
        #[unsafe(method_family = none)]
        pub fn set_max_vertex_amplification_count(
            &self,
            max_vertex_amplification_count: usize,
        );

        /// Accesses an array containing descriptions of the color attachments this pipeline writes to.
        #[unsafe(method(colorAttachments))]
        #[unsafe(method_family = none)]
        pub fn color_attachments(
            &self,
        ) -> Retained<MTL4RenderPipelineColorAttachmentDescriptorArray>;

        /// Assigns type of primitive topology this pipeline renders.
        #[unsafe(method(inputPrimitiveTopology))]
        #[unsafe(method_family = none)]
        pub fn input_primitive_topology(&self) -> MTLPrimitiveTopologyClass;

        /// Setter for [`inputPrimitiveTopology`][Self::inputPrimitiveTopology].
        #[unsafe(method(setInputPrimitiveTopology:))]
        #[unsafe(method_family = none)]
        pub fn set_input_primitive_topology(
            &self,
            input_primitive_topology: MTLPrimitiveTopologyClass,
        );

        /// Provides static linking information for the vertex stage of the render pipeline.
        ///
        /// Use this property to link extra shader functions to the vertex stage of the render pipeline.
        #[unsafe(method(vertexStaticLinkingDescriptor))]
        #[unsafe(method_family = none)]
        pub fn vertex_static_linking_descriptor(
            &self,
        ) -> Retained<MTL4StaticLinkingDescriptor>;

        /// Setter for [`vertexStaticLinkingDescriptor`][Self::vertexStaticLinkingDescriptor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVertexStaticLinkingDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn set_vertex_static_linking_descriptor(
            &self,
            vertex_static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
        );

        /// Provides static linking information for the fragment stage of the render pipeline.
        ///
        /// Use this property to link extra shader functions to the fragment stage of the render pipeline.
        #[unsafe(method(fragmentStaticLinkingDescriptor))]
        #[unsafe(method_family = none)]
        pub fn fragment_static_linking_descriptor(
            &self,
        ) -> Retained<MTL4StaticLinkingDescriptor>;

        /// Setter for [`fragmentStaticLinkingDescriptor`][Self::fragmentStaticLinkingDescriptor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFragmentStaticLinkingDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn set_fragment_static_linking_descriptor(
            &self,
            fragment_static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
        );

        /// Indicates whether you can use the render pipeline to create new pipelines by
        /// adding binary functions to the vertex shader function’s callable functions list.
        #[unsafe(method(supportVertexBinaryLinking))]
        #[unsafe(method_family = none)]
        pub fn support_vertex_binary_linking(&self) -> bool;

        /// Setter for [`supportVertexBinaryLinking`][Self::supportVertexBinaryLinking].
        #[unsafe(method(setSupportVertexBinaryLinking:))]
        #[unsafe(method_family = none)]
        pub fn set_support_vertex_binary_linking(&self, support_vertex_binary_linking: bool);

        /// Indicates whether you can use the pipeline to create new pipelines by
        /// adding binary functions to the fragment shader function’s callable functions list.
        #[unsafe(method(supportFragmentBinaryLinking))]
        #[unsafe(method_family = none)]
        pub fn support_fragment_binary_linking(&self) -> bool;

        /// Setter for [`supportFragmentBinaryLinking`][Self::supportFragmentBinaryLinking].
        #[unsafe(method(setSupportFragmentBinaryLinking:))]
        #[unsafe(method_family = none)]
        pub fn set_support_fragment_binary_linking(
            &self,
            support_fragment_binary_linking: bool,
        );

        /// Configures a logical-to-physical rendering remap state.
        ///
        /// Use this property to assign how a ``MTL4RenderCommandEncoder`` instance maps the output of your fragment shader to
        /// physical color attachments.
        #[unsafe(method(colorAttachmentMappingState))]
        #[unsafe(method_family = none)]
        pub fn color_attachment_mapping_state(
            &self,
        ) -> MTL4LogicalToPhysicalColorAttachmentMappingState;

        /// Setter for [`colorAttachmentMappingState`][Self::colorAttachmentMappingState].
        #[unsafe(method(setColorAttachmentMappingState:))]
        #[unsafe(method_family = none)]
        pub fn set_color_attachment_mapping_state(
            &self,
            color_attachment_mapping_state: MTL4LogicalToPhysicalColorAttachmentMappingState,
        );

        /// Indicates whether the pipeline supports indirect command buffers.
        #[unsafe(method(supportIndirectCommandBuffers))]
        #[unsafe(method_family = none)]
        pub fn support_indirect_command_buffers(
            &self,
        ) -> MTL4IndirectCommandBufferSupportState;

        /// Setter for [`supportIndirectCommandBuffers`][Self::supportIndirectCommandBuffers].
        #[unsafe(method(setSupportIndirectCommandBuffers:))]
        #[unsafe(method_family = none)]
        pub fn set_support_indirect_command_buffers(
            &self,
            support_indirect_command_buffers: MTL4IndirectCommandBufferSupportState,
        );

        /// Resets this descriptor to its default state.
        #[unsafe(method(reset))]
        #[unsafe(method_family = none)]
        pub fn reset(&self);
    );
}

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

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