-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhypervisorspec.go
More file actions
137 lines (121 loc) · 7.32 KB
/
hypervisorspec.go
File metadata and controls
137 lines (121 loc) · 7.32 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
// Code generated by controller-gen. DO NOT EDIT.
package v1
// HypervisorSpecApplyConfiguration represents a declarative configuration of the HypervisorSpec type for use
// with apply.
type HypervisorSpecApplyConfiguration struct {
OperatingSystemVersion *string `json:"version,omitempty"`
Reboot *bool `json:"reboot,omitempty"`
EvacuateOnReboot *bool `json:"evacuateOnReboot,omitempty"`
LifecycleEnabled *bool `json:"lifecycleEnabled,omitempty"`
SkipTests *bool `json:"skipTests,omitempty"`
CustomTraits []string `json:"customTraits,omitempty"`
Aggregates []string `json:"aggregates,omitempty"`
AllowedProjects []string `json:"allowedProjects,omitempty"`
HighAvailability *bool `json:"highAvailability,omitempty"`
CreateCertManagerCertificate *bool `json:"createCertManagerCertificate,omitempty"`
InstallCertificate *bool `json:"installCertificate,omitempty"`
Maintenance *string `json:"maintenance,omitempty"`
MaintenanceReason *string `json:"maintenanceReason,omitempty"`
}
// HypervisorSpecApplyConfiguration constructs a declarative configuration of the HypervisorSpec type for use with
// apply.
func HypervisorSpec() *HypervisorSpecApplyConfiguration {
return &HypervisorSpecApplyConfiguration{}
}
// WithOperatingSystemVersion sets the OperatingSystemVersion 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 OperatingSystemVersion field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithOperatingSystemVersion(value string) *HypervisorSpecApplyConfiguration {
b.OperatingSystemVersion = &value
return b
}
// WithReboot sets the Reboot 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 Reboot field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithReboot(value bool) *HypervisorSpecApplyConfiguration {
b.Reboot = &value
return b
}
// WithEvacuateOnReboot sets the EvacuateOnReboot 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 EvacuateOnReboot field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithEvacuateOnReboot(value bool) *HypervisorSpecApplyConfiguration {
b.EvacuateOnReboot = &value
return b
}
// WithLifecycleEnabled sets the LifecycleEnabled 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 LifecycleEnabled field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithLifecycleEnabled(value bool) *HypervisorSpecApplyConfiguration {
b.LifecycleEnabled = &value
return b
}
// WithSkipTests sets the SkipTests 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 SkipTests field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithSkipTests(value bool) *HypervisorSpecApplyConfiguration {
b.SkipTests = &value
return b
}
// WithCustomTraits adds the given value to the CustomTraits 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 CustomTraits field.
func (b *HypervisorSpecApplyConfiguration) WithCustomTraits(values ...string) *HypervisorSpecApplyConfiguration {
for i := range values {
b.CustomTraits = append(b.CustomTraits, 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 *HypervisorSpecApplyConfiguration) WithAggregates(values ...string) *HypervisorSpecApplyConfiguration {
for i := range values {
b.Aggregates = append(b.Aggregates, values[i])
}
return b
}
// WithAllowedProjects adds the given value to the AllowedProjects 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 AllowedProjects field.
func (b *HypervisorSpecApplyConfiguration) WithAllowedProjects(values ...string) *HypervisorSpecApplyConfiguration {
for i := range values {
b.AllowedProjects = append(b.AllowedProjects, values[i])
}
return b
}
// WithHighAvailability sets the HighAvailability 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 HighAvailability field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithHighAvailability(value bool) *HypervisorSpecApplyConfiguration {
b.HighAvailability = &value
return b
}
// WithCreateCertManagerCertificate sets the CreateCertManagerCertificate 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 CreateCertManagerCertificate field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithCreateCertManagerCertificate(value bool) *HypervisorSpecApplyConfiguration {
b.CreateCertManagerCertificate = &value
return b
}
// WithInstallCertificate sets the InstallCertificate 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 InstallCertificate field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithInstallCertificate(value bool) *HypervisorSpecApplyConfiguration {
b.InstallCertificate = &value
return b
}
// WithMaintenance sets the Maintenance 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 Maintenance field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithMaintenance(value string) *HypervisorSpecApplyConfiguration {
b.Maintenance = &value
return b
}
// WithMaintenanceReason sets the MaintenanceReason 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 MaintenanceReason field is set to the value of the last call.
func (b *HypervisorSpecApplyConfiguration) WithMaintenanceReason(value string) *HypervisorSpecApplyConfiguration {
b.MaintenanceReason = &value
return b
}