Class ImmutableAttachmentBean

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.AttachmentBean
com.riadalabs.jira.plugins.insight.services.model.ImmutableAttachmentBean
All Implemented Interfaces:
Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAttachmentBean extends AttachmentBean
Immutable implementation of AttachmentBean.

Use the builder to create immutable instances: ImmutableAttachmentBean.builder().

See Also:
  • Method Details

    • getId

      @Nullable public Integer getId()
      Specified by:
      getId in class AttachmentBean
      Returns:
      The value of the id attribute
    • getObjectId

      public Integer getObjectId()
      Specified by:
      getObjectId in class AttachmentBean
      Returns:
      The value of the objectId attribute
    • getAuthor

      public String getAuthor()
      Specified by:
      getAuthor in class AttachmentBean
      Returns:
      The value of the author attribute
    • getComment

      @Nullable public String getComment()
      Specified by:
      getComment in class AttachmentBean
      Returns:
      The value of the comment attribute
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in class AttachmentBean
      Returns:
      The value of the filename attribute
    • getMimeType

      public String getMimeType()
      Specified by:
      getMimeType in class AttachmentBean
      Returns:
      The value of the mimeType attribute
    • getNameInFileSystem

      public String getNameInFileSystem()
      Specified by:
      getNameInFileSystem in class AttachmentBean
      Returns:
      The value of the nameInFileSystem attribute
    • getFileSize

      public Long getFileSize()
      Specified by:
      getFileSize in class AttachmentBean
      Returns:
      The value of the fileSize attribute
    • getCreated

      public Date getCreated()
      Specified by:
      getCreated in class AttachmentBean
      Returns:
      The value of the created attribute
    • withId

      public final ImmutableAttachmentBean withId(@Nullable Integer value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id (can be null)
      Returns:
      A modified copy of the this object
    • withObjectId

      public final ImmutableAttachmentBean withObjectId(Integer value)
      Copy the current immutable object by setting a value for the objectId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for objectId
      Returns:
      A modified copy of the this object
    • withAuthor

      public final ImmutableAttachmentBean withAuthor(String value)
      Copy the current immutable object by setting a value for the author attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for author
      Returns:
      A modified copy of the this object
    • withComment

      public final ImmutableAttachmentBean withComment(@Nullable String value)
      Copy the current immutable object by setting a value for the comment attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for comment (can be null)
      Returns:
      A modified copy of the this object
    • withFilename

      public final ImmutableAttachmentBean withFilename(String value)
      Copy the current immutable object by setting a value for the filename attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for filename
      Returns:
      A modified copy of the this object
    • withMimeType

      public final ImmutableAttachmentBean withMimeType(String value)
      Copy the current immutable object by setting a value for the mimeType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for mimeType
      Returns:
      A modified copy of the this object
    • withNameInFileSystem

      public final ImmutableAttachmentBean withNameInFileSystem(String value)
      Copy the current immutable object by setting a value for the nameInFileSystem attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nameInFileSystem
      Returns:
      A modified copy of the this object
    • withFileSize

      public final ImmutableAttachmentBean withFileSize(Long value)
      Copy the current immutable object by setting a value for the fileSize attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for fileSize
      Returns:
      A modified copy of the this object
    • withCreated

      public final ImmutableAttachmentBean withCreated(Date value)
      Copy the current immutable object by setting a value for the created attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for created
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAttachmentBean that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: id, objectId, author, comment, filename, mimeType, nameInFileSystem, fileSize, created.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AttachmentBean with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableAttachmentBean copyOf(AttachmentBean instance)
      Creates an immutable copy of a AttachmentBean value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable AttachmentBean instance
    • builder

      public static ImmutableAttachmentBean.Builder builder()
      Creates a builder for ImmutableAttachmentBean.
       ImmutableAttachmentBean.builder()
          .setId(Integer | null) // nullable id
          .setObjectId(Integer) // required objectId
          .setAuthor(String) // required author
          .setComment(String | null) // nullable comment
          .setFilename(String) // required filename
          .setMimeType(String) // required mimeType
          .setNameInFileSystem(String) // required nameInFileSystem
          .setFileSize(Long) // required fileSize
          .setCreated(Date) // required created
          .build();
       
      Returns:
      A new ImmutableAttachmentBean builder