sensitivity.io for iOS & macOS  1.1.4
Instance Methods | Class Methods | List of all members
ThreatInfo Class Reference

#import <ThreatInfo.h>

Inheritance diagram for ThreatInfo:

Instance Methods

(instancetype _Nullable) - initWithError:
 
(BOOL) - setTypeId:withError:
 
(BOOL) - setMatchedText:withError:
 
(BOOL) - setThreatDescription:withError:
 
(BOOL) - setlocation:withError:
 
(BOOL) - typeId:withError:
 
(NSString *_Nullable) - typeNameWithError:
 
(NSString *_Nullable) - matchedTextWithError:
 
(NSString *_Nullable) - maskedMatchedTextWithError:
 
(NSString *_Nullable) - threatDescriptionWithError:
 
(ThreatLocation *_Nullable) - locationWithError:
 
(NSString *_Nonnull) - description
 

Class Methods

(NSString *_Nonnull) + typeNameForThreatTypeId:
 
(NSString *_Nonnull) + maskMatchedText:forThreatTypeId:
 

Detailed Description

The ThreatInfo class contains the information about a found threat using the sensitivity.io scanner module

Method Documentation

◆ description()

- (NSString* _Nonnull) description

Returns threat info description

Returns
The threat info description

◆ initWithError:()

- (instancetype _Nullable) initWithError: (NSError *_Nullable *_Nullable)  error

Initializes a new object immediately after memory for it has been allocated

Note
The designated initializer
Parameters
errorThe error representing the reason for the failure
Returns
The initialized object

◆ locationWithError:()

- (ThreatLocation* _Nullable) locationWithError: (NSError *_Nullable *_Nullable)  error

Get threat location

Parameters
errorThe error representing the reason for the failure
Returns
The location of the threat

◆ maskedMatchedTextWithError:()

- (NSString* _Nullable) maskedMatchedTextWithError: (NSError *_Nullable *_Nullable)  error

Get threat masked matched text

Parameters
errorThe error representing the reason for the failure
Returns
The masked matched text of the threat

◆ maskMatchedText:forThreatTypeId:()

+ (NSString* _Nonnull) maskMatchedText: (NSString *_Nonnull)  matchedText
forThreatTypeId: (sensitivityio_sds_threat_type_id_t)  threatTypeId 

Returns the masked matched text using the provided threat type ID

Parameters
matchedTextThe matched text that needs to be masked
threatTypeIdThe threat type ID that will be used to perform the masking
Returns
The masked matched text

◆ matchedTextWithError:()

- (NSString* _Nullable) matchedTextWithError: (NSError *_Nullable *_Nullable)  error

Get threat matched text

Parameters
errorThe error representing the reason for the failure
Returns
The matched text of the threat

◆ setlocation:withError:()

- (BOOL) setlocation: (ThreatLocation *_Nonnull)  location
withError: (NSError *_Nullable *_Nullable)  error 

Set threat location

Parameters
locationThe new threat location
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setMatchedText:withError:()

- (BOOL) setMatchedText: (NSString *_Nonnull)  matchedText
withError: (NSError *_Nullable *_Nullable)  error 

Set threat matched text

Parameters
matchedTextThe new threat matched text
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setThreatDescription:withError:()

- (BOOL) setThreatDescription: (NSString *_Nonnull)  threatDescription
withError: (NSError *_Nullable *_Nullable)  error 

Set threat description

Parameters
threatDescriptionThe new threat description
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setTypeId:withError:()

- (BOOL) setTypeId: (sensitivityio_sds_threat_type_id_t)  typeId
withError: (NSError *_Nullable *_Nullable)  error 

Set threat type ID

Parameters
typeIdThe new threat type ID
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ threatDescriptionWithError:()

- (NSString* _Nullable) threatDescriptionWithError: (NSError *_Nullable *_Nullable)  error

Get threat description

Parameters
errorThe error representing the reason for the failure
Returns
The description of the threat

◆ typeId:withError:()

- (BOOL) typeId: (sensitivityio_sds_threat_type_id_t *_Nonnull)  typeId
withError: (NSError *_Nullable *_Nullable)  error 

Get threat type ID

Parameters
typeIdWill be set to threat type ID on success
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ typeNameForThreatTypeId:()

+ (NSString* _Nonnull) typeNameForThreatTypeId: (sensitivityio_sds_threat_type_id_t)  threatTypeId

Returns threat type name using the provided threat type ID

Parameters
threatTypeIdThe threat type ID
Returns
The threat type name

◆ typeNameWithError:()

- (NSString* _Nullable) typeNameWithError: (NSError *_Nullable *_Nullable)  error

Get threat type name

Parameters
errorThe error representing the reason for the failure
Returns
The type name of the threat

The documentation for this class was generated from the following file: