Class V1LabelSelector
java.lang.Object
io.kubernetes.client.openapi.models.V1LabelSelector
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-02-02T17:56:12.287571Z[Etc/UTC]")
public class V1LabelSelector
extends Object
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMatchExpressionsItem
(V1LabelSelectorRequirement matchExpressionsItem) boolean
static V1LabelSelector
Create an instance of V1LabelSelector given an JSON stringmatchExpressions is a list of label selector requirements.matchLabels is a map of {key,value} pairs.int
hashCode()
matchExpressions
(List<V1LabelSelectorRequirement> matchExpressions) matchLabels
(Map<String, String> matchLabels) putMatchLabelsItem
(String key, String matchLabelsItem) void
setMatchExpressions
(List<V1LabelSelectorRequirement> matchExpressions) void
setMatchLabels
(Map<String, String> matchLabels) toJson()
Convert an instance of V1LabelSelector to an JSON stringtoString()
static void
validateJsonObject
(com.google.gson.JsonObject jsonObj) Validates the JSON Object and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_MATCH_EXPRESSIONS
- See Also:
-
SERIALIZED_NAME_MATCH_LABELS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1LabelSelector
public V1LabelSelector()
-
-
Method Details
-
matchExpressions
-
addMatchExpressionsItem
-
getMatchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.- Returns:
- matchExpressions
-
setMatchExpressions
-
matchLabels
-
putMatchLabelsItem
-
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.- Returns:
- matchLabels
-
setMatchLabels
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonObject
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
IOException
- if the JSON Object is invalid with respect to V1LabelSelector
-
fromJson
Create an instance of V1LabelSelector given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1LabelSelector
- Throws:
IOException
- if the JSON string is invalid with respect to V1LabelSelector
-
toJson
Convert an instance of V1LabelSelector to an JSON string- Returns:
- JSON string
-