Class ErrorAttachmentLog
- java.lang.Object
-
- com.microsoft.appcenter.ingestion.models.AbstractLog
-
- com.microsoft.appcenter.crashes.ingestion.models.ErrorAttachmentLog
-
- All Implemented Interfaces:
com.microsoft.appcenter.ingestion.models.Log,com.microsoft.appcenter.ingestion.models.Model
public class ErrorAttachmentLog extends com.microsoft.appcenter.ingestion.models.AbstractLogError attachment log.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTENT_TYPE_TEXT_PLAINPlain text mime type.static java.lang.StringTYPE
-
Constructor Summary
Constructors Constructor Description ErrorAttachmentLog()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorAttachmentLogattachmentWithBinary(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 ErrorAttachmentLogattachmentWithText(java.lang.String text, java.lang.String fileName)Build an error attachment log with text suitable for using in {link CrashesListener#getErrorAttachments(ErrorReport)}.booleanequals(java.lang.Object o)java.lang.StringgetContentType()Get the contentType value.byte[]getData()Get the data value.java.util.UUIDgetErrorId()Get the errorId value.java.lang.StringgetFileName()Get the fileName value.java.util.UUIDgetId()Get the id value.java.lang.StringgetType()inthashCode()booleanisValid()Checks if the log's values are valid.voidread(org.json.JSONObject object)voidsetContentType(java.lang.String contentType)Set the contentType value.voidsetData(byte[] data)Set the data value.voidsetErrorId(java.util.UUID errorId)Set the errorId value.voidsetFileName(java.lang.String fileName)Set the fileName value.voidsetId(java.util.UUID id)Set the id value.voidwrite(org.json.JSONStringer writer)
-
-
-
Field Detail
-
CONTENT_TYPE_TEXT_PLAIN
public static final java.lang.String CONTENT_TYPE_TEXT_PLAIN
Plain text mime type.- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
attachmentWithText
public 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)}.- Parameters:
text- text to attach to attachment log.fileName- file name to use in error attachment log.- Returns:
- ErrorAttachmentLog built attachment.
-
attachmentWithBinary
public 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)}.- Parameters:
data- binary data.fileName- file name to use in error attachment log.contentType- binary data MIME type.- Returns:
- ErrorAttachmentLog built attachment.
-
getType
public java.lang.String getType()
-
getId
public java.util.UUID getId()
Get the id value.- Returns:
- the id value
-
setId
public void setId(java.util.UUID id)
Set the id value.- Parameters:
id- the id value to set
-
getErrorId
public java.util.UUID getErrorId()
Get the errorId value.- Returns:
- the errorId value
-
setErrorId
public void setErrorId(java.util.UUID errorId)
Set the errorId value.- Parameters:
errorId- the errorId value to set
-
getContentType
public java.lang.String getContentType()
Get the contentType value.- Returns:
- the contentType value
-
setContentType
public void setContentType(java.lang.String contentType)
Set the contentType value.- Parameters:
contentType- the contentType value to set
-
getFileName
public java.lang.String getFileName()
Get the fileName value.- Returns:
- the fileName value
-
setFileName
public void setFileName(java.lang.String fileName)
Set the fileName value.- Parameters:
fileName- the fileName value to set
-
getData
public byte[] getData()
Get the data value.- Returns:
- the data value
-
setData
public void setData(byte[] data)
Set the data value.- Parameters:
data- the data value to set
-
isValid
public boolean isValid()
Checks if the log's values are valid.- Returns:
- true if validation succeeded, otherwise false.
-
read
public void read(org.json.JSONObject object) throws org.json.JSONException- Specified by:
readin interfacecom.microsoft.appcenter.ingestion.models.Model- Overrides:
readin classcom.microsoft.appcenter.ingestion.models.AbstractLog- Throws:
org.json.JSONException
-
write
public void write(org.json.JSONStringer writer) throws org.json.JSONException- Specified by:
writein interfacecom.microsoft.appcenter.ingestion.models.Model- Overrides:
writein classcom.microsoft.appcenter.ingestion.models.AbstractLog- Throws:
org.json.JSONException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classcom.microsoft.appcenter.ingestion.models.AbstractLog
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.microsoft.appcenter.ingestion.models.AbstractLog
-
-