1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package opsworkscm 4 5import ( 6 "context" 7 "fmt" 8 "github.com/aws/aws-sdk-go-v2/service/opsworkscm/types" 9 smithy "github.com/aws/smithy-go" 10 "github.com/aws/smithy-go/middleware" 11) 12 13type validateOpAssociateNode struct { 14} 15 16func (*validateOpAssociateNode) ID() string { 17 return "OperationInputValidation" 18} 19 20func (m *validateOpAssociateNode) 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.(*AssociateNodeInput) 24 if !ok { 25 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 26 } 27 if err := validateOpAssociateNodeInput(input); err != nil { 28 return out, metadata, err 29 } 30 return next.HandleInitialize(ctx, in) 31} 32 33type validateOpCreateBackup struct { 34} 35 36func (*validateOpCreateBackup) ID() string { 37 return "OperationInputValidation" 38} 39 40func (m *validateOpCreateBackup) 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.(*CreateBackupInput) 44 if !ok { 45 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 46 } 47 if err := validateOpCreateBackupInput(input); err != nil { 48 return out, metadata, err 49 } 50 return next.HandleInitialize(ctx, in) 51} 52 53type validateOpCreateServer struct { 54} 55 56func (*validateOpCreateServer) ID() string { 57 return "OperationInputValidation" 58} 59 60func (m *validateOpCreateServer) 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.(*CreateServerInput) 64 if !ok { 65 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 66 } 67 if err := validateOpCreateServerInput(input); err != nil { 68 return out, metadata, err 69 } 70 return next.HandleInitialize(ctx, in) 71} 72 73type validateOpDeleteBackup struct { 74} 75 76func (*validateOpDeleteBackup) ID() string { 77 return "OperationInputValidation" 78} 79 80func (m *validateOpDeleteBackup) 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.(*DeleteBackupInput) 84 if !ok { 85 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 86 } 87 if err := validateOpDeleteBackupInput(input); err != nil { 88 return out, metadata, err 89 } 90 return next.HandleInitialize(ctx, in) 91} 92 93type validateOpDeleteServer struct { 94} 95 96func (*validateOpDeleteServer) ID() string { 97 return "OperationInputValidation" 98} 99 100func (m *validateOpDeleteServer) 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.(*DeleteServerInput) 104 if !ok { 105 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 106 } 107 if err := validateOpDeleteServerInput(input); err != nil { 108 return out, metadata, err 109 } 110 return next.HandleInitialize(ctx, in) 111} 112 113type validateOpDescribeEvents struct { 114} 115 116func (*validateOpDescribeEvents) ID() string { 117 return "OperationInputValidation" 118} 119 120func (m *validateOpDescribeEvents) 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.(*DescribeEventsInput) 124 if !ok { 125 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 126 } 127 if err := validateOpDescribeEventsInput(input); err != nil { 128 return out, metadata, err 129 } 130 return next.HandleInitialize(ctx, in) 131} 132 133type validateOpDescribeNodeAssociationStatus struct { 134} 135 136func (*validateOpDescribeNodeAssociationStatus) ID() string { 137 return "OperationInputValidation" 138} 139 140func (m *validateOpDescribeNodeAssociationStatus) 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.(*DescribeNodeAssociationStatusInput) 144 if !ok { 145 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 146 } 147 if err := validateOpDescribeNodeAssociationStatusInput(input); err != nil { 148 return out, metadata, err 149 } 150 return next.HandleInitialize(ctx, in) 151} 152 153type validateOpDisassociateNode struct { 154} 155 156func (*validateOpDisassociateNode) ID() string { 157 return "OperationInputValidation" 158} 159 160func (m *validateOpDisassociateNode) 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.(*DisassociateNodeInput) 164 if !ok { 165 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 166 } 167 if err := validateOpDisassociateNodeInput(input); err != nil { 168 return out, metadata, err 169 } 170 return next.HandleInitialize(ctx, in) 171} 172 173type validateOpExportServerEngineAttribute struct { 174} 175 176func (*validateOpExportServerEngineAttribute) ID() string { 177 return "OperationInputValidation" 178} 179 180func (m *validateOpExportServerEngineAttribute) 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.(*ExportServerEngineAttributeInput) 184 if !ok { 185 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 186 } 187 if err := validateOpExportServerEngineAttributeInput(input); err != nil { 188 return out, metadata, err 189 } 190 return next.HandleInitialize(ctx, in) 191} 192 193type validateOpListTagsForResource struct { 194} 195 196func (*validateOpListTagsForResource) ID() string { 197 return "OperationInputValidation" 198} 199 200func (m *validateOpListTagsForResource) 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.(*ListTagsForResourceInput) 204 if !ok { 205 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 206 } 207 if err := validateOpListTagsForResourceInput(input); err != nil { 208 return out, metadata, err 209 } 210 return next.HandleInitialize(ctx, in) 211} 212 213type validateOpRestoreServer struct { 214} 215 216func (*validateOpRestoreServer) ID() string { 217 return "OperationInputValidation" 218} 219 220func (m *validateOpRestoreServer) 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.(*RestoreServerInput) 224 if !ok { 225 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 226 } 227 if err := validateOpRestoreServerInput(input); err != nil { 228 return out, metadata, err 229 } 230 return next.HandleInitialize(ctx, in) 231} 232 233type validateOpStartMaintenance struct { 234} 235 236func (*validateOpStartMaintenance) ID() string { 237 return "OperationInputValidation" 238} 239 240func (m *validateOpStartMaintenance) 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.(*StartMaintenanceInput) 244 if !ok { 245 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 246 } 247 if err := validateOpStartMaintenanceInput(input); err != nil { 248 return out, metadata, err 249 } 250 return next.HandleInitialize(ctx, in) 251} 252 253type validateOpTagResource struct { 254} 255 256func (*validateOpTagResource) ID() string { 257 return "OperationInputValidation" 258} 259 260func (m *validateOpTagResource) 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.(*TagResourceInput) 264 if !ok { 265 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 266 } 267 if err := validateOpTagResourceInput(input); err != nil { 268 return out, metadata, err 269 } 270 return next.HandleInitialize(ctx, in) 271} 272 273type validateOpUntagResource struct { 274} 275 276func (*validateOpUntagResource) ID() string { 277 return "OperationInputValidation" 278} 279 280func (m *validateOpUntagResource) 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.(*UntagResourceInput) 284 if !ok { 285 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 286 } 287 if err := validateOpUntagResourceInput(input); err != nil { 288 return out, metadata, err 289 } 290 return next.HandleInitialize(ctx, in) 291} 292 293type validateOpUpdateServerEngineAttributes struct { 294} 295 296func (*validateOpUpdateServerEngineAttributes) ID() string { 297 return "OperationInputValidation" 298} 299 300func (m *validateOpUpdateServerEngineAttributes) 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.(*UpdateServerEngineAttributesInput) 304 if !ok { 305 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 306 } 307 if err := validateOpUpdateServerEngineAttributesInput(input); err != nil { 308 return out, metadata, err 309 } 310 return next.HandleInitialize(ctx, in) 311} 312 313type validateOpUpdateServer struct { 314} 315 316func (*validateOpUpdateServer) ID() string { 317 return "OperationInputValidation" 318} 319 320func (m *validateOpUpdateServer) 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.(*UpdateServerInput) 324 if !ok { 325 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 326 } 327 if err := validateOpUpdateServerInput(input); err != nil { 328 return out, metadata, err 329 } 330 return next.HandleInitialize(ctx, in) 331} 332 333func addOpAssociateNodeValidationMiddleware(stack *middleware.Stack) error { 334 return stack.Initialize.Add(&validateOpAssociateNode{}, middleware.After) 335} 336 337func addOpCreateBackupValidationMiddleware(stack *middleware.Stack) error { 338 return stack.Initialize.Add(&validateOpCreateBackup{}, middleware.After) 339} 340 341func addOpCreateServerValidationMiddleware(stack *middleware.Stack) error { 342 return stack.Initialize.Add(&validateOpCreateServer{}, middleware.After) 343} 344 345func addOpDeleteBackupValidationMiddleware(stack *middleware.Stack) error { 346 return stack.Initialize.Add(&validateOpDeleteBackup{}, middleware.After) 347} 348 349func addOpDeleteServerValidationMiddleware(stack *middleware.Stack) error { 350 return stack.Initialize.Add(&validateOpDeleteServer{}, middleware.After) 351} 352 353func addOpDescribeEventsValidationMiddleware(stack *middleware.Stack) error { 354 return stack.Initialize.Add(&validateOpDescribeEvents{}, middleware.After) 355} 356 357func addOpDescribeNodeAssociationStatusValidationMiddleware(stack *middleware.Stack) error { 358 return stack.Initialize.Add(&validateOpDescribeNodeAssociationStatus{}, middleware.After) 359} 360 361func addOpDisassociateNodeValidationMiddleware(stack *middleware.Stack) error { 362 return stack.Initialize.Add(&validateOpDisassociateNode{}, middleware.After) 363} 364 365func addOpExportServerEngineAttributeValidationMiddleware(stack *middleware.Stack) error { 366 return stack.Initialize.Add(&validateOpExportServerEngineAttribute{}, middleware.After) 367} 368 369func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { 370 return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) 371} 372 373func addOpRestoreServerValidationMiddleware(stack *middleware.Stack) error { 374 return stack.Initialize.Add(&validateOpRestoreServer{}, middleware.After) 375} 376 377func addOpStartMaintenanceValidationMiddleware(stack *middleware.Stack) error { 378 return stack.Initialize.Add(&validateOpStartMaintenance{}, middleware.After) 379} 380 381func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { 382 return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) 383} 384 385func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { 386 return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) 387} 388 389func addOpUpdateServerEngineAttributesValidationMiddleware(stack *middleware.Stack) error { 390 return stack.Initialize.Add(&validateOpUpdateServerEngineAttributes{}, middleware.After) 391} 392 393func addOpUpdateServerValidationMiddleware(stack *middleware.Stack) error { 394 return stack.Initialize.Add(&validateOpUpdateServer{}, middleware.After) 395} 396 397func validateTag(v *types.Tag) error { 398 if v == nil { 399 return nil 400 } 401 invalidParams := smithy.InvalidParamsError{Context: "Tag"} 402 if v.Key == nil { 403 invalidParams.Add(smithy.NewErrParamRequired("Key")) 404 } 405 if v.Value == nil { 406 invalidParams.Add(smithy.NewErrParamRequired("Value")) 407 } 408 if invalidParams.Len() > 0 { 409 return invalidParams 410 } else { 411 return nil 412 } 413} 414 415func validateTagList(v []types.Tag) error { 416 if v == nil { 417 return nil 418 } 419 invalidParams := smithy.InvalidParamsError{Context: "TagList"} 420 for i := range v { 421 if err := validateTag(&v[i]); err != nil { 422 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 423 } 424 } 425 if invalidParams.Len() > 0 { 426 return invalidParams 427 } else { 428 return nil 429 } 430} 431 432func validateOpAssociateNodeInput(v *AssociateNodeInput) error { 433 if v == nil { 434 return nil 435 } 436 invalidParams := smithy.InvalidParamsError{Context: "AssociateNodeInput"} 437 if v.ServerName == nil { 438 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 439 } 440 if v.NodeName == nil { 441 invalidParams.Add(smithy.NewErrParamRequired("NodeName")) 442 } 443 if v.EngineAttributes == nil { 444 invalidParams.Add(smithy.NewErrParamRequired("EngineAttributes")) 445 } 446 if invalidParams.Len() > 0 { 447 return invalidParams 448 } else { 449 return nil 450 } 451} 452 453func validateOpCreateBackupInput(v *CreateBackupInput) error { 454 if v == nil { 455 return nil 456 } 457 invalidParams := smithy.InvalidParamsError{Context: "CreateBackupInput"} 458 if v.ServerName == nil { 459 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 460 } 461 if v.Tags != nil { 462 if err := validateTagList(v.Tags); err != nil { 463 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 464 } 465 } 466 if invalidParams.Len() > 0 { 467 return invalidParams 468 } else { 469 return nil 470 } 471} 472 473func validateOpCreateServerInput(v *CreateServerInput) error { 474 if v == nil { 475 return nil 476 } 477 invalidParams := smithy.InvalidParamsError{Context: "CreateServerInput"} 478 if v.Engine == nil { 479 invalidParams.Add(smithy.NewErrParamRequired("Engine")) 480 } 481 if v.ServerName == nil { 482 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 483 } 484 if v.InstanceProfileArn == nil { 485 invalidParams.Add(smithy.NewErrParamRequired("InstanceProfileArn")) 486 } 487 if v.InstanceType == nil { 488 invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) 489 } 490 if v.ServiceRoleArn == nil { 491 invalidParams.Add(smithy.NewErrParamRequired("ServiceRoleArn")) 492 } 493 if v.Tags != nil { 494 if err := validateTagList(v.Tags); err != nil { 495 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 496 } 497 } 498 if invalidParams.Len() > 0 { 499 return invalidParams 500 } else { 501 return nil 502 } 503} 504 505func validateOpDeleteBackupInput(v *DeleteBackupInput) error { 506 if v == nil { 507 return nil 508 } 509 invalidParams := smithy.InvalidParamsError{Context: "DeleteBackupInput"} 510 if v.BackupId == nil { 511 invalidParams.Add(smithy.NewErrParamRequired("BackupId")) 512 } 513 if invalidParams.Len() > 0 { 514 return invalidParams 515 } else { 516 return nil 517 } 518} 519 520func validateOpDeleteServerInput(v *DeleteServerInput) error { 521 if v == nil { 522 return nil 523 } 524 invalidParams := smithy.InvalidParamsError{Context: "DeleteServerInput"} 525 if v.ServerName == nil { 526 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 527 } 528 if invalidParams.Len() > 0 { 529 return invalidParams 530 } else { 531 return nil 532 } 533} 534 535func validateOpDescribeEventsInput(v *DescribeEventsInput) error { 536 if v == nil { 537 return nil 538 } 539 invalidParams := smithy.InvalidParamsError{Context: "DescribeEventsInput"} 540 if v.ServerName == nil { 541 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 542 } 543 if invalidParams.Len() > 0 { 544 return invalidParams 545 } else { 546 return nil 547 } 548} 549 550func validateOpDescribeNodeAssociationStatusInput(v *DescribeNodeAssociationStatusInput) error { 551 if v == nil { 552 return nil 553 } 554 invalidParams := smithy.InvalidParamsError{Context: "DescribeNodeAssociationStatusInput"} 555 if v.NodeAssociationStatusToken == nil { 556 invalidParams.Add(smithy.NewErrParamRequired("NodeAssociationStatusToken")) 557 } 558 if v.ServerName == nil { 559 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 560 } 561 if invalidParams.Len() > 0 { 562 return invalidParams 563 } else { 564 return nil 565 } 566} 567 568func validateOpDisassociateNodeInput(v *DisassociateNodeInput) error { 569 if v == nil { 570 return nil 571 } 572 invalidParams := smithy.InvalidParamsError{Context: "DisassociateNodeInput"} 573 if v.ServerName == nil { 574 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 575 } 576 if v.NodeName == nil { 577 invalidParams.Add(smithy.NewErrParamRequired("NodeName")) 578 } 579 if invalidParams.Len() > 0 { 580 return invalidParams 581 } else { 582 return nil 583 } 584} 585 586func validateOpExportServerEngineAttributeInput(v *ExportServerEngineAttributeInput) error { 587 if v == nil { 588 return nil 589 } 590 invalidParams := smithy.InvalidParamsError{Context: "ExportServerEngineAttributeInput"} 591 if v.ExportAttributeName == nil { 592 invalidParams.Add(smithy.NewErrParamRequired("ExportAttributeName")) 593 } 594 if v.ServerName == nil { 595 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 596 } 597 if invalidParams.Len() > 0 { 598 return invalidParams 599 } else { 600 return nil 601 } 602} 603 604func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { 605 if v == nil { 606 return nil 607 } 608 invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} 609 if v.ResourceArn == nil { 610 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 611 } 612 if invalidParams.Len() > 0 { 613 return invalidParams 614 } else { 615 return nil 616 } 617} 618 619func validateOpRestoreServerInput(v *RestoreServerInput) error { 620 if v == nil { 621 return nil 622 } 623 invalidParams := smithy.InvalidParamsError{Context: "RestoreServerInput"} 624 if v.BackupId == nil { 625 invalidParams.Add(smithy.NewErrParamRequired("BackupId")) 626 } 627 if v.ServerName == nil { 628 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 629 } 630 if invalidParams.Len() > 0 { 631 return invalidParams 632 } else { 633 return nil 634 } 635} 636 637func validateOpStartMaintenanceInput(v *StartMaintenanceInput) error { 638 if v == nil { 639 return nil 640 } 641 invalidParams := smithy.InvalidParamsError{Context: "StartMaintenanceInput"} 642 if v.ServerName == nil { 643 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 644 } 645 if invalidParams.Len() > 0 { 646 return invalidParams 647 } else { 648 return nil 649 } 650} 651 652func validateOpTagResourceInput(v *TagResourceInput) error { 653 if v == nil { 654 return nil 655 } 656 invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} 657 if v.ResourceArn == nil { 658 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 659 } 660 if v.Tags == nil { 661 invalidParams.Add(smithy.NewErrParamRequired("Tags")) 662 } else if v.Tags != nil { 663 if err := validateTagList(v.Tags); err != nil { 664 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 665 } 666 } 667 if invalidParams.Len() > 0 { 668 return invalidParams 669 } else { 670 return nil 671 } 672} 673 674func validateOpUntagResourceInput(v *UntagResourceInput) error { 675 if v == nil { 676 return nil 677 } 678 invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} 679 if v.ResourceArn == nil { 680 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 681 } 682 if v.TagKeys == nil { 683 invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) 684 } 685 if invalidParams.Len() > 0 { 686 return invalidParams 687 } else { 688 return nil 689 } 690} 691 692func validateOpUpdateServerEngineAttributesInput(v *UpdateServerEngineAttributesInput) error { 693 if v == nil { 694 return nil 695 } 696 invalidParams := smithy.InvalidParamsError{Context: "UpdateServerEngineAttributesInput"} 697 if v.ServerName == nil { 698 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 699 } 700 if v.AttributeName == nil { 701 invalidParams.Add(smithy.NewErrParamRequired("AttributeName")) 702 } 703 if invalidParams.Len() > 0 { 704 return invalidParams 705 } else { 706 return nil 707 } 708} 709 710func validateOpUpdateServerInput(v *UpdateServerInput) error { 711 if v == nil { 712 return nil 713 } 714 invalidParams := smithy.InvalidParamsError{Context: "UpdateServerInput"} 715 if v.ServerName == nil { 716 invalidParams.Add(smithy.NewErrParamRequired("ServerName")) 717 } 718 if invalidParams.Len() > 0 { 719 return invalidParams 720 } else { 721 return nil 722 } 723} 724