Record Class HealthCheck

java.lang.Object
java.lang.Record
co.elastic.gradle.utils.docker.instruction.HealthCheck
All Implemented Interfaces:
ContainerImageBuildInstruction

public record HealthCheck(String cmd, String interval, String timeout, String startPeriod, Integer retries) extends Record implements ContainerImageBuildInstruction
  • Constructor Details

    • HealthCheck

      public HealthCheck(String cmd, String interval, String timeout, String startPeriod, Integer retries)
      Creates an instance of a HealthCheck record class.
      Parameters:
      cmd - the value for the cmd record component
      interval - the value for the interval record component
      timeout - the value for the timeout record component
      startPeriod - the value for the startPeriod record component
      retries - the value for the retries record component
  • Method Details

    • getCmd

      @Input public String getCmd()
    • getInterval

      @Input @Optional public String getInterval()
    • getTimeout

      @Input @Optional public String getTimeout()
    • getStartPeriod

      @Input @Optional public String getStartPeriod()
    • getRetries

      @Input @Optional public Integer getRetries()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cmd

      public String cmd()
      Returns the value of the cmd record component.
      Returns:
      the value of the cmd record component
    • interval

      public String interval()
      Returns the value of the interval record component.
      Returns:
      the value of the interval record component
    • timeout

      public String timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • startPeriod

      public String startPeriod()
      Returns the value of the startPeriod record component.
      Returns:
      the value of the startPeriod record component
    • retries

      public Integer retries()
      Returns the value of the retries record component.
      Returns:
      the value of the retries record component