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 classShare.CreateGroupShareBuilderA convenience class for creating aSharewith the necessary fields to create aShareType.GROUPShare.static classShare.CreateUserShareBuilderA convenience class for creating aSharewith the necessary fields to create aShareType.USERShare.static classShare.ShareToOneGroupBuilderstatic classShare.ShareToOneUserBuilderA convenience class for creating aSharewith the necessary fields for sharing the sheet to one user.static classShare.UpdateShareBuilderA convenience class for creating aSharewith 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 AccessLevelgetAccessLevel()Gets the access level for this specific share.java.util.DategetCreatedAt()Gets the time that the share was createdjava.lang.StringgetEmail()Gets the email for this specific share.java.lang.LonggetGroupId()java.lang.StringgetMessage()Gets the message to be included in the body of the email.java.util.DategetModifiedAt()Gets the time that the share was last modifiedShareScopegetScope()Get the scope of this share.java.lang.StringgetSubject()Gets the subject of the email that will optionally be sent to notify the recipient.ShareTypegetType()java.lang.LonggetUserId()java.lang.BooleanisCcMe()Gets the flag to indicate whether or not to send a copy of the email to the sharerSharesetAccessLevel(AccessLevel accessLevel)Sets the access level for this specific share.SharesetCcMe(java.lang.Boolean ccMe)Sets the flag to indicate whether or not to send a copy of the email to the sharer.SharesetCreatedAt(java.util.Date createdAt)Sets the time that the share was createdSharesetEmail(java.lang.String email)Sets the email for this specific share.SharesetGroupId(java.lang.Long groupId)SharesetMessage(java.lang.String message)Sets the message to be included in the body of the email.SharesetModifiedAt(java.util.Date modifiedAt)Sets the time that the share was last modifiedSharesetName(java.lang.String name)Provide an 'override' of setName (returns Share not NamedModel)SharesetScope(ShareScope scope)Set the scope of this share.SharesetSubject(java.lang.String subject)Sets the subject of the email that will optionally be sent to notify the recipient.SharesetType(ShareType type)SharesetUserId(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:
setNamein 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,
nullif 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,
nullif isShareType.USER
-
setGroupId
public Share setGroupId(java.lang.Long groupId)
- Parameters:
groupId- the groupId to set
-
getType
public ShareType getType()
- Returns:
- the type
-
-