Debian Codegraph @

applyconfigurations/resource/v1alpha3/allocateddevicestatus.go

raw
1 /*
2 Copyright The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 // Code generated by applyconfiguration-gen. DO NOT EDIT.
18
19 package v1alpha3
20
21 import (
22 runtime "k8s.io/apimachinery/pkg/runtime"
23 v1 "k8s.io/client-go/applyconfigurations/meta/v1"
24 )
25
26 // AllocatedDeviceStatusApplyConfiguration represents a declarative configuration of the AllocatedDeviceStatus type for use
27 // with apply.
28 type AllocatedDeviceStatusApplyConfiguration struct {
29 Driver *string `json:"driver,omitempty"`
30 Pool *string `json:"pool,omitempty"`
31 Device *string `json:"device,omitempty"`
32 Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
33 Data *runtime.RawExtension `json:"data,omitempty"`
34 NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
35 }
36
37 // AllocatedDeviceStatusApplyConfiguration constructs a declarative configuration of the AllocatedDeviceStatus type for use with
38 // apply.
39 func AllocatedDeviceStatus() *AllocatedDeviceStatusApplyConfiguration {
40 return &AllocatedDeviceStatusApplyConfiguration{}
41 }
42
43 // WithDriver sets the Driver field in the declarative configuration to the given value
44 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
45 // If called multiple times, the Driver field is set to the value of the last call.
46 func (b *AllocatedDeviceStatusApplyConfiguration) WithDriver(value string) *AllocatedDeviceStatusApplyConfiguration {
47 b.Driver = &value
48 return b
49 }
50
51 // WithPool sets the Pool field in the declarative configuration to the given value
52 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
53 // If called multiple times, the Pool field is set to the value of the last call.
54 func (b *AllocatedDeviceStatusApplyConfiguration) WithPool(value string) *AllocatedDeviceStatusApplyConfiguration {
55 b.Pool = &value
56 return b
57 }
58
59 // WithDevice sets the Device field in the declarative configuration to the given value
60 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
61 // If called multiple times, the Device field is set to the value of the last call.
62 func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *AllocatedDeviceStatusApplyConfiguration {
63 b.Device = &value
64 return b
65 }
66
67 // WithConditions adds the given value to the Conditions field in the declarative configuration
68 // and returns the receiver, so that objects can be build by chaining "With" function invocations.
69 // If called multiple times, values provided by each call will be appended to the Conditions field.
70 func (b *AllocatedDeviceStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
71 for i := range values {
72 if values[i] == nil {
73 panic("nil value passed to WithConditions")
74 }
75 b.Conditions = append(b.Conditions, *values[i])
76 }
77 return b
78 }
79
80 // WithData sets the Data field in the declarative configuration to the given value
81 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
82 // If called multiple times, the Data field is set to the value of the last call.
83 func (b *AllocatedDeviceStatusApplyConfiguration) WithData(value runtime.RawExtension) *AllocatedDeviceStatusApplyConfiguration {
84 b.Data = &value
85 return b
86 }
87
88 // WithNetworkData sets the NetworkData field in the declarative configuration to the given value
89 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
90 // If called multiple times, the NetworkData field is set to the value of the last call.
91 func (b *AllocatedDeviceStatusApplyConfiguration) WithNetworkData(value *NetworkDeviceDataApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
92 b.NetworkData = value
93 return b
94 }