KubeLabelSelector Class
- java.
lang. Object - com.
azure. resourcemanager. network. models. KubeLabelSelector
- com.
Implements
public final class KubeLabelSelector
implements JsonSerializable<KubeLabelSelector>
Kubernetes Label Selector for matching labels in Kubernetes Selector Groups.
Constructor Summary
| Constructor | Description |
|---|---|
| KubeLabelSelector() |
Creates an instance of Kube |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Kube |
fromJson(JsonReader jsonReader)
Reads an instance of Kube |
|
List<Label |
matchExpressions()
Get the match |
| Map<String,String> |
matchLabels()
Get the match |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Kube |
withMatchExpressions(List<LabelSelectorExpression> matchExpressions)
Set the match |
|
Kube |
withMatchLabels(Map<String,String> matchLabels)
Set the match |
Methods inherited from java.lang.Object
Constructor Details
KubeLabelSelector
public KubeLabelSelector()
Creates an instance of KubeLabelSelector class.
Method Details
fromJson
public static KubeLabelSelector fromJson(JsonReader jsonReader)
Reads an instance of KubeLabelSelector from the JsonReader.
Parameters:
Returns:
Throws:
matchExpressions
public List<LabelSelectorExpression> matchExpressions()
Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Returns:
matchLabels
public Map<String,String> matchLabels()
Get the matchLabels property: 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.
Returns:
toJson
validate
public void validate()
Validates the instance.
withMatchExpressions
public KubeLabelSelector withMatchExpressions(List<LabelSelectorExpression> matchExpressions)
Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Parameters:
Returns:
withMatchLabels
public KubeLabelSelector withMatchLabels(Map<String,String> matchLabels)
Set the matchLabels property: 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.
Parameters:
Returns: