sensitivity.io for iOS & macOS  1.1.4
ThreatInfo.h
1 //
2 // ThreatInfo.h
3 //
4 // Created by Andreea ERDELYI <andreea.erdelyi@cososys.com>
5 //
6 // Copyright (C) 2017 CoSoSys Ltd team@sensitivity.io
7 // CoSoSys Ltd. All rights reserved.
8 // Please see the COPYING for more details.
9 //
10 
11 #import <Foundation/Foundation.h>
12 #import <sensitivityio/c_sds/sds_threat_type.h>
13 
14 @class ThreatLocation;
15 
16 // MARK: - ThreatInfo
20 @interface ThreatInfo : NSObject
21 
22 - (instancetype _Null_unspecified) init NS_UNAVAILABLE;
23 + (instancetype _Null_unspecified) new NS_UNAVAILABLE;
24 - (instancetype _Null_unspecified) copy NS_UNAVAILABLE;
33 - (instancetype _Nullable) initWithError:(NSError * _Nullable * _Nullable)error NS_DESIGNATED_INITIALIZER NS_SWIFT_NAME(init());
34 
35 // MARK: - setters
36 
44 - (BOOL) setTypeId:(sensitivityio_sds_threat_type_id_t)typeId withError:(NSError * _Nullable * _Nullable)error;
52 - (BOOL) setMatchedText:(NSString* _Nonnull)matchedText withError:(NSError * _Nullable * _Nullable)error;
60 - (BOOL) setThreatDescription:(NSString* _Nonnull)threatDescription withError:(NSError * _Nullable * _Nullable)error;
68 - (BOOL) setlocation:(ThreatLocation* _Nonnull)location withError:(NSError * _Nullable * _Nullable)error;
69 
70 // MARK: - getters
71 
79 - (BOOL) typeId:(sensitivityio_sds_threat_type_id_t* _Nonnull)typeId withError:(NSError * _Nullable * _Nullable)error;
86 - (NSString* _Nullable) typeNameWithError:(NSError * _Nullable * _Nullable)error;
93 - (NSString* _Nullable) matchedTextWithError:(NSError * _Nullable * _Nullable)error;
100 - (NSString* _Nullable) maskedMatchedTextWithError:(NSError * _Nullable * _Nullable)error;
107 - (NSString* _Nullable) threatDescriptionWithError:(NSError * _Nullable * _Nullable)error;
114 - (ThreatLocation* _Nullable) locationWithError:(NSError * _Nullable * _Nullable)error;
115 
116 // MARK: - description
117 
123 - (NSString* _Nonnull) description;
124 
125 // MARK: - class methods
126 
133 + (NSString* _Nonnull) typeNameForThreatTypeId:(sensitivityio_sds_threat_type_id_t)threatTypeId NS_SWIFT_NAME(typeName(threatTypeId:));
134 
142 + (NSString* _Nonnull) maskMatchedText:(NSString* _Nonnull)matchedText forThreatTypeId:(sensitivityio_sds_threat_type_id_t)threatTypeId NS_SWIFT_NAME(mask(matchedText:threatTypeId:));
143 
144 @end
Definition: ThreatLocation.h:16
Definition: ThreatInfo.h:20
NSString *_Nonnull description()