-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhypervisorstatus.go
More file actions
232 lines (208 loc) · 12.2 KB
/
hypervisorstatus.go
File metadata and controls
232 lines (208 loc) · 12.2 KB
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
// Code generated by controller-gen. DO NOT EDIT.
package v1
import (
resource "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// HypervisorStatusApplyConfiguration represents a declarative configuration of the HypervisorStatus type for use
// with apply.
type HypervisorStatusApplyConfiguration struct {
LibVirtVersion *string `json:"libVirtVersion,omitempty"`
HypervisorVersion *string `json:"hypervisorVersion,omitempty"`
OperatingSystem *OperatingSystemStatusApplyConfiguration `json:"operatingSystem,omitempty"`
Update *HyperVisorUpdateStatusApplyConfiguration `json:"updateStatus,omitempty"`
Instances []InstanceApplyConfiguration `json:"instances,omitempty"`
Capabilities *CapabilitiesApplyConfiguration `json:"capabilities,omitempty"`
DomainCapabilities *DomainCapabilitiesApplyConfiguration `json:"domainCapabilities,omitempty"`
Allocation map[string]resource.Quantity `json:"allocation,omitempty"`
Capacity map[string]resource.Quantity `json:"capacity,omitempty"`
Cells []CellApplyConfiguration `json:"cells,omitempty"`
NumInstances *int `json:"numInstances,omitempty"`
HypervisorID *string `json:"hypervisorId,omitempty"`
ServiceID *string `json:"serviceId,omitempty"`
Traits []string `json:"traits,omitempty"`
Aggregates []string `json:"aggregates,omitempty"`
AggregateUUIDs []string `json:"aggregateUUIDs,omitempty"`
InternalIP *string `json:"internalIp,omitempty"`
Evicted *bool `json:"evicted,omitempty"`
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
SpecHash *string `json:"specHash,omitempty"`
}
// HypervisorStatusApplyConfiguration constructs a declarative configuration of the HypervisorStatus type for use with
// apply.
func HypervisorStatus() *HypervisorStatusApplyConfiguration {
return &HypervisorStatusApplyConfiguration{}
}
// WithLibVirtVersion sets the LibVirtVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LibVirtVersion field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithLibVirtVersion(value string) *HypervisorStatusApplyConfiguration {
b.LibVirtVersion = &value
return b
}
// WithHypervisorVersion sets the HypervisorVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the HypervisorVersion field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithHypervisorVersion(value string) *HypervisorStatusApplyConfiguration {
b.HypervisorVersion = &value
return b
}
// WithOperatingSystem sets the OperatingSystem field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the OperatingSystem field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithOperatingSystem(value *OperatingSystemStatusApplyConfiguration) *HypervisorStatusApplyConfiguration {
b.OperatingSystem = value
return b
}
// WithUpdate sets the Update field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Update field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithUpdate(value *HyperVisorUpdateStatusApplyConfiguration) *HypervisorStatusApplyConfiguration {
b.Update = value
return b
}
// WithInstances adds the given value to the Instances field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Instances field.
func (b *HypervisorStatusApplyConfiguration) WithInstances(values ...*InstanceApplyConfiguration) *HypervisorStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithInstances")
}
b.Instances = append(b.Instances, *values[i])
}
return b
}
// WithCapabilities sets the Capabilities field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Capabilities field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithCapabilities(value *CapabilitiesApplyConfiguration) *HypervisorStatusApplyConfiguration {
b.Capabilities = value
return b
}
// WithDomainCapabilities sets the DomainCapabilities field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DomainCapabilities field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithDomainCapabilities(value *DomainCapabilitiesApplyConfiguration) *HypervisorStatusApplyConfiguration {
b.DomainCapabilities = value
return b
}
// WithAllocation puts the entries into the Allocation field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Allocation field,
// overwriting an existing map entries in Allocation field with the same key.
func (b *HypervisorStatusApplyConfiguration) WithAllocation(entries map[string]resource.Quantity) *HypervisorStatusApplyConfiguration {
if b.Allocation == nil && len(entries) > 0 {
b.Allocation = make(map[string]resource.Quantity, len(entries))
}
for k, v := range entries {
b.Allocation[k] = v
}
return b
}
// WithCapacity puts the entries into the Capacity field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Capacity field,
// overwriting an existing map entries in Capacity field with the same key.
func (b *HypervisorStatusApplyConfiguration) WithCapacity(entries map[string]resource.Quantity) *HypervisorStatusApplyConfiguration {
if b.Capacity == nil && len(entries) > 0 {
b.Capacity = make(map[string]resource.Quantity, len(entries))
}
for k, v := range entries {
b.Capacity[k] = v
}
return b
}
// WithCells adds the given value to the Cells field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Cells field.
func (b *HypervisorStatusApplyConfiguration) WithCells(values ...*CellApplyConfiguration) *HypervisorStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithCells")
}
b.Cells = append(b.Cells, *values[i])
}
return b
}
// WithNumInstances sets the NumInstances field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NumInstances field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithNumInstances(value int) *HypervisorStatusApplyConfiguration {
b.NumInstances = &value
return b
}
// WithHypervisorID sets the HypervisorID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the HypervisorID field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithHypervisorID(value string) *HypervisorStatusApplyConfiguration {
b.HypervisorID = &value
return b
}
// WithServiceID sets the ServiceID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ServiceID field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithServiceID(value string) *HypervisorStatusApplyConfiguration {
b.ServiceID = &value
return b
}
// WithTraits adds the given value to the Traits field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Traits field.
func (b *HypervisorStatusApplyConfiguration) WithTraits(values ...string) *HypervisorStatusApplyConfiguration {
for i := range values {
b.Traits = append(b.Traits, values[i])
}
return b
}
// WithAggregates adds the given value to the Aggregates field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Aggregates field.
func (b *HypervisorStatusApplyConfiguration) WithAggregates(values ...string) *HypervisorStatusApplyConfiguration {
for i := range values {
b.Aggregates = append(b.Aggregates, values[i])
}
return b
}
// WithAggregateUUIDs adds the given value to the AggregateUUIDs field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the AggregateUUIDs field.
func (b *HypervisorStatusApplyConfiguration) WithAggregateUUIDs(values ...string) *HypervisorStatusApplyConfiguration {
for i := range values {
b.AggregateUUIDs = append(b.AggregateUUIDs, values[i])
}
return b
}
// WithInternalIP sets the InternalIP field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the InternalIP field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithInternalIP(value string) *HypervisorStatusApplyConfiguration {
b.InternalIP = &value
return b
}
// WithEvicted sets the Evicted field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Evicted field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithEvicted(value bool) *HypervisorStatusApplyConfiguration {
b.Evicted = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *HypervisorStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *HypervisorStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithSpecHash sets the SpecHash field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SpecHash field is set to the value of the last call.
func (b *HypervisorStatusApplyConfiguration) WithSpecHash(value string) *HypervisorStatusApplyConfiguration {
b.SpecHash = &value
return b
}