objc2_metric_kit/generated/
MXDiagnostic.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An abstract class that describes a diagnostic report vended by MetricKit.
11    ///
12    /// All supported diagnostics are subclasses of MXDiagnostic.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxdiagnostic?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct MXDiagnostic;
18);
19
20unsafe impl NSCoding for MXDiagnostic {}
21
22unsafe impl NSObjectProtocol for MXDiagnostic {}
23
24unsafe impl NSSecureCoding for MXDiagnostic {}
25
26impl MXDiagnostic {
27    extern_methods!(
28        #[cfg(feature = "MXMetaData")]
29        #[unsafe(method(metaData))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn metaData(&self) -> Retained<MXMetaData>;
32
33        /// An NSString representation of the application version from which this diagnostic was generated.
34        #[unsafe(method(applicationVersion))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn applicationVersion(&self) -> Retained<NSString>;
37
38        #[cfg(feature = "MXSignpostRecord")]
39        /// An NSArray representing the list of signpost records.
40        #[unsafe(method(signpostData))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn signpostData(&self) -> Option<Retained<NSArray<MXSignpostRecord>>>;
43
44        /// Convenience method to return a JSON representation of this diagnostic.
45        ///
46        /// Returns: An NSData object containing the JSON representation
47        #[unsafe(method(JSONRepresentation))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
50
51        /// Convenience method to return a NSDictionary representation of this diagnostic.
52        ///
53        /// Returns: An NSDictionary object containing the dictionary representation
54        #[unsafe(method(dictionaryRepresentation))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61impl MXDiagnostic {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}