Class ImmutableGitEntry

java.lang.Object
io.resys.hdes.client.spi.ImmutableGitEntry
All Implemented Interfaces:
GitConfig.GitEntry

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

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

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface GitConfig.GitEntry
      Returns:
      The value of the id attribute
    • getCreated

      public Timestamp getCreated()
      Specified by:
      getCreated in interface GitConfig.GitEntry
      Returns:
      The value of the created attribute
    • getModified

      public Timestamp getModified()
      Specified by:
      getModified in interface GitConfig.GitEntry
      Returns:
      The value of the modified attribute
    • getBodyType

      public AstBody.AstBodyType getBodyType()
      Specified by:
      getBodyType in interface GitConfig.GitEntry
      Returns:
      The value of the bodyType attribute
    • getRevision

      public String getRevision()
      Specified by:
      getRevision in interface GitConfig.GitEntry
      Returns:
      The value of the revision attribute
    • getBlobHash

      public String getBlobHash()
      Specified by:
      getBlobHash in interface GitConfig.GitEntry
      Returns:
      The value of the blobHash attribute
    • getTreeValue

      public String getTreeValue()
      Specified by:
      getTreeValue in interface GitConfig.GitEntry
      Returns:
      The value of the treeValue attribute
    • getBlobValue

      public String getBlobValue()
      Specified by:
      getBlobValue in interface GitConfig.GitEntry
      Returns:
      The value of the blobValue attribute
    • getCommands

      public com.google.common.collect.ImmutableList<AstCommand> getCommands()
      Specified by:
      getCommands in interface GitConfig.GitEntry
      Returns:
      The value of the commands attribute
    • withId

      public final ImmutableGitEntry 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 of the this object
    • withCreated

      public final ImmutableGitEntry withCreated​(Timestamp 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
    • withModified

      public final ImmutableGitEntry withModified​(Timestamp value)
      Copy the current immutable object by setting a value for the modified attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for modified
      Returns:
      A modified copy of the this object
    • withBodyType

      public final ImmutableGitEntry withBodyType​(AstBody.AstBodyType value)
      Copy the current immutable object by setting a value for the bodyType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bodyType
      Returns:
      A modified copy of the this object
    • withRevision

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

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

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

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

      public final ImmutableGitEntry withCommands​(AstCommand... elements)
      Copy the current immutable object with elements that replace the content of commands.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCommands

      public final ImmutableGitEntry withCommands​(Iterable<? extends AstCommand> elements)
      Copy the current immutable object with elements that replace the content of commands. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of commands elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals​(@Nullable Object another)
      This instance is equal to all instances of ImmutableGitEntry 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, created, modified, bodyType, revision, blobHash, treeValue, blobValue, commands.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableGitEntry copyOf​(GitConfig.GitEntry instance)
      Creates an immutable copy of a GitConfig.GitEntry 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 GitEntry instance
    • builder

      public static ImmutableGitEntry.Builder builder()
      Creates a builder for ImmutableGitEntry.
       ImmutableGitEntry.builder()
          .id(String) // required id
          .created(java.sql.Timestamp) // required created
          .modified(java.sql.Timestamp) // required modified
          .bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required bodyType
          .revision(String) // required revision
          .blobHash(String) // required blobHash
          .treeValue(String) // required treeValue
          .blobValue(String) // required blobValue
          .addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) // commands elements
          .build();
       
      Returns:
      A new ImmutableGitEntry builder