k8s_pb/api/authentication/v1/
mod.rs1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct BoundObjectReference {
5 #[prost(string, optional, tag = "1")]
8 pub kind: ::core::option::Option<::prost::alloc::string::String>,
9 #[prost(string, optional, tag = "2")]
12 pub api_version: ::core::option::Option<::prost::alloc::string::String>,
13 #[prost(string, optional, tag = "3")]
16 pub name: ::core::option::Option<::prost::alloc::string::String>,
17 #[prost(string, optional, tag = "4")]
20 pub u_id: ::core::option::Option<::prost::alloc::string::String>,
21}
22#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
28pub struct ExtraValue {
29 #[prost(string, repeated, tag = "1")]
30 pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct SelfSubjectReview {
37 #[prost(message, optional, tag = "1")]
41 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
42 #[prost(message, optional, tag = "2")]
44 pub status: ::core::option::Option<SelfSubjectReviewStatus>,
45}
46#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct SelfSubjectReviewStatus {
49 #[prost(message, optional, tag = "1")]
52 pub user_info: ::core::option::Option<UserInfo>,
53}
54#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct TokenRequest {
57 #[prost(message, optional, tag = "1")]
61 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
62 #[prost(message, optional, tag = "2")]
64 pub spec: ::core::option::Option<TokenRequestSpec>,
65 #[prost(message, optional, tag = "3")]
68 pub status: ::core::option::Option<TokenRequestStatus>,
69}
70#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
72pub struct TokenRequestSpec {
73 #[prost(string, repeated, tag = "1")]
81 pub audiences: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
82 #[prost(int64, optional, tag = "4")]
87 pub expiration_seconds: ::core::option::Option<i64>,
88 #[prost(message, optional, tag = "3")]
95 pub bound_object_ref: ::core::option::Option<BoundObjectReference>,
96}
97#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
99pub struct TokenRequestStatus {
100 #[prost(string, optional, tag = "1")]
102 pub token: ::core::option::Option<::prost::alloc::string::String>,
103 #[prost(message, optional, tag = "2")]
105 pub expiration_timestamp:
106 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct TokenReview {
113 #[prost(message, optional, tag = "1")]
117 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
118 #[prost(message, optional, tag = "2")]
120 pub spec: ::core::option::Option<TokenReviewSpec>,
121 #[prost(message, optional, tag = "3")]
124 pub status: ::core::option::Option<TokenReviewStatus>,
125}
126#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
128pub struct TokenReviewSpec {
129 #[prost(string, optional, tag = "1")]
132 pub token: ::core::option::Option<::prost::alloc::string::String>,
133 #[prost(string, repeated, tag = "2")]
141 pub audiences: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct TokenReviewStatus {
146 #[prost(bool, optional, tag = "1")]
149 pub authenticated: ::core::option::Option<bool>,
150 #[prost(message, optional, tag = "2")]
153 pub user: ::core::option::Option<UserInfo>,
154 #[prost(string, repeated, tag = "4")]
166 pub audiences: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
167 #[prost(string, optional, tag = "3")]
170 pub error: ::core::option::Option<::prost::alloc::string::String>,
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct UserInfo {
176 #[prost(string, optional, tag = "1")]
179 pub username: ::core::option::Option<::prost::alloc::string::String>,
180 #[prost(string, optional, tag = "2")]
185 pub uid: ::core::option::Option<::prost::alloc::string::String>,
186 #[prost(string, repeated, tag = "3")]
190 pub groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
191 #[prost(btree_map = "string, message", tag = "4")]
194 pub extra: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ExtraValue>,
195}
196
197impl crate::Resource for SelfSubjectReview {
198 const API_VERSION: &'static str = "authentication.k8s.io/v1";
199 const GROUP: &'static str = "authentication.k8s.io";
200 const VERSION: &'static str = "v1";
201 const KIND: &'static str = "SelfSubjectReview";
202 const URL_PATH_SEGMENT: &'static str = "selfsubjectreviews";
203 type Scope = crate::ClusterResourceScope;
204}
205impl crate::Metadata for SelfSubjectReview {
206 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
207 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
208 self.metadata.as_ref()
209 }
210 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
211 self.metadata.as_mut()
212 }
213}
214impl crate::HasStatus for SelfSubjectReview {
215 type Status = crate::api::authentication::v1::SelfSubjectReviewStatus;
216 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
217 self.status.as_ref()
218 }
219 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
220 self.status.as_mut()
221 }
222}
223
224impl crate::Resource for TokenReview {
225 const API_VERSION: &'static str = "authentication.k8s.io/v1";
226 const GROUP: &'static str = "authentication.k8s.io";
227 const VERSION: &'static str = "v1";
228 const KIND: &'static str = "TokenReview";
229 const URL_PATH_SEGMENT: &'static str = "tokenreviews";
230 type Scope = crate::ClusterResourceScope;
231}
232impl crate::Metadata for TokenReview {
233 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
234 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
235 self.metadata.as_ref()
236 }
237 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
238 self.metadata.as_mut()
239 }
240}
241impl crate::HasSpec for TokenReview {
242 type Spec = crate::api::authentication::v1::TokenReviewSpec;
243 fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
244 self.spec.as_ref()
245 }
246 fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
247 self.spec.as_mut()
248 }
249}
250impl crate::HasStatus for TokenReview {
251 type Status = crate::api::authentication::v1::TokenReviewStatus;
252 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
253 self.status.as_ref()
254 }
255 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
256 self.status.as_mut()
257 }
258}