Package com.smartsheet.api.models
Class Share
- java.lang.Object
-
- com.smartsheet.api.models.IdentifiableModel<T>
-
- com.smartsheet.api.models.NamedModel<java.lang.String>
-
- com.smartsheet.api.models.Share
-
public class Share extends NamedModel<java.lang.String>
Represents a Share Object.- See Also:
- Sharing Sheets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Share.CreateGroupShareBuilder
A convenience class for creating aShare
with the necessary fields to create aShareType.GROUP
Share
.static class
Share.CreateUserShareBuilder
A convenience class for creating aShare
with the necessary fields to create aShareType.USER
Share
.static class
Share.ShareToOneGroupBuilder
static class
Share.ShareToOneUserBuilder
A convenience class for creating aShare
with the necessary fields for sharing the sheet to one user.static class
Share.UpdateShareBuilder
A convenience class for creating aShare
with the necessary fields to update a specific share.
-
Constructor Summary
Constructors Constructor Description Share()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessLevel
getAccessLevel()
Gets the access level for this specific share.java.util.Date
getCreatedAt()
Gets the time that the share was createdjava.lang.String
getEmail()
Gets the email for this specific share.java.lang.Long
getGroupId()
java.lang.String
getMessage()
Gets the message to be included in the body of the email.java.util.Date
getModifiedAt()
Gets the time that the share was last modifiedShareScope
getScope()
Get the scope of this share.java.lang.String
getSubject()
Gets the subject of the email that will optionally be sent to notify the recipient.ShareType
getType()
java.lang.Long
getUserId()
java.lang.Boolean
isCcMe()
Gets the flag to indicate whether or not to send a copy of the email to the sharerShare
setAccessLevel(AccessLevel accessLevel)
Sets the access level for this specific share.Share
setCcMe(java.lang.Boolean ccMe)
Sets the flag to indicate whether or not to send a copy of the email to the sharer.Share
setCreatedAt(java.util.Date createdAt)
Sets the time that the share was createdShare
setEmail(java.lang.String email)
Sets the email for this specific share.Share
setGroupId(java.lang.Long groupId)
Share
setMessage(java.lang.String message)
Sets the message to be included in the body of the email.Share
setModifiedAt(java.util.Date modifiedAt)
Sets the time that the share was last modifiedShare
setName(java.lang.String name)
Provide an 'override' of setName (returns Share not NamedModel)Share
setScope(ShareScope scope)
Set the scope of this share.Share
setSubject(java.lang.String subject)
Sets the subject of the email that will optionally be sent to notify the recipient.Share
setType(ShareType type)
Share
setUserId(java.lang.Long userId)
-
Methods inherited from class com.smartsheet.api.models.NamedModel
getName
-
Methods inherited from class com.smartsheet.api.models.IdentifiableModel
equals, getId, hashCode, setId
-
-
-
-
Method Detail
-
setName
public Share setName(java.lang.String name)
Provide an 'override' of setName (returns Share not NamedModel)- Overrides:
setName
in classNamedModel<java.lang.String>
- Parameters:
name
- the new name
-
getSubject
public java.lang.String getSubject()
Gets the subject of the email that will optionally be sent to notify the recipient.- Returns:
- the subject
-
setSubject
public Share setSubject(java.lang.String subject)
Sets the subject of the email that will optionally be sent to notify the recipient.- Parameters:
subject
- the subject of the email
-
getMessage
public java.lang.String getMessage()
Gets the message to be included in the body of the email.- Returns:
- the message
-
setMessage
public Share setMessage(java.lang.String message)
Sets the message to be included in the body of the email.- Parameters:
message
- the message
-
isCcMe
public java.lang.Boolean isCcMe()
Gets the flag to indicate whether or not to send a copy of the email to the sharer- Returns:
- the flag for CC
-
setCcMe
public Share setCcMe(java.lang.Boolean ccMe)
Sets the flag to indicate whether or not to send a copy of the email to the sharer.- Parameters:
ccMe
- the flag for CC
-
getAccessLevel
public AccessLevel getAccessLevel()
Gets the access level for this specific share.- Returns:
- the access level
-
setAccessLevel
public Share setAccessLevel(AccessLevel accessLevel)
Sets the access level for this specific share.- Parameters:
accessLevel
- the new access level
-
getEmail
public java.lang.String getEmail()
Gets the email for this specific share.- Returns:
- the email
-
setEmail
public Share setEmail(java.lang.String email)
Sets the email for this specific share.- Parameters:
email
- the new email
-
getScope
public ShareScope getScope()
Get the scope of this share. One of ITEM or WORKSPACE- Returns:
- scope
-
setScope
public Share setScope(ShareScope scope)
Set the scope of this share. One of ITEM or WORKSPACE
-
getCreatedAt
public java.util.Date getCreatedAt()
Gets the time that the share was created- Returns:
- createdAt
-
setCreatedAt
public Share setCreatedAt(java.util.Date createdAt)
Sets the time that the share was created
-
getModifiedAt
public java.util.Date getModifiedAt()
Gets the time that the share was last modified- Returns:
- modifiedAt
-
setModifiedAt
public Share setModifiedAt(java.util.Date modifiedAt)
Sets the time that the share was last modified
-
getUserId
public java.lang.Long getUserId()
- Returns:
- the userId,
null
if isShareType.GROUP
-
setUserId
public Share setUserId(java.lang.Long userId)
- Parameters:
userId
- the userId to set
-
getGroupId
public java.lang.Long getGroupId()
- Returns:
- the groupId,
null
if isShareType.USER
-
setGroupId
public Share setGroupId(java.lang.Long groupId)
- Parameters:
groupId
- the groupId to set
-
getType
public ShareType getType()
- Returns:
- the type
-
-