/
emailconfig.go
163 lines (144 loc) · 8.08 KB
/
emailconfig.go
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
// Copyright The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
v1 "github.com/prometheus-operator/prometheus-operator/pkg/client/applyconfiguration/monitoring/v1"
)
// EmailConfigApplyConfiguration represents an declarative configuration of the EmailConfig type for use
// with apply.
type EmailConfigApplyConfiguration struct {
SendResolved *bool `json:"sendResolved,omitempty"`
To *string `json:"to,omitempty"`
From *string `json:"from,omitempty"`
Hello *string `json:"hello,omitempty"`
Smarthost *string `json:"smarthost,omitempty"`
AuthUsername *string `json:"authUsername,omitempty"`
AuthPassword *SecretKeySelectorApplyConfiguration `json:"authPassword,omitempty"`
AuthSecret *SecretKeySelectorApplyConfiguration `json:"authSecret,omitempty"`
AuthIdentity *string `json:"authIdentity,omitempty"`
Headers []KeyValueApplyConfiguration `json:"headers,omitempty"`
HTML *string `json:"html,omitempty"`
Text *string `json:"text,omitempty"`
RequireTLS *bool `json:"requireTLS,omitempty"`
TLSConfig *v1.SafeTLSConfigApplyConfiguration `json:"tlsConfig,omitempty"`
}
// EmailConfigApplyConfiguration constructs an declarative configuration of the EmailConfig type for use with
// apply.
func EmailConfig() *EmailConfigApplyConfiguration {
return &EmailConfigApplyConfiguration{}
}
// WithSendResolved sets the SendResolved 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 SendResolved field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithSendResolved(value bool) *EmailConfigApplyConfiguration {
b.SendResolved = &value
return b
}
// WithTo sets the To 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 To field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithTo(value string) *EmailConfigApplyConfiguration {
b.To = &value
return b
}
// WithFrom sets the From 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 From field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithFrom(value string) *EmailConfigApplyConfiguration {
b.From = &value
return b
}
// WithHello sets the Hello 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 Hello field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithHello(value string) *EmailConfigApplyConfiguration {
b.Hello = &value
return b
}
// WithSmarthost sets the Smarthost 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 Smarthost field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithSmarthost(value string) *EmailConfigApplyConfiguration {
b.Smarthost = &value
return b
}
// WithAuthUsername sets the AuthUsername 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 AuthUsername field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithAuthUsername(value string) *EmailConfigApplyConfiguration {
b.AuthUsername = &value
return b
}
// WithAuthPassword sets the AuthPassword 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 AuthPassword field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithAuthPassword(value *SecretKeySelectorApplyConfiguration) *EmailConfigApplyConfiguration {
b.AuthPassword = value
return b
}
// WithAuthSecret sets the AuthSecret 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 AuthSecret field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithAuthSecret(value *SecretKeySelectorApplyConfiguration) *EmailConfigApplyConfiguration {
b.AuthSecret = value
return b
}
// WithAuthIdentity sets the AuthIdentity 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 AuthIdentity field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithAuthIdentity(value string) *EmailConfigApplyConfiguration {
b.AuthIdentity = &value
return b
}
// WithHeaders adds the given value to the Headers 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 Headers field.
func (b *EmailConfigApplyConfiguration) WithHeaders(values ...*KeyValueApplyConfiguration) *EmailConfigApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithHeaders")
}
b.Headers = append(b.Headers, *values[i])
}
return b
}
// WithHTML sets the HTML 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 HTML field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithHTML(value string) *EmailConfigApplyConfiguration {
b.HTML = &value
return b
}
// WithText sets the Text 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 Text field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithText(value string) *EmailConfigApplyConfiguration {
b.Text = &value
return b
}
// WithRequireTLS sets the RequireTLS 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 RequireTLS field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithRequireTLS(value bool) *EmailConfigApplyConfiguration {
b.RequireTLS = &value
return b
}
// WithTLSConfig sets the TLSConfig 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 TLSConfig field is set to the value of the last call.
func (b *EmailConfigApplyConfiguration) WithTLSConfig(value *v1.SafeTLSConfigApplyConfiguration) *EmailConfigApplyConfiguration {
b.TLSConfig = value
return b
}