k8s-pb 0.6.0

Bindings for the Kubernetes Client API
Documentation
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
// This file is @generated by prost-build.
/// AllocationResult contains attributes of an allocated resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocationResult {
    /// Devices is the result of allocating devices.
    ///
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub devices: ::core::option::Option<DeviceAllocationResult>,
    /// NodeSelector defines where the allocated resources are available. If
    /// unset, they are available everywhere.
    ///
    /// +optional
    #[prost(message, optional, tag = "3")]
    pub node_selector: ::core::option::Option<super::super::core::v1::NodeSelector>,
    /// Controller is the name of the DRA driver which handled the
    /// allocation. That driver is also responsible for deallocating the
    /// claim. It is empty when the claim can be deallocated without
    /// involving a driver.
    ///
    /// A driver may allocate devices provided by other drivers, so this
    /// driver name here can be different from the driver names listed for
    /// the results.
    ///
    /// This is an alpha field and requires enabling the DRAControlPlaneController
    /// feature gate.
    ///
    /// +optional
    /// +featureGate=DRAControlPlaneController
    #[prost(string, optional, tag = "4")]
    pub controller: ::core::option::Option<::prost::alloc::string::String>,
}
/// BasicDevice defines one device instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasicDevice {
    /// Attributes defines the set of attributes for this device.
    /// The name of each attribute must be unique in that set.
    ///
    /// The maximum number of attributes and capacities combined is 32.
    ///
    /// +optional
    #[prost(btree_map = "string, message", tag = "1")]
    pub attributes: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, DeviceAttribute>,
    /// Capacity defines the set of capacities for this device.
    /// The name of each capacity must be unique in that set.
    ///
    /// The maximum number of attributes and capacities combined is 32.
    ///
    /// +optional
    #[prost(btree_map = "string, message", tag = "2")]
    pub capacity: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        super::super::super::apimachinery::pkg::api::resource::Quantity,
    >,
}
/// CELDeviceSelector contains a CEL expression for selecting a device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CelDeviceSelector {
    /// Expression is a CEL expression which evaluates a single device. It
    /// must evaluate to true when the device under consideration satisfies
    /// the desired criteria, and false when it does not. Any other result
    /// is an error and causes allocation of devices to abort.
    ///
    /// The expression's input is an object named "device", which carries
    /// the following properties:
    ///   - driver (string): the name of the driver which defines this device.
    ///   - attributes (map\[string\]object): the device's attributes, grouped by prefix
    ///     (e.g. device.attributes\["dra.example.com"\] evaluates to an object with all
    ///     of the attributes which were prefixed by "dra.example.com".
    ///   - capacity (map\[string\]object): the device's capacities, grouped by prefix.
    ///
    /// Example: Consider a device with driver="dra.example.com", which exposes
    /// two attributes named "model" and "ext.example.com/family" and which
    /// exposes one capacity named "modules". This input to this expression
    /// would have the following fields:
    ///
    ///      device.driver
    ///      device.attributes\["dra.example.com"\].model
    ///      device.attributes\["ext.example.com"\].family
    ///      device.capacity\["dra.example.com"\].modules
    ///
    /// The device.driver field can be used to check for a specific driver,
    /// either as a high-level precondition (i.e. you only want to consider
    /// devices from this driver) or as part of a multi-clause expression
    /// that is meant to consider devices from different drivers.
    ///
    /// The value type of each attribute is defined by the device
    /// definition, and users who write these expressions must consult the
    /// documentation for their specific drivers. The value type of each
    /// capacity is Quantity.
    ///
    /// If an unknown prefix is used as a lookup in either device.attributes
    /// or device.capacity, an empty map will be returned. Any reference to
    /// an unknown field will cause an evaluation error and allocation to
    /// abort.
    ///
    /// A robust expression should check for the existence of attributes
    /// before referencing them.
    ///
    /// For ease of use, the cel.bind() function is enabled, and can be used
    /// to simplify expressions that access multiple attributes with the
    /// same domain. For example:
    ///
    ///      cel.bind(dra, device.attributes\["dra.example.com"\], dra.someBool && dra.anotherBool)
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub expression: ::core::option::Option<::prost::alloc::string::String>,
}
/// Device represents one individual hardware instance that can be selected based
/// on its attributes. Besides the name, exactly one field must be set.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Device {
    /// Name is unique identifier among all devices managed by
    /// the driver in the pool. It must be a DNS label.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// Basic defines one device instance.
    ///
    /// +optional
    /// +oneOf=deviceType
    #[prost(message, optional, tag = "2")]
    pub basic: ::core::option::Option<BasicDevice>,
}
/// DeviceAllocationConfiguration gets embedded in an AllocationResult.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceAllocationConfiguration {
    /// Source records whether the configuration comes from a class and thus
    /// is not something that a normal user would have been able to set
    /// or from a claim.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub source: ::core::option::Option<::prost::alloc::string::String>,
    /// Requests lists the names of requests where the configuration applies.
    /// If empty, its applies to all requests.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(string, repeated, tag = "2")]
    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "3")]
    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
}
/// DeviceAllocationResult is the result of allocating devices.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceAllocationResult {
    /// Results lists all allocated devices.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "1")]
    pub results: ::prost::alloc::vec::Vec<DeviceRequestAllocationResult>,
    /// This field is a combination of all the claim and class configuration parameters.
    /// Drivers can distinguish between those based on a flag.
    ///
    /// This includes configuration parameters for drivers which have no allocated
    /// devices in the result because it is up to the drivers which configuration
    /// parameters they support. They can silently ignore unknown configuration
    /// parameters.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "2")]
    pub config: ::prost::alloc::vec::Vec<DeviceAllocationConfiguration>,
}
/// DeviceAttribute must have exactly one field set.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceAttribute {
    /// IntValue is a number.
    ///
    /// +optional
    /// +oneOf=ValueType
    #[prost(int64, optional, tag = "2")]
    pub int: ::core::option::Option<i64>,
    /// BoolValue is a true/false value.
    ///
    /// +optional
    /// +oneOf=ValueType
    #[prost(bool, optional, tag = "3")]
    pub bool: ::core::option::Option<bool>,
    /// StringValue is a string. Must not be longer than 64 characters.
    ///
    /// +optional
    /// +oneOf=ValueType
    #[prost(string, optional, tag = "4")]
    pub string: ::core::option::Option<::prost::alloc::string::String>,
    /// VersionValue is a semantic version according to semver.org spec 2.0.0.
    /// Must not be longer than 64 characters.
    ///
    /// +optional
    /// +oneOf=ValueType
    #[prost(string, optional, tag = "5")]
    pub version: ::core::option::Option<::prost::alloc::string::String>,
}
/// DeviceClaim defines how to request devices with a ResourceClaim.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClaim {
    /// Requests represent individual requests for distinct devices which
    /// must all be satisfied. If empty, nothing needs to be allocated.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "1")]
    pub requests: ::prost::alloc::vec::Vec<DeviceRequest>,
    /// These constraints must be satisfied by the set of devices that get
    /// allocated for the claim.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "2")]
    pub constraints: ::prost::alloc::vec::Vec<DeviceConstraint>,
    /// This field holds configuration for multiple potential drivers which
    /// could satisfy requests in this claim. It is ignored while allocating
    /// the claim.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "3")]
    pub config: ::prost::alloc::vec::Vec<DeviceClaimConfiguration>,
}
/// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClaimConfiguration {
    /// Requests lists the names of requests where the configuration applies.
    /// If empty, it applies to all requests.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(string, repeated, tag = "1")]
    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "2")]
    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
}
/// DeviceClass is a vendor- or admin-provided resource that contains
/// device configuration and selectors. It can be referenced in
/// the device requests of a claim to apply these presets.
/// Cluster scoped.
///
/// This is an alpha type and requires enabling the DynamicResourceAllocation
/// feature gate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClass {
    /// Standard object metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Spec defines what can be allocated and how to configure it.
    ///
    /// This is mutable. Consumers have to be prepared for classes changing
    /// at any time, either because they get updated or replaced. Claim
    /// allocations are done once based on whatever was set in classes at
    /// the time of allocation.
    ///
    /// Changing the spec automatically increments the metadata.generation number.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<DeviceClassSpec>,
}
/// DeviceClassConfiguration is used in DeviceClass.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClassConfiguration {
    #[prost(message, optional, tag = "1")]
    pub device_configuration: ::core::option::Option<DeviceConfiguration>,
}
/// DeviceClassList is a collection of classes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClassList {
    /// Standard list metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
    /// Items is the list of resource classes.
    #[prost(message, repeated, tag = "2")]
    pub items: ::prost::alloc::vec::Vec<DeviceClass>,
}
/// DeviceClassSpec is used in a \[DeviceClass\] to define what can be allocated
/// and how to configure it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceClassSpec {
    /// Each selector must be satisfied by a device which is claimed via this class.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "1")]
    pub selectors: ::prost::alloc::vec::Vec<DeviceSelector>,
    /// Config defines configuration parameters that apply to each device that is claimed via this class.
    /// Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
    /// configuration applies to exactly one driver.
    ///
    /// They are passed to the driver, but are not considered while allocating the claim.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "2")]
    pub config: ::prost::alloc::vec::Vec<DeviceClassConfiguration>,
    /// Only nodes matching the selector will be considered by the scheduler
    /// when trying to find a Node that fits a Pod when that Pod uses
    /// a claim that has not been allocated yet *and* that claim
    /// gets allocated through a control plane controller. It is ignored
    /// when the claim does not use a control plane controller
    /// for allocation.
    ///
    /// Setting this field is optional. If unset, all Nodes are candidates.
    ///
    /// This is an alpha field and requires enabling the DRAControlPlaneController
    /// feature gate.
    ///
    /// +optional
    /// +featureGate=DRAControlPlaneController
    #[prost(message, optional, tag = "3")]
    pub suitable_nodes: ::core::option::Option<super::super::core::v1::NodeSelector>,
}
/// DeviceConfiguration must have exactly one field set. It gets embedded
/// inline in some other structs which have other fields, so field names must
/// not conflict with those.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceConfiguration {
    /// Opaque provides driver-specific configuration parameters.
    ///
    /// +optional
    /// +oneOf=ConfigurationType
    #[prost(message, optional, tag = "1")]
    pub opaque: ::core::option::Option<OpaqueDeviceConfiguration>,
}
/// DeviceConstraint must have exactly one field set besides Requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceConstraint {
    /// Requests is a list of the one or more requests in this claim which
    /// must co-satisfy this constraint. If a request is fulfilled by
    /// multiple devices, then all of the devices must satisfy the
    /// constraint. If this is not specified, this constraint applies to all
    /// requests in this claim.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(string, repeated, tag = "1")]
    pub requests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// MatchAttribute requires that all devices in question have this
    /// attribute and that its type and value are the same across those
    /// devices.
    ///
    /// For example, if you specified "dra.example.com/numa" (a hypothetical example!),
    /// then only devices in the same NUMA node will be chosen. A device which
    /// does not have that attribute will not be chosen. All devices should
    /// use a value of the same type for this attribute because that is part of
    /// its specification, but if one device doesn't, then it also will not be
    /// chosen.
    ///
    /// Must include the domain qualifier.
    ///
    /// +optional
    /// +oneOf=ConstraintType
    #[prost(string, optional, tag = "2")]
    pub match_attribute: ::core::option::Option<::prost::alloc::string::String>,
}
/// DeviceRequest is a request for devices required for a claim.
/// This is typically a request for a single resource like a device, but can
/// also ask for several identical devices.
///
/// A DeviceClassName is currently required. Clients must check that it is
/// indeed set. It's absence indicates that something changed in a way that
/// is not supported by the client yet, in which case it must refuse to
/// handle the request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceRequest {
    /// Name can be used to reference this request in a pod.spec.containers\[\].resources.claims
    /// entry and in a constraint of the claim.
    ///
    /// Must be a DNS label.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// DeviceClassName references a specific DeviceClass, which can define
    /// additional configuration and selectors to be inherited by this
    /// request.
    ///
    /// A class is required. Which classes are available depends on the cluster.
    ///
    /// Administrators may use this to restrict which devices may get
    /// requested by only installing classes with selectors for permitted
    /// devices. If users are free to request anything without restrictions,
    /// then administrators can create an empty DeviceClass for users
    /// to reference.
    ///
    /// +required
    #[prost(string, optional, tag = "2")]
    pub device_class_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Selectors define criteria which must be satisfied by a specific
    /// device in order for that device to be considered for this
    /// request. All selectors must be satisfied for a device to be
    /// considered.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "3")]
    pub selectors: ::prost::alloc::vec::Vec<DeviceSelector>,
    /// AllocationMode and its related fields define how devices are allocated
    /// to satisfy this request. Supported values are:
    ///
    /// - ExactCount: This request is for a specific number of devices.
    ///    This is the default. The exact number is provided in the
    ///    count field.
    ///
    /// - All: This request is for all of the matching devices in a pool.
    ///    Allocation will fail if some devices are already allocated,
    ///    unless adminAccess is requested.
    ///
    /// If AlloctionMode is not specified, the default mode is ExactCount. If
    /// the mode is ExactCount and count is not specified, the default count is
    /// one. Any other requests must specify this field.
    ///
    /// More modes may get added in the future. Clients must refuse to handle
    /// requests with unknown modes.
    ///
    /// +optional
    #[prost(string, optional, tag = "4")]
    pub allocation_mode: ::core::option::Option<::prost::alloc::string::String>,
    /// Count is used only when the count mode is "ExactCount". Must be greater than zero.
    /// If AllocationMode is ExactCount and this field is not specified, the default is one.
    ///
    /// +optional
    /// +oneOf=AllocationMode
    #[prost(int64, optional, tag = "5")]
    pub count: ::core::option::Option<i64>,
    /// AdminAccess indicates that this is a claim for administrative access
    /// to the device(s). Claims with AdminAccess are expected to be used for
    /// monitoring or other management services for a device.  They ignore
    /// all ordinary claims to the device with respect to access modes and
    /// any resource allocations.
    ///
    /// +optional
    /// +default=false
    #[prost(bool, optional, tag = "6")]
    pub admin_access: ::core::option::Option<bool>,
}
/// DeviceRequestAllocationResult contains the allocation result for one request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceRequestAllocationResult {
    /// Request is the name of the request in the claim which caused this
    /// device to be allocated. Multiple devices may have been allocated
    /// per request.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub request: ::core::option::Option<::prost::alloc::string::String>,
    /// Driver specifies the name of the DRA driver whose kubelet
    /// plugin should be invoked to process the allocation once the claim is
    /// needed on a node.
    ///
    /// Must be a DNS subdomain and should end with a DNS domain owned by the
    /// vendor of the driver.
    ///
    /// +required
    #[prost(string, optional, tag = "2")]
    pub driver: ::core::option::Option<::prost::alloc::string::String>,
    /// This name together with the driver name and the device name field
    /// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
    ///
    /// Must not be longer than 253 characters and may contain one or more
    /// DNS sub-domains separated by slashes.
    ///
    /// +required
    #[prost(string, optional, tag = "3")]
    pub pool: ::core::option::Option<::prost::alloc::string::String>,
    /// Device references one device instance via its name in the driver's
    /// resource pool. It must be a DNS label.
    ///
    /// +required
    #[prost(string, optional, tag = "4")]
    pub device: ::core::option::Option<::prost::alloc::string::String>,
}
/// DeviceSelector must have exactly one field set.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceSelector {
    /// CEL contains a CEL expression for selecting a device.
    ///
    /// +optional
    /// +oneOf=SelectorType
    #[prost(message, optional, tag = "1")]
    pub cel: ::core::option::Option<CelDeviceSelector>,
}
/// OpaqueDeviceConfiguration contains configuration parameters for a driver
/// in a format defined by the driver vendor.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpaqueDeviceConfiguration {
    /// Driver is used to determine which kubelet plugin needs
    /// to be passed these configuration parameters.
    ///
    /// An admission policy provided by the driver developer could use this
    /// to decide whether it needs to validate them.
    ///
    /// Must be a DNS subdomain and should end with a DNS domain owned by the
    /// vendor of the driver.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub driver: ::core::option::Option<::prost::alloc::string::String>,
    /// Parameters can contain arbitrary data. It is the responsibility of
    /// the driver developer to handle validation and versioning. Typically this
    /// includes self-identification and a version ("kind" + "apiVersion" for
    /// Kubernetes types), with conversion between different versions.
    ///
    /// +required
    #[prost(message, optional, tag = "2")]
    pub parameters: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
}
/// PodSchedulingContext objects hold information that is needed to schedule
/// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
/// mode.
///
/// This is an alpha type and requires enabling the DRAControlPlaneController
/// feature gate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PodSchedulingContext {
    /// Standard object metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Spec describes where resources for the Pod are needed.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<PodSchedulingContextSpec>,
    /// Status describes where resources for the Pod can be allocated.
    ///
    /// +optional
    #[prost(message, optional, tag = "3")]
    pub status: ::core::option::Option<PodSchedulingContextStatus>,
}
/// PodSchedulingContextList is a collection of Pod scheduling objects.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PodSchedulingContextList {
    /// Standard list metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
    /// Items is the list of PodSchedulingContext objects.
    #[prost(message, repeated, tag = "2")]
    pub items: ::prost::alloc::vec::Vec<PodSchedulingContext>,
}
/// PodSchedulingContextSpec describes where resources for the Pod are needed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PodSchedulingContextSpec {
    /// SelectedNode is the node for which allocation of ResourceClaims that
    /// are referenced by the Pod and that use "WaitForFirstConsumer"
    /// allocation is to be attempted.
    ///
    /// +optional
    #[prost(string, optional, tag = "1")]
    pub selected_node: ::core::option::Option<::prost::alloc::string::String>,
    /// PotentialNodes lists nodes where the Pod might be able to run.
    ///
    /// The size of this field is limited to 128. This is large enough for
    /// many clusters. Larger clusters may need more attempts to find a node
    /// that suits all pending resources. This may get increased in the
    /// future, but not reduced.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(string, repeated, tag = "2")]
    pub potential_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// PodSchedulingContextStatus describes where resources for the Pod can be allocated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PodSchedulingContextStatus {
    /// ResourceClaims describes resource availability for each
    /// pod.spec.resourceClaim entry where the corresponding ResourceClaim
    /// uses "WaitForFirstConsumer" allocation mode.
    ///
    /// +listType=map
    /// +listMapKey=name
    /// +optional
    #[prost(message, repeated, tag = "1")]
    pub resource_claims: ::prost::alloc::vec::Vec<ResourceClaimSchedulingStatus>,
}
/// ResourceClaim describes a request for access to resources in the cluster,
/// for use by workloads. For example, if a workload needs an accelerator device
/// with specific properties, this is how that request is expressed. The status
/// stanza tracks whether this claim has been satisfied and what specific
/// resources have been allocated.
///
/// This is an alpha type and requires enabling the DynamicResourceAllocation
/// feature gate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaim {
    /// Standard object metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Spec describes what is being requested and how to configure it.
    /// The spec is immutable.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<ResourceClaimSpec>,
    /// Status describes whether the claim is ready to use and what has been allocated.
    /// +optional
    #[prost(message, optional, tag = "3")]
    pub status: ::core::option::Option<ResourceClaimStatus>,
}
/// ResourceClaimConsumerReference contains enough information to let you
/// locate the consumer of a ResourceClaim. The user must be a resource in the same
/// namespace as the ResourceClaim.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimConsumerReference {
    /// APIGroup is the group for the resource being referenced. It is
    /// empty for the core API. This matches the group in the APIVersion
    /// that is used when creating the resources.
    /// +optional
    #[prost(string, optional, tag = "1")]
    pub api_group: ::core::option::Option<::prost::alloc::string::String>,
    /// Resource is the type of resource being referenced, for example "pods".
    /// +required
    #[prost(string, optional, tag = "3")]
    pub resource: ::core::option::Option<::prost::alloc::string::String>,
    /// Name is the name of resource being referenced.
    /// +required
    #[prost(string, optional, tag = "4")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// UID identifies exactly one incarnation of the resource.
    /// +required
    #[prost(string, optional, tag = "5")]
    pub uid: ::core::option::Option<::prost::alloc::string::String>,
}
/// ResourceClaimList is a collection of claims.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimList {
    /// Standard list metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
    /// Items is the list of resource claims.
    #[prost(message, repeated, tag = "2")]
    pub items: ::prost::alloc::vec::Vec<ResourceClaim>,
}
/// ResourceClaimSchedulingStatus contains information about one particular
/// ResourceClaim with "WaitForFirstConsumer" allocation mode.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimSchedulingStatus {
    /// Name matches the pod.spec.resourceClaims\[*\].Name field.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// UnsuitableNodes lists nodes that the ResourceClaim cannot be
    /// allocated for.
    ///
    /// The size of this field is limited to 128, the same as for
    /// PodSchedulingSpec.PotentialNodes. This may get increased in the
    /// future, but not reduced.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(string, repeated, tag = "2")]
    pub unsuitable_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimSpec {
    /// Devices defines how to request devices.
    ///
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub devices: ::core::option::Option<DeviceClaim>,
    /// Controller is the name of the DRA driver that is meant
    /// to handle allocation of this claim. If empty, allocation is handled
    /// by the scheduler while scheduling a pod.
    ///
    /// Must be a DNS subdomain and should end with a DNS domain owned by the
    /// vendor of the driver.
    ///
    /// This is an alpha field and requires enabling the DRAControlPlaneController
    /// feature gate.
    ///
    /// +optional
    /// +featureGate=DRAControlPlaneController
    #[prost(string, optional, tag = "2")]
    pub controller: ::core::option::Option<::prost::alloc::string::String>,
}
/// ResourceClaimStatus tracks whether the resource has been allocated and what
/// the result of that was.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimStatus {
    /// Allocation is set once the claim has been allocated successfully.
    ///
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub allocation: ::core::option::Option<AllocationResult>,
    /// ReservedFor indicates which entities are currently allowed to use
    /// the claim. A Pod which references a ResourceClaim which is not
    /// reserved for that Pod will not be started. A claim that is in
    /// use or might be in use because it has been reserved must not get
    /// deallocated.
    ///
    /// In a cluster with multiple scheduler instances, two pods might get
    /// scheduled concurrently by different schedulers. When they reference
    /// the same ResourceClaim which already has reached its maximum number
    /// of consumers, only one pod can be scheduled.
    ///
    /// Both schedulers try to add their pod to the claim.status.reservedFor
    /// field, but only the update that reaches the API server first gets
    /// stored. The other one fails with an error and the scheduler
    /// which issued it knows that it must put the pod back into the queue,
    /// waiting for the ResourceClaim to become usable again.
    ///
    /// There can be at most 32 such reservations. This may get increased in
    /// the future, but not reduced.
    ///
    /// +optional
    /// +listType=map
    /// +listMapKey=uid
    /// +patchStrategy=merge
    /// +patchMergeKey=uid
    #[prost(message, repeated, tag = "2")]
    pub reserved_for: ::prost::alloc::vec::Vec<ResourceClaimConsumerReference>,
    /// Indicates that a claim is to be deallocated. While this is set,
    /// no new consumers may be added to ReservedFor.
    ///
    /// This is only used if the claim needs to be deallocated by a DRA driver.
    /// That driver then must deallocate this claim and reset the field
    /// together with clearing the Allocation field.
    ///
    /// This is an alpha field and requires enabling the DRAControlPlaneController
    /// feature gate.
    ///
    /// +optional
    /// +featureGate=DRAControlPlaneController
    #[prost(bool, optional, tag = "3")]
    pub deallocation_requested: ::core::option::Option<bool>,
}
/// ResourceClaimTemplate is used to produce ResourceClaim objects.
///
/// This is an alpha type and requires enabling the DynamicResourceAllocation
/// feature gate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimTemplate {
    /// Standard object metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Describes the ResourceClaim that is to be generated.
    ///
    /// This field is immutable. A ResourceClaim will get created by the
    /// control plane for a Pod when needed and then not get updated
    /// anymore.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<ResourceClaimTemplateSpec>,
}
/// ResourceClaimTemplateList is a collection of claim templates.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimTemplateList {
    /// Standard list metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
    /// Items is the list of resource claim templates.
    #[prost(message, repeated, tag = "2")]
    pub items: ::prost::alloc::vec::Vec<ResourceClaimTemplate>,
}
/// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceClaimTemplateSpec {
    /// ObjectMeta may contain labels and annotations that will be copied into the PVC
    /// when creating it. No other fields are allowed and will be rejected during
    /// validation.
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Spec for the ResourceClaim. The entire content is copied unchanged
    /// into the ResourceClaim that gets created from this template. The
    /// same fields as in a ResourceClaim are also valid here.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<ResourceClaimSpec>,
}
/// ResourcePool describes the pool that ResourceSlices belong to.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourcePool {
    /// Name is used to identify the pool. For node-local devices, this
    /// is often the node name, but this is not required.
    ///
    /// It must not be longer than 253 characters and must consist of one or more DNS sub-domains
    /// separated by slashes. This field is immutable.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// Generation tracks the change in a pool over time. Whenever a driver
    /// changes something about one or more of the resources in a pool, it
    /// must change the generation in all ResourceSlices which are part of
    /// that pool. Consumers of ResourceSlices should only consider
    /// resources from the pool with the highest generation number. The
    /// generation may be reset by drivers, which should be fine for
    /// consumers, assuming that all ResourceSlices in a pool are updated to
    /// match or deleted.
    ///
    /// Combined with ResourceSliceCount, this mechanism enables consumers to
    /// detect pools which are comprised of multiple ResourceSlices and are
    /// in an incomplete state.
    ///
    /// +required
    #[prost(int64, optional, tag = "2")]
    pub generation: ::core::option::Option<i64>,
    /// ResourceSliceCount is the total number of ResourceSlices in the pool at this
    /// generation number. Must be greater than zero.
    ///
    /// Consumers can use this to check whether they have seen all ResourceSlices
    /// belonging to the same pool.
    ///
    /// +required
    #[prost(int64, optional, tag = "3")]
    pub resource_slice_count: ::core::option::Option<i64>,
}
/// ResourceSlice represents one or more resources in a pool of similar resources,
/// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many
/// ResourceSlices comprise a pool is determined by the driver.
///
/// At the moment, the only supported resources are devices with attributes and capacities.
/// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name.
/// The ResourceSlice in which a device gets published may change over time. The unique identifier
/// for a device is the tuple <driver name>, <pool name>, <device name>.
///
/// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number
/// and updates all ResourceSlices with that new number and new resource definitions. A consumer
/// must only use ResourceSlices with the highest generation number and ignore all others.
///
/// When allocating all resources in a pool matching certain criteria or when
/// looking for the best solution among several different alternatives, a
/// consumer should check the number of ResourceSlices in a pool (included in
/// each ResourceSlice) to determine whether its view of a pool is complete and
/// if not, should wait until the driver has completed updating the pool.
///
/// For resources that are not local to a node, the node name is not set. Instead,
/// the driver may use a node selector to specify where the devices are available.
///
/// This is an alpha type and requires enabling the DynamicResourceAllocation
/// feature gate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceSlice {
    /// Standard object metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
    /// Contains the information published by the driver.
    ///
    /// Changing the spec automatically increments the metadata.generation number.
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<ResourceSliceSpec>,
}
/// ResourceSliceList is a collection of ResourceSlices.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceSliceList {
    /// Standard list metadata
    /// +optional
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
    /// Items is the list of resource ResourceSlices.
    #[prost(message, repeated, tag = "2")]
    pub items: ::prost::alloc::vec::Vec<ResourceSlice>,
}
/// ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceSliceSpec {
    /// Driver identifies the DRA driver providing the capacity information.
    /// A field selector can be used to list only ResourceSlice
    /// objects with a certain driver name.
    ///
    /// Must be a DNS subdomain and should end with a DNS domain owned by the
    /// vendor of the driver. This field is immutable.
    ///
    /// +required
    #[prost(string, optional, tag = "1")]
    pub driver: ::core::option::Option<::prost::alloc::string::String>,
    /// Pool describes the pool that this ResourceSlice belongs to.
    ///
    /// +required
    #[prost(message, optional, tag = "2")]
    pub pool: ::core::option::Option<ResourcePool>,
    /// NodeName identifies the node which provides the resources in this pool.
    /// A field selector can be used to list only ResourceSlice
    /// objects belonging to a certain node.
    ///
    /// This field can be used to limit access from nodes to ResourceSlices with
    /// the same node name. It also indicates to autoscalers that adding
    /// new nodes of the same type as some old node might also make new
    /// resources available.
    ///
    /// Exactly one of NodeName, NodeSelector and AllNodes must be set.
    /// This field is immutable.
    ///
    /// +optional
    /// +oneOf=NodeSelection
    #[prost(string, optional, tag = "3")]
    pub node_name: ::core::option::Option<::prost::alloc::string::String>,
    /// NodeSelector defines which nodes have access to the resources in the pool,
    /// when that pool is not limited to a single node.
    ///
    /// Must use exactly one term.
    ///
    /// Exactly one of NodeName, NodeSelector and AllNodes must be set.
    ///
    /// +optional
    /// +oneOf=NodeSelection
    #[prost(message, optional, tag = "4")]
    pub node_selector: ::core::option::Option<super::super::core::v1::NodeSelector>,
    /// AllNodes indicates that all nodes have access to the resources in the pool.
    ///
    /// Exactly one of NodeName, NodeSelector and AllNodes must be set.
    ///
    /// +optional
    /// +oneOf=NodeSelection
    #[prost(bool, optional, tag = "5")]
    pub all_nodes: ::core::option::Option<bool>,
    /// Devices lists some or all of the devices in this pool.
    ///
    /// Must not have more than 128 entries.
    ///
    /// +optional
    /// +listType=atomic
    #[prost(message, repeated, tag = "6")]
    pub devices: ::prost::alloc::vec::Vec<Device>,
}

