github.com/aavshr/aws-sdk-go@v1.41.3/service/lookoutforvision/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package lookoutforvision 4 5 import ( 6 "fmt" 7 "io" 8 "time" 9 10 "github.com/aavshr/aws-sdk-go/aws" 11 "github.com/aavshr/aws-sdk-go/aws/awsutil" 12 "github.com/aavshr/aws-sdk-go/aws/request" 13 "github.com/aavshr/aws-sdk-go/private/protocol" 14 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 15 ) 16 17 const opCreateDataset = "CreateDataset" 18 19 // CreateDatasetRequest generates a "aws/request.Request" representing the 20 // client's request for the CreateDataset operation. The "output" return 21 // value will be populated with the request's response once the request completes 22 // successfully. 23 // 24 // Use "Send" method on the returned Request to send the API call to the service. 25 // the "output" return value is not valid until after Send returns without error. 26 // 27 // See CreateDataset for more information on using the CreateDataset 28 // API call, and error handling. 29 // 30 // This method is useful when you want to inject custom logic or configuration 31 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 32 // 33 // 34 // // Example sending a request using the CreateDatasetRequest method. 35 // req, resp := client.CreateDatasetRequest(params) 36 // 37 // err := req.Send() 38 // if err == nil { // resp is now filled 39 // fmt.Println(resp) 40 // } 41 // 42 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateDataset 43 func (c *LookoutForVision) CreateDatasetRequest(input *CreateDatasetInput) (req *request.Request, output *CreateDatasetOutput) { 44 op := &request.Operation{ 45 Name: opCreateDataset, 46 HTTPMethod: "POST", 47 HTTPPath: "/2020-11-20/projects/{projectName}/datasets", 48 } 49 50 if input == nil { 51 input = &CreateDatasetInput{} 52 } 53 54 output = &CreateDatasetOutput{} 55 req = c.newRequest(op, input, output) 56 return 57 } 58 59 // CreateDataset API operation for Amazon Lookout for Vision. 60 // 61 // Creates a new dataset in an Amazon Lookout for Vision project. CreateDataset 62 // can create a training or a test dataset from a valid dataset source (DatasetSource). 63 // 64 // If you want a single dataset project, specify train for the value of DatasetType. 65 // 66 // To have a project with separate training and test datasets, call CreateDataset 67 // twice. On the first call, specify train for the value of DatasetType. On 68 // the second call, specify test for the value of DatasetType. 69 // 70 // This operation requires permissions to perform the lookoutvision:CreateDataset 71 // operation. 72 // 73 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 74 // with awserr.Error's Code and Message methods to get detailed information about 75 // the error. 76 // 77 // See the AWS API reference guide for Amazon Lookout for Vision's 78 // API operation CreateDataset for usage and error information. 79 // 80 // Returned Error Types: 81 // * AccessDeniedException 82 // You are not authorized to perform the action. 83 // 84 // * InternalServerException 85 // Amazon Lookout for Vision experienced a service issue. Try your call again. 86 // 87 // * ValidationException 88 // An input validation error occured. For example, invalid characters in a project 89 // name, or if a pagination token is invalid. 90 // 91 // * ConflictException 92 // The update or deletion of a resource caused an inconsistent state. 93 // 94 // * ResourceNotFoundException 95 // The resource could not be found. 96 // 97 // * ThrottlingException 98 // Amazon Lookout for Vision is temporarily unable to process the request. Try 99 // your call again. 100 // 101 // * ServiceQuotaExceededException 102 // A service quota was exceeded the allowed limit. For more information, see 103 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 104 // Guide. 105 // 106 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateDataset 107 func (c *LookoutForVision) CreateDataset(input *CreateDatasetInput) (*CreateDatasetOutput, error) { 108 req, out := c.CreateDatasetRequest(input) 109 return out, req.Send() 110 } 111 112 // CreateDatasetWithContext is the same as CreateDataset with the addition of 113 // the ability to pass a context and additional request options. 114 // 115 // See CreateDataset for details on how to use this API operation. 116 // 117 // The context must be non-nil and will be used for request cancellation. If 118 // the context is nil a panic will occur. In the future the SDK may create 119 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 120 // for more information on using Contexts. 121 func (c *LookoutForVision) CreateDatasetWithContext(ctx aws.Context, input *CreateDatasetInput, opts ...request.Option) (*CreateDatasetOutput, error) { 122 req, out := c.CreateDatasetRequest(input) 123 req.SetContext(ctx) 124 req.ApplyOptions(opts...) 125 return out, req.Send() 126 } 127 128 const opCreateModel = "CreateModel" 129 130 // CreateModelRequest generates a "aws/request.Request" representing the 131 // client's request for the CreateModel operation. The "output" return 132 // value will be populated with the request's response once the request completes 133 // successfully. 134 // 135 // Use "Send" method on the returned Request to send the API call to the service. 136 // the "output" return value is not valid until after Send returns without error. 137 // 138 // See CreateModel for more information on using the CreateModel 139 // API call, and error handling. 140 // 141 // This method is useful when you want to inject custom logic or configuration 142 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 143 // 144 // 145 // // Example sending a request using the CreateModelRequest method. 146 // req, resp := client.CreateModelRequest(params) 147 // 148 // err := req.Send() 149 // if err == nil { // resp is now filled 150 // fmt.Println(resp) 151 // } 152 // 153 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateModel 154 func (c *LookoutForVision) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *CreateModelOutput) { 155 op := &request.Operation{ 156 Name: opCreateModel, 157 HTTPMethod: "POST", 158 HTTPPath: "/2020-11-20/projects/{projectName}/models", 159 } 160 161 if input == nil { 162 input = &CreateModelInput{} 163 } 164 165 output = &CreateModelOutput{} 166 req = c.newRequest(op, input, output) 167 return 168 } 169 170 // CreateModel API operation for Amazon Lookout for Vision. 171 // 172 // Creates a new version of a model within an an Amazon Lookout for Vision project. 173 // CreateModel is an asynchronous operation in which Amazon Lookout for Vision 174 // trains, tests, and evaluates a new version of a model. 175 // 176 // To get the current status, check the Status field returned in the response 177 // from DescribeModel. 178 // 179 // If the project has a single dataset, Amazon Lookout for Vision internally 180 // splits the dataset to create a training and a test dataset. If the project 181 // has a training and a test dataset, Lookout for Vision uses the respective 182 // datasets to train and test the model. 183 // 184 // After training completes, the evaluation metrics are stored at the location 185 // specified in OutputConfig. 186 // 187 // This operation requires permissions to perform the lookoutvision:CreateModel 188 // operation. If you want to tag your model, you also require permission to 189 // the lookoutvision:TagResource operation. 190 // 191 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 192 // with awserr.Error's Code and Message methods to get detailed information about 193 // the error. 194 // 195 // See the AWS API reference guide for Amazon Lookout for Vision's 196 // API operation CreateModel for usage and error information. 197 // 198 // Returned Error Types: 199 // * AccessDeniedException 200 // You are not authorized to perform the action. 201 // 202 // * InternalServerException 203 // Amazon Lookout for Vision experienced a service issue. Try your call again. 204 // 205 // * ValidationException 206 // An input validation error occured. For example, invalid characters in a project 207 // name, or if a pagination token is invalid. 208 // 209 // * ConflictException 210 // The update or deletion of a resource caused an inconsistent state. 211 // 212 // * ResourceNotFoundException 213 // The resource could not be found. 214 // 215 // * ThrottlingException 216 // Amazon Lookout for Vision is temporarily unable to process the request. Try 217 // your call again. 218 // 219 // * ServiceQuotaExceededException 220 // A service quota was exceeded the allowed limit. For more information, see 221 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 222 // Guide. 223 // 224 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateModel 225 func (c *LookoutForVision) CreateModel(input *CreateModelInput) (*CreateModelOutput, error) { 226 req, out := c.CreateModelRequest(input) 227 return out, req.Send() 228 } 229 230 // CreateModelWithContext is the same as CreateModel with the addition of 231 // the ability to pass a context and additional request options. 232 // 233 // See CreateModel for details on how to use this API operation. 234 // 235 // The context must be non-nil and will be used for request cancellation. If 236 // the context is nil a panic will occur. In the future the SDK may create 237 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 238 // for more information on using Contexts. 239 func (c *LookoutForVision) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*CreateModelOutput, error) { 240 req, out := c.CreateModelRequest(input) 241 req.SetContext(ctx) 242 req.ApplyOptions(opts...) 243 return out, req.Send() 244 } 245 246 const opCreateProject = "CreateProject" 247 248 // CreateProjectRequest generates a "aws/request.Request" representing the 249 // client's request for the CreateProject operation. The "output" return 250 // value will be populated with the request's response once the request completes 251 // successfully. 252 // 253 // Use "Send" method on the returned Request to send the API call to the service. 254 // the "output" return value is not valid until after Send returns without error. 255 // 256 // See CreateProject for more information on using the CreateProject 257 // API call, and error handling. 258 // 259 // This method is useful when you want to inject custom logic or configuration 260 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 261 // 262 // 263 // // Example sending a request using the CreateProjectRequest method. 264 // req, resp := client.CreateProjectRequest(params) 265 // 266 // err := req.Send() 267 // if err == nil { // resp is now filled 268 // fmt.Println(resp) 269 // } 270 // 271 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateProject 272 func (c *LookoutForVision) CreateProjectRequest(input *CreateProjectInput) (req *request.Request, output *CreateProjectOutput) { 273 op := &request.Operation{ 274 Name: opCreateProject, 275 HTTPMethod: "POST", 276 HTTPPath: "/2020-11-20/projects", 277 } 278 279 if input == nil { 280 input = &CreateProjectInput{} 281 } 282 283 output = &CreateProjectOutput{} 284 req = c.newRequest(op, input, output) 285 return 286 } 287 288 // CreateProject API operation for Amazon Lookout for Vision. 289 // 290 // Creates an empty Amazon Lookout for Vision project. After you create the 291 // project, add a dataset by calling CreateDataset. 292 // 293 // This operation requires permissions to perform the lookoutvision:CreateProject 294 // operation. 295 // 296 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 297 // with awserr.Error's Code and Message methods to get detailed information about 298 // the error. 299 // 300 // See the AWS API reference guide for Amazon Lookout for Vision's 301 // API operation CreateProject for usage and error information. 302 // 303 // Returned Error Types: 304 // * AccessDeniedException 305 // You are not authorized to perform the action. 306 // 307 // * InternalServerException 308 // Amazon Lookout for Vision experienced a service issue. Try your call again. 309 // 310 // * ValidationException 311 // An input validation error occured. For example, invalid characters in a project 312 // name, or if a pagination token is invalid. 313 // 314 // * ConflictException 315 // The update or deletion of a resource caused an inconsistent state. 316 // 317 // * ResourceNotFoundException 318 // The resource could not be found. 319 // 320 // * ThrottlingException 321 // Amazon Lookout for Vision is temporarily unable to process the request. Try 322 // your call again. 323 // 324 // * ServiceQuotaExceededException 325 // A service quota was exceeded the allowed limit. For more information, see 326 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 327 // Guide. 328 // 329 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/CreateProject 330 func (c *LookoutForVision) CreateProject(input *CreateProjectInput) (*CreateProjectOutput, error) { 331 req, out := c.CreateProjectRequest(input) 332 return out, req.Send() 333 } 334 335 // CreateProjectWithContext is the same as CreateProject with the addition of 336 // the ability to pass a context and additional request options. 337 // 338 // See CreateProject for details on how to use this API operation. 339 // 340 // The context must be non-nil and will be used for request cancellation. If 341 // the context is nil a panic will occur. In the future the SDK may create 342 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 343 // for more information on using Contexts. 344 func (c *LookoutForVision) CreateProjectWithContext(ctx aws.Context, input *CreateProjectInput, opts ...request.Option) (*CreateProjectOutput, error) { 345 req, out := c.CreateProjectRequest(input) 346 req.SetContext(ctx) 347 req.ApplyOptions(opts...) 348 return out, req.Send() 349 } 350 351 const opDeleteDataset = "DeleteDataset" 352 353 // DeleteDatasetRequest generates a "aws/request.Request" representing the 354 // client's request for the DeleteDataset operation. The "output" return 355 // value will be populated with the request's response once the request completes 356 // successfully. 357 // 358 // Use "Send" method on the returned Request to send the API call to the service. 359 // the "output" return value is not valid until after Send returns without error. 360 // 361 // See DeleteDataset for more information on using the DeleteDataset 362 // API call, and error handling. 363 // 364 // This method is useful when you want to inject custom logic or configuration 365 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 366 // 367 // 368 // // Example sending a request using the DeleteDatasetRequest method. 369 // req, resp := client.DeleteDatasetRequest(params) 370 // 371 // err := req.Send() 372 // if err == nil { // resp is now filled 373 // fmt.Println(resp) 374 // } 375 // 376 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteDataset 377 func (c *LookoutForVision) DeleteDatasetRequest(input *DeleteDatasetInput) (req *request.Request, output *DeleteDatasetOutput) { 378 op := &request.Operation{ 379 Name: opDeleteDataset, 380 HTTPMethod: "DELETE", 381 HTTPPath: "/2020-11-20/projects/{projectName}/datasets/{datasetType}", 382 } 383 384 if input == nil { 385 input = &DeleteDatasetInput{} 386 } 387 388 output = &DeleteDatasetOutput{} 389 req = c.newRequest(op, input, output) 390 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 391 return 392 } 393 394 // DeleteDataset API operation for Amazon Lookout for Vision. 395 // 396 // Deletes an existing Amazon Lookout for Vision dataset. 397 // 398 // If your the project has a single dataset, you must create a new dataset before 399 // you can create a model. 400 // 401 // If you project has a training dataset and a test dataset consider the following. 402 // 403 // * If you delete the test dataset, your project reverts to a single dataset 404 // project. If you then train the model, Amazon Lookout for Vision internally 405 // splits the remaining dataset into a training and test dataset. 406 // 407 // * If you delete the training dataset, you must create a training dataset 408 // before you can create a model. 409 // 410 // This operation requires permissions to perform the lookoutvision:DeleteDataset 411 // operation. 412 // 413 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 414 // with awserr.Error's Code and Message methods to get detailed information about 415 // the error. 416 // 417 // See the AWS API reference guide for Amazon Lookout for Vision's 418 // API operation DeleteDataset for usage and error information. 419 // 420 // Returned Error Types: 421 // * AccessDeniedException 422 // You are not authorized to perform the action. 423 // 424 // * InternalServerException 425 // Amazon Lookout for Vision experienced a service issue. Try your call again. 426 // 427 // * ValidationException 428 // An input validation error occured. For example, invalid characters in a project 429 // name, or if a pagination token is invalid. 430 // 431 // * ConflictException 432 // The update or deletion of a resource caused an inconsistent state. 433 // 434 // * ResourceNotFoundException 435 // The resource could not be found. 436 // 437 // * ThrottlingException 438 // Amazon Lookout for Vision is temporarily unable to process the request. Try 439 // your call again. 440 // 441 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteDataset 442 func (c *LookoutForVision) DeleteDataset(input *DeleteDatasetInput) (*DeleteDatasetOutput, error) { 443 req, out := c.DeleteDatasetRequest(input) 444 return out, req.Send() 445 } 446 447 // DeleteDatasetWithContext is the same as DeleteDataset with the addition of 448 // the ability to pass a context and additional request options. 449 // 450 // See DeleteDataset for details on how to use this API operation. 451 // 452 // The context must be non-nil and will be used for request cancellation. If 453 // the context is nil a panic will occur. In the future the SDK may create 454 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 455 // for more information on using Contexts. 456 func (c *LookoutForVision) DeleteDatasetWithContext(ctx aws.Context, input *DeleteDatasetInput, opts ...request.Option) (*DeleteDatasetOutput, error) { 457 req, out := c.DeleteDatasetRequest(input) 458 req.SetContext(ctx) 459 req.ApplyOptions(opts...) 460 return out, req.Send() 461 } 462 463 const opDeleteModel = "DeleteModel" 464 465 // DeleteModelRequest generates a "aws/request.Request" representing the 466 // client's request for the DeleteModel operation. The "output" return 467 // value will be populated with the request's response once the request completes 468 // successfully. 469 // 470 // Use "Send" method on the returned Request to send the API call to the service. 471 // the "output" return value is not valid until after Send returns without error. 472 // 473 // See DeleteModel for more information on using the DeleteModel 474 // API call, and error handling. 475 // 476 // This method is useful when you want to inject custom logic or configuration 477 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 478 // 479 // 480 // // Example sending a request using the DeleteModelRequest method. 481 // req, resp := client.DeleteModelRequest(params) 482 // 483 // err := req.Send() 484 // if err == nil { // resp is now filled 485 // fmt.Println(resp) 486 // } 487 // 488 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteModel 489 func (c *LookoutForVision) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { 490 op := &request.Operation{ 491 Name: opDeleteModel, 492 HTTPMethod: "DELETE", 493 HTTPPath: "/2020-11-20/projects/{projectName}/models/{modelVersion}", 494 } 495 496 if input == nil { 497 input = &DeleteModelInput{} 498 } 499 500 output = &DeleteModelOutput{} 501 req = c.newRequest(op, input, output) 502 return 503 } 504 505 // DeleteModel API operation for Amazon Lookout for Vision. 506 // 507 // Deletes an Amazon Lookout for Vision model. You can't delete a running model. 508 // To stop a running model, use the StopModel operation. 509 // 510 // It might take a few seconds to delete a model. To determine if a model has 511 // been deleted, call ListProjects and check if the version of the model (ModelVersion) 512 // is in the Models array. 513 // 514 // This operation requires permissions to perform the lookoutvision:DeleteModel 515 // operation. 516 // 517 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 518 // with awserr.Error's Code and Message methods to get detailed information about 519 // the error. 520 // 521 // See the AWS API reference guide for Amazon Lookout for Vision's 522 // API operation DeleteModel for usage and error information. 523 // 524 // Returned Error Types: 525 // * AccessDeniedException 526 // You are not authorized to perform the action. 527 // 528 // * InternalServerException 529 // Amazon Lookout for Vision experienced a service issue. Try your call again. 530 // 531 // * ValidationException 532 // An input validation error occured. For example, invalid characters in a project 533 // name, or if a pagination token is invalid. 534 // 535 // * ConflictException 536 // The update or deletion of a resource caused an inconsistent state. 537 // 538 // * ResourceNotFoundException 539 // The resource could not be found. 540 // 541 // * ThrottlingException 542 // Amazon Lookout for Vision is temporarily unable to process the request. Try 543 // your call again. 544 // 545 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteModel 546 func (c *LookoutForVision) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { 547 req, out := c.DeleteModelRequest(input) 548 return out, req.Send() 549 } 550 551 // DeleteModelWithContext is the same as DeleteModel with the addition of 552 // the ability to pass a context and additional request options. 553 // 554 // See DeleteModel for details on how to use this API operation. 555 // 556 // The context must be non-nil and will be used for request cancellation. If 557 // the context is nil a panic will occur. In the future the SDK may create 558 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 559 // for more information on using Contexts. 560 func (c *LookoutForVision) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { 561 req, out := c.DeleteModelRequest(input) 562 req.SetContext(ctx) 563 req.ApplyOptions(opts...) 564 return out, req.Send() 565 } 566 567 const opDeleteProject = "DeleteProject" 568 569 // DeleteProjectRequest generates a "aws/request.Request" representing the 570 // client's request for the DeleteProject operation. The "output" return 571 // value will be populated with the request's response once the request completes 572 // successfully. 573 // 574 // Use "Send" method on the returned Request to send the API call to the service. 575 // the "output" return value is not valid until after Send returns without error. 576 // 577 // See DeleteProject for more information on using the DeleteProject 578 // API call, and error handling. 579 // 580 // This method is useful when you want to inject custom logic or configuration 581 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 582 // 583 // 584 // // Example sending a request using the DeleteProjectRequest method. 585 // req, resp := client.DeleteProjectRequest(params) 586 // 587 // err := req.Send() 588 // if err == nil { // resp is now filled 589 // fmt.Println(resp) 590 // } 591 // 592 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteProject 593 func (c *LookoutForVision) DeleteProjectRequest(input *DeleteProjectInput) (req *request.Request, output *DeleteProjectOutput) { 594 op := &request.Operation{ 595 Name: opDeleteProject, 596 HTTPMethod: "DELETE", 597 HTTPPath: "/2020-11-20/projects/{projectName}", 598 } 599 600 if input == nil { 601 input = &DeleteProjectInput{} 602 } 603 604 output = &DeleteProjectOutput{} 605 req = c.newRequest(op, input, output) 606 return 607 } 608 609 // DeleteProject API operation for Amazon Lookout for Vision. 610 // 611 // Deletes an Amazon Lookout for Vision project. 612 // 613 // To delete a project, you must first delete each version of the model associated 614 // with the project. To delete a model use the DeleteModel operation. 615 // 616 // You also have to delete the dataset(s) associated with the model. For more 617 // information, see DeleteDataset. The images referenced by the training and 618 // test datasets aren't deleted. 619 // 620 // This operation requires permissions to perform the lookoutvision:DeleteProject 621 // operation. 622 // 623 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 624 // with awserr.Error's Code and Message methods to get detailed information about 625 // the error. 626 // 627 // See the AWS API reference guide for Amazon Lookout for Vision's 628 // API operation DeleteProject for usage and error information. 629 // 630 // Returned Error Types: 631 // * AccessDeniedException 632 // You are not authorized to perform the action. 633 // 634 // * InternalServerException 635 // Amazon Lookout for Vision experienced a service issue. Try your call again. 636 // 637 // * ValidationException 638 // An input validation error occured. For example, invalid characters in a project 639 // name, or if a pagination token is invalid. 640 // 641 // * ConflictException 642 // The update or deletion of a resource caused an inconsistent state. 643 // 644 // * ResourceNotFoundException 645 // The resource could not be found. 646 // 647 // * ThrottlingException 648 // Amazon Lookout for Vision is temporarily unable to process the request. Try 649 // your call again. 650 // 651 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DeleteProject 652 func (c *LookoutForVision) DeleteProject(input *DeleteProjectInput) (*DeleteProjectOutput, error) { 653 req, out := c.DeleteProjectRequest(input) 654 return out, req.Send() 655 } 656 657 // DeleteProjectWithContext is the same as DeleteProject with the addition of 658 // the ability to pass a context and additional request options. 659 // 660 // See DeleteProject for details on how to use this API operation. 661 // 662 // The context must be non-nil and will be used for request cancellation. If 663 // the context is nil a panic will occur. In the future the SDK may create 664 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 665 // for more information on using Contexts. 666 func (c *LookoutForVision) DeleteProjectWithContext(ctx aws.Context, input *DeleteProjectInput, opts ...request.Option) (*DeleteProjectOutput, error) { 667 req, out := c.DeleteProjectRequest(input) 668 req.SetContext(ctx) 669 req.ApplyOptions(opts...) 670 return out, req.Send() 671 } 672 673 const opDescribeDataset = "DescribeDataset" 674 675 // DescribeDatasetRequest generates a "aws/request.Request" representing the 676 // client's request for the DescribeDataset operation. The "output" return 677 // value will be populated with the request's response once the request completes 678 // successfully. 679 // 680 // Use "Send" method on the returned Request to send the API call to the service. 681 // the "output" return value is not valid until after Send returns without error. 682 // 683 // See DescribeDataset for more information on using the DescribeDataset 684 // API call, and error handling. 685 // 686 // This method is useful when you want to inject custom logic or configuration 687 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 688 // 689 // 690 // // Example sending a request using the DescribeDatasetRequest method. 691 // req, resp := client.DescribeDatasetRequest(params) 692 // 693 // err := req.Send() 694 // if err == nil { // resp is now filled 695 // fmt.Println(resp) 696 // } 697 // 698 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeDataset 699 func (c *LookoutForVision) DescribeDatasetRequest(input *DescribeDatasetInput) (req *request.Request, output *DescribeDatasetOutput) { 700 op := &request.Operation{ 701 Name: opDescribeDataset, 702 HTTPMethod: "GET", 703 HTTPPath: "/2020-11-20/projects/{projectName}/datasets/{datasetType}", 704 } 705 706 if input == nil { 707 input = &DescribeDatasetInput{} 708 } 709 710 output = &DescribeDatasetOutput{} 711 req = c.newRequest(op, input, output) 712 return 713 } 714 715 // DescribeDataset API operation for Amazon Lookout for Vision. 716 // 717 // Describe an Amazon Lookout for Vision dataset. 718 // 719 // This operation requires permissions to perform the lookoutvision:DescribeDataset 720 // operation. 721 // 722 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 723 // with awserr.Error's Code and Message methods to get detailed information about 724 // the error. 725 // 726 // See the AWS API reference guide for Amazon Lookout for Vision's 727 // API operation DescribeDataset for usage and error information. 728 // 729 // Returned Error Types: 730 // * AccessDeniedException 731 // You are not authorized to perform the action. 732 // 733 // * InternalServerException 734 // Amazon Lookout for Vision experienced a service issue. Try your call again. 735 // 736 // * ValidationException 737 // An input validation error occured. For example, invalid characters in a project 738 // name, or if a pagination token is invalid. 739 // 740 // * ConflictException 741 // The update or deletion of a resource caused an inconsistent state. 742 // 743 // * ResourceNotFoundException 744 // The resource could not be found. 745 // 746 // * ThrottlingException 747 // Amazon Lookout for Vision is temporarily unable to process the request. Try 748 // your call again. 749 // 750 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeDataset 751 func (c *LookoutForVision) DescribeDataset(input *DescribeDatasetInput) (*DescribeDatasetOutput, error) { 752 req, out := c.DescribeDatasetRequest(input) 753 return out, req.Send() 754 } 755 756 // DescribeDatasetWithContext is the same as DescribeDataset with the addition of 757 // the ability to pass a context and additional request options. 758 // 759 // See DescribeDataset for details on how to use this API operation. 760 // 761 // The context must be non-nil and will be used for request cancellation. If 762 // the context is nil a panic will occur. In the future the SDK may create 763 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 764 // for more information on using Contexts. 765 func (c *LookoutForVision) DescribeDatasetWithContext(ctx aws.Context, input *DescribeDatasetInput, opts ...request.Option) (*DescribeDatasetOutput, error) { 766 req, out := c.DescribeDatasetRequest(input) 767 req.SetContext(ctx) 768 req.ApplyOptions(opts...) 769 return out, req.Send() 770 } 771 772 const opDescribeModel = "DescribeModel" 773 774 // DescribeModelRequest generates a "aws/request.Request" representing the 775 // client's request for the DescribeModel operation. The "output" return 776 // value will be populated with the request's response once the request completes 777 // successfully. 778 // 779 // Use "Send" method on the returned Request to send the API call to the service. 780 // the "output" return value is not valid until after Send returns without error. 781 // 782 // See DescribeModel for more information on using the DescribeModel 783 // API call, and error handling. 784 // 785 // This method is useful when you want to inject custom logic or configuration 786 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 787 // 788 // 789 // // Example sending a request using the DescribeModelRequest method. 790 // req, resp := client.DescribeModelRequest(params) 791 // 792 // err := req.Send() 793 // if err == nil { // resp is now filled 794 // fmt.Println(resp) 795 // } 796 // 797 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeModel 798 func (c *LookoutForVision) DescribeModelRequest(input *DescribeModelInput) (req *request.Request, output *DescribeModelOutput) { 799 op := &request.Operation{ 800 Name: opDescribeModel, 801 HTTPMethod: "GET", 802 HTTPPath: "/2020-11-20/projects/{projectName}/models/{modelVersion}", 803 } 804 805 if input == nil { 806 input = &DescribeModelInput{} 807 } 808 809 output = &DescribeModelOutput{} 810 req = c.newRequest(op, input, output) 811 return 812 } 813 814 // DescribeModel API operation for Amazon Lookout for Vision. 815 // 816 // Describes a version of an Amazon Lookout for Vision model. 817 // 818 // This operation requires permissions to perform the lookoutvision:DescribeModel 819 // operation. 820 // 821 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 822 // with awserr.Error's Code and Message methods to get detailed information about 823 // the error. 824 // 825 // See the AWS API reference guide for Amazon Lookout for Vision's 826 // API operation DescribeModel for usage and error information. 827 // 828 // Returned Error Types: 829 // * AccessDeniedException 830 // You are not authorized to perform the action. 831 // 832 // * InternalServerException 833 // Amazon Lookout for Vision experienced a service issue. Try your call again. 834 // 835 // * ValidationException 836 // An input validation error occured. For example, invalid characters in a project 837 // name, or if a pagination token is invalid. 838 // 839 // * ConflictException 840 // The update or deletion of a resource caused an inconsistent state. 841 // 842 // * ResourceNotFoundException 843 // The resource could not be found. 844 // 845 // * ThrottlingException 846 // Amazon Lookout for Vision is temporarily unable to process the request. Try 847 // your call again. 848 // 849 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeModel 850 func (c *LookoutForVision) DescribeModel(input *DescribeModelInput) (*DescribeModelOutput, error) { 851 req, out := c.DescribeModelRequest(input) 852 return out, req.Send() 853 } 854 855 // DescribeModelWithContext is the same as DescribeModel with the addition of 856 // the ability to pass a context and additional request options. 857 // 858 // See DescribeModel for details on how to use this API operation. 859 // 860 // The context must be non-nil and will be used for request cancellation. If 861 // the context is nil a panic will occur. In the future the SDK may create 862 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 863 // for more information on using Contexts. 864 func (c *LookoutForVision) DescribeModelWithContext(ctx aws.Context, input *DescribeModelInput, opts ...request.Option) (*DescribeModelOutput, error) { 865 req, out := c.DescribeModelRequest(input) 866 req.SetContext(ctx) 867 req.ApplyOptions(opts...) 868 return out, req.Send() 869 } 870 871 const opDescribeProject = "DescribeProject" 872 873 // DescribeProjectRequest generates a "aws/request.Request" representing the 874 // client's request for the DescribeProject operation. The "output" return 875 // value will be populated with the request's response once the request completes 876 // successfully. 877 // 878 // Use "Send" method on the returned Request to send the API call to the service. 879 // the "output" return value is not valid until after Send returns without error. 880 // 881 // See DescribeProject for more information on using the DescribeProject 882 // API call, and error handling. 883 // 884 // This method is useful when you want to inject custom logic or configuration 885 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 886 // 887 // 888 // // Example sending a request using the DescribeProjectRequest method. 889 // req, resp := client.DescribeProjectRequest(params) 890 // 891 // err := req.Send() 892 // if err == nil { // resp is now filled 893 // fmt.Println(resp) 894 // } 895 // 896 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeProject 897 func (c *LookoutForVision) DescribeProjectRequest(input *DescribeProjectInput) (req *request.Request, output *DescribeProjectOutput) { 898 op := &request.Operation{ 899 Name: opDescribeProject, 900 HTTPMethod: "GET", 901 HTTPPath: "/2020-11-20/projects/{projectName}", 902 } 903 904 if input == nil { 905 input = &DescribeProjectInput{} 906 } 907 908 output = &DescribeProjectOutput{} 909 req = c.newRequest(op, input, output) 910 return 911 } 912 913 // DescribeProject API operation for Amazon Lookout for Vision. 914 // 915 // Describes an Amazon Lookout for Vision project. 916 // 917 // This operation requires permissions to perform the lookoutvision:DescribeProject 918 // operation. 919 // 920 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 921 // with awserr.Error's Code and Message methods to get detailed information about 922 // the error. 923 // 924 // See the AWS API reference guide for Amazon Lookout for Vision's 925 // API operation DescribeProject for usage and error information. 926 // 927 // Returned Error Types: 928 // * AccessDeniedException 929 // You are not authorized to perform the action. 930 // 931 // * InternalServerException 932 // Amazon Lookout for Vision experienced a service issue. Try your call again. 933 // 934 // * ValidationException 935 // An input validation error occured. For example, invalid characters in a project 936 // name, or if a pagination token is invalid. 937 // 938 // * ConflictException 939 // The update or deletion of a resource caused an inconsistent state. 940 // 941 // * ResourceNotFoundException 942 // The resource could not be found. 943 // 944 // * ThrottlingException 945 // Amazon Lookout for Vision is temporarily unable to process the request. Try 946 // your call again. 947 // 948 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DescribeProject 949 func (c *LookoutForVision) DescribeProject(input *DescribeProjectInput) (*DescribeProjectOutput, error) { 950 req, out := c.DescribeProjectRequest(input) 951 return out, req.Send() 952 } 953 954 // DescribeProjectWithContext is the same as DescribeProject with the addition of 955 // the ability to pass a context and additional request options. 956 // 957 // See DescribeProject for details on how to use this API operation. 958 // 959 // The context must be non-nil and will be used for request cancellation. If 960 // the context is nil a panic will occur. In the future the SDK may create 961 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 962 // for more information on using Contexts. 963 func (c *LookoutForVision) DescribeProjectWithContext(ctx aws.Context, input *DescribeProjectInput, opts ...request.Option) (*DescribeProjectOutput, error) { 964 req, out := c.DescribeProjectRequest(input) 965 req.SetContext(ctx) 966 req.ApplyOptions(opts...) 967 return out, req.Send() 968 } 969 970 const opDetectAnomalies = "DetectAnomalies" 971 972 // DetectAnomaliesRequest generates a "aws/request.Request" representing the 973 // client's request for the DetectAnomalies operation. The "output" return 974 // value will be populated with the request's response once the request completes 975 // successfully. 976 // 977 // Use "Send" method on the returned Request to send the API call to the service. 978 // the "output" return value is not valid until after Send returns without error. 979 // 980 // See DetectAnomalies for more information on using the DetectAnomalies 981 // API call, and error handling. 982 // 983 // This method is useful when you want to inject custom logic or configuration 984 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 985 // 986 // 987 // // Example sending a request using the DetectAnomaliesRequest method. 988 // req, resp := client.DetectAnomaliesRequest(params) 989 // 990 // err := req.Send() 991 // if err == nil { // resp is now filled 992 // fmt.Println(resp) 993 // } 994 // 995 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DetectAnomalies 996 func (c *LookoutForVision) DetectAnomaliesRequest(input *DetectAnomaliesInput) (req *request.Request, output *DetectAnomaliesOutput) { 997 op := &request.Operation{ 998 Name: opDetectAnomalies, 999 HTTPMethod: "POST", 1000 HTTPPath: "/2020-11-20/projects/{projectName}/models/{modelVersion}/detect", 1001 } 1002 1003 if input == nil { 1004 input = &DetectAnomaliesInput{} 1005 } 1006 1007 output = &DetectAnomaliesOutput{} 1008 req = c.newRequest(op, input, output) 1009 return 1010 } 1011 1012 // DetectAnomalies API operation for Amazon Lookout for Vision. 1013 // 1014 // Detects anomalies in an image that you supply. 1015 // 1016 // The response from DetectAnomalies includes a boolean prediction that the 1017 // image contains one or more anomalies and a confidence value for the prediction. 1018 // 1019 // Before calling DetectAnomalies, you must first start your model with the 1020 // StartModel operation. You are charged for the amount of time, in minutes, 1021 // that a model runs and for the number of anomaly detection units that your 1022 // model uses. If you are not using a model, use the StopModel operation to 1023 // stop your model. 1024 // 1025 // This operation requires permissions to perform the lookoutvision:DetectAnomalies 1026 // operation. 1027 // 1028 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1029 // with awserr.Error's Code and Message methods to get detailed information about 1030 // the error. 1031 // 1032 // See the AWS API reference guide for Amazon Lookout for Vision's 1033 // API operation DetectAnomalies for usage and error information. 1034 // 1035 // Returned Error Types: 1036 // * AccessDeniedException 1037 // You are not authorized to perform the action. 1038 // 1039 // * InternalServerException 1040 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1041 // 1042 // * ValidationException 1043 // An input validation error occured. For example, invalid characters in a project 1044 // name, or if a pagination token is invalid. 1045 // 1046 // * ConflictException 1047 // The update or deletion of a resource caused an inconsistent state. 1048 // 1049 // * ResourceNotFoundException 1050 // The resource could not be found. 1051 // 1052 // * ThrottlingException 1053 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1054 // your call again. 1055 // 1056 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/DetectAnomalies 1057 func (c *LookoutForVision) DetectAnomalies(input *DetectAnomaliesInput) (*DetectAnomaliesOutput, error) { 1058 req, out := c.DetectAnomaliesRequest(input) 1059 return out, req.Send() 1060 } 1061 1062 // DetectAnomaliesWithContext is the same as DetectAnomalies with the addition of 1063 // the ability to pass a context and additional request options. 1064 // 1065 // See DetectAnomalies for details on how to use this API operation. 1066 // 1067 // The context must be non-nil and will be used for request cancellation. If 1068 // the context is nil a panic will occur. In the future the SDK may create 1069 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1070 // for more information on using Contexts. 1071 func (c *LookoutForVision) DetectAnomaliesWithContext(ctx aws.Context, input *DetectAnomaliesInput, opts ...request.Option) (*DetectAnomaliesOutput, error) { 1072 req, out := c.DetectAnomaliesRequest(input) 1073 req.SetContext(ctx) 1074 req.ApplyOptions(opts...) 1075 return out, req.Send() 1076 } 1077 1078 const opListDatasetEntries = "ListDatasetEntries" 1079 1080 // ListDatasetEntriesRequest generates a "aws/request.Request" representing the 1081 // client's request for the ListDatasetEntries operation. The "output" return 1082 // value will be populated with the request's response once the request completes 1083 // successfully. 1084 // 1085 // Use "Send" method on the returned Request to send the API call to the service. 1086 // the "output" return value is not valid until after Send returns without error. 1087 // 1088 // See ListDatasetEntries for more information on using the ListDatasetEntries 1089 // API call, and error handling. 1090 // 1091 // This method is useful when you want to inject custom logic or configuration 1092 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1093 // 1094 // 1095 // // Example sending a request using the ListDatasetEntriesRequest method. 1096 // req, resp := client.ListDatasetEntriesRequest(params) 1097 // 1098 // err := req.Send() 1099 // if err == nil { // resp is now filled 1100 // fmt.Println(resp) 1101 // } 1102 // 1103 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListDatasetEntries 1104 func (c *LookoutForVision) ListDatasetEntriesRequest(input *ListDatasetEntriesInput) (req *request.Request, output *ListDatasetEntriesOutput) { 1105 op := &request.Operation{ 1106 Name: opListDatasetEntries, 1107 HTTPMethod: "GET", 1108 HTTPPath: "/2020-11-20/projects/{projectName}/datasets/{datasetType}/entries", 1109 Paginator: &request.Paginator{ 1110 InputTokens: []string{"NextToken"}, 1111 OutputTokens: []string{"NextToken"}, 1112 LimitToken: "MaxResults", 1113 TruncationToken: "", 1114 }, 1115 } 1116 1117 if input == nil { 1118 input = &ListDatasetEntriesInput{} 1119 } 1120 1121 output = &ListDatasetEntriesOutput{} 1122 req = c.newRequest(op, input, output) 1123 return 1124 } 1125 1126 // ListDatasetEntries API operation for Amazon Lookout for Vision. 1127 // 1128 // Lists the JSON Lines within a dataset. An Amazon Lookout for Vision JSON 1129 // Line contains the anomaly information for a single image, including the image 1130 // location and the assigned label. 1131 // 1132 // This operation requires permissions to perform the lookoutvision:ListDatasetEntries 1133 // operation. 1134 // 1135 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1136 // with awserr.Error's Code and Message methods to get detailed information about 1137 // the error. 1138 // 1139 // See the AWS API reference guide for Amazon Lookout for Vision's 1140 // API operation ListDatasetEntries for usage and error information. 1141 // 1142 // Returned Error Types: 1143 // * AccessDeniedException 1144 // You are not authorized to perform the action. 1145 // 1146 // * InternalServerException 1147 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1148 // 1149 // * ValidationException 1150 // An input validation error occured. For example, invalid characters in a project 1151 // name, or if a pagination token is invalid. 1152 // 1153 // * ConflictException 1154 // The update or deletion of a resource caused an inconsistent state. 1155 // 1156 // * ResourceNotFoundException 1157 // The resource could not be found. 1158 // 1159 // * ThrottlingException 1160 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1161 // your call again. 1162 // 1163 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListDatasetEntries 1164 func (c *LookoutForVision) ListDatasetEntries(input *ListDatasetEntriesInput) (*ListDatasetEntriesOutput, error) { 1165 req, out := c.ListDatasetEntriesRequest(input) 1166 return out, req.Send() 1167 } 1168 1169 // ListDatasetEntriesWithContext is the same as ListDatasetEntries with the addition of 1170 // the ability to pass a context and additional request options. 1171 // 1172 // See ListDatasetEntries for details on how to use this API operation. 1173 // 1174 // The context must be non-nil and will be used for request cancellation. If 1175 // the context is nil a panic will occur. In the future the SDK may create 1176 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1177 // for more information on using Contexts. 1178 func (c *LookoutForVision) ListDatasetEntriesWithContext(ctx aws.Context, input *ListDatasetEntriesInput, opts ...request.Option) (*ListDatasetEntriesOutput, error) { 1179 req, out := c.ListDatasetEntriesRequest(input) 1180 req.SetContext(ctx) 1181 req.ApplyOptions(opts...) 1182 return out, req.Send() 1183 } 1184 1185 // ListDatasetEntriesPages iterates over the pages of a ListDatasetEntries operation, 1186 // calling the "fn" function with the response data for each page. To stop 1187 // iterating, return false from the fn function. 1188 // 1189 // See ListDatasetEntries method for more information on how to use this operation. 1190 // 1191 // Note: This operation can generate multiple requests to a service. 1192 // 1193 // // Example iterating over at most 3 pages of a ListDatasetEntries operation. 1194 // pageNum := 0 1195 // err := client.ListDatasetEntriesPages(params, 1196 // func(page *lookoutforvision.ListDatasetEntriesOutput, lastPage bool) bool { 1197 // pageNum++ 1198 // fmt.Println(page) 1199 // return pageNum <= 3 1200 // }) 1201 // 1202 func (c *LookoutForVision) ListDatasetEntriesPages(input *ListDatasetEntriesInput, fn func(*ListDatasetEntriesOutput, bool) bool) error { 1203 return c.ListDatasetEntriesPagesWithContext(aws.BackgroundContext(), input, fn) 1204 } 1205 1206 // ListDatasetEntriesPagesWithContext same as ListDatasetEntriesPages except 1207 // it takes a Context and allows setting request options on the pages. 1208 // 1209 // The context must be non-nil and will be used for request cancellation. If 1210 // the context is nil a panic will occur. In the future the SDK may create 1211 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1212 // for more information on using Contexts. 1213 func (c *LookoutForVision) ListDatasetEntriesPagesWithContext(ctx aws.Context, input *ListDatasetEntriesInput, fn func(*ListDatasetEntriesOutput, bool) bool, opts ...request.Option) error { 1214 p := request.Pagination{ 1215 NewRequest: func() (*request.Request, error) { 1216 var inCpy *ListDatasetEntriesInput 1217 if input != nil { 1218 tmp := *input 1219 inCpy = &tmp 1220 } 1221 req, _ := c.ListDatasetEntriesRequest(inCpy) 1222 req.SetContext(ctx) 1223 req.ApplyOptions(opts...) 1224 return req, nil 1225 }, 1226 } 1227 1228 for p.Next() { 1229 if !fn(p.Page().(*ListDatasetEntriesOutput), !p.HasNextPage()) { 1230 break 1231 } 1232 } 1233 1234 return p.Err() 1235 } 1236 1237 const opListModels = "ListModels" 1238 1239 // ListModelsRequest generates a "aws/request.Request" representing the 1240 // client's request for the ListModels operation. The "output" return 1241 // value will be populated with the request's response once the request completes 1242 // successfully. 1243 // 1244 // Use "Send" method on the returned Request to send the API call to the service. 1245 // the "output" return value is not valid until after Send returns without error. 1246 // 1247 // See ListModels for more information on using the ListModels 1248 // API call, and error handling. 1249 // 1250 // This method is useful when you want to inject custom logic or configuration 1251 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1252 // 1253 // 1254 // // Example sending a request using the ListModelsRequest method. 1255 // req, resp := client.ListModelsRequest(params) 1256 // 1257 // err := req.Send() 1258 // if err == nil { // resp is now filled 1259 // fmt.Println(resp) 1260 // } 1261 // 1262 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListModels 1263 func (c *LookoutForVision) ListModelsRequest(input *ListModelsInput) (req *request.Request, output *ListModelsOutput) { 1264 op := &request.Operation{ 1265 Name: opListModels, 1266 HTTPMethod: "GET", 1267 HTTPPath: "/2020-11-20/projects/{projectName}/models", 1268 Paginator: &request.Paginator{ 1269 InputTokens: []string{"NextToken"}, 1270 OutputTokens: []string{"NextToken"}, 1271 LimitToken: "MaxResults", 1272 TruncationToken: "", 1273 }, 1274 } 1275 1276 if input == nil { 1277 input = &ListModelsInput{} 1278 } 1279 1280 output = &ListModelsOutput{} 1281 req = c.newRequest(op, input, output) 1282 return 1283 } 1284 1285 // ListModels API operation for Amazon Lookout for Vision. 1286 // 1287 // Lists the versions of a model in an Amazon Lookout for Vision project. 1288 // 1289 // This operation requires permissions to perform the lookoutvision:ListModels 1290 // operation. 1291 // 1292 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1293 // with awserr.Error's Code and Message methods to get detailed information about 1294 // the error. 1295 // 1296 // See the AWS API reference guide for Amazon Lookout for Vision's 1297 // API operation ListModels for usage and error information. 1298 // 1299 // Returned Error Types: 1300 // * AccessDeniedException 1301 // You are not authorized to perform the action. 1302 // 1303 // * InternalServerException 1304 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1305 // 1306 // * ValidationException 1307 // An input validation error occured. For example, invalid characters in a project 1308 // name, or if a pagination token is invalid. 1309 // 1310 // * ConflictException 1311 // The update or deletion of a resource caused an inconsistent state. 1312 // 1313 // * ResourceNotFoundException 1314 // The resource could not be found. 1315 // 1316 // * ThrottlingException 1317 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1318 // your call again. 1319 // 1320 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListModels 1321 func (c *LookoutForVision) ListModels(input *ListModelsInput) (*ListModelsOutput, error) { 1322 req, out := c.ListModelsRequest(input) 1323 return out, req.Send() 1324 } 1325 1326 // ListModelsWithContext is the same as ListModels with the addition of 1327 // the ability to pass a context and additional request options. 1328 // 1329 // See ListModels for details on how to use this API operation. 1330 // 1331 // The context must be non-nil and will be used for request cancellation. If 1332 // the context is nil a panic will occur. In the future the SDK may create 1333 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1334 // for more information on using Contexts. 1335 func (c *LookoutForVision) ListModelsWithContext(ctx aws.Context, input *ListModelsInput, opts ...request.Option) (*ListModelsOutput, error) { 1336 req, out := c.ListModelsRequest(input) 1337 req.SetContext(ctx) 1338 req.ApplyOptions(opts...) 1339 return out, req.Send() 1340 } 1341 1342 // ListModelsPages iterates over the pages of a ListModels operation, 1343 // calling the "fn" function with the response data for each page. To stop 1344 // iterating, return false from the fn function. 1345 // 1346 // See ListModels method for more information on how to use this operation. 1347 // 1348 // Note: This operation can generate multiple requests to a service. 1349 // 1350 // // Example iterating over at most 3 pages of a ListModels operation. 1351 // pageNum := 0 1352 // err := client.ListModelsPages(params, 1353 // func(page *lookoutforvision.ListModelsOutput, lastPage bool) bool { 1354 // pageNum++ 1355 // fmt.Println(page) 1356 // return pageNum <= 3 1357 // }) 1358 // 1359 func (c *LookoutForVision) ListModelsPages(input *ListModelsInput, fn func(*ListModelsOutput, bool) bool) error { 1360 return c.ListModelsPagesWithContext(aws.BackgroundContext(), input, fn) 1361 } 1362 1363 // ListModelsPagesWithContext same as ListModelsPages except 1364 // it takes a Context and allows setting request options on the pages. 1365 // 1366 // The context must be non-nil and will be used for request cancellation. If 1367 // the context is nil a panic will occur. In the future the SDK may create 1368 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1369 // for more information on using Contexts. 1370 func (c *LookoutForVision) ListModelsPagesWithContext(ctx aws.Context, input *ListModelsInput, fn func(*ListModelsOutput, bool) bool, opts ...request.Option) error { 1371 p := request.Pagination{ 1372 NewRequest: func() (*request.Request, error) { 1373 var inCpy *ListModelsInput 1374 if input != nil { 1375 tmp := *input 1376 inCpy = &tmp 1377 } 1378 req, _ := c.ListModelsRequest(inCpy) 1379 req.SetContext(ctx) 1380 req.ApplyOptions(opts...) 1381 return req, nil 1382 }, 1383 } 1384 1385 for p.Next() { 1386 if !fn(p.Page().(*ListModelsOutput), !p.HasNextPage()) { 1387 break 1388 } 1389 } 1390 1391 return p.Err() 1392 } 1393 1394 const opListProjects = "ListProjects" 1395 1396 // ListProjectsRequest generates a "aws/request.Request" representing the 1397 // client's request for the ListProjects operation. The "output" return 1398 // value will be populated with the request's response once the request completes 1399 // successfully. 1400 // 1401 // Use "Send" method on the returned Request to send the API call to the service. 1402 // the "output" return value is not valid until after Send returns without error. 1403 // 1404 // See ListProjects for more information on using the ListProjects 1405 // API call, and error handling. 1406 // 1407 // This method is useful when you want to inject custom logic or configuration 1408 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1409 // 1410 // 1411 // // Example sending a request using the ListProjectsRequest method. 1412 // req, resp := client.ListProjectsRequest(params) 1413 // 1414 // err := req.Send() 1415 // if err == nil { // resp is now filled 1416 // fmt.Println(resp) 1417 // } 1418 // 1419 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListProjects 1420 func (c *LookoutForVision) ListProjectsRequest(input *ListProjectsInput) (req *request.Request, output *ListProjectsOutput) { 1421 op := &request.Operation{ 1422 Name: opListProjects, 1423 HTTPMethod: "GET", 1424 HTTPPath: "/2020-11-20/projects", 1425 Paginator: &request.Paginator{ 1426 InputTokens: []string{"NextToken"}, 1427 OutputTokens: []string{"NextToken"}, 1428 LimitToken: "MaxResults", 1429 TruncationToken: "", 1430 }, 1431 } 1432 1433 if input == nil { 1434 input = &ListProjectsInput{} 1435 } 1436 1437 output = &ListProjectsOutput{} 1438 req = c.newRequest(op, input, output) 1439 return 1440 } 1441 1442 // ListProjects API operation for Amazon Lookout for Vision. 1443 // 1444 // Lists the Amazon Lookout for Vision projects in your AWS account. 1445 // 1446 // This operation requires permissions to perform the lookoutvision:ListProjects 1447 // operation. 1448 // 1449 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1450 // with awserr.Error's Code and Message methods to get detailed information about 1451 // the error. 1452 // 1453 // See the AWS API reference guide for Amazon Lookout for Vision's 1454 // API operation ListProjects for usage and error information. 1455 // 1456 // Returned Error Types: 1457 // * AccessDeniedException 1458 // You are not authorized to perform the action. 1459 // 1460 // * InternalServerException 1461 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1462 // 1463 // * ValidationException 1464 // An input validation error occured. For example, invalid characters in a project 1465 // name, or if a pagination token is invalid. 1466 // 1467 // * ConflictException 1468 // The update or deletion of a resource caused an inconsistent state. 1469 // 1470 // * ResourceNotFoundException 1471 // The resource could not be found. 1472 // 1473 // * ThrottlingException 1474 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1475 // your call again. 1476 // 1477 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListProjects 1478 func (c *LookoutForVision) ListProjects(input *ListProjectsInput) (*ListProjectsOutput, error) { 1479 req, out := c.ListProjectsRequest(input) 1480 return out, req.Send() 1481 } 1482 1483 // ListProjectsWithContext is the same as ListProjects with the addition of 1484 // the ability to pass a context and additional request options. 1485 // 1486 // See ListProjects for details on how to use this API operation. 1487 // 1488 // The context must be non-nil and will be used for request cancellation. If 1489 // the context is nil a panic will occur. In the future the SDK may create 1490 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1491 // for more information on using Contexts. 1492 func (c *LookoutForVision) ListProjectsWithContext(ctx aws.Context, input *ListProjectsInput, opts ...request.Option) (*ListProjectsOutput, error) { 1493 req, out := c.ListProjectsRequest(input) 1494 req.SetContext(ctx) 1495 req.ApplyOptions(opts...) 1496 return out, req.Send() 1497 } 1498 1499 // ListProjectsPages iterates over the pages of a ListProjects operation, 1500 // calling the "fn" function with the response data for each page. To stop 1501 // iterating, return false from the fn function. 1502 // 1503 // See ListProjects method for more information on how to use this operation. 1504 // 1505 // Note: This operation can generate multiple requests to a service. 1506 // 1507 // // Example iterating over at most 3 pages of a ListProjects operation. 1508 // pageNum := 0 1509 // err := client.ListProjectsPages(params, 1510 // func(page *lookoutforvision.ListProjectsOutput, lastPage bool) bool { 1511 // pageNum++ 1512 // fmt.Println(page) 1513 // return pageNum <= 3 1514 // }) 1515 // 1516 func (c *LookoutForVision) ListProjectsPages(input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool) error { 1517 return c.ListProjectsPagesWithContext(aws.BackgroundContext(), input, fn) 1518 } 1519 1520 // ListProjectsPagesWithContext same as ListProjectsPages except 1521 // it takes a Context and allows setting request options on the pages. 1522 // 1523 // The context must be non-nil and will be used for request cancellation. If 1524 // the context is nil a panic will occur. In the future the SDK may create 1525 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1526 // for more information on using Contexts. 1527 func (c *LookoutForVision) ListProjectsPagesWithContext(ctx aws.Context, input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool, opts ...request.Option) error { 1528 p := request.Pagination{ 1529 NewRequest: func() (*request.Request, error) { 1530 var inCpy *ListProjectsInput 1531 if input != nil { 1532 tmp := *input 1533 inCpy = &tmp 1534 } 1535 req, _ := c.ListProjectsRequest(inCpy) 1536 req.SetContext(ctx) 1537 req.ApplyOptions(opts...) 1538 return req, nil 1539 }, 1540 } 1541 1542 for p.Next() { 1543 if !fn(p.Page().(*ListProjectsOutput), !p.HasNextPage()) { 1544 break 1545 } 1546 } 1547 1548 return p.Err() 1549 } 1550 1551 const opListTagsForResource = "ListTagsForResource" 1552 1553 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 1554 // client's request for the ListTagsForResource operation. The "output" return 1555 // value will be populated with the request's response once the request completes 1556 // successfully. 1557 // 1558 // Use "Send" method on the returned Request to send the API call to the service. 1559 // the "output" return value is not valid until after Send returns without error. 1560 // 1561 // See ListTagsForResource for more information on using the ListTagsForResource 1562 // API call, and error handling. 1563 // 1564 // This method is useful when you want to inject custom logic or configuration 1565 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1566 // 1567 // 1568 // // Example sending a request using the ListTagsForResourceRequest method. 1569 // req, resp := client.ListTagsForResourceRequest(params) 1570 // 1571 // err := req.Send() 1572 // if err == nil { // resp is now filled 1573 // fmt.Println(resp) 1574 // } 1575 // 1576 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListTagsForResource 1577 func (c *LookoutForVision) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1578 op := &request.Operation{ 1579 Name: opListTagsForResource, 1580 HTTPMethod: "GET", 1581 HTTPPath: "/2020-11-20/tags/{resourceArn}", 1582 } 1583 1584 if input == nil { 1585 input = &ListTagsForResourceInput{} 1586 } 1587 1588 output = &ListTagsForResourceOutput{} 1589 req = c.newRequest(op, input, output) 1590 return 1591 } 1592 1593 // ListTagsForResource API operation for Amazon Lookout for Vision. 1594 // 1595 // Returns a list of tags attached to the specified Amazon Lookout for Vision 1596 // model. 1597 // 1598 // This operation requires permissions to perform the lookoutvision:ListTagsForResource 1599 // operation. 1600 // 1601 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1602 // with awserr.Error's Code and Message methods to get detailed information about 1603 // the error. 1604 // 1605 // See the AWS API reference guide for Amazon Lookout for Vision's 1606 // API operation ListTagsForResource for usage and error information. 1607 // 1608 // Returned Error Types: 1609 // * AccessDeniedException 1610 // You are not authorized to perform the action. 1611 // 1612 // * InternalServerException 1613 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1614 // 1615 // * ValidationException 1616 // An input validation error occured. For example, invalid characters in a project 1617 // name, or if a pagination token is invalid. 1618 // 1619 // * ConflictException 1620 // The update or deletion of a resource caused an inconsistent state. 1621 // 1622 // * ResourceNotFoundException 1623 // The resource could not be found. 1624 // 1625 // * ThrottlingException 1626 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1627 // your call again. 1628 // 1629 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/ListTagsForResource 1630 func (c *LookoutForVision) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1631 req, out := c.ListTagsForResourceRequest(input) 1632 return out, req.Send() 1633 } 1634 1635 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1636 // the ability to pass a context and additional request options. 1637 // 1638 // See ListTagsForResource for details on how to use this API operation. 1639 // 1640 // The context must be non-nil and will be used for request cancellation. If 1641 // the context is nil a panic will occur. In the future the SDK may create 1642 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1643 // for more information on using Contexts. 1644 func (c *LookoutForVision) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1645 req, out := c.ListTagsForResourceRequest(input) 1646 req.SetContext(ctx) 1647 req.ApplyOptions(opts...) 1648 return out, req.Send() 1649 } 1650 1651 const opStartModel = "StartModel" 1652 1653 // StartModelRequest generates a "aws/request.Request" representing the 1654 // client's request for the StartModel operation. The "output" return 1655 // value will be populated with the request's response once the request completes 1656 // successfully. 1657 // 1658 // Use "Send" method on the returned Request to send the API call to the service. 1659 // the "output" return value is not valid until after Send returns without error. 1660 // 1661 // See StartModel for more information on using the StartModel 1662 // API call, and error handling. 1663 // 1664 // This method is useful when you want to inject custom logic or configuration 1665 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1666 // 1667 // 1668 // // Example sending a request using the StartModelRequest method. 1669 // req, resp := client.StartModelRequest(params) 1670 // 1671 // err := req.Send() 1672 // if err == nil { // resp is now filled 1673 // fmt.Println(resp) 1674 // } 1675 // 1676 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/StartModel 1677 func (c *LookoutForVision) StartModelRequest(input *StartModelInput) (req *request.Request, output *StartModelOutput) { 1678 op := &request.Operation{ 1679 Name: opStartModel, 1680 HTTPMethod: "POST", 1681 HTTPPath: "/2020-11-20/projects/{projectName}/models/{modelVersion}/start", 1682 } 1683 1684 if input == nil { 1685 input = &StartModelInput{} 1686 } 1687 1688 output = &StartModelOutput{} 1689 req = c.newRequest(op, input, output) 1690 return 1691 } 1692 1693 // StartModel API operation for Amazon Lookout for Vision. 1694 // 1695 // Starts the running of the version of an Amazon Lookout for Vision model. 1696 // Starting a model takes a while to complete. To check the current state of 1697 // the model, use DescribeModel. 1698 // 1699 // A model is ready to use when its status is HOSTED. 1700 // 1701 // Once the model is running, you can detect custom labels in new images by 1702 // calling DetectAnomalies. 1703 // 1704 // You are charged for the amount of time that the model is running. To stop 1705 // a running model, call StopModel. 1706 // 1707 // This operation requires permissions to perform the lookoutvision:StartModel 1708 // operation. 1709 // 1710 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1711 // with awserr.Error's Code and Message methods to get detailed information about 1712 // the error. 1713 // 1714 // See the AWS API reference guide for Amazon Lookout for Vision's 1715 // API operation StartModel for usage and error information. 1716 // 1717 // Returned Error Types: 1718 // * AccessDeniedException 1719 // You are not authorized to perform the action. 1720 // 1721 // * InternalServerException 1722 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1723 // 1724 // * ValidationException 1725 // An input validation error occured. For example, invalid characters in a project 1726 // name, or if a pagination token is invalid. 1727 // 1728 // * ConflictException 1729 // The update or deletion of a resource caused an inconsistent state. 1730 // 1731 // * ResourceNotFoundException 1732 // The resource could not be found. 1733 // 1734 // * ThrottlingException 1735 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1736 // your call again. 1737 // 1738 // * ServiceQuotaExceededException 1739 // A service quota was exceeded the allowed limit. For more information, see 1740 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 1741 // Guide. 1742 // 1743 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/StartModel 1744 func (c *LookoutForVision) StartModel(input *StartModelInput) (*StartModelOutput, error) { 1745 req, out := c.StartModelRequest(input) 1746 return out, req.Send() 1747 } 1748 1749 // StartModelWithContext is the same as StartModel with the addition of 1750 // the ability to pass a context and additional request options. 1751 // 1752 // See StartModel for details on how to use this API operation. 1753 // 1754 // The context must be non-nil and will be used for request cancellation. If 1755 // the context is nil a panic will occur. In the future the SDK may create 1756 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1757 // for more information on using Contexts. 1758 func (c *LookoutForVision) StartModelWithContext(ctx aws.Context, input *StartModelInput, opts ...request.Option) (*StartModelOutput, error) { 1759 req, out := c.StartModelRequest(input) 1760 req.SetContext(ctx) 1761 req.ApplyOptions(opts...) 1762 return out, req.Send() 1763 } 1764 1765 const opStopModel = "StopModel" 1766 1767 // StopModelRequest generates a "aws/request.Request" representing the 1768 // client's request for the StopModel operation. The "output" return 1769 // value will be populated with the request's response once the request completes 1770 // successfully. 1771 // 1772 // Use "Send" method on the returned Request to send the API call to the service. 1773 // the "output" return value is not valid until after Send returns without error. 1774 // 1775 // See StopModel for more information on using the StopModel 1776 // API call, and error handling. 1777 // 1778 // This method is useful when you want to inject custom logic or configuration 1779 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1780 // 1781 // 1782 // // Example sending a request using the StopModelRequest method. 1783 // req, resp := client.StopModelRequest(params) 1784 // 1785 // err := req.Send() 1786 // if err == nil { // resp is now filled 1787 // fmt.Println(resp) 1788 // } 1789 // 1790 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/StopModel 1791 func (c *LookoutForVision) StopModelRequest(input *StopModelInput) (req *request.Request, output *StopModelOutput) { 1792 op := &request.Operation{ 1793 Name: opStopModel, 1794 HTTPMethod: "POST", 1795 HTTPPath: "/2020-11-20/projects/{projectName}/models/{modelVersion}/stop", 1796 } 1797 1798 if input == nil { 1799 input = &StopModelInput{} 1800 } 1801 1802 output = &StopModelOutput{} 1803 req = c.newRequest(op, input, output) 1804 return 1805 } 1806 1807 // StopModel API operation for Amazon Lookout for Vision. 1808 // 1809 // Stops the hosting of a running model. The operation might take a while to 1810 // complete. To check the current status, call DescribeModel. 1811 // 1812 // After the model hosting stops, the Status of the model is TRAINED. 1813 // 1814 // This operation requires permissions to perform the lookoutvision:StopModel 1815 // operation. 1816 // 1817 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1818 // with awserr.Error's Code and Message methods to get detailed information about 1819 // the error. 1820 // 1821 // See the AWS API reference guide for Amazon Lookout for Vision's 1822 // API operation StopModel for usage and error information. 1823 // 1824 // Returned Error Types: 1825 // * AccessDeniedException 1826 // You are not authorized to perform the action. 1827 // 1828 // * InternalServerException 1829 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1830 // 1831 // * ValidationException 1832 // An input validation error occured. For example, invalid characters in a project 1833 // name, or if a pagination token is invalid. 1834 // 1835 // * ConflictException 1836 // The update or deletion of a resource caused an inconsistent state. 1837 // 1838 // * ResourceNotFoundException 1839 // The resource could not be found. 1840 // 1841 // * ThrottlingException 1842 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1843 // your call again. 1844 // 1845 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/StopModel 1846 func (c *LookoutForVision) StopModel(input *StopModelInput) (*StopModelOutput, error) { 1847 req, out := c.StopModelRequest(input) 1848 return out, req.Send() 1849 } 1850 1851 // StopModelWithContext is the same as StopModel with the addition of 1852 // the ability to pass a context and additional request options. 1853 // 1854 // See StopModel for details on how to use this API operation. 1855 // 1856 // The context must be non-nil and will be used for request cancellation. If 1857 // the context is nil a panic will occur. In the future the SDK may create 1858 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1859 // for more information on using Contexts. 1860 func (c *LookoutForVision) StopModelWithContext(ctx aws.Context, input *StopModelInput, opts ...request.Option) (*StopModelOutput, error) { 1861 req, out := c.StopModelRequest(input) 1862 req.SetContext(ctx) 1863 req.ApplyOptions(opts...) 1864 return out, req.Send() 1865 } 1866 1867 const opTagResource = "TagResource" 1868 1869 // TagResourceRequest generates a "aws/request.Request" representing the 1870 // client's request for the TagResource operation. The "output" return 1871 // value will be populated with the request's response once the request completes 1872 // successfully. 1873 // 1874 // Use "Send" method on the returned Request to send the API call to the service. 1875 // the "output" return value is not valid until after Send returns without error. 1876 // 1877 // See TagResource for more information on using the TagResource 1878 // API call, and error handling. 1879 // 1880 // This method is useful when you want to inject custom logic or configuration 1881 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1882 // 1883 // 1884 // // Example sending a request using the TagResourceRequest method. 1885 // req, resp := client.TagResourceRequest(params) 1886 // 1887 // err := req.Send() 1888 // if err == nil { // resp is now filled 1889 // fmt.Println(resp) 1890 // } 1891 // 1892 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/TagResource 1893 func (c *LookoutForVision) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1894 op := &request.Operation{ 1895 Name: opTagResource, 1896 HTTPMethod: "POST", 1897 HTTPPath: "/2020-11-20/tags/{resourceArn}", 1898 } 1899 1900 if input == nil { 1901 input = &TagResourceInput{} 1902 } 1903 1904 output = &TagResourceOutput{} 1905 req = c.newRequest(op, input, output) 1906 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1907 return 1908 } 1909 1910 // TagResource API operation for Amazon Lookout for Vision. 1911 // 1912 // Adds one or more key-value tags to an Amazon Lookout for Vision model. For 1913 // more information, see Tagging a model in the Amazon Lookout for Vision Developer 1914 // Guide. 1915 // 1916 // This operation requires permissions to perform the lookoutvision:TagResource 1917 // operation. 1918 // 1919 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1920 // with awserr.Error's Code and Message methods to get detailed information about 1921 // the error. 1922 // 1923 // See the AWS API reference guide for Amazon Lookout for Vision's 1924 // API operation TagResource for usage and error information. 1925 // 1926 // Returned Error Types: 1927 // * AccessDeniedException 1928 // You are not authorized to perform the action. 1929 // 1930 // * InternalServerException 1931 // Amazon Lookout for Vision experienced a service issue. Try your call again. 1932 // 1933 // * ValidationException 1934 // An input validation error occured. For example, invalid characters in a project 1935 // name, or if a pagination token is invalid. 1936 // 1937 // * ConflictException 1938 // The update or deletion of a resource caused an inconsistent state. 1939 // 1940 // * ResourceNotFoundException 1941 // The resource could not be found. 1942 // 1943 // * ThrottlingException 1944 // Amazon Lookout for Vision is temporarily unable to process the request. Try 1945 // your call again. 1946 // 1947 // * ServiceQuotaExceededException 1948 // A service quota was exceeded the allowed limit. For more information, see 1949 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 1950 // Guide. 1951 // 1952 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/TagResource 1953 func (c *LookoutForVision) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1954 req, out := c.TagResourceRequest(input) 1955 return out, req.Send() 1956 } 1957 1958 // TagResourceWithContext is the same as TagResource with the addition of 1959 // the ability to pass a context and additional request options. 1960 // 1961 // See TagResource for details on how to use this API operation. 1962 // 1963 // The context must be non-nil and will be used for request cancellation. If 1964 // the context is nil a panic will occur. In the future the SDK may create 1965 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1966 // for more information on using Contexts. 1967 func (c *LookoutForVision) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1968 req, out := c.TagResourceRequest(input) 1969 req.SetContext(ctx) 1970 req.ApplyOptions(opts...) 1971 return out, req.Send() 1972 } 1973 1974 const opUntagResource = "UntagResource" 1975 1976 // UntagResourceRequest generates a "aws/request.Request" representing the 1977 // client's request for the UntagResource operation. The "output" return 1978 // value will be populated with the request's response once the request completes 1979 // successfully. 1980 // 1981 // Use "Send" method on the returned Request to send the API call to the service. 1982 // the "output" return value is not valid until after Send returns without error. 1983 // 1984 // See UntagResource for more information on using the UntagResource 1985 // API call, and error handling. 1986 // 1987 // This method is useful when you want to inject custom logic or configuration 1988 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1989 // 1990 // 1991 // // Example sending a request using the UntagResourceRequest method. 1992 // req, resp := client.UntagResourceRequest(params) 1993 // 1994 // err := req.Send() 1995 // if err == nil { // resp is now filled 1996 // fmt.Println(resp) 1997 // } 1998 // 1999 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/UntagResource 2000 func (c *LookoutForVision) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2001 op := &request.Operation{ 2002 Name: opUntagResource, 2003 HTTPMethod: "DELETE", 2004 HTTPPath: "/2020-11-20/tags/{resourceArn}", 2005 } 2006 2007 if input == nil { 2008 input = &UntagResourceInput{} 2009 } 2010 2011 output = &UntagResourceOutput{} 2012 req = c.newRequest(op, input, output) 2013 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2014 return 2015 } 2016 2017 // UntagResource API operation for Amazon Lookout for Vision. 2018 // 2019 // Removes one or more tags from an Amazon Lookout for Vision model. For more 2020 // information, see Tagging a model in the Amazon Lookout for Vision Developer 2021 // Guide. 2022 // 2023 // This operation requires permissions to perform the lookoutvision:UntagResource 2024 // operation. 2025 // 2026 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2027 // with awserr.Error's Code and Message methods to get detailed information about 2028 // the error. 2029 // 2030 // See the AWS API reference guide for Amazon Lookout for Vision's 2031 // API operation UntagResource for usage and error information. 2032 // 2033 // Returned Error Types: 2034 // * AccessDeniedException 2035 // You are not authorized to perform the action. 2036 // 2037 // * InternalServerException 2038 // Amazon Lookout for Vision experienced a service issue. Try your call again. 2039 // 2040 // * ValidationException 2041 // An input validation error occured. For example, invalid characters in a project 2042 // name, or if a pagination token is invalid. 2043 // 2044 // * ConflictException 2045 // The update or deletion of a resource caused an inconsistent state. 2046 // 2047 // * ResourceNotFoundException 2048 // The resource could not be found. 2049 // 2050 // * ThrottlingException 2051 // Amazon Lookout for Vision is temporarily unable to process the request. Try 2052 // your call again. 2053 // 2054 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/UntagResource 2055 func (c *LookoutForVision) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2056 req, out := c.UntagResourceRequest(input) 2057 return out, req.Send() 2058 } 2059 2060 // UntagResourceWithContext is the same as UntagResource with the addition of 2061 // the ability to pass a context and additional request options. 2062 // 2063 // See UntagResource for details on how to use this API operation. 2064 // 2065 // The context must be non-nil and will be used for request cancellation. If 2066 // the context is nil a panic will occur. In the future the SDK may create 2067 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2068 // for more information on using Contexts. 2069 func (c *LookoutForVision) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2070 req, out := c.UntagResourceRequest(input) 2071 req.SetContext(ctx) 2072 req.ApplyOptions(opts...) 2073 return out, req.Send() 2074 } 2075 2076 const opUpdateDatasetEntries = "UpdateDatasetEntries" 2077 2078 // UpdateDatasetEntriesRequest generates a "aws/request.Request" representing the 2079 // client's request for the UpdateDatasetEntries operation. The "output" return 2080 // value will be populated with the request's response once the request completes 2081 // successfully. 2082 // 2083 // Use "Send" method on the returned Request to send the API call to the service. 2084 // the "output" return value is not valid until after Send returns without error. 2085 // 2086 // See UpdateDatasetEntries for more information on using the UpdateDatasetEntries 2087 // API call, and error handling. 2088 // 2089 // This method is useful when you want to inject custom logic or configuration 2090 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2091 // 2092 // 2093 // // Example sending a request using the UpdateDatasetEntriesRequest method. 2094 // req, resp := client.UpdateDatasetEntriesRequest(params) 2095 // 2096 // err := req.Send() 2097 // if err == nil { // resp is now filled 2098 // fmt.Println(resp) 2099 // } 2100 // 2101 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/UpdateDatasetEntries 2102 func (c *LookoutForVision) UpdateDatasetEntriesRequest(input *UpdateDatasetEntriesInput) (req *request.Request, output *UpdateDatasetEntriesOutput) { 2103 op := &request.Operation{ 2104 Name: opUpdateDatasetEntries, 2105 HTTPMethod: "PATCH", 2106 HTTPPath: "/2020-11-20/projects/{projectName}/datasets/{datasetType}/entries", 2107 } 2108 2109 if input == nil { 2110 input = &UpdateDatasetEntriesInput{} 2111 } 2112 2113 output = &UpdateDatasetEntriesOutput{} 2114 req = c.newRequest(op, input, output) 2115 return 2116 } 2117 2118 // UpdateDatasetEntries API operation for Amazon Lookout for Vision. 2119 // 2120 // Adds one or more JSON Line entries to a dataset. A JSON Line includes information 2121 // about an image used for training or testing an Amazon Lookout for Vision 2122 // model. The following is an example JSON Line. 2123 // 2124 // Updating a dataset might take a while to complete. To check the current status, 2125 // call DescribeDataset and check the Status field in the response. 2126 // 2127 // This operation requires permissions to perform the lookoutvision:UpdateDatasetEntries 2128 // operation. 2129 // 2130 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2131 // with awserr.Error's Code and Message methods to get detailed information about 2132 // the error. 2133 // 2134 // See the AWS API reference guide for Amazon Lookout for Vision's 2135 // API operation UpdateDatasetEntries for usage and error information. 2136 // 2137 // Returned Error Types: 2138 // * AccessDeniedException 2139 // You are not authorized to perform the action. 2140 // 2141 // * InternalServerException 2142 // Amazon Lookout for Vision experienced a service issue. Try your call again. 2143 // 2144 // * ValidationException 2145 // An input validation error occured. For example, invalid characters in a project 2146 // name, or if a pagination token is invalid. 2147 // 2148 // * ConflictException 2149 // The update or deletion of a resource caused an inconsistent state. 2150 // 2151 // * ResourceNotFoundException 2152 // The resource could not be found. 2153 // 2154 // * ThrottlingException 2155 // Amazon Lookout for Vision is temporarily unable to process the request. Try 2156 // your call again. 2157 // 2158 // See also, https://docs.aws.amazon.com/goto/WebAPI/lookoutvision-2020-11-20/UpdateDatasetEntries 2159 func (c *LookoutForVision) UpdateDatasetEntries(input *UpdateDatasetEntriesInput) (*UpdateDatasetEntriesOutput, error) { 2160 req, out := c.UpdateDatasetEntriesRequest(input) 2161 return out, req.Send() 2162 } 2163 2164 // UpdateDatasetEntriesWithContext is the same as UpdateDatasetEntries with the addition of 2165 // the ability to pass a context and additional request options. 2166 // 2167 // See UpdateDatasetEntries for details on how to use this API operation. 2168 // 2169 // The context must be non-nil and will be used for request cancellation. If 2170 // the context is nil a panic will occur. In the future the SDK may create 2171 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2172 // for more information on using Contexts. 2173 func (c *LookoutForVision) UpdateDatasetEntriesWithContext(ctx aws.Context, input *UpdateDatasetEntriesInput, opts ...request.Option) (*UpdateDatasetEntriesOutput, error) { 2174 req, out := c.UpdateDatasetEntriesRequest(input) 2175 req.SetContext(ctx) 2176 req.ApplyOptions(opts...) 2177 return out, req.Send() 2178 } 2179 2180 // You are not authorized to perform the action. 2181 type AccessDeniedException struct { 2182 _ struct{} `type:"structure"` 2183 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2184 2185 Message_ *string `locationName:"Message" type:"string"` 2186 } 2187 2188 // String returns the string representation. 2189 // 2190 // API parameter values that are decorated as "sensitive" in the API will not 2191 // be included in the string output. The member name will be present, but the 2192 // value will be replaced with "sensitive". 2193 func (s AccessDeniedException) String() string { 2194 return awsutil.Prettify(s) 2195 } 2196 2197 // GoString returns the string representation. 2198 // 2199 // API parameter values that are decorated as "sensitive" in the API will not 2200 // be included in the string output. The member name will be present, but the 2201 // value will be replaced with "sensitive". 2202 func (s AccessDeniedException) GoString() string { 2203 return s.String() 2204 } 2205 2206 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 2207 return &AccessDeniedException{ 2208 RespMetadata: v, 2209 } 2210 } 2211 2212 // Code returns the exception type name. 2213 func (s *AccessDeniedException) Code() string { 2214 return "AccessDeniedException" 2215 } 2216 2217 // Message returns the exception's message. 2218 func (s *AccessDeniedException) Message() string { 2219 if s.Message_ != nil { 2220 return *s.Message_ 2221 } 2222 return "" 2223 } 2224 2225 // OrigErr always returns nil, satisfies awserr.Error interface. 2226 func (s *AccessDeniedException) OrigErr() error { 2227 return nil 2228 } 2229 2230 func (s *AccessDeniedException) Error() string { 2231 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2232 } 2233 2234 // Status code returns the HTTP status code for the request's response error. 2235 func (s *AccessDeniedException) StatusCode() int { 2236 return s.RespMetadata.StatusCode 2237 } 2238 2239 // RequestID returns the service's response RequestID for request. 2240 func (s *AccessDeniedException) RequestID() string { 2241 return s.RespMetadata.RequestID 2242 } 2243 2244 // The update or deletion of a resource caused an inconsistent state. 2245 type ConflictException struct { 2246 _ struct{} `type:"structure"` 2247 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2248 2249 Message_ *string `locationName:"Message" type:"string"` 2250 2251 // The ID of the resource. 2252 // 2253 // ResourceId is a required field 2254 ResourceId *string `type:"string" required:"true"` 2255 2256 // The type of the resource. 2257 // 2258 // ResourceType is a required field 2259 ResourceType *string `type:"string" required:"true" enum:"ResourceType"` 2260 } 2261 2262 // String returns the string representation. 2263 // 2264 // API parameter values that are decorated as "sensitive" in the API will not 2265 // be included in the string output. The member name will be present, but the 2266 // value will be replaced with "sensitive". 2267 func (s ConflictException) String() string { 2268 return awsutil.Prettify(s) 2269 } 2270 2271 // GoString returns the string representation. 2272 // 2273 // API parameter values that are decorated as "sensitive" in the API will not 2274 // be included in the string output. The member name will be present, but the 2275 // value will be replaced with "sensitive". 2276 func (s ConflictException) GoString() string { 2277 return s.String() 2278 } 2279 2280 func newErrorConflictException(v protocol.ResponseMetadata) error { 2281 return &ConflictException{ 2282 RespMetadata: v, 2283 } 2284 } 2285 2286 // Code returns the exception type name. 2287 func (s *ConflictException) Code() string { 2288 return "ConflictException" 2289 } 2290 2291 // Message returns the exception's message. 2292 func (s *ConflictException) Message() string { 2293 if s.Message_ != nil { 2294 return *s.Message_ 2295 } 2296 return "" 2297 } 2298 2299 // OrigErr always returns nil, satisfies awserr.Error interface. 2300 func (s *ConflictException) OrigErr() error { 2301 return nil 2302 } 2303 2304 func (s *ConflictException) Error() string { 2305 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2306 } 2307 2308 // Status code returns the HTTP status code for the request's response error. 2309 func (s *ConflictException) StatusCode() int { 2310 return s.RespMetadata.StatusCode 2311 } 2312 2313 // RequestID returns the service's response RequestID for request. 2314 func (s *ConflictException) RequestID() string { 2315 return s.RespMetadata.RequestID 2316 } 2317 2318 type CreateDatasetInput struct { 2319 _ struct{} `type:"structure"` 2320 2321 // ClientToken is an idempotency token that ensures a call to CreateDataset 2322 // completes only once. You choose the value to pass. For example, An issue, 2323 // such as an network outage, might prevent you from getting a response from 2324 // CreateDataset. In this case, safely retry your call to CreateDataset by using 2325 // the same ClientToken parameter value. An error occurs if the other input 2326 // parameters are not the same as in the first request. Using a different value 2327 // for ClientToken is considered a new call to CreateDataset. An idempotency 2328 // token is active for 8 hours. 2329 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 2330 2331 // The location of the manifest file that Amazon Lookout for Vision uses to 2332 // create the dataset. 2333 // 2334 // If you don't specify DatasetSource, an empty dataset is created and the operation 2335 // synchronously returns. Later, you can add JSON Lines by calling UpdateDatasetEntries. 2336 // 2337 // If you specify a value for DataSource, the manifest at the S3 location is 2338 // validated and used to create the dataset. The call to CreateDataset is asynchronous 2339 // and might take a while to complete. To find out the current status, Check 2340 // the value of Status returned in a call to DescribeDataset. 2341 DatasetSource *DatasetSource `type:"structure"` 2342 2343 // The type of the dataset. Specify train for a training dataset. Specify test 2344 // for a test dataset. 2345 // 2346 // DatasetType is a required field 2347 DatasetType *string `min:"1" type:"string" required:"true"` 2348 2349 // The name of the project in which you want to create a dataset. 2350 // 2351 // ProjectName is a required field 2352 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 2353 } 2354 2355 // String returns the string representation. 2356 // 2357 // API parameter values that are decorated as "sensitive" in the API will not 2358 // be included in the string output. The member name will be present, but the 2359 // value will be replaced with "sensitive". 2360 func (s CreateDatasetInput) String() string { 2361 return awsutil.Prettify(s) 2362 } 2363 2364 // GoString returns the string representation. 2365 // 2366 // API parameter values that are decorated as "sensitive" in the API will not 2367 // be included in the string output. The member name will be present, but the 2368 // value will be replaced with "sensitive". 2369 func (s CreateDatasetInput) GoString() string { 2370 return s.String() 2371 } 2372 2373 // Validate inspects the fields of the type to determine if they are valid. 2374 func (s *CreateDatasetInput) Validate() error { 2375 invalidParams := request.ErrInvalidParams{Context: "CreateDatasetInput"} 2376 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 2377 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 2378 } 2379 if s.DatasetType == nil { 2380 invalidParams.Add(request.NewErrParamRequired("DatasetType")) 2381 } 2382 if s.DatasetType != nil && len(*s.DatasetType) < 1 { 2383 invalidParams.Add(request.NewErrParamMinLen("DatasetType", 1)) 2384 } 2385 if s.ProjectName == nil { 2386 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 2387 } 2388 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 2389 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 2390 } 2391 if s.DatasetSource != nil { 2392 if err := s.DatasetSource.Validate(); err != nil { 2393 invalidParams.AddNested("DatasetSource", err.(request.ErrInvalidParams)) 2394 } 2395 } 2396 2397 if invalidParams.Len() > 0 { 2398 return invalidParams 2399 } 2400 return nil 2401 } 2402 2403 // SetClientToken sets the ClientToken field's value. 2404 func (s *CreateDatasetInput) SetClientToken(v string) *CreateDatasetInput { 2405 s.ClientToken = &v 2406 return s 2407 } 2408 2409 // SetDatasetSource sets the DatasetSource field's value. 2410 func (s *CreateDatasetInput) SetDatasetSource(v *DatasetSource) *CreateDatasetInput { 2411 s.DatasetSource = v 2412 return s 2413 } 2414 2415 // SetDatasetType sets the DatasetType field's value. 2416 func (s *CreateDatasetInput) SetDatasetType(v string) *CreateDatasetInput { 2417 s.DatasetType = &v 2418 return s 2419 } 2420 2421 // SetProjectName sets the ProjectName field's value. 2422 func (s *CreateDatasetInput) SetProjectName(v string) *CreateDatasetInput { 2423 s.ProjectName = &v 2424 return s 2425 } 2426 2427 type CreateDatasetOutput struct { 2428 _ struct{} `type:"structure"` 2429 2430 // Information about the dataset. 2431 DatasetMetadata *DatasetMetadata `type:"structure"` 2432 } 2433 2434 // String returns the string representation. 2435 // 2436 // API parameter values that are decorated as "sensitive" in the API will not 2437 // be included in the string output. The member name will be present, but the 2438 // value will be replaced with "sensitive". 2439 func (s CreateDatasetOutput) String() string { 2440 return awsutil.Prettify(s) 2441 } 2442 2443 // GoString returns the string representation. 2444 // 2445 // API parameter values that are decorated as "sensitive" in the API will not 2446 // be included in the string output. The member name will be present, but the 2447 // value will be replaced with "sensitive". 2448 func (s CreateDatasetOutput) GoString() string { 2449 return s.String() 2450 } 2451 2452 // SetDatasetMetadata sets the DatasetMetadata field's value. 2453 func (s *CreateDatasetOutput) SetDatasetMetadata(v *DatasetMetadata) *CreateDatasetOutput { 2454 s.DatasetMetadata = v 2455 return s 2456 } 2457 2458 type CreateModelInput struct { 2459 _ struct{} `type:"structure"` 2460 2461 // ClientToken is an idempotency token that ensures a call to CreateModel completes 2462 // only once. You choose the value to pass. For example, An issue, such as an 2463 // network outage, might prevent you from getting a response from CreateModel. 2464 // In this case, safely retry your call to CreateModel by using the same ClientToken 2465 // parameter value. An error occurs if the other input parameters are not the 2466 // same as in the first request. Using a different value for ClientToken is 2467 // considered a new call to CreateModel. An idempotency token is active for 2468 // 8 hours. 2469 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 2470 2471 // A description for the version of the model. 2472 Description *string `min:"1" type:"string"` 2473 2474 // The identifier for your AWS Key Management Service (AWS KMS) customer master 2475 // key (CMK). The key is used to encrypt training and test images copied into 2476 // the service for model training. Your source images are unaffected. If this 2477 // parameter is not specified, the copied images are encrypted by a key that 2478 // AWS owns and manages. 2479 KmsKeyId *string `min:"1" type:"string"` 2480 2481 // The location where Amazon Lookout for Vision saves the training results. 2482 // 2483 // OutputConfig is a required field 2484 OutputConfig *OutputConfig `type:"structure" required:"true"` 2485 2486 // The name of the project in which you want to create a model version. 2487 // 2488 // ProjectName is a required field 2489 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 2490 2491 // A set of tags (key-value pairs) that you want to attach to the model. 2492 Tags []*Tag `type:"list"` 2493 } 2494 2495 // String returns the string representation. 2496 // 2497 // API parameter values that are decorated as "sensitive" in the API will not 2498 // be included in the string output. The member name will be present, but the 2499 // value will be replaced with "sensitive". 2500 func (s CreateModelInput) String() string { 2501 return awsutil.Prettify(s) 2502 } 2503 2504 // GoString returns the string representation. 2505 // 2506 // API parameter values that are decorated as "sensitive" in the API will not 2507 // be included in the string output. The member name will be present, but the 2508 // value will be replaced with "sensitive". 2509 func (s CreateModelInput) GoString() string { 2510 return s.String() 2511 } 2512 2513 // Validate inspects the fields of the type to determine if they are valid. 2514 func (s *CreateModelInput) Validate() error { 2515 invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} 2516 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 2517 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 2518 } 2519 if s.Description != nil && len(*s.Description) < 1 { 2520 invalidParams.Add(request.NewErrParamMinLen("Description", 1)) 2521 } 2522 if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { 2523 invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) 2524 } 2525 if s.OutputConfig == nil { 2526 invalidParams.Add(request.NewErrParamRequired("OutputConfig")) 2527 } 2528 if s.ProjectName == nil { 2529 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 2530 } 2531 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 2532 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 2533 } 2534 if s.OutputConfig != nil { 2535 if err := s.OutputConfig.Validate(); err != nil { 2536 invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) 2537 } 2538 } 2539 if s.Tags != nil { 2540 for i, v := range s.Tags { 2541 if v == nil { 2542 continue 2543 } 2544 if err := v.Validate(); err != nil { 2545 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2546 } 2547 } 2548 } 2549 2550 if invalidParams.Len() > 0 { 2551 return invalidParams 2552 } 2553 return nil 2554 } 2555 2556 // SetClientToken sets the ClientToken field's value. 2557 func (s *CreateModelInput) SetClientToken(v string) *CreateModelInput { 2558 s.ClientToken = &v 2559 return s 2560 } 2561 2562 // SetDescription sets the Description field's value. 2563 func (s *CreateModelInput) SetDescription(v string) *CreateModelInput { 2564 s.Description = &v 2565 return s 2566 } 2567 2568 // SetKmsKeyId sets the KmsKeyId field's value. 2569 func (s *CreateModelInput) SetKmsKeyId(v string) *CreateModelInput { 2570 s.KmsKeyId = &v 2571 return s 2572 } 2573 2574 // SetOutputConfig sets the OutputConfig field's value. 2575 func (s *CreateModelInput) SetOutputConfig(v *OutputConfig) *CreateModelInput { 2576 s.OutputConfig = v 2577 return s 2578 } 2579 2580 // SetProjectName sets the ProjectName field's value. 2581 func (s *CreateModelInput) SetProjectName(v string) *CreateModelInput { 2582 s.ProjectName = &v 2583 return s 2584 } 2585 2586 // SetTags sets the Tags field's value. 2587 func (s *CreateModelInput) SetTags(v []*Tag) *CreateModelInput { 2588 s.Tags = v 2589 return s 2590 } 2591 2592 type CreateModelOutput struct { 2593 _ struct{} `type:"structure"` 2594 2595 // The response from a call to CreateModel. 2596 ModelMetadata *ModelMetadata `type:"structure"` 2597 } 2598 2599 // String returns the string representation. 2600 // 2601 // API parameter values that are decorated as "sensitive" in the API will not 2602 // be included in the string output. The member name will be present, but the 2603 // value will be replaced with "sensitive". 2604 func (s CreateModelOutput) String() string { 2605 return awsutil.Prettify(s) 2606 } 2607 2608 // GoString returns the string representation. 2609 // 2610 // API parameter values that are decorated as "sensitive" in the API will not 2611 // be included in the string output. The member name will be present, but the 2612 // value will be replaced with "sensitive". 2613 func (s CreateModelOutput) GoString() string { 2614 return s.String() 2615 } 2616 2617 // SetModelMetadata sets the ModelMetadata field's value. 2618 func (s *CreateModelOutput) SetModelMetadata(v *ModelMetadata) *CreateModelOutput { 2619 s.ModelMetadata = v 2620 return s 2621 } 2622 2623 type CreateProjectInput struct { 2624 _ struct{} `type:"structure"` 2625 2626 // ClientToken is an idempotency token that ensures a call to CreateProject 2627 // completes only once. You choose the value to pass. For example, An issue, 2628 // such as an network outage, might prevent you from getting a response from 2629 // CreateProject. In this case, safely retry your call to CreateProject by using 2630 // the same ClientToken parameter value. An error occurs if the other input 2631 // parameters are not the same as in the first request. Using a different value 2632 // for ClientToken is considered a new call to CreateProject. An idempotency 2633 // token is active for 8 hours. 2634 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 2635 2636 // The name for the project. 2637 // 2638 // ProjectName is a required field 2639 ProjectName *string `min:"1" type:"string" required:"true"` 2640 } 2641 2642 // String returns the string representation. 2643 // 2644 // API parameter values that are decorated as "sensitive" in the API will not 2645 // be included in the string output. The member name will be present, but the 2646 // value will be replaced with "sensitive". 2647 func (s CreateProjectInput) String() string { 2648 return awsutil.Prettify(s) 2649 } 2650 2651 // GoString returns the string representation. 2652 // 2653 // API parameter values that are decorated as "sensitive" in the API will not 2654 // be included in the string output. The member name will be present, but the 2655 // value will be replaced with "sensitive". 2656 func (s CreateProjectInput) GoString() string { 2657 return s.String() 2658 } 2659 2660 // Validate inspects the fields of the type to determine if they are valid. 2661 func (s *CreateProjectInput) Validate() error { 2662 invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"} 2663 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 2664 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 2665 } 2666 if s.ProjectName == nil { 2667 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 2668 } 2669 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 2670 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 2671 } 2672 2673 if invalidParams.Len() > 0 { 2674 return invalidParams 2675 } 2676 return nil 2677 } 2678 2679 // SetClientToken sets the ClientToken field's value. 2680 func (s *CreateProjectInput) SetClientToken(v string) *CreateProjectInput { 2681 s.ClientToken = &v 2682 return s 2683 } 2684 2685 // SetProjectName sets the ProjectName field's value. 2686 func (s *CreateProjectInput) SetProjectName(v string) *CreateProjectInput { 2687 s.ProjectName = &v 2688 return s 2689 } 2690 2691 type CreateProjectOutput struct { 2692 _ struct{} `type:"structure"` 2693 2694 // Information about the project. 2695 ProjectMetadata *ProjectMetadata `type:"structure"` 2696 } 2697 2698 // String returns the string representation. 2699 // 2700 // API parameter values that are decorated as "sensitive" in the API will not 2701 // be included in the string output. The member name will be present, but the 2702 // value will be replaced with "sensitive". 2703 func (s CreateProjectOutput) String() string { 2704 return awsutil.Prettify(s) 2705 } 2706 2707 // GoString returns the string representation. 2708 // 2709 // API parameter values that are decorated as "sensitive" in the API will not 2710 // be included in the string output. The member name will be present, but the 2711 // value will be replaced with "sensitive". 2712 func (s CreateProjectOutput) GoString() string { 2713 return s.String() 2714 } 2715 2716 // SetProjectMetadata sets the ProjectMetadata field's value. 2717 func (s *CreateProjectOutput) SetProjectMetadata(v *ProjectMetadata) *CreateProjectOutput { 2718 s.ProjectMetadata = v 2719 return s 2720 } 2721 2722 // The description for a dataset. For more information, see DescribeDataset. 2723 type DatasetDescription struct { 2724 _ struct{} `type:"structure"` 2725 2726 // The Unix timestamp for the time and date that the dataset was created. 2727 CreationTimestamp *time.Time `type:"timestamp"` 2728 2729 // The type of the dataset. The value train represents a training dataset or 2730 // single dataset project. The value test represents a test dataset. 2731 DatasetType *string `min:"1" type:"string"` 2732 2733 // Statistics about the images in a dataset. 2734 ImageStats *DatasetImageStats `type:"structure"` 2735 2736 // The Unix timestamp for the date and time that the dataset was last updated. 2737 LastUpdatedTimestamp *time.Time `type:"timestamp"` 2738 2739 // The name of the project that contains the dataset. 2740 ProjectName *string `min:"1" type:"string"` 2741 2742 // The status of the dataset. 2743 Status *string `type:"string" enum:"DatasetStatus"` 2744 2745 // The status message for the dataset. 2746 StatusMessage *string `type:"string"` 2747 } 2748 2749 // String returns the string representation. 2750 // 2751 // API parameter values that are decorated as "sensitive" in the API will not 2752 // be included in the string output. The member name will be present, but the 2753 // value will be replaced with "sensitive". 2754 func (s DatasetDescription) String() string { 2755 return awsutil.Prettify(s) 2756 } 2757 2758 // GoString returns the string representation. 2759 // 2760 // API parameter values that are decorated as "sensitive" in the API will not 2761 // be included in the string output. The member name will be present, but the 2762 // value will be replaced with "sensitive". 2763 func (s DatasetDescription) GoString() string { 2764 return s.String() 2765 } 2766 2767 // SetCreationTimestamp sets the CreationTimestamp field's value. 2768 func (s *DatasetDescription) SetCreationTimestamp(v time.Time) *DatasetDescription { 2769 s.CreationTimestamp = &v 2770 return s 2771 } 2772 2773 // SetDatasetType sets the DatasetType field's value. 2774 func (s *DatasetDescription) SetDatasetType(v string) *DatasetDescription { 2775 s.DatasetType = &v 2776 return s 2777 } 2778 2779 // SetImageStats sets the ImageStats field's value. 2780 func (s *DatasetDescription) SetImageStats(v *DatasetImageStats) *DatasetDescription { 2781 s.ImageStats = v 2782 return s 2783 } 2784 2785 // SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. 2786 func (s *DatasetDescription) SetLastUpdatedTimestamp(v time.Time) *DatasetDescription { 2787 s.LastUpdatedTimestamp = &v 2788 return s 2789 } 2790 2791 // SetProjectName sets the ProjectName field's value. 2792 func (s *DatasetDescription) SetProjectName(v string) *DatasetDescription { 2793 s.ProjectName = &v 2794 return s 2795 } 2796 2797 // SetStatus sets the Status field's value. 2798 func (s *DatasetDescription) SetStatus(v string) *DatasetDescription { 2799 s.Status = &v 2800 return s 2801 } 2802 2803 // SetStatusMessage sets the StatusMessage field's value. 2804 func (s *DatasetDescription) SetStatusMessage(v string) *DatasetDescription { 2805 s.StatusMessage = &v 2806 return s 2807 } 2808 2809 // Location information about a manifest file. You can use a manifest file to 2810 // create a dataset. 2811 type DatasetGroundTruthManifest struct { 2812 _ struct{} `type:"structure"` 2813 2814 // The S3 bucket location for the manifest file. 2815 S3Object *InputS3Object `type:"structure"` 2816 } 2817 2818 // String returns the string representation. 2819 // 2820 // API parameter values that are decorated as "sensitive" in the API will not 2821 // be included in the string output. The member name will be present, but the 2822 // value will be replaced with "sensitive". 2823 func (s DatasetGroundTruthManifest) String() string { 2824 return awsutil.Prettify(s) 2825 } 2826 2827 // GoString returns the string representation. 2828 // 2829 // API parameter values that are decorated as "sensitive" in the API will not 2830 // be included in the string output. The member name will be present, but the 2831 // value will be replaced with "sensitive". 2832 func (s DatasetGroundTruthManifest) GoString() string { 2833 return s.String() 2834 } 2835 2836 // Validate inspects the fields of the type to determine if they are valid. 2837 func (s *DatasetGroundTruthManifest) Validate() error { 2838 invalidParams := request.ErrInvalidParams{Context: "DatasetGroundTruthManifest"} 2839 if s.S3Object != nil { 2840 if err := s.S3Object.Validate(); err != nil { 2841 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 2842 } 2843 } 2844 2845 if invalidParams.Len() > 0 { 2846 return invalidParams 2847 } 2848 return nil 2849 } 2850 2851 // SetS3Object sets the S3Object field's value. 2852 func (s *DatasetGroundTruthManifest) SetS3Object(v *InputS3Object) *DatasetGroundTruthManifest { 2853 s.S3Object = v 2854 return s 2855 } 2856 2857 // Statistics about the images in a dataset. 2858 type DatasetImageStats struct { 2859 _ struct{} `type:"structure"` 2860 2861 // the total number of images labeled as an anomaly. 2862 Anomaly *int64 `type:"integer"` 2863 2864 // The total number of labeled images. 2865 Labeled *int64 `type:"integer"` 2866 2867 // The total number of images labeled as normal. 2868 Normal *int64 `type:"integer"` 2869 2870 // The total number of images in the dataset. 2871 Total *int64 `type:"integer"` 2872 } 2873 2874 // String returns the string representation. 2875 // 2876 // API parameter values that are decorated as "sensitive" in the API will not 2877 // be included in the string output. The member name will be present, but the 2878 // value will be replaced with "sensitive". 2879 func (s DatasetImageStats) String() string { 2880 return awsutil.Prettify(s) 2881 } 2882 2883 // GoString returns the string representation. 2884 // 2885 // API parameter values that are decorated as "sensitive" in the API will not 2886 // be included in the string output. The member name will be present, but the 2887 // value will be replaced with "sensitive". 2888 func (s DatasetImageStats) GoString() string { 2889 return s.String() 2890 } 2891 2892 // SetAnomaly sets the Anomaly field's value. 2893 func (s *DatasetImageStats) SetAnomaly(v int64) *DatasetImageStats { 2894 s.Anomaly = &v 2895 return s 2896 } 2897 2898 // SetLabeled sets the Labeled field's value. 2899 func (s *DatasetImageStats) SetLabeled(v int64) *DatasetImageStats { 2900 s.Labeled = &v 2901 return s 2902 } 2903 2904 // SetNormal sets the Normal field's value. 2905 func (s *DatasetImageStats) SetNormal(v int64) *DatasetImageStats { 2906 s.Normal = &v 2907 return s 2908 } 2909 2910 // SetTotal sets the Total field's value. 2911 func (s *DatasetImageStats) SetTotal(v int64) *DatasetImageStats { 2912 s.Total = &v 2913 return s 2914 } 2915 2916 // Sumary information for an Amazon Lookout for Vision dataset. 2917 type DatasetMetadata struct { 2918 _ struct{} `type:"structure"` 2919 2920 // The Unix timestamp for the date and time that the dataset was created. 2921 CreationTimestamp *time.Time `type:"timestamp"` 2922 2923 // The type of the dataset. 2924 DatasetType *string `min:"1" type:"string"` 2925 2926 // The status for the dataset. 2927 Status *string `type:"string" enum:"DatasetStatus"` 2928 2929 // The status message for the dataset. 2930 StatusMessage *string `type:"string"` 2931 } 2932 2933 // String returns the string representation. 2934 // 2935 // API parameter values that are decorated as "sensitive" in the API will not 2936 // be included in the string output. The member name will be present, but the 2937 // value will be replaced with "sensitive". 2938 func (s DatasetMetadata) String() string { 2939 return awsutil.Prettify(s) 2940 } 2941 2942 // GoString returns the string representation. 2943 // 2944 // API parameter values that are decorated as "sensitive" in the API will not 2945 // be included in the string output. The member name will be present, but the 2946 // value will be replaced with "sensitive". 2947 func (s DatasetMetadata) GoString() string { 2948 return s.String() 2949 } 2950 2951 // SetCreationTimestamp sets the CreationTimestamp field's value. 2952 func (s *DatasetMetadata) SetCreationTimestamp(v time.Time) *DatasetMetadata { 2953 s.CreationTimestamp = &v 2954 return s 2955 } 2956 2957 // SetDatasetType sets the DatasetType field's value. 2958 func (s *DatasetMetadata) SetDatasetType(v string) *DatasetMetadata { 2959 s.DatasetType = &v 2960 return s 2961 } 2962 2963 // SetStatus sets the Status field's value. 2964 func (s *DatasetMetadata) SetStatus(v string) *DatasetMetadata { 2965 s.Status = &v 2966 return s 2967 } 2968 2969 // SetStatusMessage sets the StatusMessage field's value. 2970 func (s *DatasetMetadata) SetStatusMessage(v string) *DatasetMetadata { 2971 s.StatusMessage = &v 2972 return s 2973 } 2974 2975 // Information about the location of a manifest file that Amazon Lookout for 2976 // Vision uses to to create a dataset. 2977 type DatasetSource struct { 2978 _ struct{} `type:"structure"` 2979 2980 // Location information for the manifest file. 2981 GroundTruthManifest *DatasetGroundTruthManifest `type:"structure"` 2982 } 2983 2984 // String returns the string representation. 2985 // 2986 // API parameter values that are decorated as "sensitive" in the API will not 2987 // be included in the string output. The member name will be present, but the 2988 // value will be replaced with "sensitive". 2989 func (s DatasetSource) String() string { 2990 return awsutil.Prettify(s) 2991 } 2992 2993 // GoString returns the string representation. 2994 // 2995 // API parameter values that are decorated as "sensitive" in the API will not 2996 // be included in the string output. The member name will be present, but the 2997 // value will be replaced with "sensitive". 2998 func (s DatasetSource) GoString() string { 2999 return s.String() 3000 } 3001 3002 // Validate inspects the fields of the type to determine if they are valid. 3003 func (s *DatasetSource) Validate() error { 3004 invalidParams := request.ErrInvalidParams{Context: "DatasetSource"} 3005 if s.GroundTruthManifest != nil { 3006 if err := s.GroundTruthManifest.Validate(); err != nil { 3007 invalidParams.AddNested("GroundTruthManifest", err.(request.ErrInvalidParams)) 3008 } 3009 } 3010 3011 if invalidParams.Len() > 0 { 3012 return invalidParams 3013 } 3014 return nil 3015 } 3016 3017 // SetGroundTruthManifest sets the GroundTruthManifest field's value. 3018 func (s *DatasetSource) SetGroundTruthManifest(v *DatasetGroundTruthManifest) *DatasetSource { 3019 s.GroundTruthManifest = v 3020 return s 3021 } 3022 3023 type DeleteDatasetInput struct { 3024 _ struct{} `type:"structure" nopayload:"true"` 3025 3026 // ClientToken is an idempotency token that ensures a call to DeleteDataset 3027 // completes only once. You choose the value to pass. For example, An issue, 3028 // such as an network outage, might prevent you from getting a response from 3029 // DeleteDataset. In this case, safely retry your call to DeleteDataset by using 3030 // the same ClientToken parameter value. An error occurs if the other input 3031 // parameters are not the same as in the first request. Using a different value 3032 // for ClientToken is considered a new call to DeleteDataset. An idempotency 3033 // token is active for 8 hours. 3034 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 3035 3036 // The type of the dataset to delete. Specify train to delete the training dataset. 3037 // Specify test to delete the test dataset. To delete the dataset in a single 3038 // dataset project, specify train. 3039 // 3040 // DatasetType is a required field 3041 DatasetType *string `location:"uri" locationName:"datasetType" min:"1" type:"string" required:"true"` 3042 3043 // The name of the project that contains the dataset that you want to delete. 3044 // 3045 // ProjectName is a required field 3046 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3047 } 3048 3049 // String returns the string representation. 3050 // 3051 // API parameter values that are decorated as "sensitive" in the API will not 3052 // be included in the string output. The member name will be present, but the 3053 // value will be replaced with "sensitive". 3054 func (s DeleteDatasetInput) String() string { 3055 return awsutil.Prettify(s) 3056 } 3057 3058 // GoString returns the string representation. 3059 // 3060 // API parameter values that are decorated as "sensitive" in the API will not 3061 // be included in the string output. The member name will be present, but the 3062 // value will be replaced with "sensitive". 3063 func (s DeleteDatasetInput) GoString() string { 3064 return s.String() 3065 } 3066 3067 // Validate inspects the fields of the type to determine if they are valid. 3068 func (s *DeleteDatasetInput) Validate() error { 3069 invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"} 3070 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 3071 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 3072 } 3073 if s.DatasetType == nil { 3074 invalidParams.Add(request.NewErrParamRequired("DatasetType")) 3075 } 3076 if s.DatasetType != nil && len(*s.DatasetType) < 1 { 3077 invalidParams.Add(request.NewErrParamMinLen("DatasetType", 1)) 3078 } 3079 if s.ProjectName == nil { 3080 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3081 } 3082 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3083 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3084 } 3085 3086 if invalidParams.Len() > 0 { 3087 return invalidParams 3088 } 3089 return nil 3090 } 3091 3092 // SetClientToken sets the ClientToken field's value. 3093 func (s *DeleteDatasetInput) SetClientToken(v string) *DeleteDatasetInput { 3094 s.ClientToken = &v 3095 return s 3096 } 3097 3098 // SetDatasetType sets the DatasetType field's value. 3099 func (s *DeleteDatasetInput) SetDatasetType(v string) *DeleteDatasetInput { 3100 s.DatasetType = &v 3101 return s 3102 } 3103 3104 // SetProjectName sets the ProjectName field's value. 3105 func (s *DeleteDatasetInput) SetProjectName(v string) *DeleteDatasetInput { 3106 s.ProjectName = &v 3107 return s 3108 } 3109 3110 type DeleteDatasetOutput struct { 3111 _ struct{} `type:"structure" nopayload:"true"` 3112 } 3113 3114 // String returns the string representation. 3115 // 3116 // API parameter values that are decorated as "sensitive" in the API will not 3117 // be included in the string output. The member name will be present, but the 3118 // value will be replaced with "sensitive". 3119 func (s DeleteDatasetOutput) String() string { 3120 return awsutil.Prettify(s) 3121 } 3122 3123 // GoString returns the string representation. 3124 // 3125 // API parameter values that are decorated as "sensitive" in the API will not 3126 // be included in the string output. The member name will be present, but the 3127 // value will be replaced with "sensitive". 3128 func (s DeleteDatasetOutput) GoString() string { 3129 return s.String() 3130 } 3131 3132 type DeleteModelInput struct { 3133 _ struct{} `type:"structure" nopayload:"true"` 3134 3135 // ClientToken is an idempotency token that ensures a call to DeleteModel completes 3136 // only once. You choose the value to pass. For example, An issue, such as an 3137 // network outage, might prevent you from getting a response from DeleteModel. 3138 // In this case, safely retry your call to DeleteModel by using the same ClientToken 3139 // parameter value. An error occurs if the other input parameters are not the 3140 // same as in the first request. Using a different value for ClientToken is 3141 // considered a new call to DeleteModel. An idempotency token is active for 3142 // 8 hours. 3143 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 3144 3145 // The version of the model that you want to delete. 3146 // 3147 // ModelVersion is a required field 3148 ModelVersion *string `location:"uri" locationName:"modelVersion" min:"1" type:"string" required:"true"` 3149 3150 // The name of the project that contains the model that you want to delete. 3151 // 3152 // ProjectName is a required field 3153 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3154 } 3155 3156 // String returns the string representation. 3157 // 3158 // API parameter values that are decorated as "sensitive" in the API will not 3159 // be included in the string output. The member name will be present, but the 3160 // value will be replaced with "sensitive". 3161 func (s DeleteModelInput) String() string { 3162 return awsutil.Prettify(s) 3163 } 3164 3165 // GoString returns the string representation. 3166 // 3167 // API parameter values that are decorated as "sensitive" in the API will not 3168 // be included in the string output. The member name will be present, but the 3169 // value will be replaced with "sensitive". 3170 func (s DeleteModelInput) GoString() string { 3171 return s.String() 3172 } 3173 3174 // Validate inspects the fields of the type to determine if they are valid. 3175 func (s *DeleteModelInput) Validate() error { 3176 invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} 3177 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 3178 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 3179 } 3180 if s.ModelVersion == nil { 3181 invalidParams.Add(request.NewErrParamRequired("ModelVersion")) 3182 } 3183 if s.ModelVersion != nil && len(*s.ModelVersion) < 1 { 3184 invalidParams.Add(request.NewErrParamMinLen("ModelVersion", 1)) 3185 } 3186 if s.ProjectName == nil { 3187 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3188 } 3189 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3190 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3191 } 3192 3193 if invalidParams.Len() > 0 { 3194 return invalidParams 3195 } 3196 return nil 3197 } 3198 3199 // SetClientToken sets the ClientToken field's value. 3200 func (s *DeleteModelInput) SetClientToken(v string) *DeleteModelInput { 3201 s.ClientToken = &v 3202 return s 3203 } 3204 3205 // SetModelVersion sets the ModelVersion field's value. 3206 func (s *DeleteModelInput) SetModelVersion(v string) *DeleteModelInput { 3207 s.ModelVersion = &v 3208 return s 3209 } 3210 3211 // SetProjectName sets the ProjectName field's value. 3212 func (s *DeleteModelInput) SetProjectName(v string) *DeleteModelInput { 3213 s.ProjectName = &v 3214 return s 3215 } 3216 3217 type DeleteModelOutput struct { 3218 _ struct{} `type:"structure"` 3219 3220 // The Amazon Resource Name (ARN) of the model that was deleted. 3221 ModelArn *string `type:"string"` 3222 } 3223 3224 // String returns the string representation. 3225 // 3226 // API parameter values that are decorated as "sensitive" in the API will not 3227 // be included in the string output. The member name will be present, but the 3228 // value will be replaced with "sensitive". 3229 func (s DeleteModelOutput) String() string { 3230 return awsutil.Prettify(s) 3231 } 3232 3233 // GoString returns the string representation. 3234 // 3235 // API parameter values that are decorated as "sensitive" in the API will not 3236 // be included in the string output. The member name will be present, but the 3237 // value will be replaced with "sensitive". 3238 func (s DeleteModelOutput) GoString() string { 3239 return s.String() 3240 } 3241 3242 // SetModelArn sets the ModelArn field's value. 3243 func (s *DeleteModelOutput) SetModelArn(v string) *DeleteModelOutput { 3244 s.ModelArn = &v 3245 return s 3246 } 3247 3248 type DeleteProjectInput struct { 3249 _ struct{} `type:"structure" nopayload:"true"` 3250 3251 // ClientToken is an idempotency token that ensures a call to DeleteProject 3252 // completes only once. You choose the value to pass. For example, An issue, 3253 // such as an network outage, might prevent you from getting a response from 3254 // DeleteProject. In this case, safely retry your call to DeleteProject by using 3255 // the same ClientToken parameter value. An error occurs if the other input 3256 // parameters are not the same as in the first request. Using a different value 3257 // for ClientToken is considered a new call to DeleteProject. An idempotency 3258 // token is active for 8 hours. 3259 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 3260 3261 // The name of the project to delete. 3262 // 3263 // ProjectName is a required field 3264 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3265 } 3266 3267 // String returns the string representation. 3268 // 3269 // API parameter values that are decorated as "sensitive" in the API will not 3270 // be included in the string output. The member name will be present, but the 3271 // value will be replaced with "sensitive". 3272 func (s DeleteProjectInput) String() string { 3273 return awsutil.Prettify(s) 3274 } 3275 3276 // GoString returns the string representation. 3277 // 3278 // API parameter values that are decorated as "sensitive" in the API will not 3279 // be included in the string output. The member name will be present, but the 3280 // value will be replaced with "sensitive". 3281 func (s DeleteProjectInput) GoString() string { 3282 return s.String() 3283 } 3284 3285 // Validate inspects the fields of the type to determine if they are valid. 3286 func (s *DeleteProjectInput) Validate() error { 3287 invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"} 3288 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 3289 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 3290 } 3291 if s.ProjectName == nil { 3292 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3293 } 3294 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3295 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3296 } 3297 3298 if invalidParams.Len() > 0 { 3299 return invalidParams 3300 } 3301 return nil 3302 } 3303 3304 // SetClientToken sets the ClientToken field's value. 3305 func (s *DeleteProjectInput) SetClientToken(v string) *DeleteProjectInput { 3306 s.ClientToken = &v 3307 return s 3308 } 3309 3310 // SetProjectName sets the ProjectName field's value. 3311 func (s *DeleteProjectInput) SetProjectName(v string) *DeleteProjectInput { 3312 s.ProjectName = &v 3313 return s 3314 } 3315 3316 type DeleteProjectOutput struct { 3317 _ struct{} `type:"structure"` 3318 3319 // The Amazon Resource Name (ARN) of the project that was deleted. 3320 ProjectArn *string `type:"string"` 3321 } 3322 3323 // String returns the string representation. 3324 // 3325 // API parameter values that are decorated as "sensitive" in the API will not 3326 // be included in the string output. The member name will be present, but the 3327 // value will be replaced with "sensitive". 3328 func (s DeleteProjectOutput) String() string { 3329 return awsutil.Prettify(s) 3330 } 3331 3332 // GoString returns the string representation. 3333 // 3334 // API parameter values that are decorated as "sensitive" in the API will not 3335 // be included in the string output. The member name will be present, but the 3336 // value will be replaced with "sensitive". 3337 func (s DeleteProjectOutput) GoString() string { 3338 return s.String() 3339 } 3340 3341 // SetProjectArn sets the ProjectArn field's value. 3342 func (s *DeleteProjectOutput) SetProjectArn(v string) *DeleteProjectOutput { 3343 s.ProjectArn = &v 3344 return s 3345 } 3346 3347 type DescribeDatasetInput struct { 3348 _ struct{} `type:"structure" nopayload:"true"` 3349 3350 // The type of the dataset to describe. Specify train to describe the training 3351 // dataset. Specify test to describe the test dataset. If you have a single 3352 // dataset project, specify train 3353 // 3354 // DatasetType is a required field 3355 DatasetType *string `location:"uri" locationName:"datasetType" min:"1" type:"string" required:"true"` 3356 3357 // The name of the project that contains the dataset that you want to describe. 3358 // 3359 // ProjectName is a required field 3360 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3361 } 3362 3363 // String returns the string representation. 3364 // 3365 // API parameter values that are decorated as "sensitive" in the API will not 3366 // be included in the string output. The member name will be present, but the 3367 // value will be replaced with "sensitive". 3368 func (s DescribeDatasetInput) String() string { 3369 return awsutil.Prettify(s) 3370 } 3371 3372 // GoString returns the string representation. 3373 // 3374 // API parameter values that are decorated as "sensitive" in the API will not 3375 // be included in the string output. The member name will be present, but the 3376 // value will be replaced with "sensitive". 3377 func (s DescribeDatasetInput) GoString() string { 3378 return s.String() 3379 } 3380 3381 // Validate inspects the fields of the type to determine if they are valid. 3382 func (s *DescribeDatasetInput) Validate() error { 3383 invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"} 3384 if s.DatasetType == nil { 3385 invalidParams.Add(request.NewErrParamRequired("DatasetType")) 3386 } 3387 if s.DatasetType != nil && len(*s.DatasetType) < 1 { 3388 invalidParams.Add(request.NewErrParamMinLen("DatasetType", 1)) 3389 } 3390 if s.ProjectName == nil { 3391 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3392 } 3393 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3394 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3395 } 3396 3397 if invalidParams.Len() > 0 { 3398 return invalidParams 3399 } 3400 return nil 3401 } 3402 3403 // SetDatasetType sets the DatasetType field's value. 3404 func (s *DescribeDatasetInput) SetDatasetType(v string) *DescribeDatasetInput { 3405 s.DatasetType = &v 3406 return s 3407 } 3408 3409 // SetProjectName sets the ProjectName field's value. 3410 func (s *DescribeDatasetInput) SetProjectName(v string) *DescribeDatasetInput { 3411 s.ProjectName = &v 3412 return s 3413 } 3414 3415 type DescribeDatasetOutput struct { 3416 _ struct{} `type:"structure"` 3417 3418 // The description of the requested dataset. 3419 DatasetDescription *DatasetDescription `type:"structure"` 3420 } 3421 3422 // String returns the string representation. 3423 // 3424 // API parameter values that are decorated as "sensitive" in the API will not 3425 // be included in the string output. The member name will be present, but the 3426 // value will be replaced with "sensitive". 3427 func (s DescribeDatasetOutput) String() string { 3428 return awsutil.Prettify(s) 3429 } 3430 3431 // GoString returns the string representation. 3432 // 3433 // API parameter values that are decorated as "sensitive" in the API will not 3434 // be included in the string output. The member name will be present, but the 3435 // value will be replaced with "sensitive". 3436 func (s DescribeDatasetOutput) GoString() string { 3437 return s.String() 3438 } 3439 3440 // SetDatasetDescription sets the DatasetDescription field's value. 3441 func (s *DescribeDatasetOutput) SetDatasetDescription(v *DatasetDescription) *DescribeDatasetOutput { 3442 s.DatasetDescription = v 3443 return s 3444 } 3445 3446 type DescribeModelInput struct { 3447 _ struct{} `type:"structure" nopayload:"true"` 3448 3449 // The version of the model that you want to describe. 3450 // 3451 // ModelVersion is a required field 3452 ModelVersion *string `location:"uri" locationName:"modelVersion" min:"1" type:"string" required:"true"` 3453 3454 // The project that contains the version of a model that you want to describe. 3455 // 3456 // ProjectName is a required field 3457 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3458 } 3459 3460 // String returns the string representation. 3461 // 3462 // API parameter values that are decorated as "sensitive" in the API will not 3463 // be included in the string output. The member name will be present, but the 3464 // value will be replaced with "sensitive". 3465 func (s DescribeModelInput) String() string { 3466 return awsutil.Prettify(s) 3467 } 3468 3469 // GoString returns the string representation. 3470 // 3471 // API parameter values that are decorated as "sensitive" in the API will not 3472 // be included in the string output. The member name will be present, but the 3473 // value will be replaced with "sensitive". 3474 func (s DescribeModelInput) GoString() string { 3475 return s.String() 3476 } 3477 3478 // Validate inspects the fields of the type to determine if they are valid. 3479 func (s *DescribeModelInput) Validate() error { 3480 invalidParams := request.ErrInvalidParams{Context: "DescribeModelInput"} 3481 if s.ModelVersion == nil { 3482 invalidParams.Add(request.NewErrParamRequired("ModelVersion")) 3483 } 3484 if s.ModelVersion != nil && len(*s.ModelVersion) < 1 { 3485 invalidParams.Add(request.NewErrParamMinLen("ModelVersion", 1)) 3486 } 3487 if s.ProjectName == nil { 3488 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3489 } 3490 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3491 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3492 } 3493 3494 if invalidParams.Len() > 0 { 3495 return invalidParams 3496 } 3497 return nil 3498 } 3499 3500 // SetModelVersion sets the ModelVersion field's value. 3501 func (s *DescribeModelInput) SetModelVersion(v string) *DescribeModelInput { 3502 s.ModelVersion = &v 3503 return s 3504 } 3505 3506 // SetProjectName sets the ProjectName field's value. 3507 func (s *DescribeModelInput) SetProjectName(v string) *DescribeModelInput { 3508 s.ProjectName = &v 3509 return s 3510 } 3511 3512 type DescribeModelOutput struct { 3513 _ struct{} `type:"structure"` 3514 3515 // Contains the description of the model. 3516 ModelDescription *ModelDescription `type:"structure"` 3517 } 3518 3519 // String returns the string representation. 3520 // 3521 // API parameter values that are decorated as "sensitive" in the API will not 3522 // be included in the string output. The member name will be present, but the 3523 // value will be replaced with "sensitive". 3524 func (s DescribeModelOutput) String() string { 3525 return awsutil.Prettify(s) 3526 } 3527 3528 // GoString returns the string representation. 3529 // 3530 // API parameter values that are decorated as "sensitive" in the API will not 3531 // be included in the string output. The member name will be present, but the 3532 // value will be replaced with "sensitive". 3533 func (s DescribeModelOutput) GoString() string { 3534 return s.String() 3535 } 3536 3537 // SetModelDescription sets the ModelDescription field's value. 3538 func (s *DescribeModelOutput) SetModelDescription(v *ModelDescription) *DescribeModelOutput { 3539 s.ModelDescription = v 3540 return s 3541 } 3542 3543 type DescribeProjectInput struct { 3544 _ struct{} `type:"structure" nopayload:"true"` 3545 3546 // The name of the project that you want to describe. 3547 // 3548 // ProjectName is a required field 3549 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3550 } 3551 3552 // String returns the string representation. 3553 // 3554 // API parameter values that are decorated as "sensitive" in the API will not 3555 // be included in the string output. The member name will be present, but the 3556 // value will be replaced with "sensitive". 3557 func (s DescribeProjectInput) String() string { 3558 return awsutil.Prettify(s) 3559 } 3560 3561 // GoString returns the string representation. 3562 // 3563 // API parameter values that are decorated as "sensitive" in the API will not 3564 // be included in the string output. The member name will be present, but the 3565 // value will be replaced with "sensitive". 3566 func (s DescribeProjectInput) GoString() string { 3567 return s.String() 3568 } 3569 3570 // Validate inspects the fields of the type to determine if they are valid. 3571 func (s *DescribeProjectInput) Validate() error { 3572 invalidParams := request.ErrInvalidParams{Context: "DescribeProjectInput"} 3573 if s.ProjectName == nil { 3574 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3575 } 3576 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3577 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3578 } 3579 3580 if invalidParams.Len() > 0 { 3581 return invalidParams 3582 } 3583 return nil 3584 } 3585 3586 // SetProjectName sets the ProjectName field's value. 3587 func (s *DescribeProjectInput) SetProjectName(v string) *DescribeProjectInput { 3588 s.ProjectName = &v 3589 return s 3590 } 3591 3592 type DescribeProjectOutput struct { 3593 _ struct{} `type:"structure"` 3594 3595 // The description of the project. 3596 ProjectDescription *ProjectDescription `type:"structure"` 3597 } 3598 3599 // String returns the string representation. 3600 // 3601 // API parameter values that are decorated as "sensitive" in the API will not 3602 // be included in the string output. The member name will be present, but the 3603 // value will be replaced with "sensitive". 3604 func (s DescribeProjectOutput) String() string { 3605 return awsutil.Prettify(s) 3606 } 3607 3608 // GoString returns the string representation. 3609 // 3610 // API parameter values that are decorated as "sensitive" in the API will not 3611 // be included in the string output. The member name will be present, but the 3612 // value will be replaced with "sensitive". 3613 func (s DescribeProjectOutput) GoString() string { 3614 return s.String() 3615 } 3616 3617 // SetProjectDescription sets the ProjectDescription field's value. 3618 func (s *DescribeProjectOutput) SetProjectDescription(v *ProjectDescription) *DescribeProjectOutput { 3619 s.ProjectDescription = v 3620 return s 3621 } 3622 3623 type DetectAnomaliesInput struct { 3624 _ struct{} `type:"structure" payload:"Body"` 3625 3626 // The unencrypted image bytes that you want to analyze. 3627 // 3628 // Body is a required field 3629 Body io.ReadSeeker `type:"blob" required:"true"` 3630 3631 // The type of the image passed in Body. Valid values are image/png (PNG format 3632 // images) and image/jpeg (JPG format images). 3633 // 3634 // ContentType is a required field 3635 ContentType *string `location:"header" locationName:"Content-Type" min:"1" type:"string" required:"true"` 3636 3637 // The version of the model that you want to use. 3638 // 3639 // ModelVersion is a required field 3640 ModelVersion *string `location:"uri" locationName:"modelVersion" min:"1" type:"string" required:"true"` 3641 3642 // The name of the project that contains the model version that you want to 3643 // use. 3644 // 3645 // ProjectName is a required field 3646 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 3647 } 3648 3649 // String returns the string representation. 3650 // 3651 // API parameter values that are decorated as "sensitive" in the API will not 3652 // be included in the string output. The member name will be present, but the 3653 // value will be replaced with "sensitive". 3654 func (s DetectAnomaliesInput) String() string { 3655 return awsutil.Prettify(s) 3656 } 3657 3658 // GoString returns the string representation. 3659 // 3660 // API parameter values that are decorated as "sensitive" in the API will not 3661 // be included in the string output. The member name will be present, but the 3662 // value will be replaced with "sensitive". 3663 func (s DetectAnomaliesInput) GoString() string { 3664 return s.String() 3665 } 3666 3667 // Validate inspects the fields of the type to determine if they are valid. 3668 func (s *DetectAnomaliesInput) Validate() error { 3669 invalidParams := request.ErrInvalidParams{Context: "DetectAnomaliesInput"} 3670 if s.Body == nil { 3671 invalidParams.Add(request.NewErrParamRequired("Body")) 3672 } 3673 if s.ContentType == nil { 3674 invalidParams.Add(request.NewErrParamRequired("ContentType")) 3675 } 3676 if s.ContentType != nil && len(*s.ContentType) < 1 { 3677 invalidParams.Add(request.NewErrParamMinLen("ContentType", 1)) 3678 } 3679 if s.ModelVersion == nil { 3680 invalidParams.Add(request.NewErrParamRequired("ModelVersion")) 3681 } 3682 if s.ModelVersion != nil && len(*s.ModelVersion) < 1 { 3683 invalidParams.Add(request.NewErrParamMinLen("ModelVersion", 1)) 3684 } 3685 if s.ProjectName == nil { 3686 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 3687 } 3688 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 3689 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 3690 } 3691 3692 if invalidParams.Len() > 0 { 3693 return invalidParams 3694 } 3695 return nil 3696 } 3697 3698 // SetBody sets the Body field's value. 3699 func (s *DetectAnomaliesInput) SetBody(v io.ReadSeeker) *DetectAnomaliesInput { 3700 s.Body = v 3701 return s 3702 } 3703 3704 // SetContentType sets the ContentType field's value. 3705 func (s *DetectAnomaliesInput) SetContentType(v string) *DetectAnomaliesInput { 3706 s.ContentType = &v 3707 return s 3708 } 3709 3710 // SetModelVersion sets the ModelVersion field's value. 3711 func (s *DetectAnomaliesInput) SetModelVersion(v string) *DetectAnomaliesInput { 3712 s.ModelVersion = &v 3713 return s 3714 } 3715 3716 // SetProjectName sets the ProjectName field's value. 3717 func (s *DetectAnomaliesInput) SetProjectName(v string) *DetectAnomaliesInput { 3718 s.ProjectName = &v 3719 return s 3720 } 3721 3722 type DetectAnomaliesOutput struct { 3723 _ struct{} `type:"structure"` 3724 3725 // The results of the DetectAnomalies operation. 3726 DetectAnomalyResult *DetectAnomalyResult `type:"structure"` 3727 } 3728 3729 // String returns the string representation. 3730 // 3731 // API parameter values that are decorated as "sensitive" in the API will not 3732 // be included in the string output. The member name will be present, but the 3733 // value will be replaced with "sensitive". 3734 func (s DetectAnomaliesOutput) String() string { 3735 return awsutil.Prettify(s) 3736 } 3737 3738 // GoString returns the string representation. 3739 // 3740 // API parameter values that are decorated as "sensitive" in the API will not 3741 // be included in the string output. The member name will be present, but the 3742 // value will be replaced with "sensitive". 3743 func (s DetectAnomaliesOutput) GoString() string { 3744 return s.String() 3745 } 3746 3747 // SetDetectAnomalyResult sets the DetectAnomalyResult field's value. 3748 func (s *DetectAnomaliesOutput) SetDetectAnomalyResult(v *DetectAnomalyResult) *DetectAnomaliesOutput { 3749 s.DetectAnomalyResult = v 3750 return s 3751 } 3752 3753 // The prediction results from a call to DetectAnomalies. 3754 type DetectAnomalyResult struct { 3755 _ struct{} `type:"structure"` 3756 3757 // The confidence that Amazon Lookout for Vision has in the accuracy of the 3758 // prediction. 3759 Confidence *float64 `type:"float"` 3760 3761 // True if the image contains an anomaly, otherwise false. 3762 IsAnomalous *bool `type:"boolean"` 3763 3764 // The source of the image that was analyzed. direct means that the images was 3765 // supplied from the local computer. No other values are supported. 3766 Source *ImageSource `type:"structure"` 3767 } 3768 3769 // String returns the string representation. 3770 // 3771 // API parameter values that are decorated as "sensitive" in the API will not 3772 // be included in the string output. The member name will be present, but the 3773 // value will be replaced with "sensitive". 3774 func (s DetectAnomalyResult) String() string { 3775 return awsutil.Prettify(s) 3776 } 3777 3778 // GoString returns the string representation. 3779 // 3780 // API parameter values that are decorated as "sensitive" in the API will not 3781 // be included in the string output. The member name will be present, but the 3782 // value will be replaced with "sensitive". 3783 func (s DetectAnomalyResult) GoString() string { 3784 return s.String() 3785 } 3786 3787 // SetConfidence sets the Confidence field's value. 3788 func (s *DetectAnomalyResult) SetConfidence(v float64) *DetectAnomalyResult { 3789 s.Confidence = &v 3790 return s 3791 } 3792 3793 // SetIsAnomalous sets the IsAnomalous field's value. 3794 func (s *DetectAnomalyResult) SetIsAnomalous(v bool) *DetectAnomalyResult { 3795 s.IsAnomalous = &v 3796 return s 3797 } 3798 3799 // SetSource sets the Source field's value. 3800 func (s *DetectAnomalyResult) SetSource(v *ImageSource) *DetectAnomalyResult { 3801 s.Source = v 3802 return s 3803 } 3804 3805 // The source for an image. 3806 type ImageSource struct { 3807 _ struct{} `type:"structure"` 3808 3809 // The type of the image. 3810 Type *string `type:"string"` 3811 } 3812 3813 // String returns the string representation. 3814 // 3815 // API parameter values that are decorated as "sensitive" in the API will not 3816 // be included in the string output. The member name will be present, but the 3817 // value will be replaced with "sensitive". 3818 func (s ImageSource) String() string { 3819 return awsutil.Prettify(s) 3820 } 3821 3822 // GoString returns the string representation. 3823 // 3824 // API parameter values that are decorated as "sensitive" in the API will not 3825 // be included in the string output. The member name will be present, but the 3826 // value will be replaced with "sensitive". 3827 func (s ImageSource) GoString() string { 3828 return s.String() 3829 } 3830 3831 // SetType sets the Type field's value. 3832 func (s *ImageSource) SetType(v string) *ImageSource { 3833 s.Type = &v 3834 return s 3835 } 3836 3837 // Amazon S3 Location information for an input manifest file. 3838 type InputS3Object struct { 3839 _ struct{} `type:"structure"` 3840 3841 // The Amazon S3 bucket that contains the manifest. 3842 // 3843 // Bucket is a required field 3844 Bucket *string `min:"3" type:"string" required:"true"` 3845 3846 // The name and location of the manifest file withiin the bucket. 3847 // 3848 // Key is a required field 3849 Key *string `min:"1" type:"string" required:"true"` 3850 3851 // The version ID of the bucket. 3852 VersionId *string `min:"1" type:"string"` 3853 } 3854 3855 // String returns the string representation. 3856 // 3857 // API parameter values that are decorated as "sensitive" in the API will not 3858 // be included in the string output. The member name will be present, but the 3859 // value will be replaced with "sensitive". 3860 func (s InputS3Object) String() string { 3861 return awsutil.Prettify(s) 3862 } 3863 3864 // GoString returns the string representation. 3865 // 3866 // API parameter values that are decorated as "sensitive" in the API will not 3867 // be included in the string output. The member name will be present, but the 3868 // value will be replaced with "sensitive". 3869 func (s InputS3Object) GoString() string { 3870 return s.String() 3871 } 3872 3873 // Validate inspects the fields of the type to determine if they are valid. 3874 func (s *InputS3Object) Validate() error { 3875 invalidParams := request.ErrInvalidParams{Context: "InputS3Object"} 3876 if s.Bucket == nil { 3877 invalidParams.Add(request.NewErrParamRequired("Bucket")) 3878 } 3879 if s.Bucket != nil && len(*s.Bucket) < 3 { 3880 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 3881 } 3882 if s.Key == nil { 3883 invalidParams.Add(request.NewErrParamRequired("Key")) 3884 } 3885 if s.Key != nil && len(*s.Key) < 1 { 3886 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 3887 } 3888 if s.VersionId != nil && len(*s.VersionId) < 1 { 3889 invalidParams.Add(request.NewErrParamMinLen("VersionId", 1)) 3890 } 3891 3892 if invalidParams.Len() > 0 { 3893 return invalidParams 3894 } 3895 return nil 3896 } 3897 3898 // SetBucket sets the Bucket field's value. 3899 func (s *InputS3Object) SetBucket(v string) *InputS3Object { 3900 s.Bucket = &v 3901 return s 3902 } 3903 3904 // SetKey sets the Key field's value. 3905 func (s *InputS3Object) SetKey(v string) *InputS3Object { 3906 s.Key = &v 3907 return s 3908 } 3909 3910 // SetVersionId sets the VersionId field's value. 3911 func (s *InputS3Object) SetVersionId(v string) *InputS3Object { 3912 s.VersionId = &v 3913 return s 3914 } 3915 3916 // Amazon Lookout for Vision experienced a service issue. Try your call again. 3917 type InternalServerException struct { 3918 _ struct{} `type:"structure"` 3919 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3920 3921 Message_ *string `locationName:"Message" type:"string"` 3922 3923 // The period of time, in seconds, before the operation can be retried. 3924 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 3925 } 3926 3927 // String returns the string representation. 3928 // 3929 // API parameter values that are decorated as "sensitive" in the API will not 3930 // be included in the string output. The member name will be present, but the 3931 // value will be replaced with "sensitive". 3932 func (s InternalServerException) String() string { 3933 return awsutil.Prettify(s) 3934 } 3935 3936 // GoString returns the string representation. 3937 // 3938 // API parameter values that are decorated as "sensitive" in the API will not 3939 // be included in the string output. The member name will be present, but the 3940 // value will be replaced with "sensitive". 3941 func (s InternalServerException) GoString() string { 3942 return s.String() 3943 } 3944 3945 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3946 return &InternalServerException{ 3947 RespMetadata: v, 3948 } 3949 } 3950 3951 // Code returns the exception type name. 3952 func (s *InternalServerException) Code() string { 3953 return "InternalServerException" 3954 } 3955 3956 // Message returns the exception's message. 3957 func (s *InternalServerException) Message() string { 3958 if s.Message_ != nil { 3959 return *s.Message_ 3960 } 3961 return "" 3962 } 3963 3964 // OrigErr always returns nil, satisfies awserr.Error interface. 3965 func (s *InternalServerException) OrigErr() error { 3966 return nil 3967 } 3968 3969 func (s *InternalServerException) Error() string { 3970 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3971 } 3972 3973 // Status code returns the HTTP status code for the request's response error. 3974 func (s *InternalServerException) StatusCode() int { 3975 return s.RespMetadata.StatusCode 3976 } 3977 3978 // RequestID returns the service's response RequestID for request. 3979 func (s *InternalServerException) RequestID() string { 3980 return s.RespMetadata.RequestID 3981 } 3982 3983 type ListDatasetEntriesInput struct { 3984 _ struct{} `type:"structure" nopayload:"true"` 3985 3986 // Only includes entries after the specified date in the response. For example, 3987 // 2020-06-23T00:00:00. 3988 AfterCreationDate *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"` 3989 3990 // Specify normal to include only normal images. Specify anomaly to only include 3991 // anomalous entries. If you don't specify a value, Amazon Lookout for Vision 3992 // returns normal and anomalous images. 3993 AnomalyClass *string `location:"querystring" locationName:"anomalyClass" min:"1" type:"string"` 3994 3995 // Only includes entries before the specified date in the response. For example, 3996 // 2020-06-23T00:00:00. 3997 BeforeCreationDate *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"` 3998 3999 // The type of the dataset that you want to list. Specify train to list the 4000 // training dataset. Specify test to list the test dataset. If you have a single 4001 // dataset project, specify train. 4002 // 4003 // DatasetType is a required field 4004 DatasetType *string `location:"uri" locationName:"datasetType" min:"1" type:"string" required:"true"` 4005 4006 // Specify true to include labeled entries, otherwise specify false. If you 4007 // don't specify a value, Lookout for Vision returns all entries. 4008 Labeled *bool `location:"querystring" locationName:"labeled" type:"boolean"` 4009 4010 // The maximum number of results to return per paginated call. The largest value 4011 // you can specify is 100. If you specify a value greater than 100, a ValidationException 4012 // error occurs. The default value is 100. 4013 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4014 4015 // If the previous response was incomplete (because there is more data to retrieve), 4016 // Amazon Lookout for Vision returns a pagination token in the response. You 4017 // can use this pagination token to retrieve the next set of dataset entries. 4018 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4019 4020 // The name of the project that contains the dataset that you want to list. 4021 // 4022 // ProjectName is a required field 4023 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 4024 4025 // Perform a "contains" search on the values of the source-ref key within the 4026 // dataset. For example a value of "IMG_17" returns all JSON Lines where the 4027 // source-ref key value matches *IMG_17*. 4028 SourceRefContains *string `location:"querystring" locationName:"sourceRefContains" min:"1" type:"string"` 4029 } 4030 4031 // String returns the string representation. 4032 // 4033 // API parameter values that are decorated as "sensitive" in the API will not 4034 // be included in the string output. The member name will be present, but the 4035 // value will be replaced with "sensitive". 4036 func (s ListDatasetEntriesInput) String() string { 4037 return awsutil.Prettify(s) 4038 } 4039 4040 // GoString returns the string representation. 4041 // 4042 // API parameter values that are decorated as "sensitive" in the API will not 4043 // be included in the string output. The member name will be present, but the 4044 // value will be replaced with "sensitive". 4045 func (s ListDatasetEntriesInput) GoString() string { 4046 return s.String() 4047 } 4048 4049 // Validate inspects the fields of the type to determine if they are valid. 4050 func (s *ListDatasetEntriesInput) Validate() error { 4051 invalidParams := request.ErrInvalidParams{Context: "ListDatasetEntriesInput"} 4052 if s.AnomalyClass != nil && len(*s.AnomalyClass) < 1 { 4053 invalidParams.Add(request.NewErrParamMinLen("AnomalyClass", 1)) 4054 } 4055 if s.DatasetType == nil { 4056 invalidParams.Add(request.NewErrParamRequired("DatasetType")) 4057 } 4058 if s.DatasetType != nil && len(*s.DatasetType) < 1 { 4059 invalidParams.Add(request.NewErrParamMinLen("DatasetType", 1)) 4060 } 4061 if s.MaxResults != nil && *s.MaxResults < 1 { 4062 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4063 } 4064 if s.ProjectName == nil { 4065 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 4066 } 4067 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 4068 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 4069 } 4070 if s.SourceRefContains != nil && len(*s.SourceRefContains) < 1 { 4071 invalidParams.Add(request.NewErrParamMinLen("SourceRefContains", 1)) 4072 } 4073 4074 if invalidParams.Len() > 0 { 4075 return invalidParams 4076 } 4077 return nil 4078 } 4079 4080 // SetAfterCreationDate sets the AfterCreationDate field's value. 4081 func (s *ListDatasetEntriesInput) SetAfterCreationDate(v time.Time) *ListDatasetEntriesInput { 4082 s.AfterCreationDate = &v 4083 return s 4084 } 4085 4086 // SetAnomalyClass sets the AnomalyClass field's value. 4087 func (s *ListDatasetEntriesInput) SetAnomalyClass(v string) *ListDatasetEntriesInput { 4088 s.AnomalyClass = &v 4089 return s 4090 } 4091 4092 // SetBeforeCreationDate sets the BeforeCreationDate field's value. 4093 func (s *ListDatasetEntriesInput) SetBeforeCreationDate(v time.Time) *ListDatasetEntriesInput { 4094 s.BeforeCreationDate = &v 4095 return s 4096 } 4097 4098 // SetDatasetType sets the DatasetType field's value. 4099 func (s *ListDatasetEntriesInput) SetDatasetType(v string) *ListDatasetEntriesInput { 4100 s.DatasetType = &v 4101 return s 4102 } 4103 4104 // SetLabeled sets the Labeled field's value. 4105 func (s *ListDatasetEntriesInput) SetLabeled(v bool) *ListDatasetEntriesInput { 4106 s.Labeled = &v 4107 return s 4108 } 4109 4110 // SetMaxResults sets the MaxResults field's value. 4111 func (s *ListDatasetEntriesInput) SetMaxResults(v int64) *ListDatasetEntriesInput { 4112 s.MaxResults = &v 4113 return s 4114 } 4115 4116 // SetNextToken sets the NextToken field's value. 4117 func (s *ListDatasetEntriesInput) SetNextToken(v string) *ListDatasetEntriesInput { 4118 s.NextToken = &v 4119 return s 4120 } 4121 4122 // SetProjectName sets the ProjectName field's value. 4123 func (s *ListDatasetEntriesInput) SetProjectName(v string) *ListDatasetEntriesInput { 4124 s.ProjectName = &v 4125 return s 4126 } 4127 4128 // SetSourceRefContains sets the SourceRefContains field's value. 4129 func (s *ListDatasetEntriesInput) SetSourceRefContains(v string) *ListDatasetEntriesInput { 4130 s.SourceRefContains = &v 4131 return s 4132 } 4133 4134 type ListDatasetEntriesOutput struct { 4135 _ struct{} `type:"structure"` 4136 4137 // A list of the entries (JSON Lines) within the dataset. 4138 DatasetEntries []*string `type:"list"` 4139 4140 // If the response is truncated, Amazon Lookout for Vision returns this token 4141 // that you can use in the subsequent request to retrieve the next set ofdataset 4142 // entries. 4143 NextToken *string `type:"string"` 4144 } 4145 4146 // String returns the string representation. 4147 // 4148 // API parameter values that are decorated as "sensitive" in the API will not 4149 // be included in the string output. The member name will be present, but the 4150 // value will be replaced with "sensitive". 4151 func (s ListDatasetEntriesOutput) String() string { 4152 return awsutil.Prettify(s) 4153 } 4154 4155 // GoString returns the string representation. 4156 // 4157 // API parameter values that are decorated as "sensitive" in the API will not 4158 // be included in the string output. The member name will be present, but the 4159 // value will be replaced with "sensitive". 4160 func (s ListDatasetEntriesOutput) GoString() string { 4161 return s.String() 4162 } 4163 4164 // SetDatasetEntries sets the DatasetEntries field's value. 4165 func (s *ListDatasetEntriesOutput) SetDatasetEntries(v []*string) *ListDatasetEntriesOutput { 4166 s.DatasetEntries = v 4167 return s 4168 } 4169 4170 // SetNextToken sets the NextToken field's value. 4171 func (s *ListDatasetEntriesOutput) SetNextToken(v string) *ListDatasetEntriesOutput { 4172 s.NextToken = &v 4173 return s 4174 } 4175 4176 type ListModelsInput struct { 4177 _ struct{} `type:"structure" nopayload:"true"` 4178 4179 // The maximum number of results to return per paginated call. The largest value 4180 // you can specify is 100. If you specify a value greater than 100, a ValidationException 4181 // error occurs. The default value is 100. 4182 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4183 4184 // If the previous response was incomplete (because there is more data to retrieve), 4185 // Amazon Lookout for Vision returns a pagination token in the response. You 4186 // can use this pagination token to retrieve the next set of models. 4187 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4188 4189 // The name of the project that contains the model versions that you want to 4190 // list. 4191 // 4192 // ProjectName is a required field 4193 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 4194 } 4195 4196 // String returns the string representation. 4197 // 4198 // API parameter values that are decorated as "sensitive" in the API will not 4199 // be included in the string output. The member name will be present, but the 4200 // value will be replaced with "sensitive". 4201 func (s ListModelsInput) String() string { 4202 return awsutil.Prettify(s) 4203 } 4204 4205 // GoString returns the string representation. 4206 // 4207 // API parameter values that are decorated as "sensitive" in the API will not 4208 // be included in the string output. The member name will be present, but the 4209 // value will be replaced with "sensitive". 4210 func (s ListModelsInput) GoString() string { 4211 return s.String() 4212 } 4213 4214 // Validate inspects the fields of the type to determine if they are valid. 4215 func (s *ListModelsInput) Validate() error { 4216 invalidParams := request.ErrInvalidParams{Context: "ListModelsInput"} 4217 if s.MaxResults != nil && *s.MaxResults < 1 { 4218 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4219 } 4220 if s.ProjectName == nil { 4221 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 4222 } 4223 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 4224 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 4225 } 4226 4227 if invalidParams.Len() > 0 { 4228 return invalidParams 4229 } 4230 return nil 4231 } 4232 4233 // SetMaxResults sets the MaxResults field's value. 4234 func (s *ListModelsInput) SetMaxResults(v int64) *ListModelsInput { 4235 s.MaxResults = &v 4236 return s 4237 } 4238 4239 // SetNextToken sets the NextToken field's value. 4240 func (s *ListModelsInput) SetNextToken(v string) *ListModelsInput { 4241 s.NextToken = &v 4242 return s 4243 } 4244 4245 // SetProjectName sets the ProjectName field's value. 4246 func (s *ListModelsInput) SetProjectName(v string) *ListModelsInput { 4247 s.ProjectName = &v 4248 return s 4249 } 4250 4251 type ListModelsOutput struct { 4252 _ struct{} `type:"structure"` 4253 4254 // A list of model versions in the specified project. 4255 Models []*ModelMetadata `type:"list"` 4256 4257 // If the response is truncated, Amazon Lookout for Vision returns this token 4258 // that you can use in the subsequent request to retrieve the next set of models. 4259 NextToken *string `type:"string"` 4260 } 4261 4262 // String returns the string representation. 4263 // 4264 // API parameter values that are decorated as "sensitive" in the API will not 4265 // be included in the string output. The member name will be present, but the 4266 // value will be replaced with "sensitive". 4267 func (s ListModelsOutput) String() string { 4268 return awsutil.Prettify(s) 4269 } 4270 4271 // GoString returns the string representation. 4272 // 4273 // API parameter values that are decorated as "sensitive" in the API will not 4274 // be included in the string output. The member name will be present, but the 4275 // value will be replaced with "sensitive". 4276 func (s ListModelsOutput) GoString() string { 4277 return s.String() 4278 } 4279 4280 // SetModels sets the Models field's value. 4281 func (s *ListModelsOutput) SetModels(v []*ModelMetadata) *ListModelsOutput { 4282 s.Models = v 4283 return s 4284 } 4285 4286 // SetNextToken sets the NextToken field's value. 4287 func (s *ListModelsOutput) SetNextToken(v string) *ListModelsOutput { 4288 s.NextToken = &v 4289 return s 4290 } 4291 4292 type ListProjectsInput struct { 4293 _ struct{} `type:"structure" nopayload:"true"` 4294 4295 // The maximum number of results to return per paginated call. The largest value 4296 // you can specify is 100. If you specify a value greater than 100, a ValidationException 4297 // error occurs. The default value is 100. 4298 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4299 4300 // If the previous response was incomplete (because there is more data to retrieve), 4301 // Amazon Lookout for Vision returns a pagination token in the response. You 4302 // can use this pagination token to retrieve the next set of projects. 4303 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4304 } 4305 4306 // String returns the string representation. 4307 // 4308 // API parameter values that are decorated as "sensitive" in the API will not 4309 // be included in the string output. The member name will be present, but the 4310 // value will be replaced with "sensitive". 4311 func (s ListProjectsInput) String() string { 4312 return awsutil.Prettify(s) 4313 } 4314 4315 // GoString returns the string representation. 4316 // 4317 // API parameter values that are decorated as "sensitive" in the API will not 4318 // be included in the string output. The member name will be present, but the 4319 // value will be replaced with "sensitive". 4320 func (s ListProjectsInput) GoString() string { 4321 return s.String() 4322 } 4323 4324 // Validate inspects the fields of the type to determine if they are valid. 4325 func (s *ListProjectsInput) Validate() error { 4326 invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"} 4327 if s.MaxResults != nil && *s.MaxResults < 1 { 4328 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4329 } 4330 4331 if invalidParams.Len() > 0 { 4332 return invalidParams 4333 } 4334 return nil 4335 } 4336 4337 // SetMaxResults sets the MaxResults field's value. 4338 func (s *ListProjectsInput) SetMaxResults(v int64) *ListProjectsInput { 4339 s.MaxResults = &v 4340 return s 4341 } 4342 4343 // SetNextToken sets the NextToken field's value. 4344 func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { 4345 s.NextToken = &v 4346 return s 4347 } 4348 4349 type ListProjectsOutput struct { 4350 _ struct{} `type:"structure"` 4351 4352 // If the response is truncated, Amazon Lookout for Vision returns this token 4353 // that you can use in the subsequent request to retrieve the next set of projects. 4354 NextToken *string `type:"string"` 4355 4356 // A list of projects in your AWS account. 4357 Projects []*ProjectMetadata `type:"list"` 4358 } 4359 4360 // String returns the string representation. 4361 // 4362 // API parameter values that are decorated as "sensitive" in the API will not 4363 // be included in the string output. The member name will be present, but the 4364 // value will be replaced with "sensitive". 4365 func (s ListProjectsOutput) String() string { 4366 return awsutil.Prettify(s) 4367 } 4368 4369 // GoString returns the string representation. 4370 // 4371 // API parameter values that are decorated as "sensitive" in the API will not 4372 // be included in the string output. The member name will be present, but the 4373 // value will be replaced with "sensitive". 4374 func (s ListProjectsOutput) GoString() string { 4375 return s.String() 4376 } 4377 4378 // SetNextToken sets the NextToken field's value. 4379 func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput { 4380 s.NextToken = &v 4381 return s 4382 } 4383 4384 // SetProjects sets the Projects field's value. 4385 func (s *ListProjectsOutput) SetProjects(v []*ProjectMetadata) *ListProjectsOutput { 4386 s.Projects = v 4387 return s 4388 } 4389 4390 type ListTagsForResourceInput struct { 4391 _ struct{} `type:"structure" nopayload:"true"` 4392 4393 // The Amazon Resource Name (ARN) of the model for which you want to list tags. 4394 // 4395 // ResourceArn is a required field 4396 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 4397 } 4398 4399 // String returns the string representation. 4400 // 4401 // API parameter values that are decorated as "sensitive" in the API will not 4402 // be included in the string output. The member name will be present, but the 4403 // value will be replaced with "sensitive". 4404 func (s ListTagsForResourceInput) String() string { 4405 return awsutil.Prettify(s) 4406 } 4407 4408 // GoString returns the string representation. 4409 // 4410 // API parameter values that are decorated as "sensitive" in the API will not 4411 // be included in the string output. The member name will be present, but the 4412 // value will be replaced with "sensitive". 4413 func (s ListTagsForResourceInput) GoString() string { 4414 return s.String() 4415 } 4416 4417 // Validate inspects the fields of the type to determine if they are valid. 4418 func (s *ListTagsForResourceInput) Validate() error { 4419 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 4420 if s.ResourceArn == nil { 4421 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4422 } 4423 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4424 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4425 } 4426 4427 if invalidParams.Len() > 0 { 4428 return invalidParams 4429 } 4430 return nil 4431 } 4432 4433 // SetResourceArn sets the ResourceArn field's value. 4434 func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 4435 s.ResourceArn = &v 4436 return s 4437 } 4438 4439 type ListTagsForResourceOutput struct { 4440 _ struct{} `type:"structure"` 4441 4442 // A map of tag keys and values attached to the specified model. 4443 Tags []*Tag `type:"list"` 4444 } 4445 4446 // String returns the string representation. 4447 // 4448 // API parameter values that are decorated as "sensitive" in the API will not 4449 // be included in the string output. The member name will be present, but the 4450 // value will be replaced with "sensitive". 4451 func (s ListTagsForResourceOutput) String() string { 4452 return awsutil.Prettify(s) 4453 } 4454 4455 // GoString returns the string representation. 4456 // 4457 // API parameter values that are decorated as "sensitive" in the API will not 4458 // be included in the string output. The member name will be present, but the 4459 // value will be replaced with "sensitive". 4460 func (s ListTagsForResourceOutput) GoString() string { 4461 return s.String() 4462 } 4463 4464 // SetTags sets the Tags field's value. 4465 func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 4466 s.Tags = v 4467 return s 4468 } 4469 4470 // Describes an Amazon Lookout for Vision model. 4471 type ModelDescription struct { 4472 _ struct{} `type:"structure"` 4473 4474 // The unix timestamp for the date and time that the model was created. 4475 CreationTimestamp *time.Time `type:"timestamp"` 4476 4477 // The description for the model. 4478 Description *string `min:"1" type:"string"` 4479 4480 // The unix timestamp for the date and time that the evaluation ended. 4481 EvaluationEndTimestamp *time.Time `type:"timestamp"` 4482 4483 // The S3 location where Amazon Lookout for Vision saves the manifest file that 4484 // was used to test the trained model and generate the performance scores. 4485 EvaluationManifest *OutputS3Object `type:"structure"` 4486 4487 // The S3 location where Amazon Lookout for Vision saves the performance metrics. 4488 EvaluationResult *OutputS3Object `type:"structure"` 4489 4490 // The identifer for the AWS Key Management Service (AWS KMS) key that was used 4491 // to encrypt the model during training. 4492 KmsKeyId *string `min:"1" type:"string"` 4493 4494 // The Amazon Resource Name (ARN) of the model. 4495 ModelArn *string `type:"string"` 4496 4497 // The version of the model 4498 ModelVersion *string `min:"1" type:"string"` 4499 4500 // The S3 location where Amazon Lookout for Vision saves model training files. 4501 OutputConfig *OutputConfig `type:"structure"` 4502 4503 // Performance metrics for the model. Created during training. 4504 Performance *ModelPerformance `type:"structure"` 4505 4506 // The status of the model. 4507 Status *string `type:"string" enum:"ModelStatus"` 4508 4509 // The status message for the model. 4510 StatusMessage *string `type:"string"` 4511 } 4512 4513 // String returns the string representation. 4514 // 4515 // API parameter values that are decorated as "sensitive" in the API will not 4516 // be included in the string output. The member name will be present, but the 4517 // value will be replaced with "sensitive". 4518 func (s ModelDescription) String() string { 4519 return awsutil.Prettify(s) 4520 } 4521 4522 // GoString returns the string representation. 4523 // 4524 // API parameter values that are decorated as "sensitive" in the API will not 4525 // be included in the string output. The member name will be present, but the 4526 // value will be replaced with "sensitive". 4527 func (s ModelDescription) GoString() string { 4528 return s.String() 4529 } 4530 4531 // SetCreationTimestamp sets the CreationTimestamp field's value. 4532 func (s *ModelDescription) SetCreationTimestamp(v time.Time) *ModelDescription { 4533 s.CreationTimestamp = &v 4534 return s 4535 } 4536 4537 // SetDescription sets the Description field's value. 4538 func (s *ModelDescription) SetDescription(v string) *ModelDescription { 4539 s.Description = &v 4540 return s 4541 } 4542 4543 // SetEvaluationEndTimestamp sets the EvaluationEndTimestamp field's value. 4544 func (s *ModelDescription) SetEvaluationEndTimestamp(v time.Time) *ModelDescription { 4545 s.EvaluationEndTimestamp = &v 4546 return s 4547 } 4548 4549 // SetEvaluationManifest sets the EvaluationManifest field's value. 4550 func (s *ModelDescription) SetEvaluationManifest(v *OutputS3Object) *ModelDescription { 4551 s.EvaluationManifest = v 4552 return s 4553 } 4554 4555 // SetEvaluationResult sets the EvaluationResult field's value. 4556 func (s *ModelDescription) SetEvaluationResult(v *OutputS3Object) *ModelDescription { 4557 s.EvaluationResult = v 4558 return s 4559 } 4560 4561 // SetKmsKeyId sets the KmsKeyId field's value. 4562 func (s *ModelDescription) SetKmsKeyId(v string) *ModelDescription { 4563 s.KmsKeyId = &v 4564 return s 4565 } 4566 4567 // SetModelArn sets the ModelArn field's value. 4568 func (s *ModelDescription) SetModelArn(v string) *ModelDescription { 4569 s.ModelArn = &v 4570 return s 4571 } 4572 4573 // SetModelVersion sets the ModelVersion field's value. 4574 func (s *ModelDescription) SetModelVersion(v string) *ModelDescription { 4575 s.ModelVersion = &v 4576 return s 4577 } 4578 4579 // SetOutputConfig sets the OutputConfig field's value. 4580 func (s *ModelDescription) SetOutputConfig(v *OutputConfig) *ModelDescription { 4581 s.OutputConfig = v 4582 return s 4583 } 4584 4585 // SetPerformance sets the Performance field's value. 4586 func (s *ModelDescription) SetPerformance(v *ModelPerformance) *ModelDescription { 4587 s.Performance = v 4588 return s 4589 } 4590 4591 // SetStatus sets the Status field's value. 4592 func (s *ModelDescription) SetStatus(v string) *ModelDescription { 4593 s.Status = &v 4594 return s 4595 } 4596 4597 // SetStatusMessage sets the StatusMessage field's value. 4598 func (s *ModelDescription) SetStatusMessage(v string) *ModelDescription { 4599 s.StatusMessage = &v 4600 return s 4601 } 4602 4603 // Describes an Amazon Lookout for Vision model. 4604 type ModelMetadata struct { 4605 _ struct{} `type:"structure"` 4606 4607 // The unix timestamp for the date and time that the model was created. 4608 CreationTimestamp *time.Time `type:"timestamp"` 4609 4610 // The description for the model. 4611 Description *string `min:"1" type:"string"` 4612 4613 // The Amazon Resource Name (ARN) of the model. 4614 ModelArn *string `type:"string"` 4615 4616 // The version of the model. 4617 ModelVersion *string `min:"1" type:"string"` 4618 4619 // Performance metrics for the model. Not available until training has successfully 4620 // completed. 4621 Performance *ModelPerformance `type:"structure"` 4622 4623 // The status of the model. 4624 Status *string `type:"string" enum:"ModelStatus"` 4625 4626 // The status message for the model. 4627 StatusMessage *string `type:"string"` 4628 } 4629 4630 // String returns the string representation. 4631 // 4632 // API parameter values that are decorated as "sensitive" in the API will not 4633 // be included in the string output. The member name will be present, but the 4634 // value will be replaced with "sensitive". 4635 func (s ModelMetadata) String() string { 4636 return awsutil.Prettify(s) 4637 } 4638 4639 // GoString returns the string representation. 4640 // 4641 // API parameter values that are decorated as "sensitive" in the API will not 4642 // be included in the string output. The member name will be present, but the 4643 // value will be replaced with "sensitive". 4644 func (s ModelMetadata) GoString() string { 4645 return s.String() 4646 } 4647 4648 // SetCreationTimestamp sets the CreationTimestamp field's value. 4649 func (s *ModelMetadata) SetCreationTimestamp(v time.Time) *ModelMetadata { 4650 s.CreationTimestamp = &v 4651 return s 4652 } 4653 4654 // SetDescription sets the Description field's value. 4655 func (s *ModelMetadata) SetDescription(v string) *ModelMetadata { 4656 s.Description = &v 4657 return s 4658 } 4659 4660 // SetModelArn sets the ModelArn field's value. 4661 func (s *ModelMetadata) SetModelArn(v string) *ModelMetadata { 4662 s.ModelArn = &v 4663 return s 4664 } 4665 4666 // SetModelVersion sets the ModelVersion field's value. 4667 func (s *ModelMetadata) SetModelVersion(v string) *ModelMetadata { 4668 s.ModelVersion = &v 4669 return s 4670 } 4671 4672 // SetPerformance sets the Performance field's value. 4673 func (s *ModelMetadata) SetPerformance(v *ModelPerformance) *ModelMetadata { 4674 s.Performance = v 4675 return s 4676 } 4677 4678 // SetStatus sets the Status field's value. 4679 func (s *ModelMetadata) SetStatus(v string) *ModelMetadata { 4680 s.Status = &v 4681 return s 4682 } 4683 4684 // SetStatusMessage sets the StatusMessage field's value. 4685 func (s *ModelMetadata) SetStatusMessage(v string) *ModelMetadata { 4686 s.StatusMessage = &v 4687 return s 4688 } 4689 4690 // Information about the evaluation performance of a trained model. 4691 type ModelPerformance struct { 4692 _ struct{} `type:"structure"` 4693 4694 // The overall F1 score metric for the trained model. 4695 F1Score *float64 `type:"float"` 4696 4697 // The overall precision metric value for the trained model. 4698 Precision *float64 `type:"float"` 4699 4700 // The overall recall metric value for the trained model. 4701 Recall *float64 `type:"float"` 4702 } 4703 4704 // String returns the string representation. 4705 // 4706 // API parameter values that are decorated as "sensitive" in the API will not 4707 // be included in the string output. The member name will be present, but the 4708 // value will be replaced with "sensitive". 4709 func (s ModelPerformance) String() string { 4710 return awsutil.Prettify(s) 4711 } 4712 4713 // GoString returns the string representation. 4714 // 4715 // API parameter values that are decorated as "sensitive" in the API will not 4716 // be included in the string output. The member name will be present, but the 4717 // value will be replaced with "sensitive". 4718 func (s ModelPerformance) GoString() string { 4719 return s.String() 4720 } 4721 4722 // SetF1Score sets the F1Score field's value. 4723 func (s *ModelPerformance) SetF1Score(v float64) *ModelPerformance { 4724 s.F1Score = &v 4725 return s 4726 } 4727 4728 // SetPrecision sets the Precision field's value. 4729 func (s *ModelPerformance) SetPrecision(v float64) *ModelPerformance { 4730 s.Precision = &v 4731 return s 4732 } 4733 4734 // SetRecall sets the Recall field's value. 4735 func (s *ModelPerformance) SetRecall(v float64) *ModelPerformance { 4736 s.Recall = &v 4737 return s 4738 } 4739 4740 // The S3 location where Amazon Lookout for Vision saves model training files. 4741 type OutputConfig struct { 4742 _ struct{} `type:"structure"` 4743 4744 // The S3 location for the output. 4745 // 4746 // S3Location is a required field 4747 S3Location *S3Location `type:"structure" required:"true"` 4748 } 4749 4750 // String returns the string representation. 4751 // 4752 // API parameter values that are decorated as "sensitive" in the API will not 4753 // be included in the string output. The member name will be present, but the 4754 // value will be replaced with "sensitive". 4755 func (s OutputConfig) String() string { 4756 return awsutil.Prettify(s) 4757 } 4758 4759 // GoString returns the string representation. 4760 // 4761 // API parameter values that are decorated as "sensitive" in the API will not 4762 // be included in the string output. The member name will be present, but the 4763 // value will be replaced with "sensitive". 4764 func (s OutputConfig) GoString() string { 4765 return s.String() 4766 } 4767 4768 // Validate inspects the fields of the type to determine if they are valid. 4769 func (s *OutputConfig) Validate() error { 4770 invalidParams := request.ErrInvalidParams{Context: "OutputConfig"} 4771 if s.S3Location == nil { 4772 invalidParams.Add(request.NewErrParamRequired("S3Location")) 4773 } 4774 if s.S3Location != nil { 4775 if err := s.S3Location.Validate(); err != nil { 4776 invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) 4777 } 4778 } 4779 4780 if invalidParams.Len() > 0 { 4781 return invalidParams 4782 } 4783 return nil 4784 } 4785 4786 // SetS3Location sets the S3Location field's value. 4787 func (s *OutputConfig) SetS3Location(v *S3Location) *OutputConfig { 4788 s.S3Location = v 4789 return s 4790 } 4791 4792 // The S3 location where Amazon Lookout for Vision saves training output. 4793 type OutputS3Object struct { 4794 _ struct{} `type:"structure"` 4795 4796 // The bucket that contains the training output. 4797 // 4798 // Bucket is a required field 4799 Bucket *string `min:"3" type:"string" required:"true"` 4800 4801 // The location of the training output in the bucket. 4802 // 4803 // Key is a required field 4804 Key *string `min:"1" type:"string" required:"true"` 4805 } 4806 4807 // String returns the string representation. 4808 // 4809 // API parameter values that are decorated as "sensitive" in the API will not 4810 // be included in the string output. The member name will be present, but the 4811 // value will be replaced with "sensitive". 4812 func (s OutputS3Object) String() string { 4813 return awsutil.Prettify(s) 4814 } 4815 4816 // GoString returns the string representation. 4817 // 4818 // API parameter values that are decorated as "sensitive" in the API will not 4819 // be included in the string output. The member name will be present, but the 4820 // value will be replaced with "sensitive". 4821 func (s OutputS3Object) GoString() string { 4822 return s.String() 4823 } 4824 4825 // SetBucket sets the Bucket field's value. 4826 func (s *OutputS3Object) SetBucket(v string) *OutputS3Object { 4827 s.Bucket = &v 4828 return s 4829 } 4830 4831 // SetKey sets the Key field's value. 4832 func (s *OutputS3Object) SetKey(v string) *OutputS3Object { 4833 s.Key = &v 4834 return s 4835 } 4836 4837 // Describe an Amazon Lookout for Vision project. For more information, see 4838 // DescribeProject. 4839 type ProjectDescription struct { 4840 _ struct{} `type:"structure"` 4841 4842 // The unix timestamp for the date and time that the project was created. 4843 CreationTimestamp *time.Time `type:"timestamp"` 4844 4845 // A list of datasets in the project. 4846 Datasets []*DatasetMetadata `type:"list"` 4847 4848 // The Amazon Resource Name (ARN) of the project. 4849 ProjectArn *string `type:"string"` 4850 4851 // The name of the project. 4852 ProjectName *string `min:"1" type:"string"` 4853 } 4854 4855 // String returns the string representation. 4856 // 4857 // API parameter values that are decorated as "sensitive" in the API will not 4858 // be included in the string output. The member name will be present, but the 4859 // value will be replaced with "sensitive". 4860 func (s ProjectDescription) String() string { 4861 return awsutil.Prettify(s) 4862 } 4863 4864 // GoString returns the string representation. 4865 // 4866 // API parameter values that are decorated as "sensitive" in the API will not 4867 // be included in the string output. The member name will be present, but the 4868 // value will be replaced with "sensitive". 4869 func (s ProjectDescription) GoString() string { 4870 return s.String() 4871 } 4872 4873 // SetCreationTimestamp sets the CreationTimestamp field's value. 4874 func (s *ProjectDescription) SetCreationTimestamp(v time.Time) *ProjectDescription { 4875 s.CreationTimestamp = &v 4876 return s 4877 } 4878 4879 // SetDatasets sets the Datasets field's value. 4880 func (s *ProjectDescription) SetDatasets(v []*DatasetMetadata) *ProjectDescription { 4881 s.Datasets = v 4882 return s 4883 } 4884 4885 // SetProjectArn sets the ProjectArn field's value. 4886 func (s *ProjectDescription) SetProjectArn(v string) *ProjectDescription { 4887 s.ProjectArn = &v 4888 return s 4889 } 4890 4891 // SetProjectName sets the ProjectName field's value. 4892 func (s *ProjectDescription) SetProjectName(v string) *ProjectDescription { 4893 s.ProjectName = &v 4894 return s 4895 } 4896 4897 // Metadata about an Amazon Lookout for Vision project. 4898 type ProjectMetadata struct { 4899 _ struct{} `type:"structure"` 4900 4901 // The unix timestamp for the date and time that the project was created. 4902 CreationTimestamp *time.Time `type:"timestamp"` 4903 4904 // The Amazon Resource Name (ARN) of the project. 4905 ProjectArn *string `type:"string"` 4906 4907 // The name of the project. 4908 ProjectName *string `min:"1" type:"string"` 4909 } 4910 4911 // String returns the string representation. 4912 // 4913 // API parameter values that are decorated as "sensitive" in the API will not 4914 // be included in the string output. The member name will be present, but the 4915 // value will be replaced with "sensitive". 4916 func (s ProjectMetadata) String() string { 4917 return awsutil.Prettify(s) 4918 } 4919 4920 // GoString returns the string representation. 4921 // 4922 // API parameter values that are decorated as "sensitive" in the API will not 4923 // be included in the string output. The member name will be present, but the 4924 // value will be replaced with "sensitive". 4925 func (s ProjectMetadata) GoString() string { 4926 return s.String() 4927 } 4928 4929 // SetCreationTimestamp sets the CreationTimestamp field's value. 4930 func (s *ProjectMetadata) SetCreationTimestamp(v time.Time) *ProjectMetadata { 4931 s.CreationTimestamp = &v 4932 return s 4933 } 4934 4935 // SetProjectArn sets the ProjectArn field's value. 4936 func (s *ProjectMetadata) SetProjectArn(v string) *ProjectMetadata { 4937 s.ProjectArn = &v 4938 return s 4939 } 4940 4941 // SetProjectName sets the ProjectName field's value. 4942 func (s *ProjectMetadata) SetProjectName(v string) *ProjectMetadata { 4943 s.ProjectName = &v 4944 return s 4945 } 4946 4947 // The resource could not be found. 4948 type ResourceNotFoundException struct { 4949 _ struct{} `type:"structure"` 4950 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4951 4952 Message_ *string `locationName:"Message" type:"string"` 4953 4954 // The ID of the resource. 4955 // 4956 // ResourceId is a required field 4957 ResourceId *string `type:"string" required:"true"` 4958 4959 // The type of the resource. 4960 // 4961 // ResourceType is a required field 4962 ResourceType *string `type:"string" required:"true" enum:"ResourceType"` 4963 } 4964 4965 // String returns the string representation. 4966 // 4967 // API parameter values that are decorated as "sensitive" in the API will not 4968 // be included in the string output. The member name will be present, but the 4969 // value will be replaced with "sensitive". 4970 func (s ResourceNotFoundException) String() string { 4971 return awsutil.Prettify(s) 4972 } 4973 4974 // GoString returns the string representation. 4975 // 4976 // API parameter values that are decorated as "sensitive" in the API will not 4977 // be included in the string output. The member name will be present, but the 4978 // value will be replaced with "sensitive". 4979 func (s ResourceNotFoundException) GoString() string { 4980 return s.String() 4981 } 4982 4983 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4984 return &ResourceNotFoundException{ 4985 RespMetadata: v, 4986 } 4987 } 4988 4989 // Code returns the exception type name. 4990 func (s *ResourceNotFoundException) Code() string { 4991 return "ResourceNotFoundException" 4992 } 4993 4994 // Message returns the exception's message. 4995 func (s *ResourceNotFoundException) Message() string { 4996 if s.Message_ != nil { 4997 return *s.Message_ 4998 } 4999 return "" 5000 } 5001 5002 // OrigErr always returns nil, satisfies awserr.Error interface. 5003 func (s *ResourceNotFoundException) OrigErr() error { 5004 return nil 5005 } 5006 5007 func (s *ResourceNotFoundException) Error() string { 5008 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5009 } 5010 5011 // Status code returns the HTTP status code for the request's response error. 5012 func (s *ResourceNotFoundException) StatusCode() int { 5013 return s.RespMetadata.StatusCode 5014 } 5015 5016 // RequestID returns the service's response RequestID for request. 5017 func (s *ResourceNotFoundException) RequestID() string { 5018 return s.RespMetadata.RequestID 5019 } 5020 5021 // Information about the location training output. 5022 type S3Location struct { 5023 _ struct{} `type:"structure"` 5024 5025 // The S3 bucket that contains the training output. 5026 // 5027 // Bucket is a required field 5028 Bucket *string `min:"3" type:"string" required:"true"` 5029 5030 // The path of the folder, within the S3 bucket, that contains the training 5031 // output. 5032 Prefix *string `type:"string"` 5033 } 5034 5035 // String returns the string representation. 5036 // 5037 // API parameter values that are decorated as "sensitive" in the API will not 5038 // be included in the string output. The member name will be present, but the 5039 // value will be replaced with "sensitive". 5040 func (s S3Location) String() string { 5041 return awsutil.Prettify(s) 5042 } 5043 5044 // GoString returns the string representation. 5045 // 5046 // API parameter values that are decorated as "sensitive" in the API will not 5047 // be included in the string output. The member name will be present, but the 5048 // value will be replaced with "sensitive". 5049 func (s S3Location) GoString() string { 5050 return s.String() 5051 } 5052 5053 // Validate inspects the fields of the type to determine if they are valid. 5054 func (s *S3Location) Validate() error { 5055 invalidParams := request.ErrInvalidParams{Context: "S3Location"} 5056 if s.Bucket == nil { 5057 invalidParams.Add(request.NewErrParamRequired("Bucket")) 5058 } 5059 if s.Bucket != nil && len(*s.Bucket) < 3 { 5060 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 5061 } 5062 5063 if invalidParams.Len() > 0 { 5064 return invalidParams 5065 } 5066 return nil 5067 } 5068 5069 // SetBucket sets the Bucket field's value. 5070 func (s *S3Location) SetBucket(v string) *S3Location { 5071 s.Bucket = &v 5072 return s 5073 } 5074 5075 // SetPrefix sets the Prefix field's value. 5076 func (s *S3Location) SetPrefix(v string) *S3Location { 5077 s.Prefix = &v 5078 return s 5079 } 5080 5081 // A service quota was exceeded the allowed limit. For more information, see 5082 // Limits in Amazon Lookout for Vision in the Amazon Lookout for Vision Developer 5083 // Guide. 5084 type ServiceQuotaExceededException struct { 5085 _ struct{} `type:"structure"` 5086 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5087 5088 Message_ *string `locationName:"Message" type:"string"` 5089 5090 // The quota code. 5091 // 5092 // QuotaCode is a required field 5093 QuotaCode *string `type:"string" required:"true"` 5094 5095 // The ID of the resource. 5096 ResourceId *string `type:"string"` 5097 5098 // The type of the resource. 5099 ResourceType *string `type:"string" enum:"ResourceType"` 5100 5101 // The service code. 5102 // 5103 // ServiceCode is a required field 5104 ServiceCode *string `type:"string" required:"true"` 5105 } 5106 5107 // String returns the string representation. 5108 // 5109 // API parameter values that are decorated as "sensitive" in the API will not 5110 // be included in the string output. The member name will be present, but the 5111 // value will be replaced with "sensitive". 5112 func (s ServiceQuotaExceededException) String() string { 5113 return awsutil.Prettify(s) 5114 } 5115 5116 // GoString returns the string representation. 5117 // 5118 // API parameter values that are decorated as "sensitive" in the API will not 5119 // be included in the string output. The member name will be present, but the 5120 // value will be replaced with "sensitive". 5121 func (s ServiceQuotaExceededException) GoString() string { 5122 return s.String() 5123 } 5124 5125 func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 5126 return &ServiceQuotaExceededException{ 5127 RespMetadata: v, 5128 } 5129 } 5130 5131 // Code returns the exception type name. 5132 func (s *ServiceQuotaExceededException) Code() string { 5133 return "ServiceQuotaExceededException" 5134 } 5135 5136 // Message returns the exception's message. 5137 func (s *ServiceQuotaExceededException) Message() string { 5138 if s.Message_ != nil { 5139 return *s.Message_ 5140 } 5141 return "" 5142 } 5143 5144 // OrigErr always returns nil, satisfies awserr.Error interface. 5145 func (s *ServiceQuotaExceededException) OrigErr() error { 5146 return nil 5147 } 5148 5149 func (s *ServiceQuotaExceededException) Error() string { 5150 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5151 } 5152 5153 // Status code returns the HTTP status code for the request's response error. 5154 func (s *ServiceQuotaExceededException) StatusCode() int { 5155 return s.RespMetadata.StatusCode 5156 } 5157 5158 // RequestID returns the service's response RequestID for request. 5159 func (s *ServiceQuotaExceededException) RequestID() string { 5160 return s.RespMetadata.RequestID 5161 } 5162 5163 type StartModelInput struct { 5164 _ struct{} `type:"structure"` 5165 5166 // ClientToken is an idempotency token that ensures a call to StartModel completes 5167 // only once. You choose the value to pass. For example, An issue, such as an 5168 // network outage, might prevent you from getting a response from StartModel. 5169 // In this case, safely retry your call to StartModel by using the same ClientToken 5170 // parameter value. An error occurs if the other input parameters are not the 5171 // same as in the first request. Using a different value for ClientToken is 5172 // considered a new call to StartModel. An idempotency token is active for 8 5173 // hours. 5174 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 5175 5176 // The minimum number of inference units to use. A single inference unit represents 5177 // 1 hour of processing and can support up to 5 Transaction Pers Second (TPS). 5178 // Use a higher number to increase the TPS throughput of your model. You are 5179 // charged for the number of inference units that you use. 5180 // 5181 // MinInferenceUnits is a required field 5182 MinInferenceUnits *int64 `min:"1" type:"integer" required:"true"` 5183 5184 // The version of the model that you want to start. 5185 // 5186 // ModelVersion is a required field 5187 ModelVersion *string `location:"uri" locationName:"modelVersion" min:"1" type:"string" required:"true"` 5188 5189 // The name of the project that contains the model that you want to start. 5190 // 5191 // ProjectName is a required field 5192 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 5193 } 5194 5195 // String returns the string representation. 5196 // 5197 // API parameter values that are decorated as "sensitive" in the API will not 5198 // be included in the string output. The member name will be present, but the 5199 // value will be replaced with "sensitive". 5200 func (s StartModelInput) String() string { 5201 return awsutil.Prettify(s) 5202 } 5203 5204 // GoString returns the string representation. 5205 // 5206 // API parameter values that are decorated as "sensitive" in the API will not 5207 // be included in the string output. The member name will be present, but the 5208 // value will be replaced with "sensitive". 5209 func (s StartModelInput) GoString() string { 5210 return s.String() 5211 } 5212 5213 // Validate inspects the fields of the type to determine if they are valid. 5214 func (s *StartModelInput) Validate() error { 5215 invalidParams := request.ErrInvalidParams{Context: "StartModelInput"} 5216 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 5217 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 5218 } 5219 if s.MinInferenceUnits == nil { 5220 invalidParams.Add(request.NewErrParamRequired("MinInferenceUnits")) 5221 } 5222 if s.MinInferenceUnits != nil && *s.MinInferenceUnits < 1 { 5223 invalidParams.Add(request.NewErrParamMinValue("MinInferenceUnits", 1)) 5224 } 5225 if s.ModelVersion == nil { 5226 invalidParams.Add(request.NewErrParamRequired("ModelVersion")) 5227 } 5228 if s.ModelVersion != nil && len(*s.ModelVersion) < 1 { 5229 invalidParams.Add(request.NewErrParamMinLen("ModelVersion", 1)) 5230 } 5231 if s.ProjectName == nil { 5232 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 5233 } 5234 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 5235 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 5236 } 5237 5238 if invalidParams.Len() > 0 { 5239 return invalidParams 5240 } 5241 return nil 5242 } 5243 5244 // SetClientToken sets the ClientToken field's value. 5245 func (s *StartModelInput) SetClientToken(v string) *StartModelInput { 5246 s.ClientToken = &v 5247 return s 5248 } 5249 5250 // SetMinInferenceUnits sets the MinInferenceUnits field's value. 5251 func (s *StartModelInput) SetMinInferenceUnits(v int64) *StartModelInput { 5252 s.MinInferenceUnits = &v 5253 return s 5254 } 5255 5256 // SetModelVersion sets the ModelVersion field's value. 5257 func (s *StartModelInput) SetModelVersion(v string) *StartModelInput { 5258 s.ModelVersion = &v 5259 return s 5260 } 5261 5262 // SetProjectName sets the ProjectName field's value. 5263 func (s *StartModelInput) SetProjectName(v string) *StartModelInput { 5264 s.ProjectName = &v 5265 return s 5266 } 5267 5268 type StartModelOutput struct { 5269 _ struct{} `type:"structure"` 5270 5271 // The current running status of the model. 5272 Status *string `type:"string" enum:"ModelHostingStatus"` 5273 } 5274 5275 // String returns the string representation. 5276 // 5277 // API parameter values that are decorated as "sensitive" in the API will not 5278 // be included in the string output. The member name will be present, but the 5279 // value will be replaced with "sensitive". 5280 func (s StartModelOutput) String() string { 5281 return awsutil.Prettify(s) 5282 } 5283 5284 // GoString returns the string representation. 5285 // 5286 // API parameter values that are decorated as "sensitive" in the API will not 5287 // be included in the string output. The member name will be present, but the 5288 // value will be replaced with "sensitive". 5289 func (s StartModelOutput) GoString() string { 5290 return s.String() 5291 } 5292 5293 // SetStatus sets the Status field's value. 5294 func (s *StartModelOutput) SetStatus(v string) *StartModelOutput { 5295 s.Status = &v 5296 return s 5297 } 5298 5299 type StopModelInput struct { 5300 _ struct{} `type:"structure" nopayload:"true"` 5301 5302 // ClientToken is an idempotency token that ensures a call to StopModel completes 5303 // only once. You choose the value to pass. For example, An issue, such as an 5304 // network outage, might prevent you from getting a response from StopModel. 5305 // In this case, safely retry your call to StopModel by using the same ClientToken 5306 // parameter value. An error occurs if the other input parameters are not the 5307 // same as in the first request. Using a different value for ClientToken is 5308 // considered a new call to StopModel. An idempotency token is active for 8 5309 // hours. 5310 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 5311 5312 // The version of the model that you want to stop. 5313 // 5314 // ModelVersion is a required field 5315 ModelVersion *string `location:"uri" locationName:"modelVersion" min:"1" type:"string" required:"true"` 5316 5317 // The name of the project that contains the model that you want to stop. 5318 // 5319 // ProjectName is a required field 5320 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 5321 } 5322 5323 // String returns the string representation. 5324 // 5325 // API parameter values that are decorated as "sensitive" in the API will not 5326 // be included in the string output. The member name will be present, but the 5327 // value will be replaced with "sensitive". 5328 func (s StopModelInput) String() string { 5329 return awsutil.Prettify(s) 5330 } 5331 5332 // GoString returns the string representation. 5333 // 5334 // API parameter values that are decorated as "sensitive" in the API will not 5335 // be included in the string output. The member name will be present, but the 5336 // value will be replaced with "sensitive". 5337 func (s StopModelInput) GoString() string { 5338 return s.String() 5339 } 5340 5341 // Validate inspects the fields of the type to determine if they are valid. 5342 func (s *StopModelInput) Validate() error { 5343 invalidParams := request.ErrInvalidParams{Context: "StopModelInput"} 5344 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 5345 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 5346 } 5347 if s.ModelVersion == nil { 5348 invalidParams.Add(request.NewErrParamRequired("ModelVersion")) 5349 } 5350 if s.ModelVersion != nil && len(*s.ModelVersion) < 1 { 5351 invalidParams.Add(request.NewErrParamMinLen("ModelVersion", 1)) 5352 } 5353 if s.ProjectName == nil { 5354 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 5355 } 5356 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 5357 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 5358 } 5359 5360 if invalidParams.Len() > 0 { 5361 return invalidParams 5362 } 5363 return nil 5364 } 5365 5366 // SetClientToken sets the ClientToken field's value. 5367 func (s *StopModelInput) SetClientToken(v string) *StopModelInput { 5368 s.ClientToken = &v 5369 return s 5370 } 5371 5372 // SetModelVersion sets the ModelVersion field's value. 5373 func (s *StopModelInput) SetModelVersion(v string) *StopModelInput { 5374 s.ModelVersion = &v 5375 return s 5376 } 5377 5378 // SetProjectName sets the ProjectName field's value. 5379 func (s *StopModelInput) SetProjectName(v string) *StopModelInput { 5380 s.ProjectName = &v 5381 return s 5382 } 5383 5384 type StopModelOutput struct { 5385 _ struct{} `type:"structure"` 5386 5387 // The status of the model. 5388 Status *string `type:"string" enum:"ModelHostingStatus"` 5389 } 5390 5391 // String returns the string representation. 5392 // 5393 // API parameter values that are decorated as "sensitive" in the API will not 5394 // be included in the string output. The member name will be present, but the 5395 // value will be replaced with "sensitive". 5396 func (s StopModelOutput) String() string { 5397 return awsutil.Prettify(s) 5398 } 5399 5400 // GoString returns the string representation. 5401 // 5402 // API parameter values that are decorated as "sensitive" in the API will not 5403 // be included in the string output. The member name will be present, but the 5404 // value will be replaced with "sensitive". 5405 func (s StopModelOutput) GoString() string { 5406 return s.String() 5407 } 5408 5409 // SetStatus sets the Status field's value. 5410 func (s *StopModelOutput) SetStatus(v string) *StopModelOutput { 5411 s.Status = &v 5412 return s 5413 } 5414 5415 // A key and value pair that is attached to the specified Amazon Lookout for 5416 // Vision model. 5417 type Tag struct { 5418 _ struct{} `type:"structure"` 5419 5420 // The key of the tag that is attached to the specified model. 5421 // 5422 // Key is a required field 5423 Key *string `min:"1" type:"string" required:"true"` 5424 5425 // The value of the tag that is attached to the specified model. 5426 // 5427 // Value is a required field 5428 Value *string `type:"string" required:"true"` 5429 } 5430 5431 // String returns the string representation. 5432 // 5433 // API parameter values that are decorated as "sensitive" in the API will not 5434 // be included in the string output. The member name will be present, but the 5435 // value will be replaced with "sensitive". 5436 func (s Tag) String() string { 5437 return awsutil.Prettify(s) 5438 } 5439 5440 // GoString returns the string representation. 5441 // 5442 // API parameter values that are decorated as "sensitive" in the API will not 5443 // be included in the string output. The member name will be present, but the 5444 // value will be replaced with "sensitive". 5445 func (s Tag) GoString() string { 5446 return s.String() 5447 } 5448 5449 // Validate inspects the fields of the type to determine if they are valid. 5450 func (s *Tag) Validate() error { 5451 invalidParams := request.ErrInvalidParams{Context: "Tag"} 5452 if s.Key == nil { 5453 invalidParams.Add(request.NewErrParamRequired("Key")) 5454 } 5455 if s.Key != nil && len(*s.Key) < 1 { 5456 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 5457 } 5458 if s.Value == nil { 5459 invalidParams.Add(request.NewErrParamRequired("Value")) 5460 } 5461 5462 if invalidParams.Len() > 0 { 5463 return invalidParams 5464 } 5465 return nil 5466 } 5467 5468 // SetKey sets the Key field's value. 5469 func (s *Tag) SetKey(v string) *Tag { 5470 s.Key = &v 5471 return s 5472 } 5473 5474 // SetValue sets the Value field's value. 5475 func (s *Tag) SetValue(v string) *Tag { 5476 s.Value = &v 5477 return s 5478 } 5479 5480 type TagResourceInput struct { 5481 _ struct{} `type:"structure"` 5482 5483 // The Amazon Resource Name (ARN) of the model to assign the tags. 5484 // 5485 // ResourceArn is a required field 5486 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 5487 5488 // The key-value tags to assign to the model. 5489 // 5490 // Tags is a required field 5491 Tags []*Tag `type:"list" required:"true"` 5492 } 5493 5494 // String returns the string representation. 5495 // 5496 // API parameter values that are decorated as "sensitive" in the API will not 5497 // be included in the string output. The member name will be present, but the 5498 // value will be replaced with "sensitive". 5499 func (s TagResourceInput) String() string { 5500 return awsutil.Prettify(s) 5501 } 5502 5503 // GoString returns the string representation. 5504 // 5505 // API parameter values that are decorated as "sensitive" in the API will not 5506 // be included in the string output. The member name will be present, but the 5507 // value will be replaced with "sensitive". 5508 func (s TagResourceInput) GoString() string { 5509 return s.String() 5510 } 5511 5512 // Validate inspects the fields of the type to determine if they are valid. 5513 func (s *TagResourceInput) Validate() error { 5514 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 5515 if s.ResourceArn == nil { 5516 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5517 } 5518 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 5519 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 5520 } 5521 if s.Tags == nil { 5522 invalidParams.Add(request.NewErrParamRequired("Tags")) 5523 } 5524 if s.Tags != nil { 5525 for i, v := range s.Tags { 5526 if v == nil { 5527 continue 5528 } 5529 if err := v.Validate(); err != nil { 5530 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 5531 } 5532 } 5533 } 5534 5535 if invalidParams.Len() > 0 { 5536 return invalidParams 5537 } 5538 return nil 5539 } 5540 5541 // SetResourceArn sets the ResourceArn field's value. 5542 func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 5543 s.ResourceArn = &v 5544 return s 5545 } 5546 5547 // SetTags sets the Tags field's value. 5548 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 5549 s.Tags = v 5550 return s 5551 } 5552 5553 type TagResourceOutput struct { 5554 _ struct{} `type:"structure" nopayload:"true"` 5555 } 5556 5557 // String returns the string representation. 5558 // 5559 // API parameter values that are decorated as "sensitive" in the API will not 5560 // be included in the string output. The member name will be present, but the 5561 // value will be replaced with "sensitive". 5562 func (s TagResourceOutput) String() string { 5563 return awsutil.Prettify(s) 5564 } 5565 5566 // GoString returns the string representation. 5567 // 5568 // API parameter values that are decorated as "sensitive" in the API will not 5569 // be included in the string output. The member name will be present, but the 5570 // value will be replaced with "sensitive". 5571 func (s TagResourceOutput) GoString() string { 5572 return s.String() 5573 } 5574 5575 // Amazon Lookout for Vision is temporarily unable to process the request. Try 5576 // your call again. 5577 type ThrottlingException struct { 5578 _ struct{} `type:"structure"` 5579 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5580 5581 Message_ *string `locationName:"Message" type:"string"` 5582 5583 // The quota code. 5584 QuotaCode *string `type:"string"` 5585 5586 // The period of time, in seconds, before the operation can be retried. 5587 RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` 5588 5589 // The service code. 5590 ServiceCode *string `type:"string"` 5591 } 5592 5593 // String returns the string representation. 5594 // 5595 // API parameter values that are decorated as "sensitive" in the API will not 5596 // be included in the string output. The member name will be present, but the 5597 // value will be replaced with "sensitive". 5598 func (s ThrottlingException) String() string { 5599 return awsutil.Prettify(s) 5600 } 5601 5602 // GoString returns the string representation. 5603 // 5604 // API parameter values that are decorated as "sensitive" in the API will not 5605 // be included in the string output. The member name will be present, but the 5606 // value will be replaced with "sensitive". 5607 func (s ThrottlingException) GoString() string { 5608 return s.String() 5609 } 5610 5611 func newErrorThrottlingException(v protocol.ResponseMetadata) error { 5612 return &ThrottlingException{ 5613 RespMetadata: v, 5614 } 5615 } 5616 5617 // Code returns the exception type name. 5618 func (s *ThrottlingException) Code() string { 5619 return "ThrottlingException" 5620 } 5621 5622 // Message returns the exception's message. 5623 func (s *ThrottlingException) Message() string { 5624 if s.Message_ != nil { 5625 return *s.Message_ 5626 } 5627 return "" 5628 } 5629 5630 // OrigErr always returns nil, satisfies awserr.Error interface. 5631 func (s *ThrottlingException) OrigErr() error { 5632 return nil 5633 } 5634 5635 func (s *ThrottlingException) Error() string { 5636 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5637 } 5638 5639 // Status code returns the HTTP status code for the request's response error. 5640 func (s *ThrottlingException) StatusCode() int { 5641 return s.RespMetadata.StatusCode 5642 } 5643 5644 // RequestID returns the service's response RequestID for request. 5645 func (s *ThrottlingException) RequestID() string { 5646 return s.RespMetadata.RequestID 5647 } 5648 5649 type UntagResourceInput struct { 5650 _ struct{} `type:"structure" nopayload:"true"` 5651 5652 // The Amazon Resource Name (ARN) of the model from which you want to remove 5653 // tags. 5654 // 5655 // ResourceArn is a required field 5656 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 5657 5658 // A list of the keys of the tags that you want to remove. 5659 // 5660 // TagKeys is a required field 5661 TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` 5662 } 5663 5664 // String returns the string representation. 5665 // 5666 // API parameter values that are decorated as "sensitive" in the API will not 5667 // be included in the string output. The member name will be present, but the 5668 // value will be replaced with "sensitive". 5669 func (s UntagResourceInput) String() string { 5670 return awsutil.Prettify(s) 5671 } 5672 5673 // GoString returns the string representation. 5674 // 5675 // API parameter values that are decorated as "sensitive" in the API will not 5676 // be included in the string output. The member name will be present, but the 5677 // value will be replaced with "sensitive". 5678 func (s UntagResourceInput) GoString() string { 5679 return s.String() 5680 } 5681 5682 // Validate inspects the fields of the type to determine if they are valid. 5683 func (s *UntagResourceInput) Validate() error { 5684 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 5685 if s.ResourceArn == nil { 5686 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5687 } 5688 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 5689 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 5690 } 5691 if s.TagKeys == nil { 5692 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 5693 } 5694 5695 if invalidParams.Len() > 0 { 5696 return invalidParams 5697 } 5698 return nil 5699 } 5700 5701 // SetResourceArn sets the ResourceArn field's value. 5702 func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 5703 s.ResourceArn = &v 5704 return s 5705 } 5706 5707 // SetTagKeys sets the TagKeys field's value. 5708 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 5709 s.TagKeys = v 5710 return s 5711 } 5712 5713 type UntagResourceOutput struct { 5714 _ struct{} `type:"structure" nopayload:"true"` 5715 } 5716 5717 // String returns the string representation. 5718 // 5719 // API parameter values that are decorated as "sensitive" in the API will not 5720 // be included in the string output. The member name will be present, but the 5721 // value will be replaced with "sensitive". 5722 func (s UntagResourceOutput) String() string { 5723 return awsutil.Prettify(s) 5724 } 5725 5726 // GoString returns the string representation. 5727 // 5728 // API parameter values that are decorated as "sensitive" in the API will not 5729 // be included in the string output. The member name will be present, but the 5730 // value will be replaced with "sensitive". 5731 func (s UntagResourceOutput) GoString() string { 5732 return s.String() 5733 } 5734 5735 type UpdateDatasetEntriesInput struct { 5736 _ struct{} `type:"structure"` 5737 5738 // The entries to add to the dataset. 5739 // Changes is automatically base64 encoded/decoded by the SDK. 5740 // 5741 // Changes is a required field 5742 Changes []byte `min:"1" type:"blob" required:"true"` 5743 5744 // ClientToken is an idempotency token that ensures a call to UpdateDatasetEntries 5745 // completes only once. You choose the value to pass. For example, An issue, 5746 // such as an network outage, might prevent you from getting a response from 5747 // UpdateDatasetEntries. In this case, safely retry your call to UpdateDatasetEntries 5748 // by using the same ClientToken parameter value. An error occurs if the other 5749 // input parameters are not the same as in the first request. Using a different 5750 // value for ClientToken is considered a new call to UpdateDatasetEntries. An 5751 // idempotency token is active for 8 hours. 5752 ClientToken *string `location:"header" locationName:"X-Amzn-Client-Token" min:"1" type:"string" idempotencyToken:"true"` 5753 5754 // The type of the dataset that you want to update. Specify train to update 5755 // the training dataset. Specify test to update the test dataset. If you have 5756 // a single dataset project, specify train. 5757 // 5758 // DatasetType is a required field 5759 DatasetType *string `location:"uri" locationName:"datasetType" min:"1" type:"string" required:"true"` 5760 5761 // The name of the project that contains the dataset that you want to update. 5762 // 5763 // ProjectName is a required field 5764 ProjectName *string `location:"uri" locationName:"projectName" min:"1" type:"string" required:"true"` 5765 } 5766 5767 // String returns the string representation. 5768 // 5769 // API parameter values that are decorated as "sensitive" in the API will not 5770 // be included in the string output. The member name will be present, but the 5771 // value will be replaced with "sensitive". 5772 func (s UpdateDatasetEntriesInput) String() string { 5773 return awsutil.Prettify(s) 5774 } 5775 5776 // GoString returns the string representation. 5777 // 5778 // API parameter values that are decorated as "sensitive" in the API will not 5779 // be included in the string output. The member name will be present, but the 5780 // value will be replaced with "sensitive". 5781 func (s UpdateDatasetEntriesInput) GoString() string { 5782 return s.String() 5783 } 5784 5785 // Validate inspects the fields of the type to determine if they are valid. 5786 func (s *UpdateDatasetEntriesInput) Validate() error { 5787 invalidParams := request.ErrInvalidParams{Context: "UpdateDatasetEntriesInput"} 5788 if s.Changes == nil { 5789 invalidParams.Add(request.NewErrParamRequired("Changes")) 5790 } 5791 if s.Changes != nil && len(s.Changes) < 1 { 5792 invalidParams.Add(request.NewErrParamMinLen("Changes", 1)) 5793 } 5794 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 5795 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 5796 } 5797 if s.DatasetType == nil { 5798 invalidParams.Add(request.NewErrParamRequired("DatasetType")) 5799 } 5800 if s.DatasetType != nil && len(*s.DatasetType) < 1 { 5801 invalidParams.Add(request.NewErrParamMinLen("DatasetType", 1)) 5802 } 5803 if s.ProjectName == nil { 5804 invalidParams.Add(request.NewErrParamRequired("ProjectName")) 5805 } 5806 if s.ProjectName != nil && len(*s.ProjectName) < 1 { 5807 invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) 5808 } 5809 5810 if invalidParams.Len() > 0 { 5811 return invalidParams 5812 } 5813 return nil 5814 } 5815 5816 // SetChanges sets the Changes field's value. 5817 func (s *UpdateDatasetEntriesInput) SetChanges(v []byte) *UpdateDatasetEntriesInput { 5818 s.Changes = v 5819 return s 5820 } 5821 5822 // SetClientToken sets the ClientToken field's value. 5823 func (s *UpdateDatasetEntriesInput) SetClientToken(v string) *UpdateDatasetEntriesInput { 5824 s.ClientToken = &v 5825 return s 5826 } 5827 5828 // SetDatasetType sets the DatasetType field's value. 5829 func (s *UpdateDatasetEntriesInput) SetDatasetType(v string) *UpdateDatasetEntriesInput { 5830 s.DatasetType = &v 5831 return s 5832 } 5833 5834 // SetProjectName sets the ProjectName field's value. 5835 func (s *UpdateDatasetEntriesInput) SetProjectName(v string) *UpdateDatasetEntriesInput { 5836 s.ProjectName = &v 5837 return s 5838 } 5839 5840 type UpdateDatasetEntriesOutput struct { 5841 _ struct{} `type:"structure"` 5842 5843 // The status of the dataset update. 5844 Status *string `type:"string" enum:"DatasetStatus"` 5845 } 5846 5847 // String returns the string representation. 5848 // 5849 // API parameter values that are decorated as "sensitive" in the API will not 5850 // be included in the string output. The member name will be present, but the 5851 // value will be replaced with "sensitive". 5852 func (s UpdateDatasetEntriesOutput) String() string { 5853 return awsutil.Prettify(s) 5854 } 5855 5856 // GoString returns the string representation. 5857 // 5858 // API parameter values that are decorated as "sensitive" in the API will not 5859 // be included in the string output. The member name will be present, but the 5860 // value will be replaced with "sensitive". 5861 func (s UpdateDatasetEntriesOutput) GoString() string { 5862 return s.String() 5863 } 5864 5865 // SetStatus sets the Status field's value. 5866 func (s *UpdateDatasetEntriesOutput) SetStatus(v string) *UpdateDatasetEntriesOutput { 5867 s.Status = &v 5868 return s 5869 } 5870 5871 // An input validation error occured. For example, invalid characters in a project 5872 // name, or if a pagination token is invalid. 5873 type ValidationException struct { 5874 _ struct{} `type:"structure"` 5875 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5876 5877 Message_ *string `locationName:"Message" type:"string"` 5878 } 5879 5880 // String returns the string representation. 5881 // 5882 // API parameter values that are decorated as "sensitive" in the API will not 5883 // be included in the string output. The member name will be present, but the 5884 // value will be replaced with "sensitive". 5885 func (s ValidationException) String() string { 5886 return awsutil.Prettify(s) 5887 } 5888 5889 // GoString returns the string representation. 5890 // 5891 // API parameter values that are decorated as "sensitive" in the API will not 5892 // be included in the string output. The member name will be present, but the 5893 // value will be replaced with "sensitive". 5894 func (s ValidationException) GoString() string { 5895 return s.String() 5896 } 5897 5898 func newErrorValidationException(v protocol.ResponseMetadata) error { 5899 return &ValidationException{ 5900 RespMetadata: v, 5901 } 5902 } 5903 5904 // Code returns the exception type name. 5905 func (s *ValidationException) Code() string { 5906 return "ValidationException" 5907 } 5908 5909 // Message returns the exception's message. 5910 func (s *ValidationException) Message() string { 5911 if s.Message_ != nil { 5912 return *s.Message_ 5913 } 5914 return "" 5915 } 5916 5917 // OrigErr always returns nil, satisfies awserr.Error interface. 5918 func (s *ValidationException) OrigErr() error { 5919 return nil 5920 } 5921 5922 func (s *ValidationException) Error() string { 5923 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5924 } 5925 5926 // Status code returns the HTTP status code for the request's response error. 5927 func (s *ValidationException) StatusCode() int { 5928 return s.RespMetadata.StatusCode 5929 } 5930 5931 // RequestID returns the service's response RequestID for request. 5932 func (s *ValidationException) RequestID() string { 5933 return s.RespMetadata.RequestID 5934 } 5935 5936 const ( 5937 // DatasetStatusCreateInProgress is a DatasetStatus enum value 5938 DatasetStatusCreateInProgress = "CREATE_IN_PROGRESS" 5939 5940 // DatasetStatusCreateComplete is a DatasetStatus enum value 5941 DatasetStatusCreateComplete = "CREATE_COMPLETE" 5942 5943 // DatasetStatusCreateFailed is a DatasetStatus enum value 5944 DatasetStatusCreateFailed = "CREATE_FAILED" 5945 5946 // DatasetStatusUpdateInProgress is a DatasetStatus enum value 5947 DatasetStatusUpdateInProgress = "UPDATE_IN_PROGRESS" 5948 5949 // DatasetStatusUpdateComplete is a DatasetStatus enum value 5950 DatasetStatusUpdateComplete = "UPDATE_COMPLETE" 5951 5952 // DatasetStatusUpdateFailedRollbackInProgress is a DatasetStatus enum value 5953 DatasetStatusUpdateFailedRollbackInProgress = "UPDATE_FAILED_ROLLBACK_IN_PROGRESS" 5954 5955 // DatasetStatusUpdateFailedRollbackComplete is a DatasetStatus enum value 5956 DatasetStatusUpdateFailedRollbackComplete = "UPDATE_FAILED_ROLLBACK_COMPLETE" 5957 5958 // DatasetStatusDeleteInProgress is a DatasetStatus enum value 5959 DatasetStatusDeleteInProgress = "DELETE_IN_PROGRESS" 5960 5961 // DatasetStatusDeleteComplete is a DatasetStatus enum value 5962 DatasetStatusDeleteComplete = "DELETE_COMPLETE" 5963 5964 // DatasetStatusDeleteFailed is a DatasetStatus enum value 5965 DatasetStatusDeleteFailed = "DELETE_FAILED" 5966 ) 5967 5968 // DatasetStatus_Values returns all elements of the DatasetStatus enum 5969 func DatasetStatus_Values() []string { 5970 return []string{ 5971 DatasetStatusCreateInProgress, 5972 DatasetStatusCreateComplete, 5973 DatasetStatusCreateFailed, 5974 DatasetStatusUpdateInProgress, 5975 DatasetStatusUpdateComplete, 5976 DatasetStatusUpdateFailedRollbackInProgress, 5977 DatasetStatusUpdateFailedRollbackComplete, 5978 DatasetStatusDeleteInProgress, 5979 DatasetStatusDeleteComplete, 5980 DatasetStatusDeleteFailed, 5981 } 5982 } 5983 5984 const ( 5985 // ModelHostingStatusStartingHosting is a ModelHostingStatus enum value 5986 ModelHostingStatusStartingHosting = "STARTING_HOSTING" 5987 5988 // ModelHostingStatusHosted is a ModelHostingStatus enum value 5989 ModelHostingStatusHosted = "HOSTED" 5990 5991 // ModelHostingStatusHostingFailed is a ModelHostingStatus enum value 5992 ModelHostingStatusHostingFailed = "HOSTING_FAILED" 5993 5994 // ModelHostingStatusStoppingHosting is a ModelHostingStatus enum value 5995 ModelHostingStatusStoppingHosting = "STOPPING_HOSTING" 5996 5997 // ModelHostingStatusSystemUpdating is a ModelHostingStatus enum value 5998 ModelHostingStatusSystemUpdating = "SYSTEM_UPDATING" 5999 ) 6000 6001 // ModelHostingStatus_Values returns all elements of the ModelHostingStatus enum 6002 func ModelHostingStatus_Values() []string { 6003 return []string{ 6004 ModelHostingStatusStartingHosting, 6005 ModelHostingStatusHosted, 6006 ModelHostingStatusHostingFailed, 6007 ModelHostingStatusStoppingHosting, 6008 ModelHostingStatusSystemUpdating, 6009 } 6010 } 6011 6012 const ( 6013 // ModelStatusTraining is a ModelStatus enum value 6014 ModelStatusTraining = "TRAINING" 6015 6016 // ModelStatusTrained is a ModelStatus enum value 6017 ModelStatusTrained = "TRAINED" 6018 6019 // ModelStatusTrainingFailed is a ModelStatus enum value 6020 ModelStatusTrainingFailed = "TRAINING_FAILED" 6021 6022 // ModelStatusStartingHosting is a ModelStatus enum value 6023 ModelStatusStartingHosting = "STARTING_HOSTING" 6024 6025 // ModelStatusHosted is a ModelStatus enum value 6026 ModelStatusHosted = "HOSTED" 6027 6028 // ModelStatusHostingFailed is a ModelStatus enum value 6029 ModelStatusHostingFailed = "HOSTING_FAILED" 6030 6031 // ModelStatusStoppingHosting is a ModelStatus enum value 6032 ModelStatusStoppingHosting = "STOPPING_HOSTING" 6033 6034 // ModelStatusSystemUpdating is a ModelStatus enum value 6035 ModelStatusSystemUpdating = "SYSTEM_UPDATING" 6036 6037 // ModelStatusDeleting is a ModelStatus enum value 6038 ModelStatusDeleting = "DELETING" 6039 ) 6040 6041 // ModelStatus_Values returns all elements of the ModelStatus enum 6042 func ModelStatus_Values() []string { 6043 return []string{ 6044 ModelStatusTraining, 6045 ModelStatusTrained, 6046 ModelStatusTrainingFailed, 6047 ModelStatusStartingHosting, 6048 ModelStatusHosted, 6049 ModelStatusHostingFailed, 6050 ModelStatusStoppingHosting, 6051 ModelStatusSystemUpdating, 6052 ModelStatusDeleting, 6053 } 6054 } 6055 6056 const ( 6057 // ResourceTypeProject is a ResourceType enum value 6058 ResourceTypeProject = "PROJECT" 6059 6060 // ResourceTypeDataset is a ResourceType enum value 6061 ResourceTypeDataset = "DATASET" 6062 6063 // ResourceTypeModel is a ResourceType enum value 6064 ResourceTypeModel = "MODEL" 6065 6066 // ResourceTypeTrial is a ResourceType enum value 6067 ResourceTypeTrial = "TRIAL" 6068 ) 6069 6070 // ResourceType_Values returns all elements of the ResourceType enum 6071 func ResourceType_Values() []string { 6072 return []string{ 6073 ResourceTypeProject, 6074 ResourceTypeDataset, 6075 ResourceTypeModel, 6076 ResourceTypeTrial, 6077 } 6078 }