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 validateTag(v *types.Tag) error { 481 if v == nil { 482 return nil 483 } 484 invalidParams := smithy.InvalidParamsError{Context: "Tag"} 485 if v.Key == nil { 486 invalidParams.Add(smithy.NewErrParamRequired("Key")) 487 } 488 if v.Value == nil { 489 invalidParams.Add(smithy.NewErrParamRequired("Value")) 490 } 491 if invalidParams.Len() > 0 { 492 return invalidParams 493 } else { 494 return nil 495 } 496} 497 498func validateTags(v []types.Tag) error { 499 if v == nil { 500 return nil 501 } 502 invalidParams := smithy.InvalidParamsError{Context: "Tags"} 503 for i := range v { 504 if err := validateTag(&v[i]); err != nil { 505 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 506 } 507 } 508 if invalidParams.Len() > 0 { 509 return invalidParams 510 } else { 511 return nil 512 } 513} 514 515func validateOpCreateServerInput(v *CreateServerInput) error { 516 if v == nil { 517 return nil 518 } 519 invalidParams := smithy.InvalidParamsError{Context: "CreateServerInput"} 520 if v.Tags != nil { 521 if err := validateTags(v.Tags); err != nil { 522 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 523 } 524 } 525 if invalidParams.Len() > 0 { 526 return invalidParams 527 } else { 528 return nil 529 } 530} 531 532func validateOpCreateUserInput(v *CreateUserInput) error { 533 if v == nil { 534 return nil 535 } 536 invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} 537 if v.HomeDirectoryMappings != nil { 538 if err := validateHomeDirectoryMappings(v.HomeDirectoryMappings); err != nil { 539 invalidParams.AddNested("HomeDirectoryMappings", err.(smithy.InvalidParamsError)) 540 } 541 } 542 if v.Role == nil { 543 invalidParams.Add(smithy.NewErrParamRequired("Role")) 544 } 545 if v.ServerId == nil { 546 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 547 } 548 if v.Tags != nil { 549 if err := validateTags(v.Tags); err != nil { 550 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 551 } 552 } 553 if v.UserName == nil { 554 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 555 } 556 if invalidParams.Len() > 0 { 557 return invalidParams 558 } else { 559 return nil 560 } 561} 562 563func validateOpDeleteServerInput(v *DeleteServerInput) error { 564 if v == nil { 565 return nil 566 } 567 invalidParams := smithy.InvalidParamsError{Context: "DeleteServerInput"} 568 if v.ServerId == nil { 569 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 570 } 571 if invalidParams.Len() > 0 { 572 return invalidParams 573 } else { 574 return nil 575 } 576} 577 578func validateOpDeleteSshPublicKeyInput(v *DeleteSshPublicKeyInput) error { 579 if v == nil { 580 return nil 581 } 582 invalidParams := smithy.InvalidParamsError{Context: "DeleteSshPublicKeyInput"} 583 if v.ServerId == nil { 584 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 585 } 586 if v.SshPublicKeyId == nil { 587 invalidParams.Add(smithy.NewErrParamRequired("SshPublicKeyId")) 588 } 589 if v.UserName == nil { 590 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 591 } 592 if invalidParams.Len() > 0 { 593 return invalidParams 594 } else { 595 return nil 596 } 597} 598 599func validateOpDeleteUserInput(v *DeleteUserInput) error { 600 if v == nil { 601 return nil 602 } 603 invalidParams := smithy.InvalidParamsError{Context: "DeleteUserInput"} 604 if v.ServerId == nil { 605 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 606 } 607 if v.UserName == nil { 608 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 609 } 610 if invalidParams.Len() > 0 { 611 return invalidParams 612 } else { 613 return nil 614 } 615} 616 617func validateOpDescribeSecurityPolicyInput(v *DescribeSecurityPolicyInput) error { 618 if v == nil { 619 return nil 620 } 621 invalidParams := smithy.InvalidParamsError{Context: "DescribeSecurityPolicyInput"} 622 if v.SecurityPolicyName == nil { 623 invalidParams.Add(smithy.NewErrParamRequired("SecurityPolicyName")) 624 } 625 if invalidParams.Len() > 0 { 626 return invalidParams 627 } else { 628 return nil 629 } 630} 631 632func validateOpDescribeServerInput(v *DescribeServerInput) error { 633 if v == nil { 634 return nil 635 } 636 invalidParams := smithy.InvalidParamsError{Context: "DescribeServerInput"} 637 if v.ServerId == nil { 638 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 639 } 640 if invalidParams.Len() > 0 { 641 return invalidParams 642 } else { 643 return nil 644 } 645} 646 647func validateOpDescribeUserInput(v *DescribeUserInput) error { 648 if v == nil { 649 return nil 650 } 651 invalidParams := smithy.InvalidParamsError{Context: "DescribeUserInput"} 652 if v.ServerId == nil { 653 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 654 } 655 if v.UserName == nil { 656 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 657 } 658 if invalidParams.Len() > 0 { 659 return invalidParams 660 } else { 661 return nil 662 } 663} 664 665func validateOpImportSshPublicKeyInput(v *ImportSshPublicKeyInput) error { 666 if v == nil { 667 return nil 668 } 669 invalidParams := smithy.InvalidParamsError{Context: "ImportSshPublicKeyInput"} 670 if v.ServerId == nil { 671 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 672 } 673 if v.SshPublicKeyBody == nil { 674 invalidParams.Add(smithy.NewErrParamRequired("SshPublicKeyBody")) 675 } 676 if v.UserName == nil { 677 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 678 } 679 if invalidParams.Len() > 0 { 680 return invalidParams 681 } else { 682 return nil 683 } 684} 685 686func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { 687 if v == nil { 688 return nil 689 } 690 invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} 691 if v.Arn == nil { 692 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 693 } 694 if invalidParams.Len() > 0 { 695 return invalidParams 696 } else { 697 return nil 698 } 699} 700 701func validateOpListUsersInput(v *ListUsersInput) error { 702 if v == nil { 703 return nil 704 } 705 invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} 706 if v.ServerId == nil { 707 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 708 } 709 if invalidParams.Len() > 0 { 710 return invalidParams 711 } else { 712 return nil 713 } 714} 715 716func validateOpStartServerInput(v *StartServerInput) error { 717 if v == nil { 718 return nil 719 } 720 invalidParams := smithy.InvalidParamsError{Context: "StartServerInput"} 721 if v.ServerId == nil { 722 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 723 } 724 if invalidParams.Len() > 0 { 725 return invalidParams 726 } else { 727 return nil 728 } 729} 730 731func validateOpStopServerInput(v *StopServerInput) error { 732 if v == nil { 733 return nil 734 } 735 invalidParams := smithy.InvalidParamsError{Context: "StopServerInput"} 736 if v.ServerId == nil { 737 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 738 } 739 if invalidParams.Len() > 0 { 740 return invalidParams 741 } else { 742 return nil 743 } 744} 745 746func validateOpTagResourceInput(v *TagResourceInput) error { 747 if v == nil { 748 return nil 749 } 750 invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} 751 if v.Arn == nil { 752 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 753 } 754 if v.Tags == nil { 755 invalidParams.Add(smithy.NewErrParamRequired("Tags")) 756 } else if v.Tags != nil { 757 if err := validateTags(v.Tags); err != nil { 758 invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) 759 } 760 } 761 if invalidParams.Len() > 0 { 762 return invalidParams 763 } else { 764 return nil 765 } 766} 767 768func validateOpTestIdentityProviderInput(v *TestIdentityProviderInput) error { 769 if v == nil { 770 return nil 771 } 772 invalidParams := smithy.InvalidParamsError{Context: "TestIdentityProviderInput"} 773 if v.ServerId == nil { 774 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 775 } 776 if v.UserName == nil { 777 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 778 } 779 if invalidParams.Len() > 0 { 780 return invalidParams 781 } else { 782 return nil 783 } 784} 785 786func validateOpUntagResourceInput(v *UntagResourceInput) error { 787 if v == nil { 788 return nil 789 } 790 invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} 791 if v.Arn == nil { 792 invalidParams.Add(smithy.NewErrParamRequired("Arn")) 793 } 794 if v.TagKeys == nil { 795 invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) 796 } 797 if invalidParams.Len() > 0 { 798 return invalidParams 799 } else { 800 return nil 801 } 802} 803 804func validateOpUpdateServerInput(v *UpdateServerInput) error { 805 if v == nil { 806 return nil 807 } 808 invalidParams := smithy.InvalidParamsError{Context: "UpdateServerInput"} 809 if v.ServerId == nil { 810 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 811 } 812 if invalidParams.Len() > 0 { 813 return invalidParams 814 } else { 815 return nil 816 } 817} 818 819func validateOpUpdateUserInput(v *UpdateUserInput) error { 820 if v == nil { 821 return nil 822 } 823 invalidParams := smithy.InvalidParamsError{Context: "UpdateUserInput"} 824 if v.HomeDirectoryMappings != nil { 825 if err := validateHomeDirectoryMappings(v.HomeDirectoryMappings); err != nil { 826 invalidParams.AddNested("HomeDirectoryMappings", err.(smithy.InvalidParamsError)) 827 } 828 } 829 if v.ServerId == nil { 830 invalidParams.Add(smithy.NewErrParamRequired("ServerId")) 831 } 832 if v.UserName == nil { 833 invalidParams.Add(smithy.NewErrParamRequired("UserName")) 834 } 835 if invalidParams.Len() > 0 { 836 return invalidParams 837 } else { 838 return nil 839 } 840} 841