-
Notifications
You must be signed in to change notification settings - Fork 0
/
label_selector_requirement.cr
35 lines (29 loc) · 1.56 KB
/
label_selector_requirement.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
@[::K8S::Properties(
key: {type: String, nilable: false, key: "key", getter: false, setter: false},
operator: {type: String, nilable: false, key: "operator", getter: false, setter: false},
values: {type: Array(String), nilable: true, key: "values", getter: false, setter: false},
)]
class Apimachinery::Apis::Meta::V1::LabelSelectorRequirement
include ::JSON::Serializable
include ::YAML::Serializable
# key is the label key that the selector applies to.
@[::JSON::Field(key: "key", emit_null: true)]
@[::YAML::Field(key: "key", emit_null: true)]
property key : String
# operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
@[::JSON::Field(key: "operator", emit_null: true)]
@[::YAML::Field(key: "operator", emit_null: true)]
property operator : String
# 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.
@[::JSON::Field(key: "values", emit_null: false)]
@[::YAML::Field(key: "values", emit_null: false)]
property values : Array(String) | Nil
def initialize(*, @key : String, @operator : String, @values : Array | Nil = nil)
end
end
end