1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package comprehendmedical 4 5import ( 6 "context" 7 "fmt" 8 "github.com/aws/aws-sdk-go-v2/service/comprehendmedical/types" 9 smithy "github.com/aws/smithy-go" 10 "github.com/aws/smithy-go/middleware" 11) 12 13type validateOpDescribeEntitiesDetectionV2Job struct { 14} 15 16func (*validateOpDescribeEntitiesDetectionV2Job) ID() string { 17 return "OperationInputValidation" 18} 19 20func (m *validateOpDescribeEntitiesDetectionV2Job) 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.(*DescribeEntitiesDetectionV2JobInput) 24 if !ok { 25 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 26 } 27 if err := validateOpDescribeEntitiesDetectionV2JobInput(input); err != nil { 28 return out, metadata, err 29 } 30 return next.HandleInitialize(ctx, in) 31} 32 33type validateOpDescribeICD10CMInferenceJob struct { 34} 35 36func (*validateOpDescribeICD10CMInferenceJob) ID() string { 37 return "OperationInputValidation" 38} 39 40func (m *validateOpDescribeICD10CMInferenceJob) 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.(*DescribeICD10CMInferenceJobInput) 44 if !ok { 45 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 46 } 47 if err := validateOpDescribeICD10CMInferenceJobInput(input); err != nil { 48 return out, metadata, err 49 } 50 return next.HandleInitialize(ctx, in) 51} 52 53type validateOpDescribePHIDetectionJob struct { 54} 55 56func (*validateOpDescribePHIDetectionJob) ID() string { 57 return "OperationInputValidation" 58} 59 60func (m *validateOpDescribePHIDetectionJob) 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.(*DescribePHIDetectionJobInput) 64 if !ok { 65 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 66 } 67 if err := validateOpDescribePHIDetectionJobInput(input); err != nil { 68 return out, metadata, err 69 } 70 return next.HandleInitialize(ctx, in) 71} 72 73type validateOpDescribeRxNormInferenceJob struct { 74} 75 76func (*validateOpDescribeRxNormInferenceJob) ID() string { 77 return "OperationInputValidation" 78} 79 80func (m *validateOpDescribeRxNormInferenceJob) 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.(*DescribeRxNormInferenceJobInput) 84 if !ok { 85 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 86 } 87 if err := validateOpDescribeRxNormInferenceJobInput(input); err != nil { 88 return out, metadata, err 89 } 90 return next.HandleInitialize(ctx, in) 91} 92 93type validateOpDetectEntities struct { 94} 95 96func (*validateOpDetectEntities) ID() string { 97 return "OperationInputValidation" 98} 99 100func (m *validateOpDetectEntities) 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.(*DetectEntitiesInput) 104 if !ok { 105 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 106 } 107 if err := validateOpDetectEntitiesInput(input); err != nil { 108 return out, metadata, err 109 } 110 return next.HandleInitialize(ctx, in) 111} 112 113type validateOpDetectEntitiesV2 struct { 114} 115 116func (*validateOpDetectEntitiesV2) ID() string { 117 return "OperationInputValidation" 118} 119 120func (m *validateOpDetectEntitiesV2) 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.(*DetectEntitiesV2Input) 124 if !ok { 125 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 126 } 127 if err := validateOpDetectEntitiesV2Input(input); err != nil { 128 return out, metadata, err 129 } 130 return next.HandleInitialize(ctx, in) 131} 132 133type validateOpDetectPHI struct { 134} 135 136func (*validateOpDetectPHI) ID() string { 137 return "OperationInputValidation" 138} 139 140func (m *validateOpDetectPHI) 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.(*DetectPHIInput) 144 if !ok { 145 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 146 } 147 if err := validateOpDetectPHIInput(input); err != nil { 148 return out, metadata, err 149 } 150 return next.HandleInitialize(ctx, in) 151} 152 153type validateOpInferICD10CM struct { 154} 155 156func (*validateOpInferICD10CM) ID() string { 157 return "OperationInputValidation" 158} 159 160func (m *validateOpInferICD10CM) 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.(*InferICD10CMInput) 164 if !ok { 165 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 166 } 167 if err := validateOpInferICD10CMInput(input); err != nil { 168 return out, metadata, err 169 } 170 return next.HandleInitialize(ctx, in) 171} 172 173type validateOpInferRxNorm struct { 174} 175 176func (*validateOpInferRxNorm) ID() string { 177 return "OperationInputValidation" 178} 179 180func (m *validateOpInferRxNorm) 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.(*InferRxNormInput) 184 if !ok { 185 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 186 } 187 if err := validateOpInferRxNormInput(input); err != nil { 188 return out, metadata, err 189 } 190 return next.HandleInitialize(ctx, in) 191} 192 193type validateOpStartEntitiesDetectionV2Job struct { 194} 195 196func (*validateOpStartEntitiesDetectionV2Job) ID() string { 197 return "OperationInputValidation" 198} 199 200func (m *validateOpStartEntitiesDetectionV2Job) 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.(*StartEntitiesDetectionV2JobInput) 204 if !ok { 205 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 206 } 207 if err := validateOpStartEntitiesDetectionV2JobInput(input); err != nil { 208 return out, metadata, err 209 } 210 return next.HandleInitialize(ctx, in) 211} 212 213type validateOpStartICD10CMInferenceJob struct { 214} 215 216func (*validateOpStartICD10CMInferenceJob) ID() string { 217 return "OperationInputValidation" 218} 219 220func (m *validateOpStartICD10CMInferenceJob) 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.(*StartICD10CMInferenceJobInput) 224 if !ok { 225 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 226 } 227 if err := validateOpStartICD10CMInferenceJobInput(input); err != nil { 228 return out, metadata, err 229 } 230 return next.HandleInitialize(ctx, in) 231} 232 233type validateOpStartPHIDetectionJob struct { 234} 235 236func (*validateOpStartPHIDetectionJob) ID() string { 237 return "OperationInputValidation" 238} 239 240func (m *validateOpStartPHIDetectionJob) 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.(*StartPHIDetectionJobInput) 244 if !ok { 245 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 246 } 247 if err := validateOpStartPHIDetectionJobInput(input); err != nil { 248 return out, metadata, err 249 } 250 return next.HandleInitialize(ctx, in) 251} 252 253type validateOpStartRxNormInferenceJob struct { 254} 255 256func (*validateOpStartRxNormInferenceJob) ID() string { 257 return "OperationInputValidation" 258} 259 260func (m *validateOpStartRxNormInferenceJob) 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.(*StartRxNormInferenceJobInput) 264 if !ok { 265 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 266 } 267 if err := validateOpStartRxNormInferenceJobInput(input); err != nil { 268 return out, metadata, err 269 } 270 return next.HandleInitialize(ctx, in) 271} 272 273type validateOpStopEntitiesDetectionV2Job struct { 274} 275 276func (*validateOpStopEntitiesDetectionV2Job) ID() string { 277 return "OperationInputValidation" 278} 279 280func (m *validateOpStopEntitiesDetectionV2Job) 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.(*StopEntitiesDetectionV2JobInput) 284 if !ok { 285 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 286 } 287 if err := validateOpStopEntitiesDetectionV2JobInput(input); err != nil { 288 return out, metadata, err 289 } 290 return next.HandleInitialize(ctx, in) 291} 292 293type validateOpStopICD10CMInferenceJob struct { 294} 295 296func (*validateOpStopICD10CMInferenceJob) ID() string { 297 return "OperationInputValidation" 298} 299 300func (m *validateOpStopICD10CMInferenceJob) 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.(*StopICD10CMInferenceJobInput) 304 if !ok { 305 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 306 } 307 if err := validateOpStopICD10CMInferenceJobInput(input); err != nil { 308 return out, metadata, err 309 } 310 return next.HandleInitialize(ctx, in) 311} 312 313type validateOpStopPHIDetectionJob struct { 314} 315 316func (*validateOpStopPHIDetectionJob) ID() string { 317 return "OperationInputValidation" 318} 319 320func (m *validateOpStopPHIDetectionJob) 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.(*StopPHIDetectionJobInput) 324 if !ok { 325 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 326 } 327 if err := validateOpStopPHIDetectionJobInput(input); err != nil { 328 return out, metadata, err 329 } 330 return next.HandleInitialize(ctx, in) 331} 332 333type validateOpStopRxNormInferenceJob struct { 334} 335 336func (*validateOpStopRxNormInferenceJob) ID() string { 337 return "OperationInputValidation" 338} 339 340func (m *validateOpStopRxNormInferenceJob) 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.(*StopRxNormInferenceJobInput) 344 if !ok { 345 return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) 346 } 347 if err := validateOpStopRxNormInferenceJobInput(input); err != nil { 348 return out, metadata, err 349 } 350 return next.HandleInitialize(ctx, in) 351} 352 353func addOpDescribeEntitiesDetectionV2JobValidationMiddleware(stack *middleware.Stack) error { 354 return stack.Initialize.Add(&validateOpDescribeEntitiesDetectionV2Job{}, middleware.After) 355} 356 357func addOpDescribeICD10CMInferenceJobValidationMiddleware(stack *middleware.Stack) error { 358 return stack.Initialize.Add(&validateOpDescribeICD10CMInferenceJob{}, middleware.After) 359} 360 361func addOpDescribePHIDetectionJobValidationMiddleware(stack *middleware.Stack) error { 362 return stack.Initialize.Add(&validateOpDescribePHIDetectionJob{}, middleware.After) 363} 364 365func addOpDescribeRxNormInferenceJobValidationMiddleware(stack *middleware.Stack) error { 366 return stack.Initialize.Add(&validateOpDescribeRxNormInferenceJob{}, middleware.After) 367} 368 369func addOpDetectEntitiesValidationMiddleware(stack *middleware.Stack) error { 370 return stack.Initialize.Add(&validateOpDetectEntities{}, middleware.After) 371} 372 373func addOpDetectEntitiesV2ValidationMiddleware(stack *middleware.Stack) error { 374 return stack.Initialize.Add(&validateOpDetectEntitiesV2{}, middleware.After) 375} 376 377func addOpDetectPHIValidationMiddleware(stack *middleware.Stack) error { 378 return stack.Initialize.Add(&validateOpDetectPHI{}, middleware.After) 379} 380 381func addOpInferICD10CMValidationMiddleware(stack *middleware.Stack) error { 382 return stack.Initialize.Add(&validateOpInferICD10CM{}, middleware.After) 383} 384 385func addOpInferRxNormValidationMiddleware(stack *middleware.Stack) error { 386 return stack.Initialize.Add(&validateOpInferRxNorm{}, middleware.After) 387} 388 389func addOpStartEntitiesDetectionV2JobValidationMiddleware(stack *middleware.Stack) error { 390 return stack.Initialize.Add(&validateOpStartEntitiesDetectionV2Job{}, middleware.After) 391} 392 393func addOpStartICD10CMInferenceJobValidationMiddleware(stack *middleware.Stack) error { 394 return stack.Initialize.Add(&validateOpStartICD10CMInferenceJob{}, middleware.After) 395} 396 397func addOpStartPHIDetectionJobValidationMiddleware(stack *middleware.Stack) error { 398 return stack.Initialize.Add(&validateOpStartPHIDetectionJob{}, middleware.After) 399} 400 401func addOpStartRxNormInferenceJobValidationMiddleware(stack *middleware.Stack) error { 402 return stack.Initialize.Add(&validateOpStartRxNormInferenceJob{}, middleware.After) 403} 404 405func addOpStopEntitiesDetectionV2JobValidationMiddleware(stack *middleware.Stack) error { 406 return stack.Initialize.Add(&validateOpStopEntitiesDetectionV2Job{}, middleware.After) 407} 408 409func addOpStopICD10CMInferenceJobValidationMiddleware(stack *middleware.Stack) error { 410 return stack.Initialize.Add(&validateOpStopICD10CMInferenceJob{}, middleware.After) 411} 412 413func addOpStopPHIDetectionJobValidationMiddleware(stack *middleware.Stack) error { 414 return stack.Initialize.Add(&validateOpStopPHIDetectionJob{}, middleware.After) 415} 416 417func addOpStopRxNormInferenceJobValidationMiddleware(stack *middleware.Stack) error { 418 return stack.Initialize.Add(&validateOpStopRxNormInferenceJob{}, middleware.After) 419} 420 421func validateInputDataConfig(v *types.InputDataConfig) error { 422 if v == nil { 423 return nil 424 } 425 invalidParams := smithy.InvalidParamsError{Context: "InputDataConfig"} 426 if v.S3Bucket == nil { 427 invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) 428 } 429 if invalidParams.Len() > 0 { 430 return invalidParams 431 } else { 432 return nil 433 } 434} 435 436func validateOutputDataConfig(v *types.OutputDataConfig) error { 437 if v == nil { 438 return nil 439 } 440 invalidParams := smithy.InvalidParamsError{Context: "OutputDataConfig"} 441 if v.S3Bucket == nil { 442 invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) 443 } 444 if invalidParams.Len() > 0 { 445 return invalidParams 446 } else { 447 return nil 448 } 449} 450 451func validateOpDescribeEntitiesDetectionV2JobInput(v *DescribeEntitiesDetectionV2JobInput) error { 452 if v == nil { 453 return nil 454 } 455 invalidParams := smithy.InvalidParamsError{Context: "DescribeEntitiesDetectionV2JobInput"} 456 if v.JobId == nil { 457 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 458 } 459 if invalidParams.Len() > 0 { 460 return invalidParams 461 } else { 462 return nil 463 } 464} 465 466func validateOpDescribeICD10CMInferenceJobInput(v *DescribeICD10CMInferenceJobInput) error { 467 if v == nil { 468 return nil 469 } 470 invalidParams := smithy.InvalidParamsError{Context: "DescribeICD10CMInferenceJobInput"} 471 if v.JobId == nil { 472 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 473 } 474 if invalidParams.Len() > 0 { 475 return invalidParams 476 } else { 477 return nil 478 } 479} 480 481func validateOpDescribePHIDetectionJobInput(v *DescribePHIDetectionJobInput) error { 482 if v == nil { 483 return nil 484 } 485 invalidParams := smithy.InvalidParamsError{Context: "DescribePHIDetectionJobInput"} 486 if v.JobId == nil { 487 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 488 } 489 if invalidParams.Len() > 0 { 490 return invalidParams 491 } else { 492 return nil 493 } 494} 495 496func validateOpDescribeRxNormInferenceJobInput(v *DescribeRxNormInferenceJobInput) error { 497 if v == nil { 498 return nil 499 } 500 invalidParams := smithy.InvalidParamsError{Context: "DescribeRxNormInferenceJobInput"} 501 if v.JobId == nil { 502 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 503 } 504 if invalidParams.Len() > 0 { 505 return invalidParams 506 } else { 507 return nil 508 } 509} 510 511func validateOpDetectEntitiesInput(v *DetectEntitiesInput) error { 512 if v == nil { 513 return nil 514 } 515 invalidParams := smithy.InvalidParamsError{Context: "DetectEntitiesInput"} 516 if v.Text == nil { 517 invalidParams.Add(smithy.NewErrParamRequired("Text")) 518 } 519 if invalidParams.Len() > 0 { 520 return invalidParams 521 } else { 522 return nil 523 } 524} 525 526func validateOpDetectEntitiesV2Input(v *DetectEntitiesV2Input) error { 527 if v == nil { 528 return nil 529 } 530 invalidParams := smithy.InvalidParamsError{Context: "DetectEntitiesV2Input"} 531 if v.Text == nil { 532 invalidParams.Add(smithy.NewErrParamRequired("Text")) 533 } 534 if invalidParams.Len() > 0 { 535 return invalidParams 536 } else { 537 return nil 538 } 539} 540 541func validateOpDetectPHIInput(v *DetectPHIInput) error { 542 if v == nil { 543 return nil 544 } 545 invalidParams := smithy.InvalidParamsError{Context: "DetectPHIInput"} 546 if v.Text == nil { 547 invalidParams.Add(smithy.NewErrParamRequired("Text")) 548 } 549 if invalidParams.Len() > 0 { 550 return invalidParams 551 } else { 552 return nil 553 } 554} 555 556func validateOpInferICD10CMInput(v *InferICD10CMInput) error { 557 if v == nil { 558 return nil 559 } 560 invalidParams := smithy.InvalidParamsError{Context: "InferICD10CMInput"} 561 if v.Text == nil { 562 invalidParams.Add(smithy.NewErrParamRequired("Text")) 563 } 564 if invalidParams.Len() > 0 { 565 return invalidParams 566 } else { 567 return nil 568 } 569} 570 571func validateOpInferRxNormInput(v *InferRxNormInput) error { 572 if v == nil { 573 return nil 574 } 575 invalidParams := smithy.InvalidParamsError{Context: "InferRxNormInput"} 576 if v.Text == nil { 577 invalidParams.Add(smithy.NewErrParamRequired("Text")) 578 } 579 if invalidParams.Len() > 0 { 580 return invalidParams 581 } else { 582 return nil 583 } 584} 585 586func validateOpStartEntitiesDetectionV2JobInput(v *StartEntitiesDetectionV2JobInput) error { 587 if v == nil { 588 return nil 589 } 590 invalidParams := smithy.InvalidParamsError{Context: "StartEntitiesDetectionV2JobInput"} 591 if v.InputDataConfig == nil { 592 invalidParams.Add(smithy.NewErrParamRequired("InputDataConfig")) 593 } else if v.InputDataConfig != nil { 594 if err := validateInputDataConfig(v.InputDataConfig); err != nil { 595 invalidParams.AddNested("InputDataConfig", err.(smithy.InvalidParamsError)) 596 } 597 } 598 if v.OutputDataConfig == nil { 599 invalidParams.Add(smithy.NewErrParamRequired("OutputDataConfig")) 600 } else if v.OutputDataConfig != nil { 601 if err := validateOutputDataConfig(v.OutputDataConfig); err != nil { 602 invalidParams.AddNested("OutputDataConfig", err.(smithy.InvalidParamsError)) 603 } 604 } 605 if v.DataAccessRoleArn == nil { 606 invalidParams.Add(smithy.NewErrParamRequired("DataAccessRoleArn")) 607 } 608 if len(v.LanguageCode) == 0 { 609 invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) 610 } 611 if invalidParams.Len() > 0 { 612 return invalidParams 613 } else { 614 return nil 615 } 616} 617 618func validateOpStartICD10CMInferenceJobInput(v *StartICD10CMInferenceJobInput) error { 619 if v == nil { 620 return nil 621 } 622 invalidParams := smithy.InvalidParamsError{Context: "StartICD10CMInferenceJobInput"} 623 if v.InputDataConfig == nil { 624 invalidParams.Add(smithy.NewErrParamRequired("InputDataConfig")) 625 } else if v.InputDataConfig != nil { 626 if err := validateInputDataConfig(v.InputDataConfig); err != nil { 627 invalidParams.AddNested("InputDataConfig", err.(smithy.InvalidParamsError)) 628 } 629 } 630 if v.OutputDataConfig == nil { 631 invalidParams.Add(smithy.NewErrParamRequired("OutputDataConfig")) 632 } else if v.OutputDataConfig != nil { 633 if err := validateOutputDataConfig(v.OutputDataConfig); err != nil { 634 invalidParams.AddNested("OutputDataConfig", err.(smithy.InvalidParamsError)) 635 } 636 } 637 if v.DataAccessRoleArn == nil { 638 invalidParams.Add(smithy.NewErrParamRequired("DataAccessRoleArn")) 639 } 640 if len(v.LanguageCode) == 0 { 641 invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) 642 } 643 if invalidParams.Len() > 0 { 644 return invalidParams 645 } else { 646 return nil 647 } 648} 649 650func validateOpStartPHIDetectionJobInput(v *StartPHIDetectionJobInput) error { 651 if v == nil { 652 return nil 653 } 654 invalidParams := smithy.InvalidParamsError{Context: "StartPHIDetectionJobInput"} 655 if v.InputDataConfig == nil { 656 invalidParams.Add(smithy.NewErrParamRequired("InputDataConfig")) 657 } else if v.InputDataConfig != nil { 658 if err := validateInputDataConfig(v.InputDataConfig); err != nil { 659 invalidParams.AddNested("InputDataConfig", err.(smithy.InvalidParamsError)) 660 } 661 } 662 if v.OutputDataConfig == nil { 663 invalidParams.Add(smithy.NewErrParamRequired("OutputDataConfig")) 664 } else if v.OutputDataConfig != nil { 665 if err := validateOutputDataConfig(v.OutputDataConfig); err != nil { 666 invalidParams.AddNested("OutputDataConfig", err.(smithy.InvalidParamsError)) 667 } 668 } 669 if v.DataAccessRoleArn == nil { 670 invalidParams.Add(smithy.NewErrParamRequired("DataAccessRoleArn")) 671 } 672 if len(v.LanguageCode) == 0 { 673 invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) 674 } 675 if invalidParams.Len() > 0 { 676 return invalidParams 677 } else { 678 return nil 679 } 680} 681 682func validateOpStartRxNormInferenceJobInput(v *StartRxNormInferenceJobInput) error { 683 if v == nil { 684 return nil 685 } 686 invalidParams := smithy.InvalidParamsError{Context: "StartRxNormInferenceJobInput"} 687 if v.InputDataConfig == nil { 688 invalidParams.Add(smithy.NewErrParamRequired("InputDataConfig")) 689 } else if v.InputDataConfig != nil { 690 if err := validateInputDataConfig(v.InputDataConfig); err != nil { 691 invalidParams.AddNested("InputDataConfig", err.(smithy.InvalidParamsError)) 692 } 693 } 694 if v.OutputDataConfig == nil { 695 invalidParams.Add(smithy.NewErrParamRequired("OutputDataConfig")) 696 } else if v.OutputDataConfig != nil { 697 if err := validateOutputDataConfig(v.OutputDataConfig); err != nil { 698 invalidParams.AddNested("OutputDataConfig", err.(smithy.InvalidParamsError)) 699 } 700 } 701 if v.DataAccessRoleArn == nil { 702 invalidParams.Add(smithy.NewErrParamRequired("DataAccessRoleArn")) 703 } 704 if len(v.LanguageCode) == 0 { 705 invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) 706 } 707 if invalidParams.Len() > 0 { 708 return invalidParams 709 } else { 710 return nil 711 } 712} 713 714func validateOpStopEntitiesDetectionV2JobInput(v *StopEntitiesDetectionV2JobInput) error { 715 if v == nil { 716 return nil 717 } 718 invalidParams := smithy.InvalidParamsError{Context: "StopEntitiesDetectionV2JobInput"} 719 if v.JobId == nil { 720 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 721 } 722 if invalidParams.Len() > 0 { 723 return invalidParams 724 } else { 725 return nil 726 } 727} 728 729func validateOpStopICD10CMInferenceJobInput(v *StopICD10CMInferenceJobInput) error { 730 if v == nil { 731 return nil 732 } 733 invalidParams := smithy.InvalidParamsError{Context: "StopICD10CMInferenceJobInput"} 734 if v.JobId == nil { 735 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 736 } 737 if invalidParams.Len() > 0 { 738 return invalidParams 739 } else { 740 return nil 741 } 742} 743 744func validateOpStopPHIDetectionJobInput(v *StopPHIDetectionJobInput) error { 745 if v == nil { 746 return nil 747 } 748 invalidParams := smithy.InvalidParamsError{Context: "StopPHIDetectionJobInput"} 749 if v.JobId == nil { 750 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 751 } 752 if invalidParams.Len() > 0 { 753 return invalidParams 754 } else { 755 return nil 756 } 757} 758 759func validateOpStopRxNormInferenceJobInput(v *StopRxNormInferenceJobInput) error { 760 if v == nil { 761 return nil 762 } 763 invalidParams := smithy.InvalidParamsError{Context: "StopRxNormInferenceJobInput"} 764 if v.JobId == nil { 765 invalidParams.Add(smithy.NewErrParamRequired("JobId")) 766 } 767 if invalidParams.Len() > 0 { 768 return invalidParams 769 } else { 770 return nil 771 } 772} 773