Record Class KubernetesDiscoveryProperties.Metadata
java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.discovery.KubernetesDiscoveryProperties.Metadata
- Record Components:
addLabels- include labels as metadatalabelsPrefix- prefix for the labelsaddAnnotations- include annotations as metadataannotationsPrefix- prefix for the annotationsaddPorts- include ports as metadataportsPrefix- 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KubernetesDiscoveryProperties.MetadataDefault instance. -
Constructor Summary
ConstructorsConstructorDescriptionMetadata(boolean addLabels, String labelsPrefix, boolean addAnnotations, String annotationsPrefix, boolean addPorts, String portsPrefix) Metadata(boolean addLabels, String labelsPrefix, boolean addAnnotations, String annotationsPrefix, boolean addPorts, String portsPrefix, boolean addPodLabels, boolean addPodAnnotations) Creates an instance of aMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaddAnnotationsrecord component.booleanReturns the value of theaddLabelsrecord component.booleanReturns the value of theaddPodAnnotationsrecord component.booleanReturns the value of theaddPodLabelsrecord component.booleanaddPorts()Returns the value of theaddPortsrecord component.Returns the value of theannotationsPrefixrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelabelsPrefixrecord component.Returns the value of theportsPrefixrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Default instance.
-
-
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 aMetadatarecord class.- Parameters:
addLabels- the value for theaddLabelsrecord componentlabelsPrefix- the value for thelabelsPrefixrecord componentaddAnnotations- the value for theaddAnnotationsrecord componentannotationsPrefix- the value for theannotationsPrefixrecord componentaddPorts- the value for theaddPortsrecord componentportsPrefix- the value for theportsPrefixrecord componentaddPodLabels- the value for theaddPodLabelsrecord componentaddPodAnnotations- the value for theaddPodAnnotationsrecord component
-
Metadata
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
addLabels
-
labelsPrefix
Returns the value of thelabelsPrefixrecord component.- Returns:
- the value of the
labelsPrefixrecord component
-
addAnnotations
public boolean addAnnotations()Returns the value of theaddAnnotationsrecord component.- Returns:
- the value of the
addAnnotationsrecord component
-
annotationsPrefix
Returns the value of theannotationsPrefixrecord component.- Returns:
- the value of the
annotationsPrefixrecord component
-
addPorts
-
portsPrefix
Returns the value of theportsPrefixrecord component.- Returns:
- the value of the
portsPrefixrecord component
-
addPodLabels
public boolean addPodLabels()Returns the value of theaddPodLabelsrecord component.- Returns:
- the value of the
addPodLabelsrecord component
-
addPodAnnotations
public boolean addPodAnnotations()Returns the value of theaddPodAnnotationsrecord component.- Returns:
- the value of the
addPodAnnotationsrecord component
-