Class ImmutableTagDiff

java.lang.Object
io.resys.hdes.client.api.diff.ImmutableTagDiff
All Implemented Interfaces:
TagDiff

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTagDiff extends Object implements TagDiff
Immutable implementation of TagDiff.

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

  • Method Details

    • getBaseName

      public String getBaseName()
      Specified by:
      getBaseName in interface TagDiff
      Returns:
      The value of the baseName attribute
    • getTargetName

      public String getTargetName()
      Specified by:
      getTargetName in interface TagDiff
      Returns:
      The value of the targetName attribute
    • getBaseId

      public String getBaseId()
      Specified by:
      getBaseId in interface TagDiff
      Returns:
      The value of the baseId attribute
    • getTargetId

      public String getTargetId()
      Specified by:
      getTargetId in interface TagDiff
      Returns:
      The value of the targetId attribute
    • getCreated

      public LocalDateTime getCreated()
      Specified by:
      getCreated in interface TagDiff
      Returns:
      The value of the created attribute
    • getBody

      public String getBody()
      Specified by:
      getBody in interface TagDiff
      Returns:
      The value of the body attribute
    • withBaseName

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

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

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

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

      public final ImmutableTagDiff withCreated(LocalDateTime 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
    • withBody

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableTagDiff 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: baseName, targetName, baseId, targetId, created, body.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableTagDiff.Builder builder()
      Creates a builder for ImmutableTagDiff.
       ImmutableTagDiff.builder()
          .baseName(String) // required baseName
          .targetName(String) // required targetName
          .baseId(String) // required baseId
          .targetId(String) // required targetId
          .created(java.time.LocalDateTime) // required created
          .body(String) // required body
          .build();
       
      Returns:
      A new ImmutableTagDiff builder