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