RGLDocumentReaderResults

Objective-C

@interface RGLDocumentReaderResults : NSObject

/// Document type results
@property(nonatomic, strong, readonly, nullable) NSArray <RGLDocumentReaderDocumentType *> *documentType;

/// Textual results
@property(nonatomic, strong, readonly, nonnull) RGLDocumentReaderTextResult *textResult;

/// Graphic results
@property(nonatomic, strong, readonly, nonnull) RGLDocumentReaderGraphicResult *graphicResult;

/// Position of a document
@property(nonatomic, strong, readonly, nullable) NSArray <RGLDocumentPosition *> *documentPosition;

/// Position of a barcode
@property(nonatomic, strong, readonly, nullable) NSArray <RGLBarcodePosition *> *barcodePosition;

/// Position of MRZ
@property(nonatomic, strong, readonly, nullable) NSArray <RGLMrzPosition *> *mrzPosition;

/// Image quality results
@property(nonatomic, strong, readonly, nullable) NSArray <RGLImageQualityGroup *> *imageQualityGroup;

/// Status information for each operation.
@property(nonatomic, strong, readonly, nonnull) RGLDocumentReaderResultsStatus *status;

/// Authenticity results
@property(nonatomic, strong, readonly, nullable) RGLDocumentReaderAuthenticityResult *authenticityResults;

/// RFID session data
@property(nonatomic, strong, readonly, nullable) RGLRFIDSessionData *rfidSessionData;

/// Indicates which page of the document contains an RFID chip (0 if there's no page containing it).
/// Requires document type recognition, otherwise 1 by default
@property(nonatomic, assign, readonly) NSInteger chipPage;

/// Barcode results
@property(nonatomic, strong, readonly, nonnull) RGLDocumentReaderBarcodeResult *barcodeResult;

/// Visible Digital Seal data.
@property(nonatomic, strong, readonly, nullable) RGLVDSNCData *vdsncData;

/// Document processing finish status, one of RGLProcessingFinishedStatus values
@property(nonatomic, assign, readonly) RGLProcessingFinishedStatus processingFinishedStatus;

/// Indicates how many pages of a document remains to process. Requires Document Type recognition, otherwise 0 by default
@property(nonatomic, assign, readonly) NSInteger morePagesAvailable;

/// Indicates how much time has been required for document processing, milliseconds
@property(nonatomic, assign, readonly) NSInteger elapsedTime;

/// Indicates how much time has been required for RFID chip processing, milliseconds
@property(nonatomic, assign, readonly) NSInteger elapsedTimeRFID;

/// Raw results, i.e. in their initial view
@property(nonatomic, strong, readonly, nonnull) NSString *rawResult;

@property(nonatomic, strong, readonly, nullable) RGLTransactionInfo *transactionInfo;

- (nonnull instancetype)initWithDocumentTypes:(nullable NSArray<RGLDocumentReaderDocumentType *> *)documentType
                                   textResult:(nullable RGLDocumentReaderTextResult *)textResult
                                graphicResult:(nonnull RGLDocumentReaderGraphicResult *)graphicResult
                                    rawResult:(nullable NSString *)rawResult
                             documentPosition:(nullable NSArray<RGLDocumentPosition *> *)documentPosition
                              barcodePosition:(nullable NSArray<RGLBarcodePosition *> *)barcodePosition
                                  mrzPosition:(nullable NSArray<RGLMrzPosition *> *)mrzPosition
                            imageQualityGroup:(nullable NSArray<RGLImageQualityGroup *> *)imageQualityGroup
                          authenticityResults:(nullable RGLDocumentReaderAuthenticityResult *)authenticityResults
                              rfidSessionData:(nullable RGLRFIDSessionData *)rfidSessionData
                                     chipPage:(NSInteger)chipPage
                                barcodeResult:(nullable RGLDocumentReaderBarcodeResult *)barcodeResult
                                    vdsncData:(nullable RGLVDSNCData *)vdsncData
                                       status:(nonnull RGLDocumentReaderResultsStatus *)status
                           processingFinished:(NSInteger)processingFinished
                           morePagesAvailable:(NSInteger)morePagesAvailable
                                  elapsedTime:(NSInteger)elapsedTime
                              elapsedTimeRFID:(NSInteger)elapsedTimeRFID
                              transactionInfo:(nullable RGLTransactionInfo *)transactionInfo;
- (instancetype _Nonnull)initWithJSON:(NSDictionary *_Nonnull)json;
- (instancetype _Nonnull)initWithRawJSON:(NSString *_Nonnull)rawString;
- (nonnull NSDictionary *)jsonDictionary;
- (BOOL)isResultsEmpty;

/**
 Allows you to get a value of a text field based on LCID, a source type and its originality
 @param fieldType Field type, one of RGLFieldType values
 @param lcid LCID, one of RGLLCID values
 @param source Source type, one of RGLResultType values
 @param original Originality
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType lcid:(RGLLCID)lcid source:(RGLResultType)source original:(BOOL)original NS_SWIFT_NAME(getTextFieldValueByType(fieldType:lcid:source:original:));
/**
 Allows you to get a value of a text field based on LCID and a source type
 @param fieldType Field type, one of RGLFieldType values
 @param lcid LCID, one of RGLLCID values
 @param source Source type, one of RGLResultType values
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType lcid:(RGLLCID)lcid source:(RGLResultType)source NS_SWIFT_NAME(getTextFieldValueByType(fieldType:lcid:source:));
/**
 Allows you to get a value of a text field based on LCID
 @param fieldType Field type, one of RGLFieldType values
 @param lcid LCID, one of RGLLCID values
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType lcid:(RGLLCID)lcid NS_SWIFT_NAME(getTextFieldValueByType(fieldType:lcid:));
/**
 Allows you to get a value of a text field
 @param fieldType Field type, one of RGLFieldType values
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType NS_SWIFT_NAME(getTextFieldValueByType(fieldType:));
/**
 Allows you to get a value of a text field based on a source type
 @param fieldType Field type, one of RGLFieldType values
 @param source Source type, one of RGLResultType values
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType source:(RGLResultType)source NS_SWIFT_NAME(getTextFieldValueByType(fieldType:source:));
/**
 Allows you to get a value of a text field based on a source type and its originality
 @param fieldType Field type, one of RGLFieldType values
 @param source Source type, one of RGLResultType values
 @param original Originality
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType source:(RGLResultType)source original:(BOOL)original NS_SWIFT_NAME(getTextFieldValueByType(fieldType:source:original:));
/**
 Allows you to get a value of a text field based on its originality
 @param fieldType Field type, one of RGLFieldType values
 @param original Originality
 */
