1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package cloudtrail 4 5import ( 6 "context" 7 "fmt" 8 "github.com/aws/aws-sdk-go-v2/service/cloudtrail/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 validateOpCreateTrail struct { 34} 35 36func (*validateOpCreateTrail) ID() string { 37 return "OperationInputValidation" 38} 39 40func (m *validateOpCreateTrail) 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.(*CreateTrailInput) 44 if !ok { 45 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 46 } 47 if err := validateOpCreateTrailInput(input); err != nil { 48 return out, metadata, err 49 } 50 return next.HandleInitialize(ctx, in) 51} 52 53type validateOpDeleteTrail struct { 54} 55 56func (*validateOpDeleteTrail) ID() string { 57 return "OperationInputValidation" 58} 59 60func (m *validateOpDeleteTrail) 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.(*DeleteTrailInput) 64 if !ok { 65 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 66 } 67 if err := validateOpDeleteTrailInput(input); err != nil { 68 return out, metadata, err 69 } 70 return next.HandleInitialize(ctx, in) 71} 72 73type validateOpGetEventSelectors struct { 74} 75 76func (*validateOpGetEventSelectors) ID() string { 77 return "OperationInputValidation" 78} 79 80func (m *validateOpGetEventSelectors) 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.(*GetEventSelectorsInput) 84 if !ok { 85 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 86 } 87 if err := validateOpGetEventSelectorsInput(input); err != nil { 88 return out, metadata, err 89 } 90 return next.HandleInitialize(ctx, in) 91} 92 93type validateOpGetInsightSelectors struct { 94} 95 96func (*validateOpGetInsightSelectors) ID() string { 97 return "OperationInputValidation" 98} 99 100func (m *validateOpGetInsightSelectors) 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.(*GetInsightSelectorsInput) 104 if !ok { 105 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 106 } 107 if err := validateOpGetInsightSelectorsInput(input); err != nil { 108 return out, metadata, err 109 } 110 return next.HandleInitialize(ctx, in) 111} 112 113type validateOpGetTrail struct { 114} 115 116func (*validateOpGetTrail) ID() string { 117 return "OperationInputValidation" 118} 119 120func (m *validateOpGetTrail) 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.(*GetTrailInput) 124 if !ok { 125 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 126 } 127 if err := validateOpGetTrailInput(input); err != nil { 128 return out, metadata, err 129 } 130 return next.HandleInitialize(ctx, in) 131} 132 133type validateOpGetTrailStatus struct { 134} 135 136func (*validateOpGetTrailStatus) ID() string { 137 return "OperationInputValidation" 138} 139 140func (m *validateOpGetTrailStatus) 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.(*GetTrailStatusInput) 144 if !ok { 145 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 146 } 147 if err := validateOpGetTrailStatusInput(input); err != nil { 148 return out, metadata, err 149 } 150 return next.HandleInitialize(ctx, in) 151} 152 153type validateOpListTags struct { 154} 155 156func (*validateOpListTags) ID() string { 157 return "OperationInputValidation" 158} 159 160func (m *validateOpListTags) 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.(*ListTagsInput) 164 if !ok { 165 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 166 } 167 if err := validateOpListTagsInput(input); err != nil { 168 return out, metadata, err 169 } 170 return next.HandleInitialize(ctx, in) 171} 172 173type validateOpLookupEvents struct { 174} 175 176func (*validateOpLookupEvents) ID() string { 177 return "OperationInputValidation" 178} 179 180func (m *validateOpLookupEvents) 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.(*LookupEventsInput) 184 if !ok { 185 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 186 } 187 if err := validateOpLookupEventsInput(input); err != nil { 188 return out, metadata, err 189 } 190 return next.HandleInitialize(ctx, in) 191} 192 193type validateOpPutEventSelectors struct { 194} 195 196func (*validateOpPutEventSelectors) ID() string { 197 return "OperationInputValidation" 198} 199 200func (m *validateOpPutEventSelectors) 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.(*PutEventSelectorsInput) 204 if !ok { 205 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 206 } 207 if err := validateOpPutEventSelectorsInput(input); err != nil { 208 return out, metadata, err 209 } 210 return next.HandleInitialize(ctx, in) 211} 212 213type validateOpPutInsightSelectors struct { 214} 215 216func (*validateOpPutInsightSelectors) ID() string { 217 return "OperationInputValidation" 218} 219 220func (m *validateOpPutInsightSelectors) 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.(*PutInsightSelectorsInput) 224 if !ok { 225 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 226 } 227 if err := validateOpPutInsightSelectorsInput(input); err != nil { 228 return out, metadata, err 229 } 230 return next.HandleInitialize(ctx, in) 231} 232 233type validateOpRemoveTags struct { 234} 235 236func (*validateOpRemoveTags) ID() string { 237 return "OperationInputValidation" 238} 239 240func (m *validateOpRemoveTags) 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.(*RemoveTagsInput) 244 if !ok { 245 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 246 } 247 if err := validateOpRemoveTagsInput(input); err != nil { 248 return out, metadata, err 249 } 250 return next.HandleInitialize(ctx, in) 251} 252 253type validateOpStartLogging struct { 254} 255 256func (*validateOpStartLogging) ID() string { 257 return "OperationInputValidation" 258} 259 260func (m *validateOpStartLogging) 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.(*StartLoggingInput) 264 if !ok { 265 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 266 } 267 if err := validateOpStartLoggingInput(input); err != nil { 268 return out, metadata, err 269 } 270 return next.HandleInitialize(ctx, in) 271} 272 273type validateOpStopLogging struct { 274} 275 276func (*validateOpStopLogging) ID() string { 277 return "OperationInputValidation" 278} 279 280func (m *validateOpStopLogging) 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.(*StopLoggingInput) 284 if !ok { 285 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 286 } 287 if err := validateOpStopLoggingInput(input); err != nil { 288 return out, metadata, err 289 } 290 return next.HandleInitialize(ctx, in) 291} 292 293type validateOpUpdateTrail struct { 294} 295 296func (*validateOpUpdateTrail) ID() string { 297 return "OperationInputValidation" 298} 299 300func (m *validateOpUpdateTrail) 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.(*UpdateTrailInput) 304 if !ok { 305 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 306 } 307 if err := validateOpUpdateTrailInput(input); err != nil { 308 return out, metadata, err 309 } 310 return next.HandleInitialize(ctx, in) 311} 312 313func addOpAddTagsValidationMiddleware(stack *middleware.Stack) error { 314 return stack.Initialize.Add(&validateOpAddTags{}, middleware.After) 315} 316 317func addOpCreateTrailValidationMiddleware(stack *middleware.Stack) error { 318 return stack.Initialize.Add(&validateOpCreateTrail{}, middleware.After) 319} 320 321func addOpDeleteTrailValidationMiddleware(stack *middleware.Stack) error { 322 return stack.Initialize.Add(&validateOpDeleteTrail{}, middleware.After) 323} 324 325func addOpGetEventSelectorsValidationMiddleware(stack *middleware.Stack) error { 326 return stack.Initialize.Add(&validateOpGetEventSelectors{}, middleware.After) 327} 328 329func addOpGetInsightSelectorsValidationMiddleware(stack *middleware.Stack) error { 330 return stack.Initialize.Add(&validateOpGetInsightSelectors{}, middleware.After) 331} 332 333func addOpGetTrailValidationMiddleware(stack *middleware.Stack) error { 334 return stack.Initialize.Add(&validateOpGetTrail{}, middleware.After) 335} 336 337func addOpGetTrailStatusValidationMiddleware(stack *middleware.Stack) error { 338 return stack.Initialize.Add(&validateOpGetTrailStatus{}, middleware.After) 339} 340 341func addOpListTagsValidationMiddleware(stack *middleware.Stack) error { 342 return stack.Initialize.Add(&validateOpListTags{}, middleware.After) 343} 344 345func addOpLookupEventsValidationMiddleware(stack *middleware.Stack) error { 346 return stack.Initialize.Add(&validateOpLookupEvents{}, middleware.After) 347} 348 349func addOpPutEventSelectorsValidationMiddleware(stack *middleware.Stack) error { 350 return stack.Initialize.Add(&validateOpPutEventSelectors{}, middleware.After) 351} 352 353func addOpPutInsightSelectorsValidationMiddleware(stack *middleware.Stack) error { 354 return stack.Initialize.Add(&validateOpPutInsightSelectors{}, middleware.After) 355} 356 357func addOpRemoveTagsValidationMiddleware(stack *middleware.Stack) error { 358 return stack.Initialize.Add(&validateOpRemoveTags{}, middleware.After) 359} 360 361func addOpStartLoggingValidationMiddleware(stack *middleware.Stack) error { 362 return stack.Initialize.Add(&validateOpStartLogging{}, middleware.After) 363} 364 365func addOpStopLoggingValidationMiddleware(stack *middleware.Stack) error { 366 return stack.Initialize.Add(&validateOpStopLogging{}, middleware.After) 367} 368 369func addOpUpdateTrailValidationMiddleware(stack *middleware.Stack) error { 370 return stack.Initialize.Add(&validateOpUpdateTrail{}, middleware.After) 371} 372 373func validateAdvancedEventSelector(v *types.AdvancedEventSelector) error { 374 if v == nil { 375 return nil 376 } 377 invalidParams := smithy.InvalidParamsError{Context: "AdvancedEventSelector"} 378 if v.FieldSelectors == nil { 379 invalidParams.Add(smithy.NewErrParamRequired("FieldSelectors")) 380 } else if v.FieldSelectors != nil { 381 if err := validateAdvancedFieldSelectors(v.FieldSelectors); err != nil { 382 invalidParams.AddNested("FieldSelectors", err.(smithy.InvalidParamsError)) 383 } 384 } 385 if invalidParams.Len() > 0 { 386 return invalidParams 387 } else { 388 return nil 389 } 390} 391 392func validateAdvancedEventSelectors(v []types.AdvancedEventSelector) error { 393 if v == nil { 394 return nil 395 } 396 invalidParams := smithy.InvalidParamsError{Context: "AdvancedEventSelectors"} 397 for i := range v { 398 if err := validateAdvancedEventSelector(&v[i]); err != nil { 399 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 400 } 401 } 402 if invalidParams.Len() > 0 { 403 return invalidParams 404 } else { 405 return nil 406 } 407} 408 409func validateAdvancedFieldSelector(v *types.AdvancedFieldSelector) error { 410 if v == nil { 411 return nil 412 } 413 invalidParams := smithy.InvalidParamsError{Context: "AdvancedFieldSelector"} 414 if v.Field == nil { 415 invalidParams.Add(smithy.NewErrParamRequired("Field")) 416 } 417 if invalidParams.Len() > 0 { 418 return invalidParams 419 } else { 420 return nil 421 } 422} 423 424func validateAdvancedFieldSelectors(v []types.AdvancedFieldSelector) error { 425 if v == nil { 426 return nil 427 } 428 invalidParams := smithy.InvalidParamsError{Context: "AdvancedFieldSelectors"} 429 for i := range v { 430 if err := validateAdvancedFieldSelector(&v[i]); err != nil { 431 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 432 } 433 } 434 if invalidParams.Len() > 0 { 435 return invalidParams 436 } else { 437 return nil 438 } 439} 440 441func validateLookupAttribute(v *types.LookupAttribute) error { 442 if v == nil { 443 return nil 444 } 445 invalidParams := smithy.InvalidParamsError{Context: "LookupAttribute"} 446 if len(v.AttributeKey) == 0 { 447 invalidParams.Add(smithy.NewErrParamRequired("AttributeKey")) 448 } 449 if v.AttributeValue == nil { 450 invalidParams.Add(smithy.NewErrParamRequired("AttributeValue")) 451 } 452 if invalidParams.Len() > 0 { 453 return invalidParams 454 } else { 455 return nil 456 } 457} 458 459func validateLookupAttributesList(v []types.LookupAttribute) error { 460 if v == nil { 461 return nil 462 } 463 invalidParams := smithy.InvalidParamsError{Context: "LookupAttributesList"} 464 for i := range v { 465 if err := validateLookupAttribute(&v[i]); err != nil { 466 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 467 } 468 } 469 if invalidParams.Len() > 0 { 470 return invalidParams 471 } else { 472 return nil 473 } 474} 475 476func validateTag(v *types.Tag) error { 477 if v == nil { 478 return nil 479 } 480 invalidParams := smithy.InvalidParamsError{Context: "Tag"} 481 if v.Key == nil { 482 invalidParams.Add(smithy.NewErrParamRequired("Key")) 483 } 484 if invalidParams.Len() > 0 { 485 return invalidParams 486 } else { 487 return nil 488 } 489} 490 491func validateTagsList(v []types.Tag) error { 492 if v == nil { 493 return nil 494 } 495 invalidParams := smithy.InvalidParamsError{Context: "TagsList"} 496 for i := range v { 497 if err := validateTag(&v[i]); err != nil { 498 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 499 } 500 } 501 if invalidParams.Len() > 0 { 502 return invalidParams 503 } else { 504 return nil 505 } 506} 507 508func validateOpAddTagsInput(v *AddTagsInput) error { 509 if v == nil { 510 return nil 511 } 512 invalidParams := smithy.InvalidParamsError{Context: "AddTagsInput"} 513 if v.ResourceId == nil { 514 invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) 515 } 516 if v.TagsList != nil { 517 if err := validateTagsList(v.TagsList); err != nil { 518 invalidParams.AddNested("TagsList", err.(smithy.InvalidParamsError)) 519 } 520 } 521 if invalidParams.Len() > 0 { 522 return invalidParams 523 } else { 524 return nil 525 } 526} 527 528func validateOpCreateTrailInput(v *CreateTrailInput) error { 529 if v == nil { 530 return nil 531 } 532 invalidParams := smithy.InvalidParamsError{Context: "CreateTrailInput"} 533 if v.Name == nil { 534 invalidParams.Add(smithy.NewErrParamRequired("Name")) 535 } 536 if v.S3BucketName == nil { 537 invalidParams.Add(smithy.NewErrParamRequired("S3BucketName")) 538 } 539 if v.TagsList != nil { 540 if err := validateTagsList(v.TagsList); err != nil { 541 invalidParams.AddNested("TagsList", err.(smithy.InvalidParamsError)) 542 } 543 } 544 if invalidParams.Len() > 0 { 545 return invalidParams 546 } else { 547 return nil 548 } 549} 550 551func validateOpDeleteTrailInput(v *DeleteTrailInput) error { 552 if v == nil { 553 return nil 554 } 555 invalidParams := smithy.InvalidParamsError{Context: "DeleteTrailInput"} 556 if v.Name == nil { 557 invalidParams.Add(smithy.NewErrParamRequired("Name")) 558 } 559 if invalidParams.Len() > 0 { 560 return invalidParams 561 } else { 562 return nil 563 } 564} 565 566func validateOpGetEventSelectorsInput(v *GetEventSelectorsInput) error { 567 if v == nil { 568 return nil 569 } 570 invalidParams := smithy.InvalidParamsError{Context: "GetEventSelectorsInput"} 571 if v.TrailName == nil { 572 invalidParams.Add(smithy.NewErrParamRequired("TrailName")) 573 } 574 if invalidParams.Len() > 0 { 575 return invalidParams 576 } else { 577 return nil 578 } 579} 580 581func validateOpGetInsightSelectorsInput(v *GetInsightSelectorsInput) error { 582 if v == nil { 583 return nil 584 } 585 invalidParams := smithy.InvalidParamsError{Context: "GetInsightSelectorsInput"} 586 if v.TrailName == nil { 587 invalidParams.Add(smithy.NewErrParamRequired("TrailName")) 588 } 589 if invalidParams.Len() > 0 { 590 return invalidParams 591 } else { 592 return nil 593 } 594} 595 596func validateOpGetTrailInput(v *GetTrailInput) error { 597 if v == nil { 598 return nil 599 } 600 invalidParams := smithy.InvalidParamsError{Context: "GetTrailInput"} 601 if v.Name == nil { 602 invalidParams.Add(smithy.NewErrParamRequired("Name")) 603 } 604 if invalidParams.Len() > 0 { 605 return invalidParams 606 } else { 607 return nil 608 } 609} 610 611func validateOpGetTrailStatusInput(v *GetTrailStatusInput) error { 612 if v == nil { 613 return nil 614 } 615 invalidParams := smithy.InvalidParamsError{Context: "GetTrailStatusInput"} 616 if v.Name == nil { 617 invalidParams.Add(smithy.NewErrParamRequired("Name")) 618 } 619 if invalidParams.Len() > 0 { 620 return invalidParams 621 } else { 622 return nil 623 } 624} 625 626func validateOpListTagsInput(v *ListTagsInput) error { 627 if v == nil { 628 return nil 629 } 630 invalidParams := smithy.InvalidParamsError{Context: "ListTagsInput"} 631 if v.ResourceIdList == nil { 632 invalidParams.Add(smithy.NewErrParamRequired("ResourceIdList")) 633 } 634 if invalidParams.Len() > 0 { 635 return invalidParams 636 } else { 637 return nil 638 } 639} 640 641func validateOpLookupEventsInput(v *LookupEventsInput) error { 642 if v == nil { 643 return nil 644 } 645 invalidParams := smithy.InvalidParamsError{Context: "LookupEventsInput"} 646 if v.LookupAttributes != nil { 647 if err := validateLookupAttributesList(v.LookupAttributes); err != nil { 648 invalidParams.AddNested("LookupAttributes", err.(smithy.InvalidParamsError)) 649 } 650 } 651 if invalidParams.Len() > 0 { 652 return invalidParams 653 } else { 654 return nil 655 } 656} 657 658func validateOpPutEventSelectorsInput(v *PutEventSelectorsInput) error { 659 if v == nil { 660 return nil 661 } 662 invalidParams := smithy.InvalidParamsError{Context: "PutEventSelectorsInput"} 663 if v.TrailName == nil { 664 invalidParams.Add(smithy.NewErrParamRequired("TrailName")) 665 } 666 if v.AdvancedEventSelectors != nil { 667 if err := validateAdvancedEventSelectors(v.AdvancedEventSelectors); err != nil { 668 invalidParams.AddNested("AdvancedEventSelectors", err.(smithy.InvalidParamsError)) 669 } 670 } 671 if invalidParams.Len() > 0 { 672 return invalidParams 673 } else { 674 return nil 675 } 676} 677 678func validateOpPutInsightSelectorsInput(v *PutInsightSelectorsInput) error { 679 if v == nil { 680 return nil 681 } 682 invalidParams := smithy.InvalidParamsError{Context: "PutInsightSelectorsInput"} 683 if v.TrailName == nil { 684 invalidParams.Add(smithy.NewErrParamRequired("TrailName")) 685 } 686 if v.InsightSelectors == nil { 687 invalidParams.Add(smithy.NewErrParamRequired("InsightSelectors")) 688 } 689 if invalidParams.Len() > 0 { 690 return invalidParams 691 } else { 692 return nil 693 } 694} 695 696func validateOpRemoveTagsInput(v *RemoveTagsInput) error { 697 if v == nil { 698 return nil 699 } 700 invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsInput"} 701 if v.ResourceId == nil { 702 invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) 703 } 704 if v.TagsList != nil { 705 if err := validateTagsList(v.TagsList); err != nil { 706 invalidParams.AddNested("TagsList", err.(smithy.InvalidParamsError)) 707 } 708 } 709 if invalidParams.Len() > 0 { 710 return invalidParams 711 } else { 712 return nil 713 } 714} 715 716func validateOpStartLoggingInput(v *StartLoggingInput) error { 717 if v == nil { 718 return nil 719 } 720 invalidParams := smithy.InvalidParamsError{Context: "StartLoggingInput"} 721 if v.Name == nil { 722 invalidParams.Add(smithy.NewErrParamRequired("Name")) 723 } 724 if invalidParams.Len() > 0 { 725 return invalidParams 726 } else { 727 return nil 728 } 729} 730 731func validateOpStopLoggingInput(v *StopLoggingInput) error { 732 if v == nil { 733 return nil 734 } 735 invalidParams := smithy.InvalidParamsError{Context: "StopLoggingInput"} 736 if v.Name == nil { 737 invalidParams.Add(smithy.NewErrParamRequired("Name")) 738 } 739 if invalidParams.Len() > 0 { 740 return invalidParams 741 } else { 742 return nil 743 } 744} 745 746func validateOpUpdateTrailInput(v *UpdateTrailInput) error { 747 if v == nil { 748 return nil 749 } 750 invalidParams := smithy.InvalidParamsError{Context: "UpdateTrailInput"} 751 if v.Name == nil { 752 invalidParams.Add(smithy.NewErrParamRequired("Name")) 753 } 754 if invalidParams.Len() > 0 { 755 return invalidParams 756 } else { 757 return nil 758 } 759} 760