Package io.fabric8.kubernetes.api.model
Class LabelSelector
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.LabelSelector
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<LabelSelectorBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class LabelSelector extends Object implements io.fabric8.kubernetes.api.builder.Editable<LabelSelectorBuilder>, KubernetesResource
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LabelSelector()No args constructor for use in serializationLabelSelector(List<LabelSelectorRequirement> matchExpressions, Map<String,String> matchLabels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelSelectorBuilderedit()Map<String,Object>getAdditionalProperties()List<LabelSelectorRequirement>getMatchExpressions()matchExpressions is a list of label selector requirements.Map<String,String>getMatchLabels()matchLabels is a map of {key,value} pairs.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMatchExpressions(List<LabelSelectorRequirement> matchExpressions)matchExpressions is a list of label selector requirements.voidsetMatchLabels(Map<String,String> matchLabels)matchLabels is a map of {key,value} pairs.LabelSelectorBuildertoBuilder()
-
-
-
Constructor Detail
-
LabelSelector
public LabelSelector()
No args constructor for use in serialization
-
LabelSelector
public LabelSelector(List<LabelSelectorRequirement> matchExpressions, Map<String,String> matchLabels)
-
-
Method Detail
-
getMatchExpressions
public List<LabelSelectorRequirement> getMatchExpressions()
matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
setMatchExpressions
public void setMatchExpressions(List<LabelSelectorRequirement> matchExpressions)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
getMatchLabels
public Map<String,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.
-
setMatchLabels
public void setMatchLabels(Map<String,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.
-
edit
public LabelSelectorBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<LabelSelectorBuilder>
-
toBuilder
public LabelSelectorBuilder toBuilder()
-
-