generated from aws-controllers-k8s/controller-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 10
/
delta.go
301 lines (293 loc) · 19.5 KB
/
delta.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
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
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file 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 ack-generate. DO NOT EDIT.
package broker
import (
"bytes"
"reflect"
ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
acktags "github.com/aws-controllers-k8s/runtime/pkg/tags"
)
// Hack to avoid import errors during build...
var (
_ = &bytes.Buffer{}
_ = &reflect.Method{}
_ = &acktags.Tags{}
)
// newResourceDelta returns a new `ackcompare.Delta` used to compare two
// resources
func newResourceDelta(
a *resource,
b *resource,
) *ackcompare.Delta {
delta := ackcompare.NewDelta()
if (a == nil && b != nil) ||
(a != nil && b == nil) {
delta.Add("", a, b)
return delta
}
if ackcompare.HasNilDifference(a.ko.Spec.AuthenticationStrategy, b.ko.Spec.AuthenticationStrategy) {
delta.Add("Spec.AuthenticationStrategy", a.ko.Spec.AuthenticationStrategy, b.ko.Spec.AuthenticationStrategy)
} else if a.ko.Spec.AuthenticationStrategy != nil && b.ko.Spec.AuthenticationStrategy != nil {
if *a.ko.Spec.AuthenticationStrategy != *b.ko.Spec.AuthenticationStrategy {
delta.Add("Spec.AuthenticationStrategy", a.ko.Spec.AuthenticationStrategy, b.ko.Spec.AuthenticationStrategy)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.AutoMinorVersionUpgrade, b.ko.Spec.AutoMinorVersionUpgrade) {
delta.Add("Spec.AutoMinorVersionUpgrade", a.ko.Spec.AutoMinorVersionUpgrade, b.ko.Spec.AutoMinorVersionUpgrade)
} else if a.ko.Spec.AutoMinorVersionUpgrade != nil && b.ko.Spec.AutoMinorVersionUpgrade != nil {
if *a.ko.Spec.AutoMinorVersionUpgrade != *b.ko.Spec.AutoMinorVersionUpgrade {
delta.Add("Spec.AutoMinorVersionUpgrade", a.ko.Spec.AutoMinorVersionUpgrade, b.ko.Spec.AutoMinorVersionUpgrade)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Configuration, b.ko.Spec.Configuration) {
delta.Add("Spec.Configuration", a.ko.Spec.Configuration, b.ko.Spec.Configuration)
} else if a.ko.Spec.Configuration != nil && b.ko.Spec.Configuration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.Configuration.ID, b.ko.Spec.Configuration.ID) {
delta.Add("Spec.Configuration.ID", a.ko.Spec.Configuration.ID, b.ko.Spec.Configuration.ID)
} else if a.ko.Spec.Configuration.ID != nil && b.ko.Spec.Configuration.ID != nil {
if *a.ko.Spec.Configuration.ID != *b.ko.Spec.Configuration.ID {
delta.Add("Spec.Configuration.ID", a.ko.Spec.Configuration.ID, b.ko.Spec.Configuration.ID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Configuration.Revision, b.ko.Spec.Configuration.Revision) {
delta.Add("Spec.Configuration.Revision", a.ko.Spec.Configuration.Revision, b.ko.Spec.Configuration.Revision)
} else if a.ko.Spec.Configuration.Revision != nil && b.ko.Spec.Configuration.Revision != nil {
if *a.ko.Spec.Configuration.Revision != *b.ko.Spec.Configuration.Revision {
delta.Add("Spec.Configuration.Revision", a.ko.Spec.Configuration.Revision, b.ko.Spec.Configuration.Revision)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CreatorRequestID, b.ko.Spec.CreatorRequestID) {
delta.Add("Spec.CreatorRequestID", a.ko.Spec.CreatorRequestID, b.ko.Spec.CreatorRequestID)
} else if a.ko.Spec.CreatorRequestID != nil && b.ko.Spec.CreatorRequestID != nil {
if *a.ko.Spec.CreatorRequestID != *b.ko.Spec.CreatorRequestID {
delta.Add("Spec.CreatorRequestID", a.ko.Spec.CreatorRequestID, b.ko.Spec.CreatorRequestID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentMode, b.ko.Spec.DeploymentMode) {
delta.Add("Spec.DeploymentMode", a.ko.Spec.DeploymentMode, b.ko.Spec.DeploymentMode)
} else if a.ko.Spec.DeploymentMode != nil && b.ko.Spec.DeploymentMode != nil {
if *a.ko.Spec.DeploymentMode != *b.ko.Spec.DeploymentMode {
delta.Add("Spec.DeploymentMode", a.ko.Spec.DeploymentMode, b.ko.Spec.DeploymentMode)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EncryptionOptions, b.ko.Spec.EncryptionOptions) {
delta.Add("Spec.EncryptionOptions", a.ko.Spec.EncryptionOptions, b.ko.Spec.EncryptionOptions)
} else if a.ko.Spec.EncryptionOptions != nil && b.ko.Spec.EncryptionOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.EncryptionOptions.KMSKeyID, b.ko.Spec.EncryptionOptions.KMSKeyID) {
delta.Add("Spec.EncryptionOptions.KMSKeyID", a.ko.Spec.EncryptionOptions.KMSKeyID, b.ko.Spec.EncryptionOptions.KMSKeyID)
} else if a.ko.Spec.EncryptionOptions.KMSKeyID != nil && b.ko.Spec.EncryptionOptions.KMSKeyID != nil {
if *a.ko.Spec.EncryptionOptions.KMSKeyID != *b.ko.Spec.EncryptionOptions.KMSKeyID {
delta.Add("Spec.EncryptionOptions.KMSKeyID", a.ko.Spec.EncryptionOptions.KMSKeyID, b.ko.Spec.EncryptionOptions.KMSKeyID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EncryptionOptions.UseAWSOwnedKey, b.ko.Spec.EncryptionOptions.UseAWSOwnedKey) {
delta.Add("Spec.EncryptionOptions.UseAWSOwnedKey", a.ko.Spec.EncryptionOptions.UseAWSOwnedKey, b.ko.Spec.EncryptionOptions.UseAWSOwnedKey)
} else if a.ko.Spec.EncryptionOptions.UseAWSOwnedKey != nil && b.ko.Spec.EncryptionOptions.UseAWSOwnedKey != nil {
if *a.ko.Spec.EncryptionOptions.UseAWSOwnedKey != *b.ko.Spec.EncryptionOptions.UseAWSOwnedKey {
delta.Add("Spec.EncryptionOptions.UseAWSOwnedKey", a.ko.Spec.EncryptionOptions.UseAWSOwnedKey, b.ko.Spec.EncryptionOptions.UseAWSOwnedKey)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EngineType, b.ko.Spec.EngineType) {
delta.Add("Spec.EngineType", a.ko.Spec.EngineType, b.ko.Spec.EngineType)
} else if a.ko.Spec.EngineType != nil && b.ko.Spec.EngineType != nil {
if *a.ko.Spec.EngineType != *b.ko.Spec.EngineType {
delta.Add("Spec.EngineType", a.ko.Spec.EngineType, b.ko.Spec.EngineType)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EngineVersion, b.ko.Spec.EngineVersion) {
delta.Add("Spec.EngineVersion", a.ko.Spec.EngineVersion, b.ko.Spec.EngineVersion)
} else if a.ko.Spec.EngineVersion != nil && b.ko.Spec.EngineVersion != nil {
if *a.ko.Spec.EngineVersion != *b.ko.Spec.EngineVersion {
delta.Add("Spec.EngineVersion", a.ko.Spec.EngineVersion, b.ko.Spec.EngineVersion)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.HostInstanceType, b.ko.Spec.HostInstanceType) {
delta.Add("Spec.HostInstanceType", a.ko.Spec.HostInstanceType, b.ko.Spec.HostInstanceType)
} else if a.ko.Spec.HostInstanceType != nil && b.ko.Spec.HostInstanceType != nil {
if *a.ko.Spec.HostInstanceType != *b.ko.Spec.HostInstanceType {
delta.Add("Spec.HostInstanceType", a.ko.Spec.HostInstanceType, b.ko.Spec.HostInstanceType)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata, b.ko.Spec.LDAPServerMetadata) {
delta.Add("Spec.LDAPServerMetadata", a.ko.Spec.LDAPServerMetadata, b.ko.Spec.LDAPServerMetadata)
} else if a.ko.Spec.LDAPServerMetadata != nil && b.ko.Spec.LDAPServerMetadata != nil {
if len(a.ko.Spec.LDAPServerMetadata.Hosts) != len(b.ko.Spec.LDAPServerMetadata.Hosts) {
delta.Add("Spec.LDAPServerMetadata.Hosts", a.ko.Spec.LDAPServerMetadata.Hosts, b.ko.Spec.LDAPServerMetadata.Hosts)
} else if len(a.ko.Spec.LDAPServerMetadata.Hosts) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.LDAPServerMetadata.Hosts, b.ko.Spec.LDAPServerMetadata.Hosts) {
delta.Add("Spec.LDAPServerMetadata.Hosts", a.ko.Spec.LDAPServerMetadata.Hosts, b.ko.Spec.LDAPServerMetadata.Hosts)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.RoleBase, b.ko.Spec.LDAPServerMetadata.RoleBase) {
delta.Add("Spec.LDAPServerMetadata.RoleBase", a.ko.Spec.LDAPServerMetadata.RoleBase, b.ko.Spec.LDAPServerMetadata.RoleBase)
} else if a.ko.Spec.LDAPServerMetadata.RoleBase != nil && b.ko.Spec.LDAPServerMetadata.RoleBase != nil {
if *a.ko.Spec.LDAPServerMetadata.RoleBase != *b.ko.Spec.LDAPServerMetadata.RoleBase {
delta.Add("Spec.LDAPServerMetadata.RoleBase", a.ko.Spec.LDAPServerMetadata.RoleBase, b.ko.Spec.LDAPServerMetadata.RoleBase)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.RoleName, b.ko.Spec.LDAPServerMetadata.RoleName) {
delta.Add("Spec.LDAPServerMetadata.RoleName", a.ko.Spec.LDAPServerMetadata.RoleName, b.ko.Spec.LDAPServerMetadata.RoleName)
} else if a.ko.Spec.LDAPServerMetadata.RoleName != nil && b.ko.Spec.LDAPServerMetadata.RoleName != nil {
if *a.ko.Spec.LDAPServerMetadata.RoleName != *b.ko.Spec.LDAPServerMetadata.RoleName {
delta.Add("Spec.LDAPServerMetadata.RoleName", a.ko.Spec.LDAPServerMetadata.RoleName, b.ko.Spec.LDAPServerMetadata.RoleName)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.RoleSearchMatching, b.ko.Spec.LDAPServerMetadata.RoleSearchMatching) {
delta.Add("Spec.LDAPServerMetadata.RoleSearchMatching", a.ko.Spec.LDAPServerMetadata.RoleSearchMatching, b.ko.Spec.LDAPServerMetadata.RoleSearchMatching)
} else if a.ko.Spec.LDAPServerMetadata.RoleSearchMatching != nil && b.ko.Spec.LDAPServerMetadata.RoleSearchMatching != nil {
if *a.ko.Spec.LDAPServerMetadata.RoleSearchMatching != *b.ko.Spec.LDAPServerMetadata.RoleSearchMatching {
delta.Add("Spec.LDAPServerMetadata.RoleSearchMatching", a.ko.Spec.LDAPServerMetadata.RoleSearchMatching, b.ko.Spec.LDAPServerMetadata.RoleSearchMatching)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.RoleSearchSubtree, b.ko.Spec.LDAPServerMetadata.RoleSearchSubtree) {
delta.Add("Spec.LDAPServerMetadata.RoleSearchSubtree", a.ko.Spec.LDAPServerMetadata.RoleSearchSubtree, b.ko.Spec.LDAPServerMetadata.RoleSearchSubtree)
} else if a.ko.Spec.LDAPServerMetadata.RoleSearchSubtree != nil && b.ko.Spec.LDAPServerMetadata.RoleSearchSubtree != nil {
if *a.ko.Spec.LDAPServerMetadata.RoleSearchSubtree != *b.ko.Spec.LDAPServerMetadata.RoleSearchSubtree {
delta.Add("Spec.LDAPServerMetadata.RoleSearchSubtree", a.ko.Spec.LDAPServerMetadata.RoleSearchSubtree, b.ko.Spec.LDAPServerMetadata.RoleSearchSubtree)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.ServiceAccountPassword, b.ko.Spec.LDAPServerMetadata.ServiceAccountPassword) {
delta.Add("Spec.LDAPServerMetadata.ServiceAccountPassword", a.ko.Spec.LDAPServerMetadata.ServiceAccountPassword, b.ko.Spec.LDAPServerMetadata.ServiceAccountPassword)
} else if a.ko.Spec.LDAPServerMetadata.ServiceAccountPassword != nil && b.ko.Spec.LDAPServerMetadata.ServiceAccountPassword != nil {
if *a.ko.Spec.LDAPServerMetadata.ServiceAccountPassword != *b.ko.Spec.LDAPServerMetadata.ServiceAccountPassword {
delta.Add("Spec.LDAPServerMetadata.ServiceAccountPassword", a.ko.Spec.LDAPServerMetadata.ServiceAccountPassword, b.ko.Spec.LDAPServerMetadata.ServiceAccountPassword)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.ServiceAccountUsername, b.ko.Spec.LDAPServerMetadata.ServiceAccountUsername) {
delta.Add("Spec.LDAPServerMetadata.ServiceAccountUsername", a.ko.Spec.LDAPServerMetadata.ServiceAccountUsername, b.ko.Spec.LDAPServerMetadata.ServiceAccountUsername)
} else if a.ko.Spec.LDAPServerMetadata.ServiceAccountUsername != nil && b.ko.Spec.LDAPServerMetadata.ServiceAccountUsername != nil {
if *a.ko.Spec.LDAPServerMetadata.ServiceAccountUsername != *b.ko.Spec.LDAPServerMetadata.ServiceAccountUsername {
delta.Add("Spec.LDAPServerMetadata.ServiceAccountUsername", a.ko.Spec.LDAPServerMetadata.ServiceAccountUsername, b.ko.Spec.LDAPServerMetadata.ServiceAccountUsername)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.UserBase, b.ko.Spec.LDAPServerMetadata.UserBase) {
delta.Add("Spec.LDAPServerMetadata.UserBase", a.ko.Spec.LDAPServerMetadata.UserBase, b.ko.Spec.LDAPServerMetadata.UserBase)
} else if a.ko.Spec.LDAPServerMetadata.UserBase != nil && b.ko.Spec.LDAPServerMetadata.UserBase != nil {
if *a.ko.Spec.LDAPServerMetadata.UserBase != *b.ko.Spec.LDAPServerMetadata.UserBase {
delta.Add("Spec.LDAPServerMetadata.UserBase", a.ko.Spec.LDAPServerMetadata.UserBase, b.ko.Spec.LDAPServerMetadata.UserBase)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.UserRoleName, b.ko.Spec.LDAPServerMetadata.UserRoleName) {
delta.Add("Spec.LDAPServerMetadata.UserRoleName", a.ko.Spec.LDAPServerMetadata.UserRoleName, b.ko.Spec.LDAPServerMetadata.UserRoleName)
} else if a.ko.Spec.LDAPServerMetadata.UserRoleName != nil && b.ko.Spec.LDAPServerMetadata.UserRoleName != nil {
if *a.ko.Spec.LDAPServerMetadata.UserRoleName != *b.ko.Spec.LDAPServerMetadata.UserRoleName {
delta.Add("Spec.LDAPServerMetadata.UserRoleName", a.ko.Spec.LDAPServerMetadata.UserRoleName, b.ko.Spec.LDAPServerMetadata.UserRoleName)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.UserSearchMatching, b.ko.Spec.LDAPServerMetadata.UserSearchMatching) {
delta.Add("Spec.LDAPServerMetadata.UserSearchMatching", a.ko.Spec.LDAPServerMetadata.UserSearchMatching, b.ko.Spec.LDAPServerMetadata.UserSearchMatching)
} else if a.ko.Spec.LDAPServerMetadata.UserSearchMatching != nil && b.ko.Spec.LDAPServerMetadata.UserSearchMatching != nil {
if *a.ko.Spec.LDAPServerMetadata.UserSearchMatching != *b.ko.Spec.LDAPServerMetadata.UserSearchMatching {
delta.Add("Spec.LDAPServerMetadata.UserSearchMatching", a.ko.Spec.LDAPServerMetadata.UserSearchMatching, b.ko.Spec.LDAPServerMetadata.UserSearchMatching)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LDAPServerMetadata.UserSearchSubtree, b.ko.Spec.LDAPServerMetadata.UserSearchSubtree) {
delta.Add("Spec.LDAPServerMetadata.UserSearchSubtree", a.ko.Spec.LDAPServerMetadata.UserSearchSubtree, b.ko.Spec.LDAPServerMetadata.UserSearchSubtree)
} else if a.ko.Spec.LDAPServerMetadata.UserSearchSubtree != nil && b.ko.Spec.LDAPServerMetadata.UserSearchSubtree != nil {
if *a.ko.Spec.LDAPServerMetadata.UserSearchSubtree != *b.ko.Spec.LDAPServerMetadata.UserSearchSubtree {
delta.Add("Spec.LDAPServerMetadata.UserSearchSubtree", a.ko.Spec.LDAPServerMetadata.UserSearchSubtree, b.ko.Spec.LDAPServerMetadata.UserSearchSubtree)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Logs, b.ko.Spec.Logs) {
delta.Add("Spec.Logs", a.ko.Spec.Logs, b.ko.Spec.Logs)
} else if a.ko.Spec.Logs != nil && b.ko.Spec.Logs != nil {
if ackcompare.HasNilDifference(a.ko.Spec.Logs.Audit, b.ko.Spec.Logs.Audit) {
delta.Add("Spec.Logs.Audit", a.ko.Spec.Logs.Audit, b.ko.Spec.Logs.Audit)
} else if a.ko.Spec.Logs.Audit != nil && b.ko.Spec.Logs.Audit != nil {
if *a.ko.Spec.Logs.Audit != *b.ko.Spec.Logs.Audit {
delta.Add("Spec.Logs.Audit", a.ko.Spec.Logs.Audit, b.ko.Spec.Logs.Audit)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Logs.General, b.ko.Spec.Logs.General) {
delta.Add("Spec.Logs.General", a.ko.Spec.Logs.General, b.ko.Spec.Logs.General)
} else if a.ko.Spec.Logs.General != nil && b.ko.Spec.Logs.General != nil {
if *a.ko.Spec.Logs.General != *b.ko.Spec.Logs.General {
delta.Add("Spec.Logs.General", a.ko.Spec.Logs.General, b.ko.Spec.Logs.General)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceWindowStartTime, b.ko.Spec.MaintenanceWindowStartTime) {
delta.Add("Spec.MaintenanceWindowStartTime", a.ko.Spec.MaintenanceWindowStartTime, b.ko.Spec.MaintenanceWindowStartTime)
} else if a.ko.Spec.MaintenanceWindowStartTime != nil && b.ko.Spec.MaintenanceWindowStartTime != nil {
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceWindowStartTime.DayOfWeek, b.ko.Spec.MaintenanceWindowStartTime.DayOfWeek) {
delta.Add("Spec.MaintenanceWindowStartTime.DayOfWeek", a.ko.Spec.MaintenanceWindowStartTime.DayOfWeek, b.ko.Spec.MaintenanceWindowStartTime.DayOfWeek)
} else if a.ko.Spec.MaintenanceWindowStartTime.DayOfWeek != nil && b.ko.Spec.MaintenanceWindowStartTime.DayOfWeek != nil {
if *a.ko.Spec.MaintenanceWindowStartTime.DayOfWeek != *b.ko.Spec.MaintenanceWindowStartTime.DayOfWeek {
delta.Add("Spec.MaintenanceWindowStartTime.DayOfWeek", a.ko.Spec.MaintenanceWindowStartTime.DayOfWeek, b.ko.Spec.MaintenanceWindowStartTime.DayOfWeek)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceWindowStartTime.TimeOfDay, b.ko.Spec.MaintenanceWindowStartTime.TimeOfDay) {
delta.Add("Spec.MaintenanceWindowStartTime.TimeOfDay", a.ko.Spec.MaintenanceWindowStartTime.TimeOfDay, b.ko.Spec.MaintenanceWindowStartTime.TimeOfDay)
} else if a.ko.Spec.MaintenanceWindowStartTime.TimeOfDay != nil && b.ko.Spec.MaintenanceWindowStartTime.TimeOfDay != nil {
if *a.ko.Spec.MaintenanceWindowStartTime.TimeOfDay != *b.ko.Spec.MaintenanceWindowStartTime.TimeOfDay {
delta.Add("Spec.MaintenanceWindowStartTime.TimeOfDay", a.ko.Spec.MaintenanceWindowStartTime.TimeOfDay, b.ko.Spec.MaintenanceWindowStartTime.TimeOfDay)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceWindowStartTime.TimeZone, b.ko.Spec.MaintenanceWindowStartTime.TimeZone) {
delta.Add("Spec.MaintenanceWindowStartTime.TimeZone", a.ko.Spec.MaintenanceWindowStartTime.TimeZone, b.ko.Spec.MaintenanceWindowStartTime.TimeZone)
} else if a.ko.Spec.MaintenanceWindowStartTime.TimeZone != nil && b.ko.Spec.MaintenanceWindowStartTime.TimeZone != nil {
if *a.ko.Spec.MaintenanceWindowStartTime.TimeZone != *b.ko.Spec.MaintenanceWindowStartTime.TimeZone {
delta.Add("Spec.MaintenanceWindowStartTime.TimeZone", a.ko.Spec.MaintenanceWindowStartTime.TimeZone, b.ko.Spec.MaintenanceWindowStartTime.TimeZone)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Name, b.ko.Spec.Name) {
delta.Add("Spec.Name", a.ko.Spec.Name, b.ko.Spec.Name)
} else if a.ko.Spec.Name != nil && b.ko.Spec.Name != nil {
if *a.ko.Spec.Name != *b.ko.Spec.Name {
delta.Add("Spec.Name", a.ko.Spec.Name, b.ko.Spec.Name)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PubliclyAccessible, b.ko.Spec.PubliclyAccessible) {
delta.Add("Spec.PubliclyAccessible", a.ko.Spec.PubliclyAccessible, b.ko.Spec.PubliclyAccessible)
} else if a.ko.Spec.PubliclyAccessible != nil && b.ko.Spec.PubliclyAccessible != nil {
if *a.ko.Spec.PubliclyAccessible != *b.ko.Spec.PubliclyAccessible {
delta.Add("Spec.PubliclyAccessible", a.ko.Spec.PubliclyAccessible, b.ko.Spec.PubliclyAccessible)
}
}
if !reflect.DeepEqual(a.ko.Spec.SecurityGroupRefs, b.ko.Spec.SecurityGroupRefs) {
delta.Add("Spec.SecurityGroupRefs", a.ko.Spec.SecurityGroupRefs, b.ko.Spec.SecurityGroupRefs)
}
if len(a.ko.Spec.SecurityGroups) != len(b.ko.Spec.SecurityGroups) {
delta.Add("Spec.SecurityGroups", a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups)
} else if len(a.ko.Spec.SecurityGroups) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups) {
delta.Add("Spec.SecurityGroups", a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.StorageType, b.ko.Spec.StorageType) {
delta.Add("Spec.StorageType", a.ko.Spec.StorageType, b.ko.Spec.StorageType)
} else if a.ko.Spec.StorageType != nil && b.ko.Spec.StorageType != nil {
if *a.ko.Spec.StorageType != *b.ko.Spec.StorageType {
delta.Add("Spec.StorageType", a.ko.Spec.StorageType, b.ko.Spec.StorageType)
}
}
if len(a.ko.Spec.SubnetIDs) != len(b.ko.Spec.SubnetIDs) {
delta.Add("Spec.SubnetIDs", a.ko.Spec.SubnetIDs, b.ko.Spec.SubnetIDs)
} else if len(a.ko.Spec.SubnetIDs) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.SubnetIDs, b.ko.Spec.SubnetIDs) {
delta.Add("Spec.SubnetIDs", a.ko.Spec.SubnetIDs, b.ko.Spec.SubnetIDs)
}
}
if !reflect.DeepEqual(a.ko.Spec.SubnetRefs, b.ko.Spec.SubnetRefs) {
delta.Add("Spec.SubnetRefs", a.ko.Spec.SubnetRefs, b.ko.Spec.SubnetRefs)
}
if !ackcompare.MapStringStringEqual(ToACKTags(a.ko.Spec.Tags), ToACKTags(b.ko.Spec.Tags)) {
delta.Add("Spec.Tags", a.ko.Spec.Tags, b.ko.Spec.Tags)
}
return delta
}