Package com.smartsheet.api.models
Class Attachment
- java.lang.Object
-
- com.smartsheet.api.models.IdentifiableModel<T>
-
- com.smartsheet.api.models.NamedModel<java.lang.Long>
-
- com.smartsheet.api.models.Attachment
-
public class Attachment extends NamedModel<java.lang.Long>
Represents the Attachment object.- See Also:
- Help Uploading Attachments
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Attachment.CreateAttachmentBuilder
A convenience class for quickly creating a List of cells to update.
-
Constructor Summary
Constructors Constructor Description Attachment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentSubType
getAttachmentSubType()
Gets the attachment sub type.AttachmentType
getAttachmentType()
Gets the attachment type.java.util.Date
getCreatedAt()
Gets the created at.User
getCreatedBy()
java.lang.String
getDescription()
Gets the attachment description.java.lang.String
getMimeType()
Gets the mime type.java.lang.Long
getParentId()
Gets the parent id.AttachmentParentType
getParentType()
Gets the parent type.java.lang.Long
getSizeInKb()
Gets the size in kb.java.lang.String
getUrl()
Gets the URL.java.lang.Long
getUrlExpiresInMillis()
Gets the url expires in millis.Attachment
setAttachmentSubType(AttachmentSubType attachmentSubType)
Sets the attachment sub type.Attachment
setAttachmentType(AttachmentType attachmentType)
Sets the attachment type.Attachment
setCreatedAt(java.util.Date createdAt)
Sets the created at.Attachment
setCreatedBy(User createdBy)
Attachment
setDescription(java.lang.String description)
Sets the attachment description.Attachment
setMimeType(java.lang.String mimeType)
Sets the mime type.Attachment
setName(java.lang.String name)
Provide an 'override' of setName (returns Attachment not NamedModel)Attachment
setParentId(java.lang.Long parentId)
Sets the parent id.Attachment
setParentType(AttachmentParentType parentType)
Sets the parent type.Attachment
setSizeInKb(java.lang.Long sizeInKb)
Sets the size in kb.Attachment
setUrl(java.lang.String url)
Sets the URL.Attachment
setUrlExpiresInMillis(java.lang.Long urlExpiresInMillis)
Sets the url expires in millis.-
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 Attachment setName(java.lang.String name)
Provide an 'override' of setName (returns Attachment not NamedModel)- Overrides:
setName
in classNamedModel<java.lang.Long>
- Parameters:
name
- the new name
-
getUrl
public java.lang.String getUrl()
Gets the URL.- Returns:
- The url.
-
setUrl
public Attachment setUrl(java.lang.String url)
Sets the URL.- Parameters:
url
- the new url
-
getUrlExpiresInMillis
public java.lang.Long getUrlExpiresInMillis()
Gets the url expires in millis.- Returns:
- the url expires in millis
-
setUrlExpiresInMillis
public Attachment setUrlExpiresInMillis(java.lang.Long urlExpiresInMillis)
Sets the url expires in millis.- Parameters:
urlExpiresInMillis
- the new url expires in millis
-
getAttachmentType
public AttachmentType getAttachmentType()
Gets the attachment type.- Returns:
- the attachment type
-
setAttachmentType
public Attachment setAttachmentType(AttachmentType attachmentType)
Sets the attachment type.- Parameters:
attachmentType
- the new attachment type
-
getAttachmentSubType
public AttachmentSubType getAttachmentSubType()
Gets the attachment sub type.- Returns:
- the attachment sub type
-
setAttachmentSubType
public Attachment setAttachmentSubType(AttachmentSubType attachmentSubType)
Sets the attachment sub type.- Parameters:
attachmentSubType
- the new attachment sub type
-
getCreatedAt
public java.util.Date getCreatedAt()
Gets the created at.- Returns:
- the created at
-
setCreatedAt
public Attachment setCreatedAt(java.util.Date createdAt)
Sets the created at.- Parameters:
createdAt
- the new created at
-
getMimeType
public java.lang.String getMimeType()
Gets the mime type.- Returns:
- the mime type
-
setMimeType
public Attachment setMimeType(java.lang.String mimeType)
Sets the mime type.- Parameters:
mimeType
- the new mime type
-
getParentType
public AttachmentParentType getParentType()
Gets the parent type.- Returns:
- the parent type
-
setParentType
public Attachment setParentType(AttachmentParentType parentType)
Sets the parent type.- Parameters:
parentType
- the new parent type
-
getParentId
public java.lang.Long getParentId()
Gets the parent id.- Returns:
- the parent id
-
setParentId
public Attachment setParentId(java.lang.Long parentId)
Sets the parent id.- Parameters:
parentId
- the new parent id
-
getSizeInKb
public java.lang.Long getSizeInKb()
Gets the size in kb.- Returns:
- the size in kb
-
setSizeInKb
public Attachment setSizeInKb(java.lang.Long sizeInKb)
Sets the size in kb.- Parameters:
sizeInKb
- the new size in kb
-
getCreatedBy
public User getCreatedBy()
- Returns:
- the createdBy
-
setCreatedBy
public Attachment setCreatedBy(User createdBy)
- Parameters:
createdBy
- the createdBy to set
-
getDescription
public java.lang.String getDescription()
Gets the attachment description.- Returns:
- the attachment description.
-
setDescription
public Attachment setDescription(java.lang.String description)
Sets the attachment description.- Parameters:
description
- the description
-
-