impl crate::Resource for DeviceClass {
    const API_VERSION: &'static str = "resource.k8s.io/v1alpha3";
    const GROUP: &'static str = "resource.k8s.io";
    const VERSION: &'static str = "v1alpha3";
    const KIND: &'static str = "DeviceClass";
    const URL_PATH_SEGMENT: &'static str = "deviceclasses";
    type Scope = crate::ClusterResourceScope;
}
impl crate::Metadata for DeviceClass {
    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
        self.metadata.as_ref()
    }
    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
        self.metadata.as_mut()
    }
}
impl crate::HasSpec for DeviceClass {
    type Spec = crate::api::resource::v1alpha3::DeviceClassSpec;
    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
        self.spec.as_ref()
    }
    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
        self.spec.as_mut()
    }
}

impl crate::Resource for PodSchedulingContext {
    const API_VERSION: &'static str = "resource.k8s.io/v1alpha3";
    const GROUP: &'static str = "resource.k8s.io";
    const VERSION: &'static str = "v1alpha3";
    const KIND: &'static str = "PodSchedulingContext";
    const URL_PATH_SEGMENT: &'static str = "podschedulingcontexts";
    type Scope = crate::NamespaceResourceScope;
}
impl crate::Metadata for PodSchedulingContext {
    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
        self.metadata.as_ref()
    }
    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
        self.metadata.as_mut()
    }
}
impl crate::HasSpec for PodSchedulingContext {
    type Spec = crate::api::resource::v1alpha3::PodSchedulingContextSpec;
    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
        self.spec.as_ref()
    }
    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
        self.spec.as_mut()
    }
}
impl crate::HasStatus for PodSchedulingContext {
    type Status = crate::api::resource::v1alpha3::PodSchedulingContextStatus;
    fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
        self.status.as_ref()
    }
    fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
        self.status.as_mut()
    }
}

