1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package dataexchange 4 5import ( 6 "context" 7 "fmt" 8 "github.com/aws/aws-sdk-go-v2/service/dataexchange/types" 9 smithy "github.com/aws/smithy-go" 10 "github.com/aws/smithy-go/middleware" 11) 12 13type validateOpCancelJob struct { 14} 15 16func (*validateOpCancelJob) ID() string { 17 return "OperationInputValidation" 18} 19 20func (m *validateOpCancelJob) 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.(*CancelJobInput) 24 if !ok { 25 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 26 } 27 if err := validateOpCancelJobInput(input); err != nil { 28 return out, metadata, err 29 } 30 return next.HandleInitialize(ctx, in) 31} 32 33type validateOpCreateDataSet struct { 34} 35 36func (*validateOpCreateDataSet) ID() string { 37 return "OperationInputValidation" 38} 39 40func (m *validateOpCreateDataSet) 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.(*CreateDataSetInput) 44 if !ok { 45 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 46 } 47 if err := validateOpCreateDataSetInput(input); err != nil { 48 return out, metadata, err 49 } 50 return next.HandleInitialize(ctx, in) 51} 52 53type validateOpCreateJob struct { 54} 55 56func (*validateOpCreateJob) ID() string { 57 return "OperationInputValidation" 58} 59 60func (m *validateOpCreateJob) 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.(*CreateJobInput) 64 if !ok { 65 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 66 } 67 if err := validateOpCreateJobInput(input); err != nil { 68 return out, metadata, err 69 } 70 return next.HandleInitialize(ctx, in) 71} 72 73type validateOpCreateRevision struct { 74} 75 76func (*validateOpCreateRevision) ID() string { 77 return "OperationInputValidation" 78} 79 80func (m *validateOpCreateRevision) 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.(*CreateRevisionInput) 84 if !ok { 85 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 86 } 87 if err := validateOpCreateRevisionInput(input); err != nil { 88 return out, metadata, err 89 } 90 return next.HandleInitialize(ctx, in) 91} 92 93type validateOpDeleteAsset struct { 94} 95 96func (*validateOpDeleteAsset) ID() string { 97 return "OperationInputValidation" 98} 99 100func (m *validateOpDeleteAsset) 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.(*DeleteAssetInput) 104 if !ok { 105 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 106 } 107 if err := validateOpDeleteAssetInput(input); err != nil { 108 return out, metadata, err 109 } 110 return next.HandleInitialize(ctx, in) 111} 112 113type validateOpDeleteDataSet struct { 114} 115 116func (*validateOpDeleteDataSet) ID() string { 117 return "OperationInputValidation" 118} 119 120func (m *validateOpDeleteDataSet) 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.(*DeleteDataSetInput) 124 if !ok { 125 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 126 } 127 if err := validateOpDeleteDataSetInput(input); err != nil { 128 return out, metadata, err 129 } 130 return next.HandleInitialize(ctx, in) 131} 132 133type validateOpDeleteRevision struct { 134} 135 136func (*validateOpDeleteRevision) ID() string { 137 return "OperationInputValidation" 138} 139 140func (m *validateOpDeleteRevision) 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.(*DeleteRevisionInput) 144 if !ok { 145 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 146 } 147 if err := validateOpDeleteRevisionInput(input); err != nil { 148 return out, metadata, err 149 } 150 return next.HandleInitialize(ctx, in) 151} 152 153type validateOpGetAsset struct { 154} 155 156func (*validateOpGetAsset) ID() string { 157 return "OperationInputValidation" 158} 159 160func (m *validateOpGetAsset) 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.(*GetAssetInput) 164 if !ok { 165 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 166 } 167 if err := validateOpGetAssetInput(input); err != nil { 168 return out, metadata, err 169 } 170 return next.HandleInitialize(ctx, in) 171} 172 173type validateOpGetDataSet struct { 174} 175 176func (*validateOpGetDataSet) ID() string { 177 return "OperationInputValidation" 178} 179 180func (m *validateOpGetDataSet) 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.(*GetDataSetInput) 184 if !ok { 185 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 186 } 187 if err := validateOpGetDataSetInput(input); err != nil { 188 return out, metadata, err 189 } 190 return next.HandleInitialize(ctx, in) 191} 192 193type validateOpGetJob struct { 194} 195 196func (*validateOpGetJob) ID() string { 197 return "OperationInputValidation" 198} 199 200func (m *validateOpGetJob) 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.(*GetJobInput) 204 if !ok { 205 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 206 } 207 if err := validateOpGetJobInput(input); err != nil { 208 return out, metadata, err 209 } 210 return next.HandleInitialize(ctx, in) 211} 212 213type validateOpGetRevision struct { 214} 215 216func (*validateOpGetRevision) ID() string { 217 return "OperationInputValidation" 218} 219 220func (m *validateOpGetRevision) 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.(*GetRevisionInput) 224 if !ok { 225 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 226 } 227 if err := validateOpGetRevisionInput(input); err != nil { 228 return out, metadata, err 229 } 230 return next.HandleInitialize(ctx, in) 231} 232 233type validateOpListDataSetRevisions struct { 234} 235 236func (*validateOpListDataSetRevisions) ID() string { 237 return "OperationInputValidation" 238} 239 240func (m *validateOpListDataSetRevisions) 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.(*ListDataSetRevisionsInput) 244 if !ok { 245 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 246 } 247 if err := validateOpListDataSetRevisionsInput(input); err != nil { 248 return out, metadata, err 249 } 250 return next.HandleInitialize(ctx, in) 251} 252 253type validateOpListRevisionAssets struct { 254} 255 256func (*validateOpListRevisionAssets) ID() string { 257 return "OperationInputValidation" 258} 259 260func (m *validateOpListRevisionAssets) 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.(*ListRevisionAssetsInput) 264 if !ok { 265 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 266 } 267 if err := validateOpListRevisionAssetsInput(input); err != nil { 268 return out, metadata, err 269 } 270 return next.HandleInitialize(ctx, in) 271} 272 273type validateOpListTagsForResource struct { 274} 275 276func (*validateOpListTagsForResource) ID() string { 277 return "OperationInputValidation" 278} 279 280func (m *validateOpListTagsForResource) 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.(*ListTagsForResourceInput) 284 if !ok { 285 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 286 } 287 if err := validateOpListTagsForResourceInput(input); err != nil { 288 return out, metadata, err 289 } 290 return next.HandleInitialize(ctx, in) 291} 292 293type validateOpStartJob struct { 294} 295 296func (*validateOpStartJob) ID() string { 297 return "OperationInputValidation" 298} 299 300func (m *validateOpStartJob) 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.(*StartJobInput) 304 if !ok { 305 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 306 } 307 if err := validateOpStartJobInput(input); err != nil { 308 return out, metadata, err 309 } 310 return next.HandleInitialize(ctx, in) 311} 312 313type validateOpTagResource struct { 314} 315 316func (*validateOpTagResource) ID() string { 317 return "OperationInputValidation" 318} 319 320func (m *validateOpTagResource) 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.(*TagResourceInput) 324 if !ok { 325 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 326 } 327 if err := validateOpTagResourceInput(input); err != nil { 328 return out, metadata, err 329 } 330 return next.HandleInitialize(ctx, in) 331} 332 333type validateOpUntagResource struct { 334} 335 336func (*validateOpUntagResource) ID() string { 337 return "OperationInputValidation" 338} 339 340func (m *validateOpUntagResource) 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.(*UntagResourceInput) 344 if !ok { 345 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 346 } 347 if err := validateOpUntagResourceInput(input); err != nil { 348 return out, metadata, err 349 } 350 return next.HandleInitialize(ctx, in) 351} 352 353type validateOpUpdateAsset struct { 354} 355 356func (*validateOpUpdateAsset) ID() string { 357 return "OperationInputValidation" 358} 359 360func (m *validateOpUpdateAsset) 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.(*UpdateAssetInput) 364 if !ok { 365 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 366 } 367 if err := validateOpUpdateAssetInput(input); err != nil { 368 return out, metadata, err 369 } 370 return next.HandleInitialize(ctx, in) 371} 372 373type validateOpUpdateDataSet struct { 374} 375 376func (*validateOpUpdateDataSet) ID() string { 377 return "OperationInputValidation" 378} 379 380func (m *validateOpUpdateDataSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( 381 out middleware.InitializeOutput, metadata middleware.Metadata, err error, 382) { 383 input, ok := in.Parameters.(*UpdateDataSetInput) 384 if !ok { 385 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 386 } 387 if err := validateOpUpdateDataSetInput(input); err != nil { 388 return out, metadata, err 389 } 390 return next.HandleInitialize(ctx, in) 391} 392 393type validateOpUpdateRevision struct { 394} 395 396func (*validateOpUpdateRevision) ID() string { 397 return "OperationInputValidation" 398} 399 400func (m *validateOpUpdateRevision) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( 401 out middleware.InitializeOutput, metadata middleware.Metadata, err error, 402) { 403 input, ok := in.Parameters.(*UpdateRevisionInput) 404 if !ok { 405 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 406 } 407 if err := validateOpUpdateRevisionInput(input); err != nil { 408 return out, metadata, err 409 } 410 return next.HandleInitialize(ctx, in) 411} 412 413func addOpCancelJobValidationMiddleware(stack *middleware.Stack) error { 414 return stack.Initialize.Add(&validateOpCancelJob{}, middleware.After) 415} 416 417func addOpCreateDataSetValidationMiddleware(stack *middleware.Stack) error { 418 return stack.Initialize.Add(&validateOpCreateDataSet{}, middleware.After) 419} 420 421func addOpCreateJobValidationMiddleware(stack *middleware.Stack) error { 422 return stack.Initialize.Add(&validateOpCreateJob{}, middleware.After) 423} 424 425func addOpCreateRevisionValidationMiddleware(stack *middleware.Stack) error { 426 return stack.Initialize.Add(&validateOpCreateRevision{}, middleware.After) 427} 428 429func addOpDeleteAssetValidationMiddleware(stack *middleware.Stack) error { 430 return stack.Initialize.Add(&validateOpDeleteAsset{}, middleware.After) 431} 432 433func addOpDeleteDataSetValidationMiddleware(stack *middleware.Stack) error { 434 return stack.Initialize.Add(&validateOpDeleteDataSet{}, middleware.After) 435} 436 437func addOpDeleteRevisionValidationMiddleware(stack *middleware.Stack) error { 438 return stack.Initialize.Add(&validateOpDeleteRevision{}, middleware.After) 439} 440 441func addOpGetAssetValidationMiddleware(stack *middleware.Stack) error { 442 return stack.Initialize.Add(&validateOpGetAsset{}, middleware.After) 443} 444 445func addOpGetDataSetValidationMiddleware(stack *middleware.Stack) error { 446 return stack.Initialize.Add(&validateOpGetDataSet{}, middleware.After) 447} 448 449func addOpGetJobValidationMiddleware(stack *middleware.Stack) error { 450 return stack.Initialize.Add(&validateOpGetJob{}, middleware.After) 451} 452 453func addOpGetRevisionValidationMiddleware(stack *middleware.Stack) error { 454 return stack.Initialize.Add(&validateOpGetRevision{}, middleware.After) 455} 456 457func addOpListDataSetRevisionsValidationMiddleware(stack *middleware.Stack) error { 458 return stack.Initialize.Add(&validateOpListDataSetRevisions{}, middleware.After) 459} 460 461func addOpListRevisionAssetsValidationMiddleware(stack *middleware.Stack) error { 462 return stack.Initialize.Add(&validateOpListRevisionAssets{}, middleware.After) 463} 464 465func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { 466 return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) 467} 468 469func addOpStartJobValidationMiddleware(stack *middleware.Stack) error { 470 return stack.Initialize.Add(&validateOpStartJob{}, middleware.After) 471} 472 473func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { 474 return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) 475} 476 477func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { 478 return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) 479} 480 481func addOpUpdateAssetValidationMiddleware(stack *middleware.Stack) error { 482 return stack.Initialize.Add(&validateOpUpdateAsset{}, middleware.After) 483} 484 485func addOpUpdateDataSetValidationMiddleware(stack *middleware.Stack) error { 486 return stack.Initialize.Add(&validateOpUpdateDataSet{}, middleware.After) 487} 488 489func addOpUpdateRevisionValidationMiddleware(stack *middleware.Stack) error { 490 return stack.Initialize.Add(&validateOpUpdateRevision{}, middleware.After) 491} 492 493func validateAssetDestinationEntry(v *types.AssetDestinationEntry) error { 494 if v == nil { 495 return nil 496 } 497 invalidParams := smithy.InvalidParamsError{Context: "AssetDestinationEntry"} 498 if v.AssetId == nil { 499 invalidParams.Add(smithy.NewErrParamRequired("AssetId")) 500 } 501 if v.Bucket == nil { 502 invalidParams.Add(smithy.NewErrParamRequired("Bucket")) 503 } 504 if invalidParams.Len() > 0 { 505 return invalidParams 506 } else { 507 return nil 508 } 509} 510 511func validateAssetSourceEntry(v *types.AssetSourceEntry) error { 512 if v == nil { 513 return nil 514 } 515 invalidParams := smithy.InvalidParamsError{Context: "AssetSourceEntry"} 516 if v.Bucket == nil { 517 invalidParams.Add(smithy.NewErrParamRequired("Bucket")) 518 } 519 if v.Key == nil { 520 invalidParams.Add(smithy.NewErrParamRequired("Key")) 521 } 522 if invalidParams.Len() > 0 { 523 return invalidParams 524 } else { 525 return nil 526 } 527} 528 529func validateExportAssetsToS3RequestDetails(v *types.ExportAssetsToS3RequestDetails) error { 530 if v == nil { 531 return nil 532 } 533 invalidParams := smithy.InvalidParamsError{Context: "ExportAssetsToS3RequestDetails"} 534 if v.AssetDestinations == nil { 535 invalidParams.Add(smithy.NewErrParamRequired("AssetDestinations")) 536 } else if v.AssetDestinations != nil { 537 if err := validateListOfAssetDestinationEntry(v.AssetDestinations); err != nil { 538 invalidParams.AddNested("AssetDestinations", err.(smithy.InvalidParamsError)) 539 } 540 } 541 if v.DataSetId == nil { 542 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 543 } 544 if v.Encryption != nil { 545 if err := validateExportServerSideEncryption(v.Encryption); err != nil { 546 invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) 547 } 548 } 549 if v.RevisionId == nil { 550 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 551 } 552 if invalidParams.Len() > 0 { 553 return invalidParams 554 } else { 555 return nil 556 } 557} 558 559func validateExportAssetToSignedUrlRequestDetails(v *types.ExportAssetToSignedUrlRequestDetails) error { 560 if v == nil { 561 return nil 562 } 563 invalidParams := smithy.InvalidParamsError{Context: "ExportAssetToSignedUrlRequestDetails"} 564 if v.AssetId == nil { 565 invalidParams.Add(smithy.NewErrParamRequired("AssetId")) 566 } 567 if v.DataSetId == nil { 568 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 569 } 570 if v.RevisionId == nil { 571 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 572 } 573 if invalidParams.Len() > 0 { 574 return invalidParams 575 } else { 576 return nil 577 } 578} 579 580func validateExportRevisionsToS3RequestDetails(v *types.ExportRevisionsToS3RequestDetails) error { 581 if v == nil { 582 return nil 583 } 584 invalidParams := smithy.InvalidParamsError{Context: "ExportRevisionsToS3RequestDetails"} 585 if v.DataSetId == nil { 586 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 587 } 588 if v.Encryption != nil { 589 if err := validateExportServerSideEncryption(v.Encryption); err != nil { 590 invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError)) 591 } 592 } 593 if v.RevisionDestinations == nil { 594 invalidParams.Add(smithy.NewErrParamRequired("RevisionDestinations")) 595 } else if v.RevisionDestinations != nil { 596 if err := validateListOfRevisionDestinationEntry(v.RevisionDestinations); err != nil { 597 invalidParams.AddNested("RevisionDestinations", err.(smithy.InvalidParamsError)) 598 } 599 } 600 if invalidParams.Len() > 0 { 601 return invalidParams 602 } else { 603 return nil 604 } 605} 606 607func validateExportServerSideEncryption(v *types.ExportServerSideEncryption) error { 608 if v == nil { 609 return nil 610 } 611 invalidParams := smithy.InvalidParamsError{Context: "ExportServerSideEncryption"} 612 if len(v.Type) == 0 { 613 invalidParams.Add(smithy.NewErrParamRequired("Type")) 614 } 615 if invalidParams.Len() > 0 { 616 return invalidParams 617 } else { 618 return nil 619 } 620} 621 622func validateImportAssetFromSignedUrlRequestDetails(v *types.ImportAssetFromSignedUrlRequestDetails) error { 623 if v == nil { 624 return nil 625 } 626 invalidParams := smithy.InvalidParamsError{Context: "ImportAssetFromSignedUrlRequestDetails"} 627 if v.AssetName == nil { 628 invalidParams.Add(smithy.NewErrParamRequired("AssetName")) 629 } 630 if v.DataSetId == nil { 631 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 632 } 633 if v.Md5Hash == nil { 634 invalidParams.Add(smithy.NewErrParamRequired("Md5Hash")) 635 } 636 if v.RevisionId == nil { 637 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 638 } 639 if invalidParams.Len() > 0 { 640 return invalidParams 641 } else { 642 return nil 643 } 644} 645 646func validateImportAssetsFromS3RequestDetails(v *types.ImportAssetsFromS3RequestDetails) error { 647 if v == nil { 648 return nil 649 } 650 invalidParams := smithy.InvalidParamsError{Context: "ImportAssetsFromS3RequestDetails"} 651 if v.AssetSources == nil { 652 invalidParams.Add(smithy.NewErrParamRequired("AssetSources")) 653 } else if v.AssetSources != nil { 654 if err := validateListOfAssetSourceEntry(v.AssetSources); err != nil { 655 invalidParams.AddNested("AssetSources", err.(smithy.InvalidParamsError)) 656 } 657 } 658 if v.DataSetId == nil { 659 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 660 } 661 if v.RevisionId == nil { 662 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 663 } 664 if invalidParams.Len() > 0 { 665 return invalidParams 666 } else { 667 return nil 668 } 669} 670 671func validateListOfAssetDestinationEntry(v []types.AssetDestinationEntry) error { 672 if v == nil { 673 return nil 674 } 675 invalidParams := smithy.InvalidParamsError{Context: "ListOfAssetDestinationEntry"} 676 for i := range v { 677 if err := validateAssetDestinationEntry(&v[i]); err != nil { 678 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 679 } 680 } 681 if invalidParams.Len() > 0 { 682 return invalidParams 683 } else { 684 return nil 685 } 686} 687 688func validateListOfAssetSourceEntry(v []types.AssetSourceEntry) error { 689 if v == nil { 690 return nil 691 } 692 invalidParams := smithy.InvalidParamsError{Context: "ListOfAssetSourceEntry"} 693 for i := range v { 694 if err := validateAssetSourceEntry(&v[i]); err != nil { 695 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 696 } 697 } 698 if invalidParams.Len() > 0 { 699 return invalidParams 700 } else { 701 return nil 702 } 703} 704 705func validateListOfRevisionDestinationEntry(v []types.RevisionDestinationEntry) error { 706 if v == nil { 707 return nil 708 } 709 invalidParams := smithy.InvalidParamsError{Context: "ListOfRevisionDestinationEntry"} 710 for i := range v { 711 if err := validateRevisionDestinationEntry(&v[i]); err != nil { 712 invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) 713 } 714 } 715 if invalidParams.Len() > 0 { 716 return invalidParams 717 } else { 718 return nil 719 } 720} 721 722func validateRequestDetails(v *types.RequestDetails) error { 723 if v == nil { 724 return nil 725 } 726 invalidParams := smithy.InvalidParamsError{Context: "RequestDetails"} 727 if v.ExportAssetToSignedUrl != nil { 728 if err := validateExportAssetToSignedUrlRequestDetails(v.ExportAssetToSignedUrl); err != nil { 729 invalidParams.AddNested("ExportAssetToSignedUrl", err.(smithy.InvalidParamsError)) 730 } 731 } 732 if v.ExportAssetsToS3 != nil { 733 if err := validateExportAssetsToS3RequestDetails(v.ExportAssetsToS3); err != nil { 734 invalidParams.AddNested("ExportAssetsToS3", err.(smithy.InvalidParamsError)) 735 } 736 } 737 if v.ExportRevisionsToS3 != nil { 738 if err := validateExportRevisionsToS3RequestDetails(v.ExportRevisionsToS3); err != nil { 739 invalidParams.AddNested("ExportRevisionsToS3", err.(smithy.InvalidParamsError)) 740 } 741 } 742 if v.ImportAssetFromSignedUrl != nil { 743 if err := validateImportAssetFromSignedUrlRequestDetails(v.ImportAssetFromSignedUrl); err != nil { 744 invalidParams.AddNested("ImportAssetFromSignedUrl", err.(smithy.InvalidParamsError)) 745 } 746 } 747 if v.ImportAssetsFromS3 != nil { 748 if err := validateImportAssetsFromS3RequestDetails(v.ImportAssetsFromS3); err != nil { 749 invalidParams.AddNested("ImportAssetsFromS3", err.(smithy.InvalidParamsError)) 750 } 751 } 752 if invalidParams.Len() > 0 { 753 return invalidParams 754 } else { 755 return nil 756 } 757} 758 759func validateRevisionDestinationEntry(v *types.RevisionDestinationEntry) error { 760 if v == nil { 761 return nil 762 } 763 invalidParams := smithy.InvalidParamsError{Context: "RevisionDestinationEntry"} 764 if v.Bucket == nil { 765 invalidParams.Add(smithy.NewErrParamRequired("Bucket")) 766 } 767 if v.RevisionId == nil { 768 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 769 } 770 if invalidParams.Len() > 0 { 771 return invalidParams 772 } else { 773 return nil 774 } 775} 776 777func validateOpCancelJobInput(v *CancelJobInput) error { 778 if v == nil { 779 return nil 780 } 781 invalidParams := smithy.InvalidParamsError{Context: "CancelJobInput"} 782 if v.JobId == nil { 783 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 784 } 785 if invalidParams.Len() > 0 { 786 return invalidParams 787 } else { 788 return nil 789 } 790} 791 792func validateOpCreateDataSetInput(v *CreateDataSetInput) error { 793 if v == nil { 794 return nil 795 } 796 invalidParams := smithy.InvalidParamsError{Context: "CreateDataSetInput"} 797 if len(v.AssetType) == 0 { 798 invalidParams.Add(smithy.NewErrParamRequired("AssetType")) 799 } 800 if v.Description == nil { 801 invalidParams.Add(smithy.NewErrParamRequired("Description")) 802 } 803 if v.Name == nil { 804 invalidParams.Add(smithy.NewErrParamRequired("Name")) 805 } 806 if invalidParams.Len() > 0 { 807 return invalidParams 808 } else { 809 return nil 810 } 811} 812 813func validateOpCreateJobInput(v *CreateJobInput) error { 814 if v == nil { 815 return nil 816 } 817 invalidParams := smithy.InvalidParamsError{Context: "CreateJobInput"} 818 if v.Details == nil { 819 invalidParams.Add(smithy.NewErrParamRequired("Details")) 820 } else if v.Details != nil { 821 if err := validateRequestDetails(v.Details); err != nil { 822 invalidParams.AddNested("Details", err.(smithy.InvalidParamsError)) 823 } 824 } 825 if len(v.Type) == 0 { 826 invalidParams.Add(smithy.NewErrParamRequired("Type")) 827 } 828 if invalidParams.Len() > 0 { 829 return invalidParams 830 } else { 831 return nil 832 } 833} 834 835func validateOpCreateRevisionInput(v *CreateRevisionInput) error { 836 if v == nil { 837 return nil 838 } 839 invalidParams := smithy.InvalidParamsError{Context: "CreateRevisionInput"} 840 if v.DataSetId == nil { 841 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 842 } 843 if invalidParams.Len() > 0 { 844 return invalidParams 845 } else { 846 return nil 847 } 848} 849 850func validateOpDeleteAssetInput(v *DeleteAssetInput) error { 851 if v == nil { 852 return nil 853 } 854 invalidParams := smithy.InvalidParamsError{Context: "DeleteAssetInput"} 855 if v.AssetId == nil { 856 invalidParams.Add(smithy.NewErrParamRequired("AssetId")) 857 } 858 if v.DataSetId == nil { 859 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 860 } 861 if v.RevisionId == nil { 862 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 863 } 864 if invalidParams.Len() > 0 { 865 return invalidParams 866 } else { 867 return nil 868 } 869} 870 871func validateOpDeleteDataSetInput(v *DeleteDataSetInput) error { 872 if v == nil { 873 return nil 874 } 875 invalidParams := smithy.InvalidParamsError{Context: "DeleteDataSetInput"} 876 if v.DataSetId == nil { 877 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 878 } 879 if invalidParams.Len() > 0 { 880 return invalidParams 881 } else { 882 return nil 883 } 884} 885 886func validateOpDeleteRevisionInput(v *DeleteRevisionInput) error { 887 if v == nil { 888 return nil 889 } 890 invalidParams := smithy.InvalidParamsError{Context: "DeleteRevisionInput"} 891 if v.DataSetId == nil { 892 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 893 } 894 if v.RevisionId == nil { 895 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 896 } 897 if invalidParams.Len() > 0 { 898 return invalidParams 899 } else { 900 return nil 901 } 902} 903 904func validateOpGetAssetInput(v *GetAssetInput) error { 905 if v == nil { 906 return nil 907 } 908 invalidParams := smithy.InvalidParamsError{Context: "GetAssetInput"} 909 if v.AssetId == nil { 910 invalidParams.Add(smithy.NewErrParamRequired("AssetId")) 911 } 912 if v.DataSetId == nil { 913 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 914 } 915 if v.RevisionId == nil { 916 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 917 } 918 if invalidParams.Len() > 0 { 919 return invalidParams 920 } else { 921 return nil 922 } 923} 924 925func validateOpGetDataSetInput(v *GetDataSetInput) error { 926 if v == nil { 927 return nil 928 } 929 invalidParams := smithy.InvalidParamsError{Context: "GetDataSetInput"} 930 if v.DataSetId == nil { 931 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 932 } 933 if invalidParams.Len() > 0 { 934 return invalidParams 935 } else { 936 return nil 937 } 938} 939 940func validateOpGetJobInput(v *GetJobInput) error { 941 if v == nil { 942 return nil 943 } 944 invalidParams := smithy.InvalidParamsError{Context: "GetJobInput"} 945 if v.JobId == nil { 946 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 947 } 948 if invalidParams.Len() > 0 { 949 return invalidParams 950 } else { 951 return nil 952 } 953} 954 955func validateOpGetRevisionInput(v *GetRevisionInput) error { 956 if v == nil { 957 return nil 958 } 959 invalidParams := smithy.InvalidParamsError{Context: "GetRevisionInput"} 960 if v.DataSetId == nil { 961 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 962 } 963 if v.RevisionId == nil { 964 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 965 } 966 if invalidParams.Len() > 0 { 967 return invalidParams 968 } else { 969 return nil 970 } 971} 972 973func validateOpListDataSetRevisionsInput(v *ListDataSetRevisionsInput) error { 974 if v == nil { 975 return nil 976 } 977 invalidParams := smithy.InvalidParamsError{Context: "ListDataSetRevisionsInput"} 978 if v.DataSetId == nil { 979 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 980 } 981 if invalidParams.Len() > 0 { 982 return invalidParams 983 } else { 984 return nil 985 } 986} 987 988func validateOpListRevisionAssetsInput(v *ListRevisionAssetsInput) error { 989 if v == nil { 990 return nil 991 } 992 invalidParams := smithy.InvalidParamsError{Context: "ListRevisionAssetsInput"} 993 if v.DataSetId == nil { 994 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 995 } 996 if v.RevisionId == nil { 997 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 998 } 999 if invalidParams.Len() > 0 { 1000 return invalidParams 1001 } else { 1002 return nil 1003 } 1004} 1005 1006func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { 1007 if v == nil { 1008 return nil 1009 } 1010 invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} 1011 if v.ResourceArn == nil { 1012 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 1013 } 1014 if invalidParams.Len() > 0 { 1015 return invalidParams 1016 } else { 1017 return nil 1018 } 1019} 1020 1021func validateOpStartJobInput(v *StartJobInput) error { 1022 if v == nil { 1023 return nil 1024 } 1025 invalidParams := smithy.InvalidParamsError{Context: "StartJobInput"} 1026 if v.JobId == nil { 1027 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 1028 } 1029 if invalidParams.Len() > 0 { 1030 return invalidParams 1031 } else { 1032 return nil 1033 } 1034} 1035 1036func validateOpTagResourceInput(v *TagResourceInput) error { 1037 if v == nil { 1038 return nil 1039 } 1040 invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} 1041 if v.ResourceArn == nil { 1042 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 1043 } 1044 if v.Tags == nil { 1045 invalidParams.Add(smithy.NewErrParamRequired("Tags")) 1046 } 1047 if invalidParams.Len() > 0 { 1048 return invalidParams 1049 } else { 1050 return nil 1051 } 1052} 1053 1054func validateOpUntagResourceInput(v *UntagResourceInput) error { 1055 if v == nil { 1056 return nil 1057 } 1058 invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} 1059 if v.ResourceArn == nil { 1060 invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) 1061 } 1062 if v.TagKeys == nil { 1063 invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) 1064 } 1065 if invalidParams.Len() > 0 { 1066 return invalidParams 1067 } else { 1068 return nil 1069 } 1070} 1071 1072func validateOpUpdateAssetInput(v *UpdateAssetInput) error { 1073 if v == nil { 1074 return nil 1075 } 1076 invalidParams := smithy.InvalidParamsError{Context: "UpdateAssetInput"} 1077 if v.AssetId == nil { 1078 invalidParams.Add(smithy.NewErrParamRequired("AssetId")) 1079 } 1080 if v.DataSetId == nil { 1081 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 1082 } 1083 if v.Name == nil { 1084 invalidParams.Add(smithy.NewErrParamRequired("Name")) 1085 } 1086 if v.RevisionId == nil { 1087 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 1088 } 1089 if invalidParams.Len() > 0 { 1090 return invalidParams 1091 } else { 1092 return nil 1093 } 1094} 1095 1096func validateOpUpdateDataSetInput(v *UpdateDataSetInput) error { 1097 if v == nil { 1098 return nil 1099 } 1100 invalidParams := smithy.InvalidParamsError{Context: "UpdateDataSetInput"} 1101 if v.DataSetId == nil { 1102 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 1103 } 1104 if invalidParams.Len() > 0 { 1105 return invalidParams 1106 } else { 1107 return nil 1108 } 1109} 1110 1111func validateOpUpdateRevisionInput(v *UpdateRevisionInput) error { 1112 if v == nil { 1113 return nil 1114 } 1115 invalidParams := smithy.InvalidParamsError{Context: "UpdateRevisionInput"} 1116 if v.DataSetId == nil { 1117 invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) 1118 } 1119 if v.RevisionId == nil { 1120 invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) 1121 } 1122 if invalidParams.Len() > 0 { 1123 return invalidParams 1124 } else { 1125 return nil 1126 } 1127} 1128