Package com.ibm.cloud.cloudant.v1.model
Class Attachment
java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.cloud.cloudant.v1.model.Attachment
- All Implemented Interfaces:
 ObjectModel
Schema for an attachment.
- 
Nested Class Summary
Nested Classes - 
Method Summary
Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString 
- 
Method Details
- 
newBuilder
New builder.- Returns:
 - a Attachment builder
 
 - 
contentType
Gets the contentType. Attachment MIME type.- Returns:
 - the contentType
 
 - 
data
public byte[] data()Gets the data. Base64-encoded content. Available if attachment content is requested by using the query parameters `attachments=true` or `atts_since`. Note that when used with a view or changes feed `include_docs` must also be `true`.- Returns:
 - the data
 
 - 
digest
Gets the digest. Content hash digest. It starts with prefix which announce hash type (e.g. `md5-`) and continues with Base64-encoded hash digest.- Returns:
 - the digest
 
 - 
encodedLength
Gets the encodedLength. Compressed attachment size in bytes. Available if content_type was in list of compressible types when the attachment was added and the query parameter `att_encoding_info` is `true`. Note that when used with a view or changes feed `include_docs` must also be `true`.- Returns:
 - the encodedLength
 
 - 
encoding
Gets the encoding. Compression codec. Available if content_type was in list of compressible types when the attachment was added and the and the query parameter `att_encoding_info` is `true`. Note that when used with a view or changes feed `include_docs` must also be `true`.- Returns:
 - the encoding
 
 - 
follows
Gets the follows. True if the attachment follows in a multipart request or response.- Returns:
 - the follows
 
 - 
length
Gets the length. Real attachment size in bytes. Not available if inline attachment content requested.- Returns:
 - the length
 
 - 
revpos
Gets the revpos. Revision number when attachment was added.- Returns:
 - the revpos
 
 - 
stub
Gets the stub. Has `true` value if object contains stub info and no content. Otherwise omitted in response.- Returns:
 - the stub
 
 
 -