1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package elasticloadbalancing
4
5import (
6	"context"
7	"fmt"
8	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types"
9	smithy "github.com/aws/smithy-go"
10	"github.com/aws/smithy-go/middleware"
11)
12
13type validateOpAddTags struct {
14}
15
16func (*validateOpAddTags) ID() string {
17	return "OperationInputValidation"
18}
19
20func (m *validateOpAddTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
21	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
22) {
23	input, ok := in.Parameters.(*AddTagsInput)
24	if !ok {
25		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
26	}
27	if err := validateOpAddTagsInput(input); err != nil {
28		return out, metadata, err
29	}
30	return next.HandleInitialize(ctx, in)
31}
32
33type validateOpApplySecurityGroupsToLoadBalancer struct {
34}
35
36func (*validateOpApplySecurityGroupsToLoadBalancer) ID() string {
37	return "OperationInputValidation"
38}
39
40func (m *validateOpApplySecurityGroupsToLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
41	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
42) {
43	input, ok := in.Parameters.(*ApplySecurityGroupsToLoadBalancerInput)
44	if !ok {
45		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
46	}
47	if err := validateOpApplySecurityGroupsToLoadBalancerInput(input); err != nil {
48		return out, metadata, err
49	}
50	return next.HandleInitialize(ctx, in)
51}
52
53type validateOpAttachLoadBalancerToSubnets struct {
54}
55
56func (*validateOpAttachLoadBalancerToSubnets) ID() string {
57	return "OperationInputValidation"
58}
59
60func (m *validateOpAttachLoadBalancerToSubnets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
61	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
62) {
63	input, ok := in.Parameters.(*AttachLoadBalancerToSubnetsInput)
64	if !ok {
65		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
66	}
67	if err := validateOpAttachLoadBalancerToSubnetsInput(input); err != nil {
68		return out, metadata, err
69	}
70	return next.HandleInitialize(ctx, in)
71}
72
73type validateOpConfigureHealthCheck struct {
74}
75
76func (*validateOpConfigureHealthCheck) ID() string {
77	return "OperationInputValidation"
78}
79
80func (m *validateOpConfigureHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
81	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
82) {
83	input, ok := in.Parameters.(*ConfigureHealthCheckInput)
84	if !ok {
85		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
86	}
87	if err := validateOpConfigureHealthCheckInput(input); err != nil {
88		return out, metadata, err
89	}
90	return next.HandleInitialize(ctx, in)
91}
92
93type validateOpCreateAppCookieStickinessPolicy struct {
94}
95
96func (*validateOpCreateAppCookieStickinessPolicy) ID() string {
97	return "OperationInputValidation"
98}
99
100func (m *validateOpCreateAppCookieStickinessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
101	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
102) {
103	input, ok := in.Parameters.(*CreateAppCookieStickinessPolicyInput)
104	if !ok {
105		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
106	}
107	if err := validateOpCreateAppCookieStickinessPolicyInput(input); err != nil {
108		return out, metadata, err
109	}
110	return next.HandleInitialize(ctx, in)
111}
112
113type validateOpCreateLBCookieStickinessPolicy struct {
114}
115
116func (*validateOpCreateLBCookieStickinessPolicy) ID() string {
117	return "OperationInputValidation"
118}
119
120func (m *validateOpCreateLBCookieStickinessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
121	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
122) {
123	input, ok := in.Parameters.(*CreateLBCookieStickinessPolicyInput)
124	if !ok {
125		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
126	}
127	if err := validateOpCreateLBCookieStickinessPolicyInput(input); err != nil {
128		return out, metadata, err
129	}
130	return next.HandleInitialize(ctx, in)
131}
132
133type validateOpCreateLoadBalancer struct {
134}
135
136func (*validateOpCreateLoadBalancer) ID() string {
137	return "OperationInputValidation"
138}
139
140func (m *validateOpCreateLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
141	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
142) {
143	input, ok := in.Parameters.(*CreateLoadBalancerInput)
144	if !ok {
145		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
146	}
147	if err := validateOpCreateLoadBalancerInput(input); err != nil {
148		return out, metadata, err
149	}
150	return next.HandleInitialize(ctx, in)
151}
152
153type validateOpCreateLoadBalancerListeners struct {
154}
155
156func (*validateOpCreateLoadBalancerListeners) ID() string {
157	return "OperationInputValidation"
158}
159
160func (m *validateOpCreateLoadBalancerListeners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
161	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
162) {
163	input, ok := in.Parameters.(*CreateLoadBalancerListenersInput)
164	if !ok {
165		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
166	}
167	if err := validateOpCreateLoadBalancerListenersInput(input); err != nil {
168		return out, metadata, err
169	}
170	return next.HandleInitialize(ctx, in)
171}
172
173type validateOpCreateLoadBalancerPolicy struct {
174}
175
176func (*validateOpCreateLoadBalancerPolicy) ID() string {
177	return "OperationInputValidation"
178}
179
180func (m *validateOpCreateLoadBalancerPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
181	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
182) {
183	input, ok := in.Parameters.(*CreateLoadBalancerPolicyInput)
184	if !ok {
185		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
186	}
187	if err := validateOpCreateLoadBalancerPolicyInput(input); err != nil {
188		return out, metadata, err
189	}
190	return next.HandleInitialize(ctx, in)
191}
192
193type validateOpDeleteLoadBalancer struct {
194}
195
196func (*validateOpDeleteLoadBalancer) ID() string {
197	return "OperationInputValidation"
198}
199
200func (m *validateOpDeleteLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
201	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
202) {
203	input, ok := in.Parameters.(*DeleteLoadBalancerInput)
204	if !ok {
205		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
206	}
207	if err := validateOpDeleteLoadBalancerInput(input); err != nil {
208		return out, metadata, err
209	}
210	return next.HandleInitialize(ctx, in)
211}
212
213type validateOpDeleteLoadBalancerListeners struct {
214}
215
216func (*validateOpDeleteLoadBalancerListeners) ID() string {
217	return "OperationInputValidation"
218}
219
220func (m *validateOpDeleteLoadBalancerListeners) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
221	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
222) {
223	input, ok := in.Parameters.(*DeleteLoadBalancerListenersInput)
224	if !ok {
225		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
226	}
227	if err := validateOpDeleteLoadBalancerListenersInput(input); err != nil {
228		return out, metadata, err
229	}
230	return next.HandleInitialize(ctx, in)
231}
232
233type validateOpDeleteLoadBalancerPolicy struct {
234}
235
236func (*validateOpDeleteLoadBalancerPolicy) ID() string {
237	return "OperationInputValidation"
238}
239
240func (m *validateOpDeleteLoadBalancerPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
241	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
242) {
243	input, ok := in.Parameters.(*DeleteLoadBalancerPolicyInput)
244	if !ok {
245		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
246	}
247	if err := validateOpDeleteLoadBalancerPolicyInput(input); err != nil {
248		return out, metadata, err
249	}
250	return next.HandleInitialize(ctx, in)
251}
252
253type validateOpDeregisterInstancesFromLoadBalancer struct {
254}
255
256func (*validateOpDeregisterInstancesFromLoadBalancer) ID() string {
257	return "OperationInputValidation"
258}
259
260func (m *validateOpDeregisterInstancesFromLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
261	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
262) {
263	input, ok := in.Parameters.(*DeregisterInstancesFromLoadBalancerInput)
264	if !ok {
265		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
266	}
267	if err := validateOpDeregisterInstancesFromLoadBalancerInput(input); err != nil {
268		return out, metadata, err
269	}
270	return next.HandleInitialize(ctx, in)
271}
272
273type validateOpDescribeInstanceHealth struct {
274}
275
276func (*validateOpDescribeInstanceHealth) ID() string {
277	return "OperationInputValidation"
278}
279
280func (m *validateOpDescribeInstanceHealth) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
281	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
282) {
283	input, ok := in.Parameters.(*DescribeInstanceHealthInput)
284	if !ok {
285		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
286	}
287	if err := validateOpDescribeInstanceHealthInput(input); err != nil {
288		return out, metadata, err
289	}
290	return next.HandleInitialize(ctx, in)
291}
292
293type validateOpDescribeLoadBalancerAttributes struct {
294}
295
296func (*validateOpDescribeLoadBalancerAttributes) ID() string {
297	return "OperationInputValidation"
298}
299
300func (m *validateOpDescribeLoadBalancerAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
301	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
302) {
303	input, ok := in.Parameters.(*DescribeLoadBalancerAttributesInput)
304	if !ok {
305		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
306	}
307	if err := validateOpDescribeLoadBalancerAttributesInput(input); err != nil {
308		return out, metadata, err
309	}
310	return next.HandleInitialize(ctx, in)
311}
312
313type validateOpDescribeTags struct {
314}
315
316func (*validateOpDescribeTags) ID() string {
317	return "OperationInputValidation"
318}
319
320func (m *validateOpDescribeTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
321	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
322) {
323	input, ok := in.Parameters.(*DescribeTagsInput)
324	if !ok {
325		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
326	}
327	if err := validateOpDescribeTagsInput(input); err != nil {
328		return out, metadata, err
329	}
330	return next.HandleInitialize(ctx, in)
331}
332
333type validateOpDetachLoadBalancerFromSubnets struct {
334}
335
336func (*validateOpDetachLoadBalancerFromSubnets) ID() string {
337	return "OperationInputValidation"
338}
339
340func (m *validateOpDetachLoadBalancerFromSubnets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
341	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
342) {
343	input, ok := in.Parameters.(*DetachLoadBalancerFromSubnetsInput)
344	if !ok {
345		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
346	}
347	if err := validateOpDetachLoadBalancerFromSubnetsInput(input); err != nil {
348		return out, metadata, err
349	}
350	return next.HandleInitialize(ctx, in)
351}
352
353type validateOpDisableAvailabilityZonesForLoadBalancer struct {
354}
355
356func (*validateOpDisableAvailabilityZonesForLoadBalancer) ID() string {
357	return "OperationInputValidation"
358}
359
360func (m *validateOpDisableAvailabilityZonesForLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
361	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
362) {
363	input, ok := in.Parameters.(*DisableAvailabilityZonesForLoadBalancerInput)
364	if !ok {
365		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
366	}
367	if err := validateOpDisableAvailabilityZonesForLoadBalancerInput(input); err != nil {
368		return out, metadata, err
369	}
370	return next.HandleInitialize(ctx, in)
371}
372
373type validateOpEnableAvailabilityZonesForLoadBalancer struct {
374}
375
376func (*validateOpEnableAvailabilityZonesForLoadBalancer) ID() string {
377	return "OperationInputValidation"
378}
379
380func (m *validateOpEnableAvailabilityZonesForLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
381	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
382) {
383	input, ok := in.Parameters.(*EnableAvailabilityZonesForLoadBalancerInput)
384	if !ok {
385		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
386	}
387	if err := validateOpEnableAvailabilityZonesForLoadBalancerInput(input); err != nil {
388		return out, metadata, err
389	}
390	return next.HandleInitialize(ctx, in)
391}
392
393type validateOpModifyLoadBalancerAttributes struct {
394}
395
396func (*validateOpModifyLoadBalancerAttributes) ID() string {
397	return "OperationInputValidation"
398}
399
400func (m *validateOpModifyLoadBalancerAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
401	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
402) {
403	input, ok := in.Parameters.(*ModifyLoadBalancerAttributesInput)
404	if !ok {
405		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
406	}
407	if err := validateOpModifyLoadBalancerAttributesInput(input); err != nil {
408		return out, metadata, err
409	}
410	return next.HandleInitialize(ctx, in)
411}
412
413type validateOpRegisterInstancesWithLoadBalancer struct {
414}
415
416func (*validateOpRegisterInstancesWithLoadBalancer) ID() string {
417	return "OperationInputValidation"
418}
419
420func (m *validateOpRegisterInstancesWithLoadBalancer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
421	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
422) {
423	input, ok := in.Parameters.(*RegisterInstancesWithLoadBalancerInput)
424	if !ok {
425		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
426	}
427	if err := validateOpRegisterInstancesWithLoadBalancerInput(input); err != nil {
428		return out, metadata, err
429	}
430	return next.HandleInitialize(ctx, in)
431}
432
433type validateOpRemoveTags struct {
434}
435
436func (*validateOpRemoveTags) ID() string {
437	return "OperationInputValidation"
438}
439
440func (m *validateOpRemoveTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
441	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
442) {
443	input, ok := in.Parameters.(*RemoveTagsInput)
444	if !ok {
445		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
446	}
447	if err := validateOpRemoveTagsInput(input); err != nil {
448		return out, metadata, err
449	}
450	return next.HandleInitialize(ctx, in)
451}
452
453type validateOpSetLoadBalancerListenerSSLCertificate struct {
454}
455
456func (*validateOpSetLoadBalancerListenerSSLCertificate) ID() string {
457	return "OperationInputValidation"
458}
459
460func (m *validateOpSetLoadBalancerListenerSSLCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
461	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
462) {
463	input, ok := in.Parameters.(*SetLoadBalancerListenerSSLCertificateInput)
464	if !ok {
465		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
466	}
467	if err := validateOpSetLoadBalancerListenerSSLCertificateInput(input); err != nil {
468		return out, metadata, err
469	}
470	return next.HandleInitialize(ctx, in)
471}
472
473type validateOpSetLoadBalancerPoliciesForBackendServer struct {
474}
475
476func (*validateOpSetLoadBalancerPoliciesForBackendServer) ID() string {
477	return "OperationInputValidation"
478}
479
480func (m *validateOpSetLoadBalancerPoliciesForBackendServer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
481	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
482) {
483	input, ok := in.Parameters.(*SetLoadBalancerPoliciesForBackendServerInput)
484	if !ok {
485		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
486	}
487	if err := validateOpSetLoadBalancerPoliciesForBackendServerInput(input); err != nil {
488		return out, metadata, err
489	}
490	return next.HandleInitialize(ctx, in)
491}
492
493type validateOpSetLoadBalancerPoliciesOfListener struct {
494}
495
496func (*validateOpSetLoadBalancerPoliciesOfListener) ID() string {
497	return "OperationInputValidation"
498}
499
500func (m *validateOpSetLoadBalancerPoliciesOfListener) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
501	out middleware.InitializeOutput, metadata middleware.Metadata, err error,
502) {
503	input, ok := in.Parameters.(*SetLoadBalancerPoliciesOfListenerInput)
504	if !ok {
505		return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
506	}
507	if err := validateOpSetLoadBalancerPoliciesOfListenerInput(input); err != nil {
508		return out, metadata, err
509	}
510	return next.HandleInitialize(ctx, in)
511}
512
513func addOpAddTagsValidationMiddleware(stack *middleware.Stack) error {
514	return stack.Initialize.Add(&validateOpAddTags{}, middleware.After)
515}
516
517func addOpApplySecurityGroupsToLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
518	return stack.Initialize.Add(&validateOpApplySecurityGroupsToLoadBalancer{}, middleware.After)
519}
520
521func addOpAttachLoadBalancerToSubnetsValidationMiddleware(stack *middleware.Stack) error {
522	return stack.Initialize.Add(&validateOpAttachLoadBalancerToSubnets{}, middleware.After)
523}
524
525func addOpConfigureHealthCheckValidationMiddleware(stack *middleware.Stack) error {
526	return stack.Initialize.Add(&validateOpConfigureHealthCheck{}, middleware.After)
527}
528
529func addOpCreateAppCookieStickinessPolicyValidationMiddleware(stack *middleware.Stack) error {
530	return stack.Initialize.Add(&validateOpCreateAppCookieStickinessPolicy{}, middleware.After)
531}
532
533func addOpCreateLBCookieStickinessPolicyValidationMiddleware(stack *middleware.Stack) error {
534	return stack.Initialize.Add(&validateOpCreateLBCookieStickinessPolicy{}, middleware.After)
535}
536
537func addOpCreateLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
538	return stack.Initialize.Add(&validateOpCreateLoadBalancer{}, middleware.After)
539}
540
541func addOpCreateLoadBalancerListenersValidationMiddleware(stack *middleware.Stack) error {
542	return stack.Initialize.Add(&validateOpCreateLoadBalancerListeners{}, middleware.After)
543}
544
545func addOpCreateLoadBalancerPolicyValidationMiddleware(stack *middleware.Stack) error {
546	return stack.Initialize.Add(&validateOpCreateLoadBalancerPolicy{}, middleware.After)
547}
548
549func addOpDeleteLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
550	return stack.Initialize.Add(&validateOpDeleteLoadBalancer{}, middleware.After)
551}
552
553func addOpDeleteLoadBalancerListenersValidationMiddleware(stack *middleware.Stack) error {
554	return stack.Initialize.Add(&validateOpDeleteLoadBalancerListeners{}, middleware.After)
555}
556
557func addOpDeleteLoadBalancerPolicyValidationMiddleware(stack *middleware.Stack) error {
558	return stack.Initialize.Add(&validateOpDeleteLoadBalancerPolicy{}, middleware.After)
559}
560
561func addOpDeregisterInstancesFromLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
562	return stack.Initialize.Add(&validateOpDeregisterInstancesFromLoadBalancer{}, middleware.After)
563}
564
565func addOpDescribeInstanceHealthValidationMiddleware(stack *middleware.Stack) error {
566	return stack.Initialize.Add(&validateOpDescribeInstanceHealth{}, middleware.After)
567}
568
569func addOpDescribeLoadBalancerAttributesValidationMiddleware(stack *middleware.Stack) error {
570	return stack.Initialize.Add(&validateOpDescribeLoadBalancerAttributes{}, middleware.After)
571}
572
573func addOpDescribeTagsValidationMiddleware(stack *middleware.Stack) error {
574	return stack.Initialize.Add(&validateOpDescribeTags{}, middleware.After)
575}
576
577func addOpDetachLoadBalancerFromSubnetsValidationMiddleware(stack *middleware.Stack) error {
578	return stack.Initialize.Add(&validateOpDetachLoadBalancerFromSubnets{}, middleware.After)
579}
580
581func addOpDisableAvailabilityZonesForLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
582	return stack.Initialize.Add(&validateOpDisableAvailabilityZonesForLoadBalancer{}, middleware.After)
583}
584
585func addOpEnableAvailabilityZonesForLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
586	return stack.Initialize.Add(&validateOpEnableAvailabilityZonesForLoadBalancer{}, middleware.After)
587}
588
589func addOpModifyLoadBalancerAttributesValidationMiddleware(stack *middleware.Stack) error {
590	return stack.Initialize.Add(&validateOpModifyLoadBalancerAttributes{}, middleware.After)
591}
592
593func addOpRegisterInstancesWithLoadBalancerValidationMiddleware(stack *middleware.Stack) error {
594	return stack.Initialize.Add(&validateOpRegisterInstancesWithLoadBalancer{}, middleware.After)
595}
596
597func addOpRemoveTagsValidationMiddleware(stack *middleware.Stack) error {
598	return stack.Initialize.Add(&validateOpRemoveTags{}, middleware.After)
599}
600
601func addOpSetLoadBalancerListenerSSLCertificateValidationMiddleware(stack *middleware.Stack) error {
602	return stack.Initialize.Add(&validateOpSetLoadBalancerListenerSSLCertificate{}, middleware.After)
603}
604
605func addOpSetLoadBalancerPoliciesForBackendServerValidationMiddleware(stack *middleware.Stack) error {
606	return stack.Initialize.Add(&validateOpSetLoadBalancerPoliciesForBackendServer{}, middleware.After)
607}
608
609func addOpSetLoadBalancerPoliciesOfListenerValidationMiddleware(stack *middleware.Stack) error {
610	return stack.Initialize.Add(&validateOpSetLoadBalancerPoliciesOfListener{}, middleware.After)
611}
612
613func validateAccessLog(v *types.AccessLog) error {
614	if v == nil {
615		return nil
616	}
617	invalidParams := smithy.InvalidParamsError{Context: "AccessLog"}
618	if invalidParams.Len() > 0 {
619		return invalidParams
620	} else {
621		return nil
622	}
623}
624
625func validateConnectionDraining(v *types.ConnectionDraining) error {
626	if v == nil {
627		return nil
628	}
629	invalidParams := smithy.InvalidParamsError{Context: "ConnectionDraining"}
630	if invalidParams.Len() > 0 {
631		return invalidParams
632	} else {
633		return nil
634	}
635}
636
637func validateConnectionSettings(v *types.ConnectionSettings) error {
638	if v == nil {
639		return nil
640	}
641	invalidParams := smithy.InvalidParamsError{Context: "ConnectionSettings"}
642	if v.IdleTimeout == nil {
643		invalidParams.Add(smithy.NewErrParamRequired("IdleTimeout"))
644	}
645	if invalidParams.Len() > 0 {
646		return invalidParams
647	} else {
648		return nil
649	}
650}
651
652func validateCrossZoneLoadBalancing(v *types.CrossZoneLoadBalancing) error {
653	if v == nil {
654		return nil
655	}
656	invalidParams := smithy.InvalidParamsError{Context: "CrossZoneLoadBalancing"}
657	if invalidParams.Len() > 0 {
658		return invalidParams
659	} else {
660		return nil
661	}
662}
663
664func validateHealthCheck(v *types.HealthCheck) error {
665	if v == nil {
666		return nil
667	}
668	invalidParams := smithy.InvalidParamsError{Context: "HealthCheck"}
669	if v.Target == nil {
670		invalidParams.Add(smithy.NewErrParamRequired("Target"))
671	}
672	if invalidParams.Len() > 0 {
673		return invalidParams
674	} else {
675		return nil
676	}
677}
678
679func validateListener(v *types.Listener) error {
680	if v == nil {
681		return nil
682	}
683	invalidParams := smithy.InvalidParamsError{Context: "Listener"}
684	if v.Protocol == nil {
685		invalidParams.Add(smithy.NewErrParamRequired("Protocol"))
686	}
687	if invalidParams.Len() > 0 {
688		return invalidParams
689	} else {
690		return nil
691	}
692}
693
694func validateListeners(v []types.Listener) error {
695	if v == nil {
696		return nil
697	}
698	invalidParams := smithy.InvalidParamsError{Context: "Listeners"}
699	for i := range v {
700		if err := validateListener(&v[i]); err != nil {
701			invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
702		}
703	}
704	if invalidParams.Len() > 0 {
705		return invalidParams
706	} else {
707		return nil
708	}
709}
710
711func validateLoadBalancerAttributes(v *types.LoadBalancerAttributes) error {
712	if v == nil {
713		return nil
714	}
715	invalidParams := smithy.InvalidParamsError{Context: "LoadBalancerAttributes"}
716	if v.CrossZoneLoadBalancing != nil {
717		if err := validateCrossZoneLoadBalancing(v.CrossZoneLoadBalancing); err != nil {
718			invalidParams.AddNested("CrossZoneLoadBalancing", err.(smithy.InvalidParamsError))
719		}
720	}
721	if v.AccessLog != nil {
722		if err := validateAccessLog(v.AccessLog); err != nil {
723			invalidParams.AddNested("AccessLog", err.(smithy.InvalidParamsError))
724		}
725	}
726	if v.ConnectionDraining != nil {
727		if err := validateConnectionDraining(v.ConnectionDraining); err != nil {
728			invalidParams.AddNested("ConnectionDraining", err.(smithy.InvalidParamsError))
729		}
730	}
731	if v.ConnectionSettings != nil {
732		if err := validateConnectionSettings(v.ConnectionSettings); err != nil {
733			invalidParams.AddNested("ConnectionSettings", err.(smithy.InvalidParamsError))
734		}
735	}
736	if invalidParams.Len() > 0 {
737		return invalidParams
738	} else {
739		return nil
740	}
741}
742
743func validateTag(v *types.Tag) error {
744	if v == nil {
745		return nil
746	}
747	invalidParams := smithy.InvalidParamsError{Context: "Tag"}
748	if v.Key == nil {
749		invalidParams.Add(smithy.NewErrParamRequired("Key"))
750	}
751	if invalidParams.Len() > 0 {
752		return invalidParams
753	} else {
754		return nil
755	}
756}
757
758func validateTagList(v []types.Tag) error {
759	if v == nil {
760		return nil
761	}
762	invalidParams := smithy.InvalidParamsError{Context: "TagList"}
763	for i := range v {
764		if err := validateTag(&v[i]); err != nil {
765			invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
766		}
767	}
768	if invalidParams.Len() > 0 {
769		return invalidParams
770	} else {
771		return nil
772	}
773}
774
775func validateOpAddTagsInput(v *AddTagsInput) error {
776	if v == nil {
777		return nil
778	}
779	invalidParams := smithy.InvalidParamsError{Context: "AddTagsInput"}
780	if v.LoadBalancerNames == nil {
781		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerNames"))
782	}
783	if v.Tags == nil {
784		invalidParams.Add(smithy.NewErrParamRequired("Tags"))
785	} else if v.Tags != nil {
786		if err := validateTagList(v.Tags); err != nil {
787			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
788		}
789	}
790	if invalidParams.Len() > 0 {
791		return invalidParams
792	} else {
793		return nil
794	}
795}
796
797func validateOpApplySecurityGroupsToLoadBalancerInput(v *ApplySecurityGroupsToLoadBalancerInput) error {
798	if v == nil {
799		return nil
800	}
801	invalidParams := smithy.InvalidParamsError{Context: "ApplySecurityGroupsToLoadBalancerInput"}
802	if v.LoadBalancerName == nil {
803		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
804	}
805	if v.SecurityGroups == nil {
806		invalidParams.Add(smithy.NewErrParamRequired("SecurityGroups"))
807	}
808	if invalidParams.Len() > 0 {
809		return invalidParams
810	} else {
811		return nil
812	}
813}
814
815func validateOpAttachLoadBalancerToSubnetsInput(v *AttachLoadBalancerToSubnetsInput) error {
816	if v == nil {
817		return nil
818	}
819	invalidParams := smithy.InvalidParamsError{Context: "AttachLoadBalancerToSubnetsInput"}
820	if v.LoadBalancerName == nil {
821		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
822	}
823	if v.Subnets == nil {
824		invalidParams.Add(smithy.NewErrParamRequired("Subnets"))
825	}
826	if invalidParams.Len() > 0 {
827		return invalidParams
828	} else {
829		return nil
830	}
831}
832
833func validateOpConfigureHealthCheckInput(v *ConfigureHealthCheckInput) error {
834	if v == nil {
835		return nil
836	}
837	invalidParams := smithy.InvalidParamsError{Context: "ConfigureHealthCheckInput"}
838	if v.LoadBalancerName == nil {
839		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
840	}
841	if v.HealthCheck == nil {
842		invalidParams.Add(smithy.NewErrParamRequired("HealthCheck"))
843	} else if v.HealthCheck != nil {
844		if err := validateHealthCheck(v.HealthCheck); err != nil {
845			invalidParams.AddNested("HealthCheck", err.(smithy.InvalidParamsError))
846		}
847	}
848	if invalidParams.Len() > 0 {
849		return invalidParams
850	} else {
851		return nil
852	}
853}
854
855func validateOpCreateAppCookieStickinessPolicyInput(v *CreateAppCookieStickinessPolicyInput) error {
856	if v == nil {
857		return nil
858	}
859	invalidParams := smithy.InvalidParamsError{Context: "CreateAppCookieStickinessPolicyInput"}
860	if v.LoadBalancerName == nil {
861		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
862	}
863	if v.PolicyName == nil {
864		invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
865	}
866	if v.CookieName == nil {
867		invalidParams.Add(smithy.NewErrParamRequired("CookieName"))
868	}
869	if invalidParams.Len() > 0 {
870		return invalidParams
871	} else {
872		return nil
873	}
874}
875
876func validateOpCreateLBCookieStickinessPolicyInput(v *CreateLBCookieStickinessPolicyInput) error {
877	if v == nil {
878		return nil
879	}
880	invalidParams := smithy.InvalidParamsError{Context: "CreateLBCookieStickinessPolicyInput"}
881	if v.LoadBalancerName == nil {
882		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
883	}
884	if v.PolicyName == nil {
885		invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
886	}
887	if invalidParams.Len() > 0 {
888		return invalidParams
889	} else {
890		return nil
891	}
892}
893
894func validateOpCreateLoadBalancerInput(v *CreateLoadBalancerInput) error {
895	if v == nil {
896		return nil
897	}
898	invalidParams := smithy.InvalidParamsError{Context: "CreateLoadBalancerInput"}
899	if v.LoadBalancerName == nil {
900		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
901	}
902	if v.Listeners == nil {
903		invalidParams.Add(smithy.NewErrParamRequired("Listeners"))
904	} else if v.Listeners != nil {
905		if err := validateListeners(v.Listeners); err != nil {
906			invalidParams.AddNested("Listeners", err.(smithy.InvalidParamsError))
907		}
908	}
909	if v.Tags != nil {
910		if err := validateTagList(v.Tags); err != nil {
911			invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
912		}
913	}
914	if invalidParams.Len() > 0 {
915		return invalidParams
916	} else {
917		return nil
918	}
919}
920
921func validateOpCreateLoadBalancerListenersInput(v *CreateLoadBalancerListenersInput) error {
922	if v == nil {
923		return nil
924	}
925	invalidParams := smithy.InvalidParamsError{Context: "CreateLoadBalancerListenersInput"}
926	if v.LoadBalancerName == nil {
927		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
928	}
929	if v.Listeners == nil {
930		invalidParams.Add(smithy.NewErrParamRequired("Listeners"))
931	} else if v.Listeners != nil {
932		if err := validateListeners(v.Listeners); err != nil {
933			invalidParams.AddNested("Listeners", err.(smithy.InvalidParamsError))
934		}
935	}
936	if invalidParams.Len() > 0 {
937		return invalidParams
938	} else {
939		return nil
940	}
941}
942
943func validateOpCreateLoadBalancerPolicyInput(v *CreateLoadBalancerPolicyInput) error {
944	if v == nil {
945		return nil
946	}
947	invalidParams := smithy.InvalidParamsError{Context: "CreateLoadBalancerPolicyInput"}
948	if v.LoadBalancerName == nil {
949		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
950	}
951	if v.PolicyName == nil {
952		invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
953	}
954	if v.PolicyTypeName == nil {
955		invalidParams.Add(smithy.NewErrParamRequired("PolicyTypeName"))
956	}
957	if invalidParams.Len() > 0 {
958		return invalidParams
959	} else {
960		return nil
961	}
962}
963
964func validateOpDeleteLoadBalancerInput(v *DeleteLoadBalancerInput) error {
965	if v == nil {
966		return nil
967	}
968	invalidParams := smithy.InvalidParamsError{Context: "DeleteLoadBalancerInput"}
969	if v.LoadBalancerName == nil {
970		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
971	}
972	if invalidParams.Len() > 0 {
973		return invalidParams
974	} else {
975		return nil
976	}
977}
978
979func validateOpDeleteLoadBalancerListenersInput(v *DeleteLoadBalancerListenersInput) error {
980	if v == nil {
981		return nil
982	}
983	invalidParams := smithy.InvalidParamsError{Context: "DeleteLoadBalancerListenersInput"}
984	if v.LoadBalancerName == nil {
985		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
986	}
987	if v.LoadBalancerPorts == nil {
988		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerPorts"))
989	}
990	if invalidParams.Len() > 0 {
991		return invalidParams
992	} else {
993		return nil
994	}
995}
996
997func validateOpDeleteLoadBalancerPolicyInput(v *DeleteLoadBalancerPolicyInput) error {
998	if v == nil {
999		return nil
1000	}
1001	invalidParams := smithy.InvalidParamsError{Context: "DeleteLoadBalancerPolicyInput"}
1002	if v.LoadBalancerName == nil {
1003		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1004	}
1005	if v.PolicyName == nil {
1006		invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
1007	}
1008	if invalidParams.Len() > 0 {
1009		return invalidParams
1010	} else {
1011		return nil
1012	}
1013}
1014
1015func validateOpDeregisterInstancesFromLoadBalancerInput(v *DeregisterInstancesFromLoadBalancerInput) error {
1016	if v == nil {
1017		return nil
1018	}
1019	invalidParams := smithy.InvalidParamsError{Context: "DeregisterInstancesFromLoadBalancerInput"}
1020	if v.LoadBalancerName == nil {
1021		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1022	}
1023	if v.Instances == nil {
1024		invalidParams.Add(smithy.NewErrParamRequired("Instances"))
1025	}
1026	if invalidParams.Len() > 0 {
1027		return invalidParams
1028	} else {
1029		return nil
1030	}
1031}
1032
1033func validateOpDescribeInstanceHealthInput(v *DescribeInstanceHealthInput) error {
1034	if v == nil {
1035		return nil
1036	}
1037	invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceHealthInput"}
1038	if v.LoadBalancerName == nil {
1039		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1040	}
1041	if invalidParams.Len() > 0 {
1042		return invalidParams
1043	} else {
1044		return nil
1045	}
1046}
1047
1048func validateOpDescribeLoadBalancerAttributesInput(v *DescribeLoadBalancerAttributesInput) error {
1049	if v == nil {
1050		return nil
1051	}
1052	invalidParams := smithy.InvalidParamsError{Context: "DescribeLoadBalancerAttributesInput"}
1053	if v.LoadBalancerName == nil {
1054		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1055	}
1056	if invalidParams.Len() > 0 {
1057		return invalidParams
1058	} else {
1059		return nil
1060	}
1061}
1062
1063func validateOpDescribeTagsInput(v *DescribeTagsInput) error {
1064	if v == nil {
1065		return nil
1066	}
1067	invalidParams := smithy.InvalidParamsError{Context: "DescribeTagsInput"}
1068	if v.LoadBalancerNames == nil {
1069		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerNames"))
1070	}
1071	if invalidParams.Len() > 0 {
1072		return invalidParams
1073	} else {
1074		return nil
1075	}
1076}
1077
1078func validateOpDetachLoadBalancerFromSubnetsInput(v *DetachLoadBalancerFromSubnetsInput) error {
1079	if v == nil {
1080		return nil
1081	}
1082	invalidParams := smithy.InvalidParamsError{Context: "DetachLoadBalancerFromSubnetsInput"}
1083	if v.LoadBalancerName == nil {
1084		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1085	}
1086	if v.Subnets == nil {
1087		invalidParams.Add(smithy.NewErrParamRequired("Subnets"))
1088	}
1089	if invalidParams.Len() > 0 {
1090		return invalidParams
1091	} else {
1092		return nil
1093	}
1094}
1095
1096func validateOpDisableAvailabilityZonesForLoadBalancerInput(v *DisableAvailabilityZonesForLoadBalancerInput) error {
1097	if v == nil {
1098		return nil
1099	}
1100	invalidParams := smithy.InvalidParamsError{Context: "DisableAvailabilityZonesForLoadBalancerInput"}
1101	if v.LoadBalancerName == nil {
1102		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1103	}
1104	if v.AvailabilityZones == nil {
1105		invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZones"))
1106	}
1107	if invalidParams.Len() > 0 {
1108		return invalidParams
1109	} else {
1110		return nil
1111	}
1112}
1113
1114func validateOpEnableAvailabilityZonesForLoadBalancerInput(v *EnableAvailabilityZonesForLoadBalancerInput) error {
1115	if v == nil {
1116		return nil
1117	}
1118	invalidParams := smithy.InvalidParamsError{Context: "EnableAvailabilityZonesForLoadBalancerInput"}
1119	if v.LoadBalancerName == nil {
1120		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1121	}
1122	if v.AvailabilityZones == nil {
1123		invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZones"))
1124	}
1125	if invalidParams.Len() > 0 {
1126		return invalidParams
1127	} else {
1128		return nil
1129	}
1130}
1131
1132func validateOpModifyLoadBalancerAttributesInput(v *ModifyLoadBalancerAttributesInput) error {
1133	if v == nil {
1134		return nil
1135	}
1136	invalidParams := smithy.InvalidParamsError{Context: "ModifyLoadBalancerAttributesInput"}
1137	if v.LoadBalancerName == nil {
1138		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1139	}
1140	if v.LoadBalancerAttributes == nil {
1141		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerAttributes"))
1142	} else if v.LoadBalancerAttributes != nil {
1143		if err := validateLoadBalancerAttributes(v.LoadBalancerAttributes); err != nil {
1144			invalidParams.AddNested("LoadBalancerAttributes", err.(smithy.InvalidParamsError))
1145		}
1146	}
1147	if invalidParams.Len() > 0 {
1148		return invalidParams
1149	} else {
1150		return nil
1151	}
1152}
1153
1154func validateOpRegisterInstancesWithLoadBalancerInput(v *RegisterInstancesWithLoadBalancerInput) error {
1155	if v == nil {
1156		return nil
1157	}
1158	invalidParams := smithy.InvalidParamsError{Context: "RegisterInstancesWithLoadBalancerInput"}
1159	if v.LoadBalancerName == nil {
1160		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1161	}
1162	if v.Instances == nil {
1163		invalidParams.Add(smithy.NewErrParamRequired("Instances"))
1164	}
1165	if invalidParams.Len() > 0 {
1166		return invalidParams
1167	} else {
1168		return nil
1169	}
1170}
1171
1172func validateOpRemoveTagsInput(v *RemoveTagsInput) error {
1173	if v == nil {
1174		return nil
1175	}
1176	invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsInput"}
1177	if v.LoadBalancerNames == nil {
1178		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerNames"))
1179	}
1180	if v.Tags == nil {
1181		invalidParams.Add(smithy.NewErrParamRequired("Tags"))
1182	}
1183	if invalidParams.Len() > 0 {
1184		return invalidParams
1185	} else {
1186		return nil
1187	}
1188}
1189
1190func validateOpSetLoadBalancerListenerSSLCertificateInput(v *SetLoadBalancerListenerSSLCertificateInput) error {
1191	if v == nil {
1192		return nil
1193	}
1194	invalidParams := smithy.InvalidParamsError{Context: "SetLoadBalancerListenerSSLCertificateInput"}
1195	if v.LoadBalancerName == nil {
1196		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1197	}
1198	if v.SSLCertificateId == nil {
1199		invalidParams.Add(smithy.NewErrParamRequired("SSLCertificateId"))
1200	}
1201	if invalidParams.Len() > 0 {
1202		return invalidParams
1203	} else {
1204		return nil
1205	}
1206}
1207
1208func validateOpSetLoadBalancerPoliciesForBackendServerInput(v *SetLoadBalancerPoliciesForBackendServerInput) error {
1209	if v == nil {
1210		return nil
1211	}
1212	invalidParams := smithy.InvalidParamsError{Context: "SetLoadBalancerPoliciesForBackendServerInput"}
1213	if v.LoadBalancerName == nil {
1214		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1215	}
1216	if v.InstancePort == nil {
1217		invalidParams.Add(smithy.NewErrParamRequired("InstancePort"))
1218	}
1219	if v.PolicyNames == nil {
1220		invalidParams.Add(smithy.NewErrParamRequired("PolicyNames"))
1221	}
1222	if invalidParams.Len() > 0 {
1223		return invalidParams
1224	} else {
1225		return nil
1226	}
1227}
1228
1229func validateOpSetLoadBalancerPoliciesOfListenerInput(v *SetLoadBalancerPoliciesOfListenerInput) error {
1230	if v == nil {
1231		return nil
1232	}
1233	invalidParams := smithy.InvalidParamsError{Context: "SetLoadBalancerPoliciesOfListenerInput"}
1234	if v.LoadBalancerName == nil {
1235		invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerName"))
1236	}
1237	if v.PolicyNames == nil {
1238		invalidParams.Add(smithy.NewErrParamRequired("PolicyNames"))
1239	}
1240	if invalidParams.Len() > 0 {
1241		return invalidParams
1242	} else {
1243		return nil
1244	}
1245}
1246