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.Builder
attachment(File attachment)
Set the attachment.PutAttachmentOptions.Builder
attachment(InputStream attachment)
Set the attachment.PutAttachmentOptions.Builder
attachmentName(String attachmentName)
Set the attachmentName.PutAttachmentOptions
build()
Builds a PutAttachmentOptions.PutAttachmentOptions.Builder
contentType(String contentType)
Set the contentType.PutAttachmentOptions.Builder
db(String db)
Set the db.PutAttachmentOptions.Builder
docId(String docId)
Set the docId.PutAttachmentOptions.Builder
ifMatch(String ifMatch)
Set the ifMatch.PutAttachmentOptions.Builder
rev(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
-
-