1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package transfer 4 5import ( 6 "context" 7 "fmt" 8 "github.com/aws/aws-sdk-go-v2/service/transfer/types" 9 smithy "github.com/aws/smithy-go" 10 "github.com/aws/smithy-go/middleware" 11) 12 13type validateOpCreateServer struct { 14} 15 16func (*validateOpCreateServer) ID() string { 17 return "OperationInputValidation" 18} 19 20func (m *validateOpCreateServer) 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.(*CreateServerInput) 24 if !ok { 25 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 26 } 27 if err := validateOpCreateServerInput(input); err != nil { 28 return out, metadata, err 29 } 30 return next.HandleInitialize(ctx, in) 31} 32 33type validateOpCreateUser struct { 34} 35 36func (*validateOpCreateUser) ID() string { 37 return "OperationInputValidation" 38} 39 40func (m *validateOpCreateUser) 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.(*CreateUserInput) 44 if !ok { 45 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 46 } 47 if err := validateOpCreateUserInput(input); err != nil { 48 return out, metadata, err 49 } 50 return next.HandleInitialize(ctx, in) 51} 52 53type validateOpDeleteServer struct { 54} 55 56func (*validateOpDeleteServer) ID() string { 57 return "OperationInputValidation" 58} 59 60func (m *validateOpDeleteServer) 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.(*DeleteServerInput) 64 if !ok { 65 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 66 } 67 if err := validateOpDeleteServerInput(input); err != nil { 68 return out, metadata, err 69 } 70 return next.HandleInitialize(ctx, in) 71} 72 73type validateOpDeleteSshPublicKey struct { 74} 75 76func (*validateOpDeleteSshPublicKey) ID() string { 77 return "OperationInputValidation" 78} 79 80func (m *validateOpDeleteSshPublicKey) 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.(*DeleteSshPublicKeyInput) 84 if !ok { 85 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 86 } 87 if err := validateOpDeleteSshPublicKeyInput(input); err != nil { 88 return out, metadata, err 89 } 90 return next.HandleInitialize(ctx, in) 91} 92 93type validateOpDeleteUser struct { 94} 95 96func (*validateOpDeleteUser) ID() string { 97 return "OperationInputValidation" 98} 99 100func (m *validateOpDeleteUser) 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.(*DeleteUserInput) 104 if !ok { 105 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 106 } 107 if err := validateOpDeleteUserInput(input); err != nil { 108 return out, metadata, err 109 } 110 return next.HandleInitialize(ctx, in) 111} 112 113type validateOpDescribeSecurityPolicy struct { 114} 115 116func (*validateOpDescribeSecurityPolicy) ID() string { 117 return "OperationInputValidation" 118} 119 120func (m *validateOpDescribeSecurityPolicy) 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.(*DescribeSecurityPolicyInput) 124 if !ok { 125 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 126 } 127 if err := validateOpDescribeSecurityPolicyInput(input); err != nil { 128 return out, metadata, err 129 } 130 return next.HandleInitialize(ctx, in) 131} 132 133type validateOpDescribeServer struct { 134} 135 136func (*validateOpDescribeServer) ID() string { 137 return "OperationInputValidation" 138} 139 140func (m *validateOpDescribeServer) 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.(*DescribeServerInput) 144 if !ok { 145 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 146 } 147 if err := validateOpDescribeServerInput(input); err != nil { 148 return out, metadata, err 149 } 150 return next.HandleInitialize(ctx, in) 151} 152 153type validateOpDescribeUser struct { 154} 155 156func (*validateOpDescribeUser) ID() string { 157 return "OperationInputValidation" 158} 159 160func (m *validateOpDescribeUser) 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.(*DescribeUserInput) 164 if !ok { 165 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 166 } 167 if err := validateOpDescribeUserInput(input); err != nil { 168 return out, metadata, err 169 } 170 return next.HandleInitialize(ctx, in) 171} 172 173type validateOpImportSshPublicKey struct { 174} 175 176func (*validateOpImportSshPublicKey) ID() string { 177 return "OperationInputValidation" 178} 179 180func (m *validateOpImportSshPublicKey) 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.(*ImportSshPublicKeyInput) 184 if !ok { 185 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 186 } 187 if err := validateOpImportSshPublicKeyInput(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 validateOpListUsers struct { 214} 215 216func (*validateOpListUsers) ID() string { 217 return "OperationInputValidation" 218} 219 220func (m *validateOpListUsers) 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.(*ListUsersInput) 224 if !ok { 225 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 226 } 227 if err := validateOpListUsersInput(input); err != nil { 228 return out, metadata, err 229 } 230 return next.HandleInitialize(ctx, in) 231} 232 233type validateOpStartServer struct { 234} 235 236func (*validateOpStartServer) ID() string { 237 return "OperationInputValidation" 238} 239 240func (m *validateOpStartServer) 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.(*StartServerInput) 244 if !ok { 245 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 246 } 247 if err := validateOpStartServerInput(input); err != nil { 248 return out, metadata, err 249 } 250 return next.HandleInitialize(ctx, in) 251} 252 253type validateOpStopServer struct { 254} 255 256func (*validateOpStopServer) ID() string { 257 return "OperationInputValidation" 258} 259 260func (m *validateOpStopServer) 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.(*StopServerInput) 264 if !ok { 265 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 266 } 267 if err := validateOpStopServerInput(input); err != nil { 268 return out, metadata, err 269 } 270 return next.HandleInitialize(ctx, in) 271} 272 273type validateOpTagResource struct { 274} 275 276func (*validateOpTagResource) ID() string { 277 return "OperationInputValidation" 278} 279 280func (m *validateOpTagResource) 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.(*TagResourceInput) 284 if !ok { 285 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 286 } 287 if err := validateOpTagResourceInput(input); err != nil { 288 return out, metadata, err 289 } 290 return next.HandleInitialize(ctx, in) 291} 292 293type validateOpTestIdentityProvider struct { 294} 295 296func (*validateOpTestIdentityProvider) ID() string { 297 return "OperationInputValidation" 298} 299 300func (m *validateOpTestIdentityProvider) 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.(*TestIdentityProviderInput) 304 if !ok { 305 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 306 } 307 if err := validateOpTestIdentityProviderInput(input); err != nil { 308 return out, metadata, err 309 } 310 return next.HandleInitialize(ctx, in) 311} 312 313type validateOpUntagResource struct { 314} 315 316func (*validateOpUntagResource) ID() string { 317 return "OperationInputValidation" 318} 319 320func (m *validateOpUntagResource) 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.(*UntagResourceInput) 324 if !ok { 325 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 326 } 327 if err := validateOpUntagResourceInput(input); err != nil { 328 return out, metadata, err 329 } 330 return next.HandleInitialize(ctx, in) 331} 332 333type validateOpUpdateServer struct { 334} 335 336func (*validateOpUpdateServer) ID() string { 337 return "OperationInputValidation" 338} 339 340func (m *validateOpUpdateServer) 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.(*UpdateServerInput) 344 if !ok { 345 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 346 } 347 if err := validateOpUpdateServerInput(input); err != nil { 348 return out, metadata, err 349 } 350 return next.HandleInitialize(ctx, in) 351} 352 353type validateOpUpdateUser struct { 354} 355 356func (*validateOpUpdateUser) ID() string { 357 return "OperationInputValidation" 358} 359 360func (m *validateOpUpdateUser) 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.(*UpdateUserInput) 364 if !ok { 365 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 366 } 367 if err := validateOpUpdateUserInput(input); err != nil { 368 return out, metadata, err 369 } 370 return next.HandleInitialize(ctx, in) 371} 372 373func addOpCreateServerValidationMiddleware(stack *middleware.Stack) error { 374 return stack.Initialize.Add(&validateOpCreateServer{}, middleware.After) 375} 376 377func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { 378 return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) 379} 380 381func addOpDeleteServerValidationMiddleware(stack *middleware.Stack) error { 382 return stack.Initialize.Add(&validateOpDeleteServer{}, middleware.After) 383} 384 385func addOpDeleteSshPublicKeyValidationMiddleware(stack *middleware.Stack) error { 386 return stack.Initialize.Add(&validateOpDeleteSshPublicKey{}, middleware.After) 387} 388 389func addOpDeleteUserValidationMiddleware(stack *middleware.Stack) error { 390 return stack.Initialize.Add(&validateOpDeleteUser{}, middleware.After) 391} 392 393func addOpDescribeSecurityPolicyValidationMiddleware(stack *middleware.Stack) error { 394 return stack.Initialize.Add(&validateOpDescribeSecurityPolicy{}, middleware.After) 395} 396 397func addOpDescribeServerValidationMiddleware(stack *middleware.Stack) error { 398 return stack.Initialize.Add(&validateOpDescribeServer{}, middleware.After) 399} 400 401func addOpDescribeUserValidationMiddleware(stack *middleware.Stack) error { 402 return stack.Initialize.Add(&validateOpDescribeUser{}, middleware.After) 403} 404 405func addOpImportSshPublicKeyValidationMiddleware(stack *middleware.Stack) error { 406 return stack.Initialize.Add(&validateOpImportSshPublicKey{}, middleware.After) 407} 408 409func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { 410 return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) 411} 412 413func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { 414 return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) 415} 416 417func addOpStartServerValidationMiddleware(stack *middleware.Stack) error { 418 return stack.Initialize.Add(&validateOpStartServer{}, middleware.After) 419} 420 421func addOpStopServerValidationMiddleware(stack *middleware.Stack) error { 422 return stack.Initialize.Add(&validateOpStopServer{}, middleware.After) 423} 424 425func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { 426 return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) 427} 428 429func addOpTestIdentityProviderValidationMiddleware(stack *middleware.Stack) error { 430 return stack.Initialize.Add(&validateOpTestIdentityProvider{}, middleware.After) 431} 432 433func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { 434 return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) 435} 436 437func addOpUpdateServerValidationMiddleware(stack *middleware.Stack) error { 438 return stack.Initialize.Add(&validateOpUpdateServer{}, middleware.After) 439} 440 441func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { 442 return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) 443} 444 445func validateHomeDirectoryMapEntry(v *types.HomeDirectoryMapEntry) error { 446 if v == nil { 447 return nil 448 } 449 invalidParams := smithy.InvalidParamsError{Context: "HomeDirectoryMapEntry"} 450 if v.Entry == nil { 451 invalidParams.Add(smithy.NewErrParamRequired("Entry")) 452 } 453 if v.Target == nil { 454 invalidParams.Add(smithy.NewErrParamRequired("Target")) 455 } 456 if invalidParams.Len() > 0 { 457 return invalidParams 458 } else { 459 return nil 460 } 461} 462 463func validateHomeDirectoryMappings(v []types.HomeDirectoryMapEntry) error { 464 if v == nil { 465 return nil 466 } 467 invalidParams := smithy.InvalidParamsError{Context: "HomeDirectoryMappings"} 468 for i := range v { 469 if err := validateHomeDirectoryMapEntry(&v[i]); err != nil { 470 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 471 } 472 } 473 if invalidParams.Len() > 0 { 474 return invalidParams 475 } else { 476 return nil 477 } 478} 479 480func validatePosixProfile(v *types.PosixProfile) error { 481 if v == nil { 482 return nil 483 } 484 invalidParams := smithy.InvalidParamsError{Context: "PosixProfile"} 485 if v.Uid == nil { 486 invalidParams.Add(smithy.NewErrParamRequired("Uid")) 487 } 488 if v.Gid == nil { 489 invalidParams.Add(smithy.NewErrParamRequired("Gid")) 490 } 491 if invalidParams.Len() > 0 { 492 return invalidParams 493 } else { 494 return nil 495 } 496} 497 498func validateTag(v *types.Tag) error { 499 if v == nil { 500 return nil 501 } 502 invalidParams := smithy.InvalidParamsError{Context: "Tag"} 503 if v.Key == nil { 504 invalidParams.Add(smithy.NewErrParamRequired("Key")) 505 } 506 if v.Value == nil { 507 invalidParams.Add(smithy.NewErrParamRequired("Value")) 508 } 509 if invalidParams.Len() > 0 { 510 return invalidParams 511 } else { 512 return nil 513 } 514} 515 516func validateTags(v []types.Tag) error { 517 if v == nil { 518 return nil 519 } 520 invalidParams := smithy.InvalidParamsError{Context: "Tags"} 521 for i := range v { 522 if err := validateTag(&v[i]); err != nil { 523 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 524 } 525 } 526 if invalidParams.Len() > 0 { 527 return invalidParams 528 } else { 529 return nil 530 } 531} 532 533func validateOpCreateServerInput(v *CreateServerInput) error { 534 if v == nil { 535 return nil 536 } 537 invalidParams := smithy.InvalidParamsError{Context: "CreateServerInput"} 538 if v.Tags != nil { 539 if err := validateTags(v.Tags); err != nil { 540 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 541 } 542 } 543 if invalidParams.Len() > 0 { 544 return invalidParams 545 } else { 546 return nil 547 } 548} 549 550func validateOpCreateUserInput(v *CreateUserInput) error { 551 if v == nil { 552 return nil 553 } 554 invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} 555 if v.HomeDirectoryMappings != nil { 556 if err := validateHomeDirectoryMappings(v.HomeDirectoryMappings); err != nil { 557 invalidParams.AddNested("HomeDirectoryMappings", err.(smithy.InvalidParamsError)) 558 } 559 } 560 if v.PosixProfile != nil { 561 if err := validatePosixProfile(v.PosixProfile); err != nil { 562 invalidParams.AddNested("PosixProfile", err.(smithy.InvalidParamsError)) 563 } 564 } 565 if v.Role == nil { 566 invalidParams.Add(smithy.NewErrParamRequired("Role")) 567 } 568 if v.ServerId == nil { 569 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 570 } 571 if v.Tags != nil { 572 if err := validateTags(v.Tags); err != nil { 573 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 574 } 575 } 576 if v.UserName == nil { 577 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 578 } 579 if invalidParams.Len() > 0 { 580 return invalidParams 581 } else { 582 return nil 583 } 584} 585 586func validateOpDeleteServerInput(v *DeleteServerInput) error { 587 if v == nil { 588 return nil 589 } 590 invalidParams := smithy.InvalidParamsError{Context: "DeleteServerInput"} 591 if v.ServerId == nil { 592 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 593 } 594 if invalidParams.Len() > 0 { 595 return invalidParams 596 } else { 597 return nil 598 } 599} 600 601func validateOpDeleteSshPublicKeyInput(v *DeleteSshPublicKeyInput) error { 602 if v == nil { 603 return nil 604 } 605 invalidParams := smithy.InvalidParamsError{Context: "DeleteSshPublicKeyInput"} 606 if v.ServerId == nil { 607 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 608 } 609 if v.SshPublicKeyId == nil { 610 invalidParams.Add(smithy.NewErrParamRequired("SshPublicKeyId")) 611 } 612 if v.UserName == nil { 613 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 614 } 615 if invalidParams.Len() > 0 { 616 return invalidParams 617 } else { 618 return nil 619 } 620} 621 622func validateOpDeleteUserInput(v *DeleteUserInput) error { 623 if v == nil { 624 return nil 625 } 626 invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} 627 if v.ServerId == nil { 628 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 629 } 630 if v.UserName == nil { 631 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 632 } 633 if invalidParams.Len() > 0 { 634 return invalidParams 635 } else { 636 return nil 637 } 638} 639 640func validateOpDescribeSecurityPolicyInput(v *DescribeSecurityPolicyInput) error { 641 if v == nil { 642 return nil 643 } 644 invalidParams := smithy.InvalidParamsError{Context: "DescribeSecurityPolicyInput"} 645 if v.SecurityPolicyName == nil { 646 invalidParams.Add(smithy.NewErrParamRequired("SecurityPolicyName")) 647 } 648 if invalidParams.Len() > 0 { 649 return invalidParams 650 } else { 651 return nil 652 } 653} 654 655func validateOpDescribeServerInput(v *DescribeServerInput) error { 656 if v == nil { 657 return nil 658 } 659 invalidParams := smithy.InvalidParamsError{Context: "DescribeServerInput"} 660 if v.ServerId == nil { 661 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 662 } 663 if invalidParams.Len() > 0 { 664 return invalidParams 665 } else { 666 return nil 667 } 668} 669 670func validateOpDescribeUserInput(v *DescribeUserInput) error { 671 if v == nil { 672 return nil 673 } 674 invalidParams := smithy.InvalidParamsError{Context: "DescribeUserInput"} 675 if v.ServerId == nil { 676 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 677 } 678 if v.UserName == nil { 679 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 680 } 681 if invalidParams.Len() > 0 { 682 return invalidParams 683 } else { 684 return nil 685 } 686} 687 688func validateOpImportSshPublicKeyInput(v *ImportSshPublicKeyInput) error { 689 if v == nil { 690 return nil 691 } 692 invalidParams := smithy.InvalidParamsError{Context: "ImportSshPublicKeyInput"} 693 if v.ServerId == nil { 694 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 695 } 696 if v.SshPublicKeyBody == nil { 697 invalidParams.Add(smithy.NewErrParamRequired("SshPublicKeyBody")) 698 } 699 if v.UserName == nil { 700 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 701 } 702 if invalidParams.Len() > 0 { 703 return invalidParams 704 } else { 705 return nil 706 } 707} 708 709func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { 710 if v == nil { 711 return nil 712 } 713 invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} 714 if v.Arn == nil { 715 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 716 } 717 if invalidParams.Len() > 0 { 718 return invalidParams 719 } else { 720 return nil 721 } 722} 723 724func validateOpListUsersInput(v *ListUsersInput) error { 725 if v == nil { 726 return nil 727 } 728 invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} 729 if v.ServerId == nil { 730 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 731 } 732 if invalidParams.Len() > 0 { 733 return invalidParams 734 } else { 735 return nil 736 } 737} 738 739func validateOpStartServerInput(v *StartServerInput) error { 740 if v == nil { 741 return nil 742 } 743 invalidParams := smithy.InvalidParamsError{Context: "StartServerInput"} 744 if v.ServerId == nil { 745 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 746 } 747 if invalidParams.Len() > 0 { 748 return invalidParams 749 } else { 750 return nil 751 } 752} 753 754func validateOpStopServerInput(v *StopServerInput) error { 755 if v == nil { 756 return nil 757 } 758 invalidParams := smithy.InvalidParamsError{Context: "StopServerInput"} 759 if v.ServerId == nil { 760 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 761 } 762 if invalidParams.Len() > 0 { 763 return invalidParams 764 } else { 765 return nil 766 } 767} 768 769func validateOpTagResourceInput(v *TagResourceInput) error { 770 if v == nil { 771 return nil 772 } 773 invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} 774 if v.Arn == nil { 775 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 776 } 777 if v.Tags == nil { 778 invalidParams.Add(smithy.NewErrParamRequired("Tags")) 779 } else if v.Tags != nil { 780 if err := validateTags(v.Tags); err != nil { 781 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 782 } 783 } 784 if invalidParams.Len() > 0 { 785 return invalidParams 786 } else { 787 return nil 788 } 789} 790 791func validateOpTestIdentityProviderInput(v *TestIdentityProviderInput) error { 792 if v == nil { 793 return nil 794 } 795 invalidParams := smithy.InvalidParamsError{Context: "TestIdentityProviderInput"} 796 if v.ServerId == nil { 797 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 798 } 799 if v.UserName == nil { 800 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 801 } 802 if invalidParams.Len() > 0 { 803 return invalidParams 804 } else { 805 return nil 806 } 807} 808 809func validateOpUntagResourceInput(v *UntagResourceInput) error { 810 if v == nil { 811 return nil 812 } 813 invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} 814 if v.Arn == nil { 815 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 816 } 817 if v.TagKeys == nil { 818 invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) 819 } 820 if invalidParams.Len() > 0 { 821 return invalidParams 822 } else { 823 return nil 824 } 825} 826 827func validateOpUpdateServerInput(v *UpdateServerInput) error { 828 if v == nil { 829 return nil 830 } 831 invalidParams := smithy.InvalidParamsError{Context: "UpdateServerInput"} 832 if v.ServerId == nil { 833 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 834 } 835 if invalidParams.Len() > 0 { 836 return invalidParams 837 } else { 838 return nil 839 } 840} 841 842func validateOpUpdateUserInput(v *UpdateUserInput) error { 843 if v == nil { 844 return nil 845 } 846 invalidParams := smithy.InvalidParamsError{Context: "UpdateUserInput"} 847 if v.HomeDirectoryMappings != nil { 848 if err := validateHomeDirectoryMappings(v.HomeDirectoryMappings); err != nil { 849 invalidParams.AddNested("HomeDirectoryMappings", err.(smithy.InvalidParamsError)) 850 } 851 } 852 if v.PosixProfile != nil { 853 if err := validatePosixProfile(v.PosixProfile); err != nil { 854 invalidParams.AddNested("PosixProfile", err.(smithy.InvalidParamsError)) 855 } 856 } 857 if v.ServerId == nil { 858 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 859 } 860 if v.UserName == nil { 861 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 862 } 863 if invalidParams.Len() > 0 { 864 return invalidParams 865 } else { 866 return nil 867 } 868} 869