C# Class Smartsheet.Api.Models.Attachment.CreateAttachmentBuilder

A convenience class for quickly creating an Attachment to a URL.
Show file Open project: smartsheet-platform/smartsheet-csharp-sdk Class Usage Examples

Public Methods

Method Description
Build ( ) : Attachment

Returns the Attachment.

CreateAttachmentBuilder ( string url, AttachmentType attachmentType ) : System

Sets the required attributes for creating an Attachment.

SetAttachmentSubType ( AttachmentSubType attachmentSubType ) : CreateAttachmentBuilder

Attachment sub type, only for GOOGLE_DRIVE type attachments; one of (DOCUMENT, SPREADSHEET, PRESENTATION, PDF, DRAWING)

SetDescription ( string description ) : CreateAttachmentBuilder

Applicable when attaching to sheet or row only

SetName ( string name ) : CreateAttachmentBuilder

Attachment name

SetUrl ( string url ) : CreateAttachmentBuilder

Attachment temporary URL (files only)

Method Details

Build() public method

Returns the Attachment.
public Build ( ) : Attachment
return Attachment

CreateAttachmentBuilder() public method

Sets the required attributes for creating an Attachment.
public CreateAttachmentBuilder ( string url, AttachmentType attachmentType ) : System
url string Attachment temporary URL (files only)
attachmentType AttachmentType Attachment type (one of FILE, GOOGLE_DRIVE, /// LINK, BOX_COM, DROPBOX, or EVERNOTE)
return System

SetAttachmentSubType() public method

Attachment sub type, only for GOOGLE_DRIVE type attachments; one of (DOCUMENT, SPREADSHEET, PRESENTATION, PDF, DRAWING)
public SetAttachmentSubType ( AttachmentSubType attachmentSubType ) : CreateAttachmentBuilder
attachmentSubType AttachmentSubType the attachmentSubType
return CreateAttachmentBuilder

SetDescription() public method

Applicable when attaching to sheet or row only
public SetDescription ( string description ) : CreateAttachmentBuilder
description string the description
return CreateAttachmentBuilder

SetName() public method

Attachment name
public SetName ( string name ) : CreateAttachmentBuilder
name string Attachment name
return CreateAttachmentBuilder

SetUrl() public method

Attachment temporary URL (files only)
public SetUrl ( string url ) : CreateAttachmentBuilder
url string the url
return CreateAttachmentBuilder