impl crate::Resource for ResourceClaim {
    const API_VERSION: &'static str = "resource.k8s.io/v1alpha3";
    const GROUP: &'static str = "resource.k8s.io";
    const VERSION: &'static str = "v1alpha3";
    const KIND: &'static str = "ResourceClaim";
    const URL_PATH_SEGMENT: &'static str = "resourceclaims";
    type Scope = crate::NamespaceResourceScope;
}
impl crate::Metadata for ResourceClaim {
    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
        self.metadata.as_ref()
    }
    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
        self.metadata.as_mut()
    }
}
impl crate::HasSpec for ResourceClaim {
    type Spec = crate::api::resource::v1alpha3::ResourceClaimSpec;
    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
        self.spec.as_ref()
    }
    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
        self.spec.as_mut()
    }
}
impl crate::HasStatus for ResourceClaim {
    type Status = crate::api::resource::v1alpha3::ResourceClaimStatus;
    fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
        self.status.as_ref()
    }
    fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
        self.status.as_mut()
    }
}

impl crate::Resource for ResourceClaimTemplate {
    const API_VERSION: &'static str = "resource.k8s.io/v1alpha3";
    const GROUP: &'static str = "resource.k8s.io";
    const VERSION: &'static str = "v1alpha3";
    const KIND: &'static str = "ResourceClaimTemplate";
    const URL_PATH_SEGMENT: &'static str = "resourceclaimtemplates";
    type Scope = crate::NamespaceResourceScope;
}
impl crate::Metadata for ResourceClaimTemplate {
    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
        self.metadata.as_ref()
    }
    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
        self.metadata.as_mut()
    }
}
impl crate::HasSpec for ResourceClaimTemplate {
    type Spec = crate::api::resource::v1alpha3::ResourceClaimTemplateSpec;
    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
        self.spec.as_ref()
    }
    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
        self.spec.as_mut()
    }
}

impl crate::Resource for ResourceSlice {
    const API_VERSION: &'static str = "resource.k8s.io/v1alpha3";
    const GROUP: &'static str = "resource.k8s.io";
    const VERSION: &'static str = "v1alpha3";
    const KIND: &'static str = "ResourceSlice";
    const URL_PATH_SEGMENT: &'static str = "resourceslices";
    type Scope = crate::ClusterResourceScope;
}
impl crate::Metadata for ResourceSlice {
    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
    fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
        self.metadata.as_ref()
    }
    fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
        self.metadata.as_mut()
    }
}
impl crate::HasSpec for ResourceSlice {
    type Spec = crate::api::resource::v1alpha3::ResourceSliceSpec;
    fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
        self.spec.as_ref()
    }
    fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
        self.spec.as_mut()
    }
}