Package com.ibm.cloud.cloudant.v1.model
Class PutAttachmentOptions.Builder
- java.lang.Object
-
- com.ibm.cloud.cloudant.v1.model.PutAttachmentOptions.Builder
-
- Enclosing class:
- PutAttachmentOptions
public static class PutAttachmentOptions.Builder extends Object
Builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PutAttachmentOptions.Builderattachment(File attachment)Set the attachment.PutAttachmentOptions.Builderattachment(InputStream attachment)Set the attachment.PutAttachmentOptions.BuilderattachmentName(String attachmentName)Set the attachmentName.PutAttachmentOptionsbuild()Builds a PutAttachmentOptions.PutAttachmentOptions.BuildercontentType(String contentType)Set the contentType.PutAttachmentOptions.Builderdb(String db)Set the db.PutAttachmentOptions.BuilderdocId(String docId)Set the docId.PutAttachmentOptions.BuilderifMatch(String ifMatch)Set the ifMatch.PutAttachmentOptions.Builderrev(String rev)Set the rev.
-
-
-
Constructor Detail
-
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 Detail
-
build
public PutAttachmentOptions build()
Builds a PutAttachmentOptions.- Returns:
- the new PutAttachmentOptions instance
-
db
public PutAttachmentOptions.Builder db(String db)
Set the db.- Parameters:
db- the db- Returns:
- the PutAttachmentOptions builder
-
docId
public PutAttachmentOptions.Builder docId(String docId)
Set the docId.- Parameters:
docId- the docId- Returns:
- the PutAttachmentOptions builder
-
attachmentName
public PutAttachmentOptions.Builder attachmentName(String attachmentName)
Set the attachmentName.- Parameters:
attachmentName- the attachmentName- Returns:
- the PutAttachmentOptions builder
-
attachment
public PutAttachmentOptions.Builder attachment(InputStream attachment)
Set the attachment.- Parameters:
attachment- the attachment- Returns:
- the PutAttachmentOptions builder
-
contentType
public PutAttachmentOptions.Builder contentType(String contentType)
Set the contentType.- Parameters:
contentType- the contentType- Returns:
- the PutAttachmentOptions builder
-
ifMatch
public PutAttachmentOptions.Builder ifMatch(String ifMatch)
Set the ifMatch.- Parameters:
ifMatch- the ifMatch- Returns:
- the PutAttachmentOptions builder
-
rev
public PutAttachmentOptions.Builder rev(String rev)
Set the rev.- Parameters:
rev- the rev- Returns:
- the PutAttachmentOptions builder
-
attachment
public PutAttachmentOptions.Builder attachment(File attachment) throws FileNotFoundException
Set the attachment.- Parameters:
attachment- the attachment- Returns:
- the PutAttachmentOptions builder
- Throws:
FileNotFoundException- if the file could not be found
-
-