Initial completion of scanning of qr code from gmail
This commit is contained in:
38
src/main/java/com/safeqr/app/gmail/model/EmailMessage.java
Normal file
38
src/main/java/com/safeqr/app/gmail/model/EmailMessage.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.safeqr.app.gmail.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class EmailMessage {
|
||||
private String messageId;
|
||||
private String subject;
|
||||
private String historyId;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
List<QRCodeByContentId> qrCodeByContentId;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
List<QRCodeByURL> qrCodeByURL;
|
||||
|
||||
public EmailMessage(String messageId, String subject, String historyId) {
|
||||
this.messageId = messageId;
|
||||
this.subject = subject;
|
||||
this.historyId = historyId;
|
||||
this.qrCodeByContentId = new ArrayList<>();
|
||||
this.qrCodeByURL = new ArrayList<>();
|
||||
}
|
||||
public void addQRCodeByContentId(QRCodeByContentId qrCode) {
|
||||
this.qrCodeByContentId.add(qrCode);
|
||||
}
|
||||
|
||||
public void addQRCodeByURL(QRCodeByURL qrCode) {
|
||||
this.qrCodeByURL.add(qrCode);
|
||||
}
|
||||
|
||||
public boolean hasQRCodes() {
|
||||
return !qrCodeByContentId.isEmpty() || !qrCodeByURL.isEmpty();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user