objc2_intents/generated/
INMessageLinkMetadata.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inmessagelinkmetadata?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct INMessageLinkMetadata;
15);
16
17extern_conformance!(
18    unsafe impl NSCoding for INMessageLinkMetadata {}
19);
20
21extern_conformance!(
22    unsafe impl NSCopying for INMessageLinkMetadata {}
23);
24
25unsafe impl CopyingHelper for INMessageLinkMetadata {
26    type Result = Self;
27}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for INMessageLinkMetadata {}
31);
32
33extern_conformance!(
34    unsafe impl NSSecureCoding for INMessageLinkMetadata {}
35);
36
37impl INMessageLinkMetadata {
38    extern_methods!(
39        #[unsafe(method(initWithSiteName:summary:title:openGraphType:linkURL:))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn initWithSiteName_summary_title_openGraphType_linkURL(
42            this: Allocated<Self>,
43            site_name: Option<&NSString>,
44            summary: Option<&NSString>,
45            title: Option<&NSString>,
46            open_graph_type: Option<&NSString>,
47            link_url: Option<&NSURL>,
48        ) -> Retained<Self>;
49
50        #[unsafe(method(siteName))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn siteName(&self) -> Option<Retained<NSString>>;
53
54        /// Setter for [`siteName`][Self::siteName].
55        ///
56        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
57        #[unsafe(method(setSiteName:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setSiteName(&self, site_name: Option<&NSString>);
60
61        #[unsafe(method(summary))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn summary(&self) -> Option<Retained<NSString>>;
64
65        /// Setter for [`summary`][Self::summary].
66        ///
67        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
68        #[unsafe(method(setSummary:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setSummary(&self, summary: Option<&NSString>);
71
72        #[unsafe(method(title))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
75
76        /// Setter for [`title`][Self::title].
77        ///
78        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
79        #[unsafe(method(setTitle:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn setTitle(&self, title: Option<&NSString>);
82
83        #[unsafe(method(openGraphType))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn openGraphType(&self) -> Option<Retained<NSString>>;
86
87        /// Setter for [`openGraphType`][Self::openGraphType].
88        ///
89        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
90        #[unsafe(method(setOpenGraphType:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setOpenGraphType(&self, open_graph_type: Option<&NSString>);
93
94        #[unsafe(method(linkURL))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn linkURL(&self) -> Option<Retained<NSURL>>;
97
98        /// Setter for [`linkURL`][Self::linkURL].
99        ///
100        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
101        #[unsafe(method(setLinkURL:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn setLinkURL(&self, link_url: Option<&NSURL>);
104    );
105}
106
107/// Methods declared on superclass `NSObject`.
108impl INMessageLinkMetadata {
109    extern_methods!(
110        #[unsafe(method(init))]
111        #[unsafe(method_family = init)]
112        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114        #[unsafe(method(new))]
115        #[unsafe(method_family = new)]
116        pub unsafe fn new() -> Retained<Self>;
117    );
118}