Class Attachment.CreateAttachmentBuilder
- Namespace
- Smartsheet.Api.Models
- Assembly
- smartsheet-csharp-sdk.dll
A convenience class for quickly creating an Attachment to a URL.
public class Attachment.CreateAttachmentBuilder
- Inheritance
-
Attachment.CreateAttachmentBuilder
- Inherited Members
Constructors
CreateAttachmentBuilder(string, AttachmentType?)
Sets the required attributes for creating an Attachment.
public CreateAttachmentBuilder(string url, AttachmentType? attachmentType)
Parameters
urlstringAttachment temporary URL (files only)
attachmentTypeAttachmentType?Attachment type (one of FILE, GOOGLE_DRIVE, LINK, BOX_COM, DROPBOX, or EVERNOTE)
Methods
Build()
Returns the Attachment.
public Attachment Build()
Returns
- Attachment
the attachment
SetAttachmentSubType(AttachmentSubType?)
Attachment sub type, only for GOOGLE_DRIVE type attachments; one of (DOCUMENT, SPREADSHEET, PRESENTATION, PDF, DRAWING)
public Attachment.CreateAttachmentBuilder SetAttachmentSubType(AttachmentSubType? attachmentSubType)
Parameters
attachmentSubTypeAttachmentSubType?the attachmentSubType
Returns
- Attachment.CreateAttachmentBuilder
the CreateAttachmentBuilder object
SetDescription(string)
Applicable when attaching to sheet or row only
public Attachment.CreateAttachmentBuilder SetDescription(string description)
Parameters
descriptionstringthe description
Returns
- Attachment.CreateAttachmentBuilder
the CreateAttachmentBuilder object
SetName(string)
Attachment name
public Attachment.CreateAttachmentBuilder SetName(string name)
Parameters
namestringAttachment name
Returns
- Attachment.CreateAttachmentBuilder
the CreateAttachmentBuilder object
SetUrl(string)
Attachment temporary URL (files only)
public Attachment.CreateAttachmentBuilder SetUrl(string url)
Parameters
urlstringthe url
Returns
- Attachment.CreateAttachmentBuilder
the CreateAttachmentBuilder object