Table of Contents

Class Share.CreateShareBuilder

Namespace
Smartsheet.Api.Models
Assembly
smartsheet-csharp-sdk.dll

A convenience class for creating a Share with the necessary fields for sharing the sheet to one user.

public class Share.CreateShareBuilder
Inheritance
Share.CreateShareBuilder
Inherited Members

Constructors

CreateShareBuilder(long?, AccessLevel?)

Sets the required properties for sharing to a Group.

public CreateShareBuilder(long? groupId, AccessLevel? accessLevel)

Parameters

groupId long?

the group ID

accessLevel AccessLevel?

the Access Level

CreateShareBuilder(string, AccessLevel?)

Sets the required properties for sharing to a User.

public CreateShareBuilder(string email, AccessLevel? accessLevel)

Parameters

email string

the email of the User

accessLevel AccessLevel?

the Access Level

Methods

Build()

Builds the Share object.

public Share Build()

Returns

Share

the share

GetAccessLevel()

Gets the access level.

public AccessLevel? GetAccessLevel()

Returns

AccessLevel?

the access level

GetCcMe()

Gets the CcMe.

public bool? GetCcMe()

Returns

bool?

the CcMe

GetEmail()

Gets the Email.

public string GetEmail()

Returns

string

the Email

GetGroupId()

Gets the GroupId.

public long? GetGroupId()

Returns

long?

the GroupId

GetMessage()

Gets the Message.

public string GetMessage()

Returns

string

the Message

GetSubject()

Gets the Subject.

public string GetSubject()

Returns

string

the Subject

SetAccessLevel(AccessLevel?)

(required) Access level for this specific share.

public Share.CreateShareBuilder SetAccessLevel(AccessLevel? accessLevel)

Parameters

accessLevel AccessLevel?

the access level

Returns

Share.CreateShareBuilder

the share to one builder

SetAccessLevel(string)

(optional): The message to be included in the body of the email that will optionally be sent to the recipient.

public Share.CreateShareBuilder SetAccessLevel(string message)

Parameters

message string

the message

Returns

Share.CreateShareBuilder

the share to one builder

SetCcMe(bool?)

(optional): Boolean flag to indicate whether or not to CC the user sharing the sheet.

public Share.CreateShareBuilder SetCcMe(bool? ccMe)

Parameters

ccMe bool?

the ccMe

Returns

Share.CreateShareBuilder

the share to one builder

SetEmail(string)

(optional) Email address for this specific share. NOTE: One of email or groupId must be specified, but not both.

public Share.CreateShareBuilder SetEmail(string email)

Parameters

email string

the Email

Returns

Share.CreateShareBuilder

the share to one builder

SetGroupId(long?)

the group share recipient’s group ID. NOTE: One of email or groupId must be specified, but not both.

public Share.CreateShareBuilder SetGroupId(long? groupId)

Parameters

groupId long?

the groupId

Returns

Share.CreateShareBuilder

the share to one builder

SetSubject(string)

(optional): The subject of the email that will optionally be sent to notify the recipient.

public Share.CreateShareBuilder SetSubject(string subject)

Parameters

subject string

the subject

Returns

Share.CreateShareBuilder

the share to one builder