-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.cr
184 lines (165 loc) · 10.4 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
184
# 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.
@[::K8S::GroupVersionKind(group: "", kind: "Event", version: "v1", full: "io.k8s.api.core.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},
count: {type: Int32, nilable: true, key: "count", getter: false, setter: false},
event_time: {type: Time, nilable: true, key: "eventTime", getter: false, setter: false},
first_timestamp: {type: Time, nilable: true, key: "firstTimestamp", getter: false, setter: false},
involved_object: {type: Api::Core::V1::ObjectReference, nilable: false, key: "involvedObject", getter: false, setter: false},
kind: {type: String, nilable: true, key: "kind", getter: false, setter: false},
last_timestamp: {type: Time, nilable: true, key: "lastTimestamp", getter: false, setter: false},
message: {type: String, nilable: true, key: "message", getter: false, setter: false},
metadata: {type: Apimachinery::Apis::Meta::V1::ObjectMeta, nilable: false, key: "metadata", getter: false, setter: false},
reason: {type: String, nilable: true, key: "reason", getter: false, setter: false},
related: {type: Api::Core::V1::ObjectReference, nilable: true, key: "related", getter: false, setter: false},
reporting_component: {type: String, nilable: true, key: "reportingComponent", getter: false, setter: false},
reporting_instance: {type: String, nilable: true, key: "reportingInstance", getter: false, setter: false},
series: {type: Api::Core::V1::EventSeries, nilable: true, key: "series", getter: false, setter: false},
source: {type: Api::Core::V1::EventSource, nilable: true, key: "source", getter: false, setter: false},
type: {type: String, nilable: true, key: "type", getter: false, setter: false},
)]
@[::K8S::Action(name: "post", verb: "post",
path: "/api/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: "/api/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: "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: "/api/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: "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: "timeout_seconds", type: Int32 | Nil, default: nil},
{name: "watch", type: Bool | Nil, default: nil},
{name: "namespace", type: String, default: "default"}]
)]
@[::K8S::Action(name: "get", verb: "get",
path: "/api/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: "/api/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: "/api/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: "/api/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::Core::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 = "v1"
getter kind : String = "Event"
# What action was [taken/failed regarding to the Regarding object.](taken/failed regarding to the Regarding object.)
@[::JSON::Field(key: "action", emit_null: false)]
@[::YAML::Field(key: "action", emit_null: false)]
property action : String | Nil
# The number of times this event has occurred.
@[::JSON::Field(key: "count", emit_null: false)]
@[::YAML::Field(key: "count", emit_null: false)]
property count : Int32 | Nil
# Time when this Event was first observed.
@[::JSON::Field(key: "eventTime", emit_null: false)]
@[::YAML::Field(key: "eventTime", emit_null: false)]
property event_time : Time | Nil
# The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
@[::JSON::Field(key: "firstTimestamp", emit_null: false)]
@[::YAML::Field(key: "firstTimestamp", emit_null: false)]
property first_timestamp : Time | Nil
# The object that this event is about.
@[::JSON::Field(key: "involvedObject", emit_null: true)]
@[::YAML::Field(key: "involvedObject", emit_null: true)]
property involved_object : Api::Core::V1::ObjectReference
# The time at which the most recent occurrence of this event was recorded.
@[::JSON::Field(key: "lastTimestamp", emit_null: false)]
@[::YAML::Field(key: "lastTimestamp", emit_null: false)]
property last_timestamp : Time | Nil
# A human-readable description of the status of this operation.
@[::JSON::Field(key: "message", emit_null: false)]
@[::YAML::Field(key: "message", emit_null: false)]
property message : String | Nil
# Standard object's metadata. More info: [https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata)
@[::JSON::Field(key: "metadata", emit_null: true)]
@[::YAML::Field(key: "metadata", emit_null: true)]
property metadata : Apimachinery::Apis::Meta::V1::ObjectMeta
# This should be a short, machine understandable string that gives the reason for the transition into the object's current status.
@[::JSON::Field(key: "reason", emit_null: false)]
@[::YAML::Field(key: "reason", emit_null: false)]
property reason : String | Nil
# Optional secondary object for more complex actions.
@[::JSON::Field(key: "related", emit_null: false)]
@[::YAML::Field(key: "related", emit_null: false)]
property related : Api::Core::V1::ObjectReference | Nil
# Name of the controller that emitted this Event, e.g. [`kubernetes.io/kubelet`.](`kubernetes.io/kubelet`.)
@[::JSON::Field(key: "reportingComponent", emit_null: false)]
@[::YAML::Field(key: "reportingComponent", emit_null: false)]
property reporting_component : String | Nil
# ID of the controller instance, e.g. `kubelet-xyzf`.
@[::JSON::Field(key: "reportingInstance", emit_null: false)]
@[::YAML::Field(key: "reportingInstance", emit_null: false)]
property reporting_instance : String | Nil
# 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::Core::V1::EventSeries | Nil
# The component reporting this event. Should be a short machine understandable string.
@[::JSON::Field(key: "source", emit_null: false)]
@[::YAML::Field(key: "source", emit_null: false)]
property source : Api::Core::V1::EventSource | Nil
# Type of this event (Normal, Warning), new types could be added in the future
@[::JSON::Field(key: "type", emit_null: false)]
@[::YAML::Field(key: "type", emit_null: false)]
property type : String | Nil
def initialize(*, @involved_object : Api::Core::V1::ObjectReference, @metadata : Apimachinery::Apis::Meta::V1::ObjectMeta, @action : String | Nil = nil, @count : Int32 | Nil = nil, @event_time : Time | Nil = nil, @first_timestamp : Time | Nil = nil, @last_timestamp : Time | Nil = nil, @message : String | Nil = nil, @reason : String | Nil = nil, @related : Api::Core::V1::ObjectReference | Nil = nil, @reporting_component : String | Nil = nil, @reporting_instance : String | Nil = nil, @series : Api::Core::V1::EventSeries | Nil = nil, @source : Api::Core::V1::EventSource | Nil = nil, @type : String | Nil = nil)
end
end
module Resources::V1
alias Event = ::K8S::Api::Core::V1::Event
end
end