// Generated by json_to_model

@import Foundation;


#import "JDJSONModel.h"
#import "ItemModel.h"

#define ksDeviceTypeControllerPrimary @"CONTROLLER_PRIMARY"
#define ksDeviceTypeSlave @"SLAVE"

#define ksDeviceProfileIdUnknown @"20001"

@protocol CmdClsValueModel;
@protocol DeviceModel;
@interface DeviceModel : ItemSubModel

@property (copy, nonatomic) NSString *deviceId;
@property (copy, nonatomic) NSString *deviceName;
@property (copy, nonatomic) NSString *deviceProfileId;
@property (copy, nonatomic) NSString *profileName;
//@property (copy, nonatomic) NSString *imageFileName;
@property (copy, nonatomic) NSString *nodeId;
@property (copy, nonatomic) NSString *nodeName;
@property (copy, nonatomic) NSString *groupName;

@property (copy, nonatomic) NSString *createDatetime;
@property (copy, nonatomic) NSString *updateDatetime;

@property (copy, nonatomic) NSString *cmdclsCount;
@property (copy, nonatomic) NSString *contentValue;
@property (copy, nonatomic) NSString *contentValueMsg;
@property (copy, nonatomic) NSString *networkYn;
@property (copy, nonatomic) NSString *deviceType;
@property (copy, nonatomic) NSString *collectTime;


//detail
@property (copy, nonatomic) NSString *prdName;
@property (copy, nonatomic) NSString *deviceModelId;
@property (copy, nonatomic) NSString *deviceMfId;
@property (copy, nonatomic) NSString *firmwareVersion;
@property (copy, nonatomic) NSString *deviceProtocolType;   //연결타입
@property (copy, nonatomic) NSString *removableYn;          //장치삭제 가능 여부
@property (copy, nonatomic) NSString *activationCode;       //장치 인증 코드



//camera
@property (copy, nonatomic) NSString *ip;
@property (copy, nonatomic) NSString *port;
@property (copy, nonatomic) NSString *cameraId;
@property (copy, nonatomic) NSString *cameraPassword;

//Command
@property (copy, nonatomic) NSString *commandId;
@property (copy, nonatomic) NSString *requestTime;

//Local temporary
@property (assign, nonatomic) BOOL enable;
@property (assign, nonatomic) BOOL isRequesting;


- (UIImage *)backgroundImageForMandatary:(NSString *)value;
- (UIImage *)imageForMandataryForState:(UIControlState)state;
- (NSString *)conditionForMandatary;

- (instancetype)initWithSubItem:(ItemSubModel *)subItem;
+ (NSString *)contentValueMsgByCmdClsCode:(NSString *)cmdclsCode cmdclsTypeId:(NSString *)cmdclsTypeId contentValue:(NSString *)contentValue;

@end

@interface DeviceListModel : JDJSONModel
@property (copy, nonatomic) NSMutableArray<DeviceModel> *list;
@end

@protocol NodeModel;
@interface NodeModel : DeviceModel

@property (copy, nonatomic) NSString *cmdclsMandatoryYn;
@property (weak, nonatomic) DeviceModel *refDevice;
@property (assign, nonatomic, readonly) BOOL isDeviceOnline;

//@property (copy, nonatomic) NSString *deviceId;
//@property (copy, nonatomic) NSString *nodeId;
//@property (copy, nonatomic) NSString *nodeName;
//@property (copy, nonatomic) NSString *cmdclsTypeId;
//@property (copy, nonatomic) NSString *cmdclsTypeName;
//@property (copy, nonatomic) NSString *cmdclsTypeSystemName;
//@property (copy, nonatomic) NSString *createDatetime;
//@property (copy, nonatomic) NSString *cmdclsCode;
//
//@property (assign, nonatomic) CmdClsType cmdclsType;

@end

@interface DeviceDetailModel : DeviceModel

@property (copy, nonatomic) NSArray<NodeModel> *nodes;
@property (copy, nonatomic) NSArray<DeviceModel> *relateDevice;

@end


@protocol ItemModel;
@protocol PredefinedDeviceModel;
@interface PredefinedDeviceModel : DeviceModel

- (instancetype)initWithSubItem:(ItemSubModel *)subItem;
@end

@interface PredefinedDeviceListModel : JDJSONModel

@property (strong, nonatomic) NSArray<PredefinedDeviceModel> *list;

@end



@protocol DeviceIconModel;
@interface DeviceIconModel : JDJSONModel

@property (copy, nonatomic) NSString *imageSequence;
@property (copy, nonatomic) NSString *imageFileName;

@end

@interface DeviceIconListModel : JDJSONModel

@property (copy, nonatomic) NSArray<DeviceIconModel> *list;

@end
