Class V1ScopedResourceSelectorRequirement

java.lang.Object
io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class V1ScopedResourceSelectorRequirement extends Object
A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.
  • Field Details

  • Constructor Details

    • V1ScopedResourceSelectorRequirement

      public V1ScopedResourceSelectorRequirement()
  • Method Details

    • operator

      public V1ScopedResourceSelectorRequirement operator(String operator)
    • getOperator

      @Nonnull public String getOperator()
      Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.
      Returns:
      operator
    • setOperator

      public void setOperator(String operator)
    • scopeName

      public V1ScopedResourceSelectorRequirement scopeName(String scopeName)
    • getScopeName

      @Nonnull public String getScopeName()
      The name of the scope that the selector applies to.
      Returns:
      scopeName
    • setScopeName

      public void setScopeName(String scopeName)
    • values

    • addValuesItem

      public V1ScopedResourceSelectorRequirement addValuesItem(String valuesItem)
    • getValues

      @Nullable public List<String> getValues()
      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

      public void setValues(List<String> values)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      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 V1ScopedResourceSelectorRequirement
    • fromJson

      public static V1ScopedResourceSelectorRequirement fromJson(String jsonString) throws IOException
      Create an instance of V1ScopedResourceSelectorRequirement given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1ScopedResourceSelectorRequirement
      Throws:
      IOException - if the JSON string is invalid with respect to V1ScopedResourceSelectorRequirement
    • toJson

      public String toJson()
      Convert an instance of V1ScopedResourceSelectorRequirement to an JSON string
      Returns:
      JSON string