-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.cr
183 lines (164 loc) · 12 KB
/
event.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
@[::K8S::GroupVersionKind(group: "events.k8s.io", kind: "Event", version: "v1", full: "io.k8s.api.events.v1.Event")]
@[::K8S::Properties(
action: {type: String, nilable: true, key: "action", getter: false, setter: false},
api_version: {type: String, nilable: true, key: "apiVersion", getter: false, setter: false},
deprecated_count: {type: Int32, nilable: true, key: "deprecatedCount", getter: false, setter: false},
deprecated_first_timestamp: {type: Time, nilable: true, key: "deprecatedFirstTimestamp", getter: false, setter: false},
deprecated_last_timestamp: {type: Time, nilable: true, key: "deprecatedLastTimestamp", getter: false, setter: false},
deprecated_source: {type: Api::Core::V1::EventSource, nilable: true, key: "deprecatedSource", getter: false, setter: false},
event_time: {type: Time, nilable: true, key: "eventTime", getter: false, setter: false},
kind: {type: String, nilable: true, key: "kind", getter: false, setter: false},
metadata: {type: Apimachinery::Apis::Meta::V1::ObjectMeta, nilable: false, key: "metadata", getter: false, setter: false},
note: {type: String, nilable: true, key: "note", getter: false, setter: false},
reason: {type: String, nilable: true, key: "reason", getter: false, setter: false},
regarding: {type: Api::Core::V1::ObjectReference, nilable: true, key: "regarding", getter: false, setter: false},
related: {type: Api::Core::V1::ObjectReference, nilable: true, key: "related", getter: false, setter: false},
reporting_controller: {type: String, nilable: true, key: "reportingController", getter: false, setter: false},
reporting_instance: {type: String, nilable: true, key: "reportingInstance", getter: false, setter: false},
series: {type: Api::Events::V1::EventSeries, nilable: true, key: "series", getter: false, setter: false},
type: {type: String, nilable: true, key: "type", getter: false, setter: false},
)]
@[::K8S::Action(name: "post", verb: "post",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "list", verb: "get",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events", toplevel: true,
args: [{name: "context", type: String | Nil, default: nil},
{name: "allow_watch_bookmarks", type: Bool | Nil, default: nil},
{name: "continue", type: String | Nil, default: nil},
{name: "field_selector", type: String | Nil, default: nil},
{name: "label_selector", type: String | Nil, default: nil},
{name: "limit", type: Int32 | Nil, default: nil},
{name: "resource_version", type: String | Nil, default: nil},
{name: "resource_version_match", type: String | Nil, default: nil},
{name: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "watch", type: Bool | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "deletecollection", verb: "delete",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events", toplevel: true,
args: [{name: "context", type: String | Nil, default: nil},
{name: "continue", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_selector", type: String | Nil, default: nil},
{name: "grace_period_seconds", type: Int32 | Nil, default: nil},
{name: "label_selector", type: String | Nil, default: nil},
{name: "limit", type: Int32 | Nil, default: nil},
{name: "orphan_dependents", type: Bool | Nil, default: nil},
{name: "propagation_policy", type: String | Nil, default: nil},
{name: "resource_version", type: String | Nil, default: nil},
{name: "resource_version_match", type: String | Nil, default: nil},
{name: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}", toplevel: true,
args: [{name: "name", type: String},
{name: "context", type: String | Nil, default: nil},
{name: "exact", type: Bool | Nil, default: nil},
{name: "export", type: Bool | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "put", verb: "put",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil}]
)]
@[::K8S::Action(name: "patch", verb: "path",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "field_manager", type: String | Nil, default: nil},
{name: "force", type: Bool | Nil, default: nil}]
)]
@[::K8S::Action(name: "delete", verb: "delete",
path: "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}", toplevel: false,
args: [{name: "context", type: String | Nil, default: nil},
{name: "dry_run", type: String | Nil, default: nil},
{name: "grace_period_seconds", type: Int32 | Nil, default: nil},
{name: "orphan_dependents", type: Bool | Nil, default: nil},
{name: "propagation_policy", type: String | Nil, default: nil}]
)]
class Api::Events::V1::Event < ::K8S::Kubernetes::Resource
include ::K8S::Kubernetes::Resource::Object
include ::JSON::Serializable
include ::YAML::Serializable
@[::JSON::Field(key: "apiVersion")]
@[::YAML::Field(key: "apiVersion")]
getter api_version : String = "events/v1"
getter kind : String = "Event"
# action is what action was [taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.](taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.)
@[::JSON::Field(key: "action", emit_null: false)]
@[::YAML::Field(key: "action", emit_null: false)]
property action : String | Nil
# deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
@[::JSON::Field(key: "deprecatedCount", emit_null: false)]
@[::YAML::Field(key: "deprecatedCount", emit_null: false)]
property deprecated_count : Int32 | Nil
# deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
@[::JSON::Field(key: "deprecatedFirstTimestamp", emit_null: false)]
@[::YAML::Field(key: "deprecatedFirstTimestamp", emit_null: false)]
property deprecated_first_timestamp : Time | Nil
# deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
@[::JSON::Field(key: "deprecatedLastTimestamp", emit_null: false)]
@[::YAML::Field(key: "deprecatedLastTimestamp", emit_null: false)]
property deprecated_last_timestamp : Time | Nil
# deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
@[::JSON::Field(key: "deprecatedSource", emit_null: false)]
@[::YAML::Field(key: "deprecatedSource", emit_null: false)]
property deprecated_source : Api::Core::V1::EventSource | Nil
# eventTime is the time when this Event was first observed. It is required.
@[::JSON::Field(key: "eventTime", emit_null: false)]
@[::YAML::Field(key: "eventTime", emit_null: false)]
property event_time : Time | Nil
@[::JSON::Field(key: "metadata", emit_null: true)]
@[::YAML::Field(key: "metadata", emit_null: true)]
property metadata : Apimachinery::Apis::Meta::V1::ObjectMeta
# note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
@[::JSON::Field(key: "note", emit_null: false)]
@[::YAML::Field(key: "note", emit_null: false)]
property note : String | Nil
# reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
@[::JSON::Field(key: "reason", emit_null: false)]
@[::YAML::Field(key: "reason", emit_null: false)]
property reason : String | Nil
# regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
@[::JSON::Field(key: "regarding", emit_null: false)]
@[::YAML::Field(key: "regarding", emit_null: false)]
property regarding : Api::Core::V1::ObjectReference | Nil
# related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
@[::JSON::Field(key: "related", emit_null: false)]
@[::YAML::Field(key: "related", emit_null: false)]
property related : Api::Core::V1::ObjectReference | Nil
# reportingController is the name of the controller that emitted this Event, e.g. [`kubernetes.io/kubelet`. This field cannot be empty for new Events.](`kubernetes.io/kubelet`. This field cannot be empty for new Events.)
@[::JSON::Field(key: "reportingController", emit_null: false)]
@[::YAML::Field(key: "reportingController", emit_null: false)]
property reporting_controller : String | Nil
# reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
@[::JSON::Field(key: "reportingInstance", emit_null: false)]
@[::YAML::Field(key: "reportingInstance", emit_null: false)]
property reporting_instance : String | Nil
# series is data about the Event series this event represents or nil if it's a singleton Event.
@[::JSON::Field(key: "series", emit_null: false)]
@[::YAML::Field(key: "series", emit_null: false)]
property series : Api::Events::V1::EventSeries | Nil
# type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
@[::JSON::Field(key: "type", emit_null: false)]
@[::YAML::Field(key: "type", emit_null: false)]
property type : String | Nil
def initialize(*, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta, @action : String | Nil = nil, @deprecated_count : Int32 | Nil = nil, @deprecated_first_timestamp : Time | Nil = nil, @deprecated_last_timestamp : Time | Nil = nil, @deprecated_source : Api::Core::V1::EventSource | Nil = nil, @event_time : Time | Nil = nil, @note : String | Nil = nil, @reason : String | Nil = nil, @regarding : Api::Core::V1::ObjectReference | Nil = nil, @related : Api::Core::V1::ObjectReference | Nil = nil, @reporting_controller : String | Nil = nil, @reporting_instance : String | Nil = nil, @series : Api::Events::V1::EventSeries | Nil = nil, @type : String | Nil = nil)
end
end
module Resources::Events::V1
alias Event = ::K8S::Api::Events::V1::Event
end
end