- (NSString *_Nullable)getTextFieldValueByType:(RGLFieldType)fieldType original:(BOOL)original NS_SWIFT_NAME(getTextFieldValueByType(fieldType:original:));
/**
 Allows you to get an instance of a text field
 @param fieldType Field type, one of RGLFieldType values
 */
- (RGLDocumentReaderTextField *_Nullable)getTextFieldByType:(RGLFieldType)fieldType NS_SWIFT_NAME(getTextFieldByType(fieldType:));
/**
 Allows you to get an instance of a text field based on LCID
 @param fieldType Field type, one of RGLFieldType values
 @param lcid LCID, one of RGLLCID values
 */
- (RGLDocumentReaderTextField *_Nullable)getTextFieldByType:(RGLFieldType)fieldType lcid:(RGLLCID)lcid NS_SWIFT_NAME(getTextFieldByType(fieldType:lcid:));

/**
 Allows you to get an image of a graphic field based on a source type, page index and light type
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 @param pageIndex An index of the document page
 @param light Light type, one of RGLGraphicFieldLight values
 */
- (UIImage *_Nullable)getGraphicFieldImageByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source pageIndex:(NSInteger)pageIndex light:(RGLGraphicFieldLight)light NS_SWIFT_NAME(getGraphicFieldImageByType(fieldType:source:pageIndex:light:));
/**
 Allows you to get an image of a graphic field based on a source type and page index
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 @param pageIndex An index of the document page
 */
- (UIImage *_Nullable)getGraphicFieldImageByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source pageIndex:(NSInteger)pageIndex NS_SWIFT_NAME(getGraphicFieldImageByType(fieldType:source:pageIndex:));
/**
 Allows you to get an image of a graphic field based on a source type and page index
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 */
- (UIImage *_Nullable)getGraphicFieldImageByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source NS_SWIFT_NAME(getGraphicFieldImageByType(fieldType:source:));
/**
 Allows you to get an image of a graphic field
 @param fieldType Field type, one of RGLGraphicFieldType values
 */
- (UIImage *_Nullable)getGraphicFieldImageByType:(RGLGraphicFieldType)fieldType NS_SWIFT_NAME(getGraphicFieldImageByType(fieldType:));
/**
 Allows you to get an instance of a graphic field based on a source type, page index and light type
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 @param pageIndex An index of the document page
 @param light Light type, one of RGLGraphicFieldLight values
 */
- (RGLDocumentReaderGraphicField *_Nullable)getGraphicFieldByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source pageIndex:(NSInteger)pageIndex light:(RGLGraphicFieldLight)light NS_SWIFT_NAME(getGraphicFieldByType(fieldType:source:pageIndex:light:));
/**
 Allows you to get an instance of a graphic field based on a source type and page index
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 @param pageIndex An index of the document page
 */
- (RGLDocumentReaderGraphicField *_Nullable)getGraphicFieldByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source pageIndex:(NSInteger)pageIndex NS_SWIFT_NAME(getGraphicFieldByType(fieldType:source:pageIndex:));
/**
 Allows you to get an instance of a graphic field based on a source type
 @param fieldType Field type, one of RGLGraphicFieldType values
 @param source Source type, one of RGLResultType values
 */
- (RGLDocumentReaderGraphicField *_Nullable)getGraphicFieldByType:(RGLGraphicFieldType)fieldType source:(RGLResultType)source NS_SWIFT_NAME(getGraphicFieldByType(fieldType:source:));
/**
 Allows you to get an instance of a graphic field
 @param fieldType Field type, one of RGLGraphicFieldType values
 */
- (RGLDocumentReaderGraphicField *_Nullable)getGraphicFieldByType:(RGLGraphicFieldType)fieldType NS_SWIFT_NAME(getGraphicFieldByType(fieldType:));
/**
 Method returns containers by result type. If result type doesn't exist, the result of the search will be null.
 @param resultTypes array of result type specified in  `RGLResultType` raw values.
 @return get original containers from rawResult value in NSString format including information about the transaction.
 */
- (NSString *_Nullable)getContainersByResultTypes:(NSArray<NSNumber *> *_Nonnull)resultTypes NS_SWIFT_NAME(getContainers(byResultTypes:));
/**
 Method returns only containers for `RGLResultTypeRFIDSession`, `RGLResultTypeEncryptedRCL` and `RGLResultTypeLicense` values
 from `RGLResultType` enum. For more details, see `getContainersByResultTypes` method.
 @return Get all encrypted containers from rawResult to reprocess data on the server side.
 */
- (NSString *_Nullable)getEncryptedContainers NS_SWIFT_NAME(getEncryptedContainers());

+ (nonnull instancetype)initWithJSON:(nonnull NSDictionary *)json;
+ (nonnull instancetype)initWithRawString:(nonnull NSString *)rawString;

@end

Swift

class DocumentReaderResults : NSObject

Undocumented