Class LabelSelector

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class LabelSelector
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
    • Constructor Detail

      • LabelSelector

        public LabelSelector​(java.util.List<LabelSelectorRequirement> matchExpressions,
                             java.util.Map<java.lang.String,​java.lang.String> matchLabels)
      • LabelSelector

        public LabelSelector()
    • Method Detail

      • getMatchExpressions

        public java.util.List<LabelSelectorRequirement> getMatchExpressions()
        matchExpressions is a list of label selector requirements. The requirements are ANDed.
      • getMatchLabels

        public java.util.Map<java.lang.String,​java.lang.String> getMatchLabels()
        matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
      • setMatchExpressions

        public void setMatchExpressions​(java.util.List<LabelSelectorRequirement> matchExpressions)
        matchExpressions is a list of label selector requirements. The requirements are ANDed.
      • setMatchLabels

        public void setMatchLabels​(java.util.Map<java.lang.String,​java.lang.String> matchLabels)
        matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object