blob: 20dd2836a21e21e53b1a5c4b83f9fa6791f71d29 [file] [log] [blame]
{{> header excludeZapComment=true}}
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
{{#zcl_clusters}}
{{#zcl_structs}}
{{#*inline "interfaceDecl"}}
{{! Override the getter name because some of our properties start with things
like "new" or "init" }}
{{#zcl_struct_items}}
@property (nonatomic, copy{{#unless (isStrEqual (asGetterName label) (asStructPropertyName label))}}, getter={{asGetterName label}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName label}};
{{/zcl_struct_items}}
- (instancetype)init;
- (id)copyWithZone:(NSZone * _Nullable)zone;
{{/inline}}
{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }}
{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}
{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}}
API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
{{/if}}
{{else if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}
MTR_NEWLY_AVAILABLE
{{/if}}
@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}} : NSObject <NSCopying>
{{> interfaceDecl}}
@end
{{!Backwards compat for now: Add a DeviceType thing that is API-compatible with DeviceTypeStruct. }}
{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}
{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeStruct")}}
@interface MTRDescriptorClusterDeviceType : NSObject <NSCopying>
{{> interfaceDecl}}
@end
{{/if}}
{{else if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}
MTR_NEWLY_DEPRECATED("Please use MTRUnitTestingCluster{{asUpperCamelCase name}}")
@interface MTRTestClusterCluster{{asUpperCamelCase name}} : MTRUnitTestingCluster{{asUpperCamelCase name}}
@end
{{/if}}
{{/zcl_structs}}
{{#zcl_events}}
{{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}
MTR_NEWLY_AVAILABLE
{{/if}}
@interface MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Event : NSObject <NSCopying>
{{#zcl_event_fields}}
@property (nonatomic, copy{{#unless (isStrEqual (asGetterName name) (asStructPropertyName name))}}, getter={{asGetterName name}}{{/unless}}) {{asObjectiveCType type parent.parent.name}} {{asStructPropertyName name}};
{{/zcl_event_fields}}
- (instancetype)init;
- (id)copyWithZone:(NSZone * _Nullable)zone;
@end
{{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}
MTR_NEWLY_DEPRECATED("Please use MTRUnitTestingCluster{{asUpperCamelCase name}}Event")
@interface MTRTestClusterCluster{{asUpperCamelCase name}}Event : MTRUnitTestingCluster{{asUpperCamelCase name}}Event
@end
{{/if}}
{{/zcl_events}}
{{/zcl_clusters}}
NS_ASSUME_NONNULL_END