-
Notifications
You must be signed in to change notification settings - Fork 0
/
rule_with_operations.cr
47 lines (40 loc) · 2.79 KB
/
rule_with_operations.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
36
37
38
39
40
41
42
43
44
45
46
47
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
@[::K8S::Properties(
api_groups: {type: Array(String), nilable: true, key: "apiGroups", getter: false, setter: false},
api_versions: {type: Array(String), nilable: true, key: "apiVersions", getter: false, setter: false},
operations: {type: Array(String), nilable: true, key: "operations", getter: false, setter: false},
resources: {type: Array(String), nilable: true, key: "resources", getter: false, setter: false},
)]
class Api::Admissionregistration::V1beta1::RuleWithOperations
include ::JSON::Serializable
include ::YAML::Serializable
# APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
@[::JSON::Field(key: "apiGroups", emit_null: false)]
@[::YAML::Field(key: "apiGroups", emit_null: false)]
property api_groups : Array(String) | Nil
# APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
@[::JSON::Field(key: "apiVersions", emit_null: false)]
@[::YAML::Field(key: "apiVersions", emit_null: false)]
property api_versions : Array(String) | Nil
# Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.
@[::JSON::Field(key: "operations", emit_null: false)]
@[::YAML::Field(key: "operations", emit_null: false)]
property operations : Array(String) | Nil
# Resources is a list of resources this rule applies to.
#
# For example: 'pods' means pods. ['pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.]('pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.)
#
# If wildcard is present, the validation rule will ensure resources do not overlap with each other.
#
# Depending on the enclosing object, subresources might not be allowed. Required.
@[::JSON::Field(key: "resources", emit_null: false)]
@[::YAML::Field(key: "resources", emit_null: false)]
property resources : Array(String) | Nil
def initialize(*, @api_groups : Array | Nil = nil, @api_versions : Array | Nil = nil, @operations : Array | Nil = nil, @resources : Array | Nil = nil)
end
end
end