Package com.ibm.cloud.cloudant.v1.model
Class PutAttachmentOptions.Builder
java.lang.Object
com.ibm.cloud.cloudant.v1.model.PutAttachmentOptions.Builder
- Enclosing class:
- PutAttachmentOptions
Builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattachment(File attachment) Set the attachment.attachment(InputStream attachment) Set the attachment.attachmentName(String attachmentName) Set the attachmentName.build()Builds a PutAttachmentOptions.contentType(String contentType) Set the contentType.Set the db.Set the docId.Set the ifMatch.Set the rev.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
public Builder(String db, String docId, String attachmentName, InputStream attachment, String contentType) Instantiates a new builder with required properties.- Parameters:
db- the dbdocId- the docIdattachmentName- the attachmentNameattachment- the attachmentcontentType- the contentType
-
-
Method Details
-
build
Builds a PutAttachmentOptions.- Returns:
- the new PutAttachmentOptions instance
-
db
Set the db.- Parameters:
db- the db- Returns:
- the PutAttachmentOptions builder
-
docId
Set the docId.- Parameters:
docId- the docId- Returns:
- the PutAttachmentOptions builder
-
attachmentName
Set the attachmentName.- Parameters:
attachmentName- the attachmentName- Returns:
- the PutAttachmentOptions builder
-
attachment
Set the attachment.- Parameters:
attachment- the attachment- Returns:
- the PutAttachmentOptions builder
-
contentType
Set the contentType.- Parameters:
contentType- the contentType- Returns:
- the PutAttachmentOptions builder
-
ifMatch
Set the ifMatch.- Parameters:
ifMatch- the ifMatch- Returns:
- the PutAttachmentOptions builder
-
rev
Set the rev.- Parameters:
rev- the rev- Returns:
- the PutAttachmentOptions builder
-
attachment
Set the attachment.- Parameters:
attachment- the attachment- Returns:
- the PutAttachmentOptions builder
- Throws:
FileNotFoundException- if the file could not be found
-