Class ImmutableStoreState

java.lang.Object
io.resys.hdes.client.api.ImmutableStoreState
All Implemented Interfaces:
HdesStore.StoreState

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

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

  • Method Details

    • getTagName

      public String getTagName()
      Specified by:
      getTagName in interface HdesStore.StoreState
      Returns:
      The value of the tagName attribute
    • getCommitId

      @Nullable public String getCommitId()
      Specified by:
      getCommitId in interface HdesStore.StoreState
      Returns:
      The value of the commitId attribute
    • getCommitAt

      @Nullable public LocalDateTime getCommitAt()
      Specified by:
      getCommitAt in interface HdesStore.StoreState
      Returns:
      The value of the commitAt attribute
    • getBranches

      public com.google.common.collect.ImmutableMap<String,HdesStore.StoreEntity> getBranches()
      Specified by:
      getBranches in interface HdesStore.StoreState
      Returns:
      The value of the branches attribute
    • getTags

      public com.google.common.collect.ImmutableMap<String,HdesStore.StoreEntity> getTags()
      Specified by:
      getTags in interface HdesStore.StoreState
      Returns:
      The value of the tags attribute
    • getFlows

      public com.google.common.collect.ImmutableMap<String,HdesStore.StoreEntity> getFlows()
      Specified by:
      getFlows in interface HdesStore.StoreState
      Returns:
      The value of the flows attribute
    • getServices

      public com.google.common.collect.ImmutableMap<String,HdesStore.StoreEntity> getServices()
      Specified by:
      getServices in interface HdesStore.StoreState
      Returns:
      The value of the services attribute
    • getDecisions

      public com.google.common.collect.ImmutableMap<String,HdesStore.StoreEntity> getDecisions()
      Specified by:
      getDecisions in interface HdesStore.StoreState
      Returns:
      The value of the decisions attribute
    • withTagName

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

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

      public final ImmutableStoreState withCommitAt(@Nullable LocalDateTime value)
      Copy the current immutable object by setting a value for the commitAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for commitAt (can be null)
      Returns:
      A modified copy of the this object
    • withBranches

      public final ImmutableStoreState withBranches(Map<String,? extends HdesStore.StoreEntity> entries)
      Copy the current immutable object by replacing the branches map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the branches map
      Returns:
      A modified copy of this object
    • withTags

      public final ImmutableStoreState withTags(Map<String,? extends HdesStore.StoreEntity> entries)
      Copy the current immutable object by replacing the tags map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the tags map
      Returns:
      A modified copy of this object
    • withFlows

      public final ImmutableStoreState withFlows(Map<String,? extends HdesStore.StoreEntity> entries)
      Copy the current immutable object by replacing the flows map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the flows map
      Returns:
      A modified copy of this object
    • withServices

      public final ImmutableStoreState withServices(Map<String,? extends HdesStore.StoreEntity> entries)
      Copy the current immutable object by replacing the services map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the services map
      Returns:
      A modified copy of this object
    • withDecisions

      public final ImmutableStoreState withDecisions(Map<String,? extends HdesStore.StoreEntity> entries)
      Copy the current immutable object by replacing the decisions map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the decisions map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableStoreState 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: tagName, commitId, commitAt, branches, tags, flows, services, decisions.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableStoreState copyOf(HdesStore.StoreState instance)
      Creates an immutable copy of a HdesStore.StoreState 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 StoreState instance
    • builder

      public static ImmutableStoreState.Builder builder()
      Creates a builder for ImmutableStoreState.
       ImmutableStoreState.builder()
          .tagName(String) // required tagName
          .commitId(String | null) // nullable commitId
          .commitAt(java.time.LocalDateTime | null) // nullable commitAt
          .putBranches|putAllBranches(String => io.resys.hdes.client.api.HdesStore.StoreEntity) // branches mappings
          .putTags|putAllTags(String => io.resys.hdes.client.api.HdesStore.StoreEntity) // tags mappings
          .putFlows|putAllFlows(String => io.resys.hdes.client.api.HdesStore.StoreEntity) // flows mappings
          .putServices|putAllServices(String => io.resys.hdes.client.api.HdesStore.StoreEntity) // services mappings
          .putDecisions|putAllDecisions(String => io.resys.hdes.client.api.HdesStore.StoreEntity) // decisions mappings
          .build();
       
      Returns:
      A new ImmutableStoreState builder