public class ErrorAttachmentLog
extends com.microsoft.appcenter.ingestion.models.AbstractLog
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONTENT_TYPE_TEXT_PLAIN
Plain text mime type.
|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
ErrorAttachmentLog() |
| Modifier and Type | Method and Description |
|---|---|
static ErrorAttachmentLog |
attachmentWithBinary(byte[] data,
java.lang.String fileName,
java.lang.String contentType)
Build an error attachment log with binary suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
|
static ErrorAttachmentLog |
attachmentWithText(java.lang.String text,
java.lang.String fileName)
Build an error attachment log with text suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getContentType()
Get the contentType value.
|
byte[] |
getData()
Get the data value.
|
java.util.UUID |
getErrorId()
Get the errorId value.
|
java.lang.String |
getFileName()
Get the fileName value.
|
java.util.UUID |
getId()
Get the id value.
|
java.lang.String |
getType() |
int |
hashCode() |
boolean |
isValid()
Checks if the log's values are valid.
|
void |
read(org.json.JSONObject object) |
void |
setContentType(java.lang.String contentType)
Set the contentType value.
|
void |
setData(byte[] data)
Set the data value.
|
void |
setErrorId(java.util.UUID errorId)
Set the errorId value.
|
void |
setFileName(java.lang.String fileName)
Set the fileName value.
|
void |
setId(java.util.UUID id)
Set the id value.
|
void |
write(org.json.JSONStringer writer) |
public static final java.lang.String CONTENT_TYPE_TEXT_PLAIN
public static final java.lang.String TYPE
public static ErrorAttachmentLog attachmentWithText(java.lang.String text, java.lang.String fileName)
text - text to attach to attachment log.fileName - file name to use in error attachment log.public static ErrorAttachmentLog attachmentWithBinary(byte[] data, java.lang.String fileName, java.lang.String contentType)
data - binary data.fileName - file name to use in error attachment log.contentType - binary data MIME type.public java.lang.String getType()
public java.util.UUID getId()
public void setId(java.util.UUID id)
id - the id value to setpublic java.util.UUID getErrorId()
public void setErrorId(java.util.UUID errorId)
errorId - the errorId value to setpublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - the contentType value to setpublic java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
fileName - the fileName value to setpublic byte[] getData()
public void setData(byte[] data)
data - the data value to setpublic boolean isValid()
public void read(org.json.JSONObject object)
throws org.json.JSONException
read in interface com.microsoft.appcenter.ingestion.models.Modelread in class com.microsoft.appcenter.ingestion.models.AbstractLogorg.json.JSONExceptionpublic void write(org.json.JSONStringer writer)
throws org.json.JSONException
write in interface com.microsoft.appcenter.ingestion.models.Modelwrite in class com.microsoft.appcenter.ingestion.models.AbstractLogorg.json.JSONExceptionpublic boolean equals(java.lang.Object o)
equals in class com.microsoft.appcenter.ingestion.models.AbstractLogpublic int hashCode()
hashCode in class com.microsoft.appcenter.ingestion.models.AbstractLog