k8s_pb/api/scheduling/v1/mod.rs
1// This file is @generated by prost-build.
2/// PriorityClass defines mapping from a priority class name to the priority
3/// integer value. The value can be any valid integer.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct PriorityClass {
6 /// Standard object's metadata.
7 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
8 /// +optional
9 #[prost(message, optional, tag = "1")]
10 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
11 /// value represents the integer value of this priority class. This is the actual priority that pods
12 /// receive when they have the name of this class in their pod spec.
13 #[prost(int32, optional, tag = "2")]
14 pub value: ::core::option::Option<i32>,
15 /// globalDefault specifies whether this PriorityClass should be considered as
16 /// the default priority for pods that do not have any priority class.
17 /// Only one PriorityClass can be marked as `globalDefault`. However, if more than
18 /// one PriorityClasses exists with their `globalDefault` field set to true,
19 /// the smallest value of such global default PriorityClasses will be used as the default priority.
20 /// +optional
21 #[prost(bool, optional, tag = "3")]
22 pub global_default: ::core::option::Option<bool>,
23 /// description is an arbitrary string that usually provides guidelines on
24 /// when this priority class should be used.
25 /// +optional
26 #[prost(string, optional, tag = "4")]
27 pub description: ::core::option::Option<::prost::alloc::string::String>,
28 /// preemptionPolicy is the Policy for preempting pods with lower priority.
29 /// One of Never, PreemptLowerPriority.
30 /// Defaults to PreemptLowerPriority if unset.
31 /// +optional
32 #[prost(string, optional, tag = "5")]
33 pub preemption_policy: ::core::option::Option<::prost::alloc::string::String>,
34}
35/// PriorityClassList is a collection of priority classes.
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct PriorityClassList {
38 /// Standard list metadata
39 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
40 /// +optional
41 #[prost(message, optional, tag = "1")]
42 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
43 /// items is the list of PriorityClasses
44 #[prost(message, repeated, tag = "2")]
45 pub items: ::prost::alloc::vec::Vec<PriorityClass>,
46}
47
48impl crate::Resource for PriorityClass {
49 const API_VERSION: &'static str = "scheduling.k8s.io/v1";
50 const GROUP: &'static str = "scheduling.k8s.io";
51 const VERSION: &'static str = "v1";
52 const KIND: &'static str = "PriorityClass";
53 const URL_PATH_SEGMENT: &'static str = "priorityclasses";
54 type Scope = crate::ClusterResourceScope;
55}
56impl crate::Metadata for PriorityClass {
57 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
58 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
59 self.metadata.as_ref()
60 }
61 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
62 self.metadata.as_mut()
63 }
64}