Class V1LabelSelectorRequirement
java.lang.Object
io.kubernetes.client.openapi.models.V1LabelSelectorRequirement
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T21:15:49.397498Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1LabelSelectorRequirement
extends Object
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValuesItem
(String valuesItem) boolean
static V1LabelSelectorRequirement
Create an instance of V1LabelSelectorRequirement given an JSON stringgetKey()
key is the label key that the selector applies to.operator represents a key's relationship to a set of values.values is an array of string values.int
hashCode()
void
void
setOperator
(String operator) void
toJson()
Convert an instance of V1LabelSelectorRequirement to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_KEY
- See Also:
-
SERIALIZED_NAME_OPERATOR
- See Also:
-
SERIALIZED_NAME_VALUES
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1LabelSelectorRequirement
public V1LabelSelectorRequirement()
-
-
Method Details
-
key
-
getKey
key is the label key that the selector applies to.- Returns:
- key
-
setKey
-
operator
-
getOperator
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.- Returns:
- operator
-
setOperator
-
values
-
addValuesItem
-
getValues
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.- Returns:
- values
-
setValues
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1LabelSelectorRequirement
-
fromJson
Create an instance of V1LabelSelectorRequirement given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1LabelSelectorRequirement
- Throws:
IOException
- if the JSON string is invalid with respect to V1LabelSelectorRequirement
-
toJson
Convert an instance of V1LabelSelectorRequirement to an JSON string- Returns:
- JSON string
-