Record Class KubernetesDiscoveryProperties.Metadata

java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.discovery.KubernetesDiscoveryProperties.Metadata
Record Components:
addLabels - include labels as metadata
labelsPrefix - prefix for the labels
addAnnotations - include annotations as metadata
annotationsPrefix - prefix for the annotations
addPorts - include ports as metadata
portsPrefix - prefix for the ports, by default it is "port."
addPodLabels - add pod labels as part of the response.
addPodAnnotations - add pod annotations as part of the response.
Enclosing class:
KubernetesDiscoveryProperties

public static record KubernetesDiscoveryProperties.Metadata(boolean addLabels, String labelsPrefix, boolean addAnnotations, String annotationsPrefix, boolean addPorts, String portsPrefix, boolean addPodLabels, boolean addPodAnnotations) extends Record
  • Field Details

  • Constructor Details

    • Metadata

      @ConstructorBinding public Metadata(@DefaultValue("true") boolean addLabels, String labelsPrefix, @DefaultValue("true") boolean addAnnotations, String annotationsPrefix, @DefaultValue("true") boolean addPorts, @DefaultValue("port.") String portsPrefix, boolean addPodLabels, boolean addPodAnnotations)
      Creates an instance of a Metadata record class.
      Parameters:
      addLabels - the value for the addLabels record component
      labelsPrefix - the value for the labelsPrefix record component
      addAnnotations - the value for the addAnnotations record component
      annotationsPrefix - the value for the annotationsPrefix record component
      addPorts - the value for the addPorts record component
      portsPrefix - the value for the portsPrefix record component
      addPodLabels - the value for the addPodLabels record component
      addPodAnnotations - the value for the addPodAnnotations record component
    • Metadata

      public Metadata(@DefaultValue("true") boolean addLabels, String labelsPrefix, @DefaultValue("true") boolean addAnnotations, String annotationsPrefix, @DefaultValue("true") boolean addPorts, @DefaultValue("port.") String portsPrefix)
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • addLabels

      public boolean addLabels()
      Returns the value of the addLabels record component.
      Returns:
      the value of the addLabels record component
    • labelsPrefix

      public String labelsPrefix()
      Returns the value of the labelsPrefix record component.
      Returns:
      the value of the labelsPrefix record component
    • addAnnotations

      public boolean addAnnotations()
      Returns the value of the addAnnotations record component.
      Returns:
      the value of the addAnnotations record component
    • annotationsPrefix

      public String annotationsPrefix()
      Returns the value of the annotationsPrefix record component.
      Returns:
      the value of the annotationsPrefix record component
    • addPorts

      public boolean addPorts()
      Returns the value of the addPorts record component.
      Returns:
      the value of the addPorts record component
    • portsPrefix

      public String portsPrefix()
      Returns the value of the portsPrefix record component.
      Returns:
      the value of the portsPrefix record component
    • addPodLabels

      public boolean addPodLabels()
      Returns the value of the addPodLabels record component.
      Returns:
      the value of the addPodLabels record component
    • addPodAnnotations

      public boolean addPodAnnotations()
      Returns the value of the addPodAnnotations record component.
      Returns:
      the value of the addPodAnnotations record component