Class ImmutableJiraDto

java.lang.Object
fr.enedis.chutney.jira.api.ImmutableJiraDto
All Implemented Interfaces:
JiraDto

@Generated(from="JiraDto", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableJiraDto extends Object implements JiraDto
Immutable implementation of JiraDto.

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

  • Method Details

    • id

      public String id()
      Specified by:
      id in interface JiraDto
      Returns:
      The value of the id attribute
    • chutneyId

      public String chutneyId()
      Specified by:
      chutneyId in interface JiraDto
      Returns:
      The value of the chutneyId attribute
    • executionStatus

      public Optional<String> executionStatus()
      Specified by:
      executionStatus in interface JiraDto
      Returns:
      The value of the executionStatus attribute
    • withId

      public final ImmutableJiraDto withId(String 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
      Returns:
      A modified copy or the this object
    • withChutneyId

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

      public final ImmutableJiraDto withExecutionStatus(String value)
      Copy the current immutable object by setting a present value for the optional executionStatus attribute.
      Parameters:
      value - The value for executionStatus
      Returns:
      A modified copy or this if not changed
    • withExecutionStatus

      public final ImmutableJiraDto withExecutionStatus(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the executionStatus attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for executionStatus
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableJiraDto 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, chutneyId, executionStatus.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableJiraDto copyOf(JiraDto instance)
      Creates an immutable copy of a JiraDto 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 JiraDto instance
    • builder

      public static ImmutableJiraDto.Builder builder()
      Creates a builder for ImmutableJiraDto.
       ImmutableJiraDto.builder()
          .id(String) // required id
          .chutneyId(String) // required chutneyId
          .executionStatus(Optional<String>) // optional executionStatus
          .build();
       
      Returns:
      A new ImmutableJiraDto builder