1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package iotjobsdataplane
4
5import (
6	"fmt"
7
8	"github.com/aws/aws-sdk-go/aws"
9	"github.com/aws/aws-sdk-go/aws/awsutil"
10	"github.com/aws/aws-sdk-go/aws/request"
11	"github.com/aws/aws-sdk-go/private/protocol"
12)
13
14const opDescribeJobExecution = "DescribeJobExecution"
15
16// DescribeJobExecutionRequest generates a "aws/request.Request" representing the
17// client's request for the DescribeJobExecution operation. The "output" return
18// value will be populated with the request's response once the request completes
19// successfully.
20//
21// Use "Send" method on the returned Request to send the API call to the service.
22// the "output" return value is not valid until after Send returns without error.
23//
24// See DescribeJobExecution for more information on using the DescribeJobExecution
25// API call, and error handling.
26//
27// This method is useful when you want to inject custom logic or configuration
28// into the SDK's request lifecycle. Such as custom headers, or retry logic.
29//
30//
31//    // Example sending a request using the DescribeJobExecutionRequest method.
32//    req, resp := client.DescribeJobExecutionRequest(params)
33//
34//    err := req.Send()
35//    if err == nil { // resp is now filled
36//        fmt.Println(resp)
37//    }
38//
39// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/DescribeJobExecution
40func (c *IoTJobsDataPlane) DescribeJobExecutionRequest(input *DescribeJobExecutionInput) (req *request.Request, output *DescribeJobExecutionOutput) {
41	op := &request.Operation{
42		Name:       opDescribeJobExecution,
43		HTTPMethod: "GET",
44		HTTPPath:   "/things/{thingName}/jobs/{jobId}",
45	}
46
47	if input == nil {
48		input = &DescribeJobExecutionInput{}
49	}
50
51	output = &DescribeJobExecutionOutput{}
52	req = c.newRequest(op, input, output)
53	return
54}
55
56// DescribeJobExecution API operation for AWS IoT Jobs Data Plane.
57//
58// Gets details of a job execution.
59//
60// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
61// with awserr.Error's Code and Message methods to get detailed information about
62// the error.
63//
64// See the AWS API reference guide for AWS IoT Jobs Data Plane's
65// API operation DescribeJobExecution for usage and error information.
66//
67// Returned Error Types:
68//   * InvalidRequestException
69//   The contents of the request were invalid. For example, this code is returned
70//   when an UpdateJobExecution request contains invalid status details. The message
71//   contains details about the error.
72//
73//   * ResourceNotFoundException
74//   The specified resource does not exist.
75//
76//   * ThrottlingException
77//   The rate exceeds the limit.
78//
79//   * ServiceUnavailableException
80//   The service is temporarily unavailable.
81//
82//   * CertificateValidationException
83//   The certificate is invalid.
84//
85//   * TerminalStateException
86//   The job is in a terminal state.
87//
88// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/DescribeJobExecution
89func (c *IoTJobsDataPlane) DescribeJobExecution(input *DescribeJobExecutionInput) (*DescribeJobExecutionOutput, error) {
90	req, out := c.DescribeJobExecutionRequest(input)
91	return out, req.Send()
92}
93
94// DescribeJobExecutionWithContext is the same as DescribeJobExecution with the addition of
95// the ability to pass a context and additional request options.
96//
97// See DescribeJobExecution for details on how to use this API operation.
98//
99// The context must be non-nil and will be used for request cancellation. If
100// the context is nil a panic will occur. In the future the SDK may create
101// sub-contexts for http.Requests. See https://golang.org/pkg/context/
102// for more information on using Contexts.
103func (c *IoTJobsDataPlane) DescribeJobExecutionWithContext(ctx aws.Context, input *DescribeJobExecutionInput, opts ...request.Option) (*DescribeJobExecutionOutput, error) {
104	req, out := c.DescribeJobExecutionRequest(input)
105	req.SetContext(ctx)
106	req.ApplyOptions(opts...)
107	return out, req.Send()
108}
109
110const opGetPendingJobExecutions = "GetPendingJobExecutions"
111
112// GetPendingJobExecutionsRequest generates a "aws/request.Request" representing the
113// client's request for the GetPendingJobExecutions operation. The "output" return
114// value will be populated with the request's response once the request completes
115// successfully.
116//
117// Use "Send" method on the returned Request to send the API call to the service.
118// the "output" return value is not valid until after Send returns without error.
119//
120// See GetPendingJobExecutions for more information on using the GetPendingJobExecutions
121// API call, and error handling.
122//
123// This method is useful when you want to inject custom logic or configuration
124// into the SDK's request lifecycle. Such as custom headers, or retry logic.
125//
126//
127//    // Example sending a request using the GetPendingJobExecutionsRequest method.
128//    req, resp := client.GetPendingJobExecutionsRequest(params)
129//
130//    err := req.Send()
131//    if err == nil { // resp is now filled
132//        fmt.Println(resp)
133//    }
134//
135// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/GetPendingJobExecutions
136func (c *IoTJobsDataPlane) GetPendingJobExecutionsRequest(input *GetPendingJobExecutionsInput) (req *request.Request, output *GetPendingJobExecutionsOutput) {
137	op := &request.Operation{
138		Name:       opGetPendingJobExecutions,
139		HTTPMethod: "GET",
140		HTTPPath:   "/things/{thingName}/jobs",
141	}
142
143	if input == nil {
144		input = &GetPendingJobExecutionsInput{}
145	}
146
147	output = &GetPendingJobExecutionsOutput{}
148	req = c.newRequest(op, input, output)
149	return
150}
151
152// GetPendingJobExecutions API operation for AWS IoT Jobs Data Plane.
153//
154// Gets the list of all jobs for a thing that are not in a terminal status.
155//
156// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
157// with awserr.Error's Code and Message methods to get detailed information about
158// the error.
159//
160// See the AWS API reference guide for AWS IoT Jobs Data Plane's
161// API operation GetPendingJobExecutions for usage and error information.
162//
163// Returned Error Types:
164//   * InvalidRequestException
165//   The contents of the request were invalid. For example, this code is returned
166//   when an UpdateJobExecution request contains invalid status details. The message
167//   contains details about the error.
168//
169//   * ResourceNotFoundException
170//   The specified resource does not exist.
171//
172//   * ThrottlingException
173//   The rate exceeds the limit.
174//
175//   * ServiceUnavailableException
176//   The service is temporarily unavailable.
177//
178//   * CertificateValidationException
179//   The certificate is invalid.
180//
181// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/GetPendingJobExecutions
182func (c *IoTJobsDataPlane) GetPendingJobExecutions(input *GetPendingJobExecutionsInput) (*GetPendingJobExecutionsOutput, error) {
183	req, out := c.GetPendingJobExecutionsRequest(input)
184	return out, req.Send()
185}
186
187// GetPendingJobExecutionsWithContext is the same as GetPendingJobExecutions with the addition of
188// the ability to pass a context and additional request options.
189//
190// See GetPendingJobExecutions for details on how to use this API operation.
191//
192// The context must be non-nil and will be used for request cancellation. If
193// the context is nil a panic will occur. In the future the SDK may create
194// sub-contexts for http.Requests. See https://golang.org/pkg/context/
195// for more information on using Contexts.
196func (c *IoTJobsDataPlane) GetPendingJobExecutionsWithContext(ctx aws.Context, input *GetPendingJobExecutionsInput, opts ...request.Option) (*GetPendingJobExecutionsOutput, error) {
197	req, out := c.GetPendingJobExecutionsRequest(input)
198	req.SetContext(ctx)
199	req.ApplyOptions(opts...)
200	return out, req.Send()
201}
202
203const opStartNextPendingJobExecution = "StartNextPendingJobExecution"
204
205// StartNextPendingJobExecutionRequest generates a "aws/request.Request" representing the
206// client's request for the StartNextPendingJobExecution operation. The "output" return
207// value will be populated with the request's response once the request completes
208// successfully.
209//
210// Use "Send" method on the returned Request to send the API call to the service.
211// the "output" return value is not valid until after Send returns without error.
212//
213// See StartNextPendingJobExecution for more information on using the StartNextPendingJobExecution
214// API call, and error handling.
215//
216// This method is useful when you want to inject custom logic or configuration
217// into the SDK's request lifecycle. Such as custom headers, or retry logic.
218//
219//
220//    // Example sending a request using the StartNextPendingJobExecutionRequest method.
221//    req, resp := client.StartNextPendingJobExecutionRequest(params)
222//
223//    err := req.Send()
224//    if err == nil { // resp is now filled
225//        fmt.Println(resp)
226//    }
227//
228// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/StartNextPendingJobExecution
229func (c *IoTJobsDataPlane) StartNextPendingJobExecutionRequest(input *StartNextPendingJobExecutionInput) (req *request.Request, output *StartNextPendingJobExecutionOutput) {
230	op := &request.Operation{
231		Name:       opStartNextPendingJobExecution,
232		HTTPMethod: "PUT",
233		HTTPPath:   "/things/{thingName}/jobs/$next",
234	}
235
236	if input == nil {
237		input = &StartNextPendingJobExecutionInput{}
238	}
239
240	output = &StartNextPendingJobExecutionOutput{}
241	req = c.newRequest(op, input, output)
242	return
243}
244
245// StartNextPendingJobExecution API operation for AWS IoT Jobs Data Plane.
246//
247// Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution
248// for a thing.
249//
250// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
251// with awserr.Error's Code and Message methods to get detailed information about
252// the error.
253//
254// See the AWS API reference guide for AWS IoT Jobs Data Plane's
255// API operation StartNextPendingJobExecution for usage and error information.
256//
257// Returned Error Types:
258//   * InvalidRequestException
259//   The contents of the request were invalid. For example, this code is returned
260//   when an UpdateJobExecution request contains invalid status details. The message
261//   contains details about the error.
262//
263//   * ResourceNotFoundException
264//   The specified resource does not exist.
265//
266//   * ThrottlingException
267//   The rate exceeds the limit.
268//
269//   * ServiceUnavailableException
270//   The service is temporarily unavailable.
271//
272//   * CertificateValidationException
273//   The certificate is invalid.
274//
275// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/StartNextPendingJobExecution
276func (c *IoTJobsDataPlane) StartNextPendingJobExecution(input *StartNextPendingJobExecutionInput) (*StartNextPendingJobExecutionOutput, error) {
277	req, out := c.StartNextPendingJobExecutionRequest(input)
278	return out, req.Send()
279}
280
281// StartNextPendingJobExecutionWithContext is the same as StartNextPendingJobExecution with the addition of
282// the ability to pass a context and additional request options.
283//
284// See StartNextPendingJobExecution for details on how to use this API operation.
285//
286// The context must be non-nil and will be used for request cancellation. If
287// the context is nil a panic will occur. In the future the SDK may create
288// sub-contexts for http.Requests. See https://golang.org/pkg/context/
289// for more information on using Contexts.
290func (c *IoTJobsDataPlane) StartNextPendingJobExecutionWithContext(ctx aws.Context, input *StartNextPendingJobExecutionInput, opts ...request.Option) (*StartNextPendingJobExecutionOutput, error) {
291	req, out := c.StartNextPendingJobExecutionRequest(input)
292	req.SetContext(ctx)
293	req.ApplyOptions(opts...)
294	return out, req.Send()
295}
296
297const opUpdateJobExecution = "UpdateJobExecution"
298
299// UpdateJobExecutionRequest generates a "aws/request.Request" representing the
300// client's request for the UpdateJobExecution operation. The "output" return
301// value will be populated with the request's response once the request completes
302// successfully.
303//
304// Use "Send" method on the returned Request to send the API call to the service.
305// the "output" return value is not valid until after Send returns without error.
306//
307// See UpdateJobExecution for more information on using the UpdateJobExecution
308// API call, and error handling.
309//
310// This method is useful when you want to inject custom logic or configuration
311// into the SDK's request lifecycle. Such as custom headers, or retry logic.
312//
313//
314//    // Example sending a request using the UpdateJobExecutionRequest method.
315//    req, resp := client.UpdateJobExecutionRequest(params)
316//
317//    err := req.Send()
318//    if err == nil { // resp is now filled
319//        fmt.Println(resp)
320//    }
321//
322// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/UpdateJobExecution
323func (c *IoTJobsDataPlane) UpdateJobExecutionRequest(input *UpdateJobExecutionInput) (req *request.Request, output *UpdateJobExecutionOutput) {
324	op := &request.Operation{
325		Name:       opUpdateJobExecution,
326		HTTPMethod: "POST",
327		HTTPPath:   "/things/{thingName}/jobs/{jobId}",
328	}
329
330	if input == nil {
331		input = &UpdateJobExecutionInput{}
332	}
333
334	output = &UpdateJobExecutionOutput{}
335	req = c.newRequest(op, input, output)
336	return
337}
338
339// UpdateJobExecution API operation for AWS IoT Jobs Data Plane.
340//
341// Updates the status of a job execution.
342//
343// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
344// with awserr.Error's Code and Message methods to get detailed information about
345// the error.
346//
347// See the AWS API reference guide for AWS IoT Jobs Data Plane's
348// API operation UpdateJobExecution for usage and error information.
349//
350// Returned Error Types:
351//   * InvalidRequestException
352//   The contents of the request were invalid. For example, this code is returned
353//   when an UpdateJobExecution request contains invalid status details. The message
354//   contains details about the error.
355//
356//   * ResourceNotFoundException
357//   The specified resource does not exist.
358//
359//   * ThrottlingException
360//   The rate exceeds the limit.
361//
362//   * ServiceUnavailableException
363//   The service is temporarily unavailable.
364//
365//   * CertificateValidationException
366//   The certificate is invalid.
367//
368//   * InvalidStateTransitionException
369//   An update attempted to change the job execution to a state that is invalid
370//   because of the job execution's current state (for example, an attempt to
371//   change a request in state SUCCESS to state IN_PROGRESS). In this case, the
372//   body of the error message also contains the executionState field.
373//
374// See also, https://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/UpdateJobExecution
375func (c *IoTJobsDataPlane) UpdateJobExecution(input *UpdateJobExecutionInput) (*UpdateJobExecutionOutput, error) {
376	req, out := c.UpdateJobExecutionRequest(input)
377	return out, req.Send()
378}
379
380// UpdateJobExecutionWithContext is the same as UpdateJobExecution with the addition of
381// the ability to pass a context and additional request options.
382//
383// See UpdateJobExecution for details on how to use this API operation.
384//
385// The context must be non-nil and will be used for request cancellation. If
386// the context is nil a panic will occur. In the future the SDK may create
387// sub-contexts for http.Requests. See https://golang.org/pkg/context/
388// for more information on using Contexts.
389func (c *IoTJobsDataPlane) UpdateJobExecutionWithContext(ctx aws.Context, input *UpdateJobExecutionInput, opts ...request.Option) (*UpdateJobExecutionOutput, error) {
390	req, out := c.UpdateJobExecutionRequest(input)
391	req.SetContext(ctx)
392	req.ApplyOptions(opts...)
393	return out, req.Send()
394}
395
396// The certificate is invalid.
397type CertificateValidationException struct {
398	_            struct{}                  `type:"structure"`
399	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
400
401	// Additional information about the exception.
402	Message_ *string `locationName:"message" type:"string"`
403}
404
405// String returns the string representation
406func (s CertificateValidationException) String() string {
407	return awsutil.Prettify(s)
408}
409
410// GoString returns the string representation
411func (s CertificateValidationException) GoString() string {
412	return s.String()
413}
414
415func newErrorCertificateValidationException(v protocol.ResponseMetadata) error {
416	return &CertificateValidationException{
417		RespMetadata: v,
418	}
419}
420
421// Code returns the exception type name.
422func (s *CertificateValidationException) Code() string {
423	return "CertificateValidationException"
424}
425
426// Message returns the exception's message.
427func (s *CertificateValidationException) Message() string {
428	if s.Message_ != nil {
429		return *s.Message_
430	}
431	return ""
432}
433
434// OrigErr always returns nil, satisfies awserr.Error interface.
435func (s *CertificateValidationException) OrigErr() error {
436	return nil
437}
438
439func (s *CertificateValidationException) Error() string {
440	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
441}
442
443// Status code returns the HTTP status code for the request's response error.
444func (s *CertificateValidationException) StatusCode() int {
445	return s.RespMetadata.StatusCode
446}
447
448// RequestID returns the service's response RequestID for request.
449func (s *CertificateValidationException) RequestID() string {
450	return s.RespMetadata.RequestID
451}
452
453type DescribeJobExecutionInput struct {
454	_ struct{} `type:"structure"`
455
456	// Optional. A number that identifies a particular job execution on a particular
457	// device. If not specified, the latest job execution is returned.
458	ExecutionNumber *int64 `location:"querystring" locationName:"executionNumber" type:"long"`
459
460	// Optional. When set to true, the response contains the job document. The default
461	// is false.
462	IncludeJobDocument *bool `location:"querystring" locationName:"includeJobDocument" type:"boolean"`
463
464	// The unique identifier assigned to this job when it was created.
465	//
466	// JobId is a required field
467	JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
468
469	// The thing name associated with the device the job execution is running on.
470	//
471	// ThingName is a required field
472	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
473}
474
475// String returns the string representation
476func (s DescribeJobExecutionInput) String() string {
477	return awsutil.Prettify(s)
478}
479
480// GoString returns the string representation
481func (s DescribeJobExecutionInput) GoString() string {
482	return s.String()
483}
484
485// Validate inspects the fields of the type to determine if they are valid.
486func (s *DescribeJobExecutionInput) Validate() error {
487	invalidParams := request.ErrInvalidParams{Context: "DescribeJobExecutionInput"}
488	if s.JobId == nil {
489		invalidParams.Add(request.NewErrParamRequired("JobId"))
490	}
491	if s.JobId != nil && len(*s.JobId) < 1 {
492		invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
493	}
494	if s.ThingName == nil {
495		invalidParams.Add(request.NewErrParamRequired("ThingName"))
496	}
497	if s.ThingName != nil && len(*s.ThingName) < 1 {
498		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
499	}
500
501	if invalidParams.Len() > 0 {
502		return invalidParams
503	}
504	return nil
505}
506
507// SetExecutionNumber sets the ExecutionNumber field's value.
508func (s *DescribeJobExecutionInput) SetExecutionNumber(v int64) *DescribeJobExecutionInput {
509	s.ExecutionNumber = &v
510	return s
511}
512
513// SetIncludeJobDocument sets the IncludeJobDocument field's value.
514func (s *DescribeJobExecutionInput) SetIncludeJobDocument(v bool) *DescribeJobExecutionInput {
515	s.IncludeJobDocument = &v
516	return s
517}
518
519// SetJobId sets the JobId field's value.
520func (s *DescribeJobExecutionInput) SetJobId(v string) *DescribeJobExecutionInput {
521	s.JobId = &v
522	return s
523}
524
525// SetThingName sets the ThingName field's value.
526func (s *DescribeJobExecutionInput) SetThingName(v string) *DescribeJobExecutionInput {
527	s.ThingName = &v
528	return s
529}
530
531type DescribeJobExecutionOutput struct {
532	_ struct{} `type:"structure"`
533
534	// Contains data about a job execution.
535	Execution *JobExecution `locationName:"execution" type:"structure"`
536}
537
538// String returns the string representation
539func (s DescribeJobExecutionOutput) String() string {
540	return awsutil.Prettify(s)
541}
542
543// GoString returns the string representation
544func (s DescribeJobExecutionOutput) GoString() string {
545	return s.String()
546}
547
548// SetExecution sets the Execution field's value.
549func (s *DescribeJobExecutionOutput) SetExecution(v *JobExecution) *DescribeJobExecutionOutput {
550	s.Execution = v
551	return s
552}
553
554type GetPendingJobExecutionsInput struct {
555	_ struct{} `type:"structure"`
556
557	// The name of the thing that is executing the job.
558	//
559	// ThingName is a required field
560	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
561}
562
563// String returns the string representation
564func (s GetPendingJobExecutionsInput) String() string {
565	return awsutil.Prettify(s)
566}
567
568// GoString returns the string representation
569func (s GetPendingJobExecutionsInput) GoString() string {
570	return s.String()
571}
572
573// Validate inspects the fields of the type to determine if they are valid.
574func (s *GetPendingJobExecutionsInput) Validate() error {
575	invalidParams := request.ErrInvalidParams{Context: "GetPendingJobExecutionsInput"}
576	if s.ThingName == nil {
577		invalidParams.Add(request.NewErrParamRequired("ThingName"))
578	}
579	if s.ThingName != nil && len(*s.ThingName) < 1 {
580		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
581	}
582
583	if invalidParams.Len() > 0 {
584		return invalidParams
585	}
586	return nil
587}
588
589// SetThingName sets the ThingName field's value.
590func (s *GetPendingJobExecutionsInput) SetThingName(v string) *GetPendingJobExecutionsInput {
591	s.ThingName = &v
592	return s
593}
594
595type GetPendingJobExecutionsOutput struct {
596	_ struct{} `type:"structure"`
597
598	// A list of JobExecutionSummary objects with status IN_PROGRESS.
599	InProgressJobs []*JobExecutionSummary `locationName:"inProgressJobs" type:"list"`
600
601	// A list of JobExecutionSummary objects with status QUEUED.
602	QueuedJobs []*JobExecutionSummary `locationName:"queuedJobs" type:"list"`
603}
604
605// String returns the string representation
606func (s GetPendingJobExecutionsOutput) String() string {
607	return awsutil.Prettify(s)
608}
609
610// GoString returns the string representation
611func (s GetPendingJobExecutionsOutput) GoString() string {
612	return s.String()
613}
614
615// SetInProgressJobs sets the InProgressJobs field's value.
616func (s *GetPendingJobExecutionsOutput) SetInProgressJobs(v []*JobExecutionSummary) *GetPendingJobExecutionsOutput {
617	s.InProgressJobs = v
618	return s
619}
620
621// SetQueuedJobs sets the QueuedJobs field's value.
622func (s *GetPendingJobExecutionsOutput) SetQueuedJobs(v []*JobExecutionSummary) *GetPendingJobExecutionsOutput {
623	s.QueuedJobs = v
624	return s
625}
626
627// The contents of the request were invalid. For example, this code is returned
628// when an UpdateJobExecution request contains invalid status details. The message
629// contains details about the error.
630type InvalidRequestException struct {
631	_            struct{}                  `type:"structure"`
632	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
633
634	// The message for the exception.
635	Message_ *string `locationName:"message" type:"string"`
636}
637
638// String returns the string representation
639func (s InvalidRequestException) String() string {
640	return awsutil.Prettify(s)
641}
642
643// GoString returns the string representation
644func (s InvalidRequestException) GoString() string {
645	return s.String()
646}
647
648func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
649	return &InvalidRequestException{
650		RespMetadata: v,
651	}
652}
653
654// Code returns the exception type name.
655func (s *InvalidRequestException) Code() string {
656	return "InvalidRequestException"
657}
658
659// Message returns the exception's message.
660func (s *InvalidRequestException) Message() string {
661	if s.Message_ != nil {
662		return *s.Message_
663	}
664	return ""
665}
666
667// OrigErr always returns nil, satisfies awserr.Error interface.
668func (s *InvalidRequestException) OrigErr() error {
669	return nil
670}
671
672func (s *InvalidRequestException) Error() string {
673	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
674}
675
676// Status code returns the HTTP status code for the request's response error.
677func (s *InvalidRequestException) StatusCode() int {
678	return s.RespMetadata.StatusCode
679}
680
681// RequestID returns the service's response RequestID for request.
682func (s *InvalidRequestException) RequestID() string {
683	return s.RespMetadata.RequestID
684}
685
686// An update attempted to change the job execution to a state that is invalid
687// because of the job execution's current state (for example, an attempt to
688// change a request in state SUCCESS to state IN_PROGRESS). In this case, the
689// body of the error message also contains the executionState field.
690type InvalidStateTransitionException struct {
691	_            struct{}                  `type:"structure"`
692	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
693
694	Message_ *string `locationName:"message" type:"string"`
695}
696
697// String returns the string representation
698func (s InvalidStateTransitionException) String() string {
699	return awsutil.Prettify(s)
700}
701
702// GoString returns the string representation
703func (s InvalidStateTransitionException) GoString() string {
704	return s.String()
705}
706
707func newErrorInvalidStateTransitionException(v protocol.ResponseMetadata) error {
708	return &InvalidStateTransitionException{
709		RespMetadata: v,
710	}
711}
712
713// Code returns the exception type name.
714func (s *InvalidStateTransitionException) Code() string {
715	return "InvalidStateTransitionException"
716}
717
718// Message returns the exception's message.
719func (s *InvalidStateTransitionException) Message() string {
720	if s.Message_ != nil {
721		return *s.Message_
722	}
723	return ""
724}
725
726// OrigErr always returns nil, satisfies awserr.Error interface.
727func (s *InvalidStateTransitionException) OrigErr() error {
728	return nil
729}
730
731func (s *InvalidStateTransitionException) Error() string {
732	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
733}
734
735// Status code returns the HTTP status code for the request's response error.
736func (s *InvalidStateTransitionException) StatusCode() int {
737	return s.RespMetadata.StatusCode
738}
739
740// RequestID returns the service's response RequestID for request.
741func (s *InvalidStateTransitionException) RequestID() string {
742	return s.RespMetadata.RequestID
743}
744
745// Contains data about a job execution.
746type JobExecution struct {
747	_ struct{} `type:"structure"`
748
749	// The estimated number of seconds that remain before the job execution status
750	// will be changed to TIMED_OUT.
751	ApproximateSecondsBeforeTimedOut *int64 `locationName:"approximateSecondsBeforeTimedOut" type:"long"`
752
753	// A number that identifies a particular job execution on a particular device.
754	// It can be used later in commands that return or update job execution information.
755	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
756
757	// The content of the job document.
758	JobDocument *string `locationName:"jobDocument" type:"string"`
759
760	// The unique identifier you assigned to this job when it was created.
761	JobId *string `locationName:"jobId" min:"1" type:"string"`
762
763	// The time, in milliseconds since the epoch, when the job execution was last
764	// updated.
765	LastUpdatedAt *int64 `locationName:"lastUpdatedAt" type:"long"`
766
767	// The time, in milliseconds since the epoch, when the job execution was enqueued.
768	QueuedAt *int64 `locationName:"queuedAt" type:"long"`
769
770	// The time, in milliseconds since the epoch, when the job execution was started.
771	StartedAt *int64 `locationName:"startedAt" type:"long"`
772
773	// The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS",
774	// "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
775	Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"`
776
777	// A collection of name/value pairs that describe the status of the job execution.
778	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
779
780	// The name of the thing that is executing the job.
781	ThingName *string `locationName:"thingName" min:"1" type:"string"`
782
783	// The version of the job execution. Job execution versions are incremented
784	// each time they are updated by a device.
785	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
786}
787
788// String returns the string representation
789func (s JobExecution) String() string {
790	return awsutil.Prettify(s)
791}
792
793// GoString returns the string representation
794func (s JobExecution) GoString() string {
795	return s.String()
796}
797
798// SetApproximateSecondsBeforeTimedOut sets the ApproximateSecondsBeforeTimedOut field's value.
799func (s *JobExecution) SetApproximateSecondsBeforeTimedOut(v int64) *JobExecution {
800	s.ApproximateSecondsBeforeTimedOut = &v
801	return s
802}
803
804// SetExecutionNumber sets the ExecutionNumber field's value.
805func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution {
806	s.ExecutionNumber = &v
807	return s
808}
809
810// SetJobDocument sets the JobDocument field's value.
811func (s *JobExecution) SetJobDocument(v string) *JobExecution {
812	s.JobDocument = &v
813	return s
814}
815
816// SetJobId sets the JobId field's value.
817func (s *JobExecution) SetJobId(v string) *JobExecution {
818	s.JobId = &v
819	return s
820}
821
822// SetLastUpdatedAt sets the LastUpdatedAt field's value.
823func (s *JobExecution) SetLastUpdatedAt(v int64) *JobExecution {
824	s.LastUpdatedAt = &v
825	return s
826}
827
828// SetQueuedAt sets the QueuedAt field's value.
829func (s *JobExecution) SetQueuedAt(v int64) *JobExecution {
830	s.QueuedAt = &v
831	return s
832}
833
834// SetStartedAt sets the StartedAt field's value.
835func (s *JobExecution) SetStartedAt(v int64) *JobExecution {
836	s.StartedAt = &v
837	return s
838}
839
840// SetStatus sets the Status field's value.
841func (s *JobExecution) SetStatus(v string) *JobExecution {
842	s.Status = &v
843	return s
844}
845
846// SetStatusDetails sets the StatusDetails field's value.
847func (s *JobExecution) SetStatusDetails(v map[string]*string) *JobExecution {
848	s.StatusDetails = v
849	return s
850}
851
852// SetThingName sets the ThingName field's value.
853func (s *JobExecution) SetThingName(v string) *JobExecution {
854	s.ThingName = &v
855	return s
856}
857
858// SetVersionNumber sets the VersionNumber field's value.
859func (s *JobExecution) SetVersionNumber(v int64) *JobExecution {
860	s.VersionNumber = &v
861	return s
862}
863
864// Contains data about the state of a job execution.
865type JobExecutionState struct {
866	_ struct{} `type:"structure"`
867
868	// The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS",
869	// "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
870	Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"`
871
872	// A collection of name/value pairs that describe the status of the job execution.
873	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
874
875	// The version of the job execution. Job execution versions are incremented
876	// each time they are updated by a device.
877	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
878}
879
880// String returns the string representation
881func (s JobExecutionState) String() string {
882	return awsutil.Prettify(s)
883}
884
885// GoString returns the string representation
886func (s JobExecutionState) GoString() string {
887	return s.String()
888}
889
890// SetStatus sets the Status field's value.
891func (s *JobExecutionState) SetStatus(v string) *JobExecutionState {
892	s.Status = &v
893	return s
894}
895
896// SetStatusDetails sets the StatusDetails field's value.
897func (s *JobExecutionState) SetStatusDetails(v map[string]*string) *JobExecutionState {
898	s.StatusDetails = v
899	return s
900}
901
902// SetVersionNumber sets the VersionNumber field's value.
903func (s *JobExecutionState) SetVersionNumber(v int64) *JobExecutionState {
904	s.VersionNumber = &v
905	return s
906}
907
908// Contains a subset of information about a job execution.
909type JobExecutionSummary struct {
910	_ struct{} `type:"structure"`
911
912	// A number that identifies a particular job execution on a particular device.
913	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
914
915	// The unique identifier you assigned to this job when it was created.
916	JobId *string `locationName:"jobId" min:"1" type:"string"`
917
918	// The time, in milliseconds since the epoch, when the job execution was last
919	// updated.
920	LastUpdatedAt *int64 `locationName:"lastUpdatedAt" type:"long"`
921
922	// The time, in milliseconds since the epoch, when the job execution was enqueued.
923	QueuedAt *int64 `locationName:"queuedAt" type:"long"`
924
925	// The time, in milliseconds since the epoch, when the job execution started.
926	StartedAt *int64 `locationName:"startedAt" type:"long"`
927
928	// The version of the job execution. Job execution versions are incremented
929	// each time AWS IoT Jobs receives an update from a device.
930	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
931}
932
933// String returns the string representation
934func (s JobExecutionSummary) String() string {
935	return awsutil.Prettify(s)
936}
937
938// GoString returns the string representation
939func (s JobExecutionSummary) GoString() string {
940	return s.String()
941}
942
943// SetExecutionNumber sets the ExecutionNumber field's value.
944func (s *JobExecutionSummary) SetExecutionNumber(v int64) *JobExecutionSummary {
945	s.ExecutionNumber = &v
946	return s
947}
948
949// SetJobId sets the JobId field's value.
950func (s *JobExecutionSummary) SetJobId(v string) *JobExecutionSummary {
951	s.JobId = &v
952	return s
953}
954
955// SetLastUpdatedAt sets the LastUpdatedAt field's value.
956func (s *JobExecutionSummary) SetLastUpdatedAt(v int64) *JobExecutionSummary {
957	s.LastUpdatedAt = &v
958	return s
959}
960
961// SetQueuedAt sets the QueuedAt field's value.
962func (s *JobExecutionSummary) SetQueuedAt(v int64) *JobExecutionSummary {
963	s.QueuedAt = &v
964	return s
965}
966
967// SetStartedAt sets the StartedAt field's value.
968func (s *JobExecutionSummary) SetStartedAt(v int64) *JobExecutionSummary {
969	s.StartedAt = &v
970	return s
971}
972
973// SetVersionNumber sets the VersionNumber field's value.
974func (s *JobExecutionSummary) SetVersionNumber(v int64) *JobExecutionSummary {
975	s.VersionNumber = &v
976	return s
977}
978
979// The specified resource does not exist.
980type ResourceNotFoundException struct {
981	_            struct{}                  `type:"structure"`
982	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
983
984	// The message for the exception.
985	Message_ *string `locationName:"message" type:"string"`
986}
987
988// String returns the string representation
989func (s ResourceNotFoundException) String() string {
990	return awsutil.Prettify(s)
991}
992
993// GoString returns the string representation
994func (s ResourceNotFoundException) GoString() string {
995	return s.String()
996}
997
998func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
999	return &ResourceNotFoundException{
1000		RespMetadata: v,
1001	}
1002}
1003
1004// Code returns the exception type name.
1005func (s *ResourceNotFoundException) Code() string {
1006	return "ResourceNotFoundException"
1007}
1008
1009// Message returns the exception's message.
1010func (s *ResourceNotFoundException) Message() string {
1011	if s.Message_ != nil {
1012		return *s.Message_
1013	}
1014	return ""
1015}
1016
1017// OrigErr always returns nil, satisfies awserr.Error interface.
1018func (s *ResourceNotFoundException) OrigErr() error {
1019	return nil
1020}
1021
1022func (s *ResourceNotFoundException) Error() string {
1023	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1024}
1025
1026// Status code returns the HTTP status code for the request's response error.
1027func (s *ResourceNotFoundException) StatusCode() int {
1028	return s.RespMetadata.StatusCode
1029}
1030
1031// RequestID returns the service's response RequestID for request.
1032func (s *ResourceNotFoundException) RequestID() string {
1033	return s.RespMetadata.RequestID
1034}
1035
1036// The service is temporarily unavailable.
1037type ServiceUnavailableException struct {
1038	_            struct{}                  `type:"structure"`
1039	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1040
1041	// The message for the exception.
1042	Message_ *string `locationName:"message" type:"string"`
1043}
1044
1045// String returns the string representation
1046func (s ServiceUnavailableException) String() string {
1047	return awsutil.Prettify(s)
1048}
1049
1050// GoString returns the string representation
1051func (s ServiceUnavailableException) GoString() string {
1052	return s.String()
1053}
1054
1055func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error {
1056	return &ServiceUnavailableException{
1057		RespMetadata: v,
1058	}
1059}
1060
1061// Code returns the exception type name.
1062func (s *ServiceUnavailableException) Code() string {
1063	return "ServiceUnavailableException"
1064}
1065
1066// Message returns the exception's message.
1067func (s *ServiceUnavailableException) Message() string {
1068	if s.Message_ != nil {
1069		return *s.Message_
1070	}
1071	return ""
1072}
1073
1074// OrigErr always returns nil, satisfies awserr.Error interface.
1075func (s *ServiceUnavailableException) OrigErr() error {
1076	return nil
1077}
1078
1079func (s *ServiceUnavailableException) Error() string {
1080	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1081}
1082
1083// Status code returns the HTTP status code for the request's response error.
1084func (s *ServiceUnavailableException) StatusCode() int {
1085	return s.RespMetadata.StatusCode
1086}
1087
1088// RequestID returns the service's response RequestID for request.
1089func (s *ServiceUnavailableException) RequestID() string {
1090	return s.RespMetadata.RequestID
1091}
1092
1093type StartNextPendingJobExecutionInput struct {
1094	_ struct{} `type:"structure"`
1095
1096	// A collection of name/value pairs that describe the status of the job execution.
1097	// If not specified, the statusDetails are unchanged.
1098	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
1099
1100	// Specifies the amount of time this device has to finish execution of this
1101	// job. If the job execution status is not set to a terminal state before this
1102	// timer expires, or before the timer is reset (by calling UpdateJobExecution,
1103	// setting the status to IN_PROGRESS and specifying a new timeout value in field
1104	// stepTimeoutInMinutes) the job execution status will be automatically set
1105	// to TIMED_OUT. Note that setting this timeout has no effect on that job execution
1106	// timeout which may have been specified when the job was created (CreateJob
1107	// using field timeoutConfig).
1108	StepTimeoutInMinutes *int64 `locationName:"stepTimeoutInMinutes" type:"long"`
1109
1110	// The name of the thing associated with the device.
1111	//
1112	// ThingName is a required field
1113	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
1114}
1115
1116// String returns the string representation
1117func (s StartNextPendingJobExecutionInput) String() string {
1118	return awsutil.Prettify(s)
1119}
1120
1121// GoString returns the string representation
1122func (s StartNextPendingJobExecutionInput) GoString() string {
1123	return s.String()
1124}
1125
1126// Validate inspects the fields of the type to determine if they are valid.
1127func (s *StartNextPendingJobExecutionInput) Validate() error {
1128	invalidParams := request.ErrInvalidParams{Context: "StartNextPendingJobExecutionInput"}
1129	if s.ThingName == nil {
1130		invalidParams.Add(request.NewErrParamRequired("ThingName"))
1131	}
1132	if s.ThingName != nil && len(*s.ThingName) < 1 {
1133		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
1134	}
1135
1136	if invalidParams.Len() > 0 {
1137		return invalidParams
1138	}
1139	return nil
1140}
1141
1142// SetStatusDetails sets the StatusDetails field's value.
1143func (s *StartNextPendingJobExecutionInput) SetStatusDetails(v map[string]*string) *StartNextPendingJobExecutionInput {
1144	s.StatusDetails = v
1145	return s
1146}
1147
1148// SetStepTimeoutInMinutes sets the StepTimeoutInMinutes field's value.
1149func (s *StartNextPendingJobExecutionInput) SetStepTimeoutInMinutes(v int64) *StartNextPendingJobExecutionInput {
1150	s.StepTimeoutInMinutes = &v
1151	return s
1152}
1153
1154// SetThingName sets the ThingName field's value.
1155func (s *StartNextPendingJobExecutionInput) SetThingName(v string) *StartNextPendingJobExecutionInput {
1156	s.ThingName = &v
1157	return s
1158}
1159
1160type StartNextPendingJobExecutionOutput struct {
1161	_ struct{} `type:"structure"`
1162
1163	// A JobExecution object.
1164	Execution *JobExecution `locationName:"execution" type:"structure"`
1165}
1166
1167// String returns the string representation
1168func (s StartNextPendingJobExecutionOutput) String() string {
1169	return awsutil.Prettify(s)
1170}
1171
1172// GoString returns the string representation
1173func (s StartNextPendingJobExecutionOutput) GoString() string {
1174	return s.String()
1175}
1176
1177// SetExecution sets the Execution field's value.
1178func (s *StartNextPendingJobExecutionOutput) SetExecution(v *JobExecution) *StartNextPendingJobExecutionOutput {
1179	s.Execution = v
1180	return s
1181}
1182
1183// The job is in a terminal state.
1184type TerminalStateException struct {
1185	_            struct{}                  `type:"structure"`
1186	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1187
1188	Message_ *string `locationName:"message" type:"string"`
1189}
1190
1191// String returns the string representation
1192func (s TerminalStateException) String() string {
1193	return awsutil.Prettify(s)
1194}
1195
1196// GoString returns the string representation
1197func (s TerminalStateException) GoString() string {
1198	return s.String()
1199}
1200
1201func newErrorTerminalStateException(v protocol.ResponseMetadata) error {
1202	return &TerminalStateException{
1203		RespMetadata: v,
1204	}
1205}
1206
1207// Code returns the exception type name.
1208func (s *TerminalStateException) Code() string {
1209	return "TerminalStateException"
1210}
1211
1212// Message returns the exception's message.
1213func (s *TerminalStateException) Message() string {
1214	if s.Message_ != nil {
1215		return *s.Message_
1216	}
1217	return ""
1218}
1219
1220// OrigErr always returns nil, satisfies awserr.Error interface.
1221func (s *TerminalStateException) OrigErr() error {
1222	return nil
1223}
1224
1225func (s *TerminalStateException) Error() string {
1226	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1227}
1228
1229// Status code returns the HTTP status code for the request's response error.
1230func (s *TerminalStateException) StatusCode() int {
1231	return s.RespMetadata.StatusCode
1232}
1233
1234// RequestID returns the service's response RequestID for request.
1235func (s *TerminalStateException) RequestID() string {
1236	return s.RespMetadata.RequestID
1237}
1238
1239// The rate exceeds the limit.
1240type ThrottlingException struct {
1241	_            struct{}                  `type:"structure"`
1242	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1243
1244	// The message associated with the exception.
1245	Message_ *string `locationName:"message" type:"string"`
1246
1247	// The payload associated with the exception.
1248	//
1249	// Payload is automatically base64 encoded/decoded by the SDK.
1250	Payload []byte `locationName:"payload" type:"blob"`
1251}
1252
1253// String returns the string representation
1254func (s ThrottlingException) String() string {
1255	return awsutil.Prettify(s)
1256}
1257
1258// GoString returns the string representation
1259func (s ThrottlingException) GoString() string {
1260	return s.String()
1261}
1262
1263func newErrorThrottlingException(v protocol.ResponseMetadata) error {
1264	return &ThrottlingException{
1265		RespMetadata: v,
1266	}
1267}
1268
1269// Code returns the exception type name.
1270func (s *ThrottlingException) Code() string {
1271	return "ThrottlingException"
1272}
1273
1274// Message returns the exception's message.
1275func (s *ThrottlingException) Message() string {
1276	if s.Message_ != nil {
1277		return *s.Message_
1278	}
1279	return ""
1280}
1281
1282// OrigErr always returns nil, satisfies awserr.Error interface.
1283func (s *ThrottlingException) OrigErr() error {
1284	return nil
1285}
1286
1287func (s *ThrottlingException) Error() string {
1288	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1289}
1290
1291// Status code returns the HTTP status code for the request's response error.
1292func (s *ThrottlingException) StatusCode() int {
1293	return s.RespMetadata.StatusCode
1294}
1295
1296// RequestID returns the service's response RequestID for request.
1297func (s *ThrottlingException) RequestID() string {
1298	return s.RespMetadata.RequestID
1299}
1300
1301type UpdateJobExecutionInput struct {
1302	_ struct{} `type:"structure"`
1303
1304	// Optional. A number that identifies a particular job execution on a particular
1305	// device.
1306	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
1307
1308	// Optional. The expected current version of the job execution. Each time you
1309	// update the job execution, its version is incremented. If the version of the
1310	// job execution stored in Jobs does not match, the update is rejected with
1311	// a VersionMismatch error, and an ErrorResponse that contains the current job
1312	// execution status data is returned. (This makes it unnecessary to perform
1313	// a separate DescribeJobExecution request in order to obtain the job execution
1314	// status data.)
1315	ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"`
1316
1317	// Optional. When set to true, the response contains the job document. The default
1318	// is false.
1319	IncludeJobDocument *bool `locationName:"includeJobDocument" type:"boolean"`
1320
1321	// Optional. When included and set to true, the response contains the JobExecutionState
1322	// data. The default is false.
1323	IncludeJobExecutionState *bool `locationName:"includeJobExecutionState" type:"boolean"`
1324
1325	// The unique identifier assigned to this job when it was created.
1326	//
1327	// JobId is a required field
1328	JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"`
1329
1330	// The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED).
1331	// This must be specified on every update.
1332	//
1333	// Status is a required field
1334	Status *string `locationName:"status" type:"string" required:"true" enum:"JobExecutionStatus"`
1335
1336	// Optional. A collection of name/value pairs that describe the status of the
1337	// job execution. If not specified, the statusDetails are unchanged.
1338	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
1339
1340	// Specifies the amount of time this device has to finish execution of this
1341	// job. If the job execution status is not set to a terminal state before this
1342	// timer expires, or before the timer is reset (by again calling UpdateJobExecution,
1343	// setting the status to IN_PROGRESS and specifying a new timeout value in this
1344	// field) the job execution status will be automatically set to TIMED_OUT. Note
1345	// that setting or resetting this timeout has no effect on that job execution
1346	// timeout which may have been specified when the job was created (CreateJob
1347	// using field timeoutConfig).
1348	StepTimeoutInMinutes *int64 `locationName:"stepTimeoutInMinutes" type:"long"`
1349
1350	// The name of the thing associated with the device.
1351	//
1352	// ThingName is a required field
1353	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
1354}
1355
1356// String returns the string representation
1357func (s UpdateJobExecutionInput) String() string {
1358	return awsutil.Prettify(s)
1359}
1360
1361// GoString returns the string representation
1362func (s UpdateJobExecutionInput) GoString() string {
1363	return s.String()
1364}
1365
1366// Validate inspects the fields of the type to determine if they are valid.
1367func (s *UpdateJobExecutionInput) Validate() error {
1368	invalidParams := request.ErrInvalidParams{Context: "UpdateJobExecutionInput"}
1369	if s.JobId == nil {
1370		invalidParams.Add(request.NewErrParamRequired("JobId"))
1371	}
1372	if s.JobId != nil && len(*s.JobId) < 1 {
1373		invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
1374	}
1375	if s.Status == nil {
1376		invalidParams.Add(request.NewErrParamRequired("Status"))
1377	}
1378	if s.ThingName == nil {
1379		invalidParams.Add(request.NewErrParamRequired("ThingName"))
1380	}
1381	if s.ThingName != nil && len(*s.ThingName) < 1 {
1382		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
1383	}
1384
1385	if invalidParams.Len() > 0 {
1386		return invalidParams
1387	}
1388	return nil
1389}
1390
1391// SetExecutionNumber sets the ExecutionNumber field's value.
1392func (s *UpdateJobExecutionInput) SetExecutionNumber(v int64) *UpdateJobExecutionInput {
1393	s.ExecutionNumber = &v
1394	return s
1395}
1396
1397// SetExpectedVersion sets the ExpectedVersion field's value.
1398func (s *UpdateJobExecutionInput) SetExpectedVersion(v int64) *UpdateJobExecutionInput {
1399	s.ExpectedVersion = &v
1400	return s
1401}
1402
1403// SetIncludeJobDocument sets the IncludeJobDocument field's value.
1404func (s *UpdateJobExecutionInput) SetIncludeJobDocument(v bool) *UpdateJobExecutionInput {
1405	s.IncludeJobDocument = &v
1406	return s
1407}
1408
1409// SetIncludeJobExecutionState sets the IncludeJobExecutionState field's value.
1410func (s *UpdateJobExecutionInput) SetIncludeJobExecutionState(v bool) *UpdateJobExecutionInput {
1411	s.IncludeJobExecutionState = &v
1412	return s
1413}
1414
1415// SetJobId sets the JobId field's value.
1416func (s *UpdateJobExecutionInput) SetJobId(v string) *UpdateJobExecutionInput {
1417	s.JobId = &v
1418	return s
1419}
1420
1421// SetStatus sets the Status field's value.
1422func (s *UpdateJobExecutionInput) SetStatus(v string) *UpdateJobExecutionInput {
1423	s.Status = &v
1424	return s
1425}
1426
1427// SetStatusDetails sets the StatusDetails field's value.
1428func (s *UpdateJobExecutionInput) SetStatusDetails(v map[string]*string) *UpdateJobExecutionInput {
1429	s.StatusDetails = v
1430	return s
1431}
1432
1433// SetStepTimeoutInMinutes sets the StepTimeoutInMinutes field's value.
1434func (s *UpdateJobExecutionInput) SetStepTimeoutInMinutes(v int64) *UpdateJobExecutionInput {
1435	s.StepTimeoutInMinutes = &v
1436	return s
1437}
1438
1439// SetThingName sets the ThingName field's value.
1440func (s *UpdateJobExecutionInput) SetThingName(v string) *UpdateJobExecutionInput {
1441	s.ThingName = &v
1442	return s
1443}
1444
1445type UpdateJobExecutionOutput struct {
1446	_ struct{} `type:"structure"`
1447
1448	// A JobExecutionState object.
1449	ExecutionState *JobExecutionState `locationName:"executionState" type:"structure"`
1450
1451	// The contents of the Job Documents.
1452	JobDocument *string `locationName:"jobDocument" type:"string"`
1453}
1454
1455// String returns the string representation
1456func (s UpdateJobExecutionOutput) String() string {
1457	return awsutil.Prettify(s)
1458}
1459
1460// GoString returns the string representation
1461func (s UpdateJobExecutionOutput) GoString() string {
1462	return s.String()
1463}
1464
1465// SetExecutionState sets the ExecutionState field's value.
1466func (s *UpdateJobExecutionOutput) SetExecutionState(v *JobExecutionState) *UpdateJobExecutionOutput {
1467	s.ExecutionState = v
1468	return s
1469}
1470
1471// SetJobDocument sets the JobDocument field's value.
1472func (s *UpdateJobExecutionOutput) SetJobDocument(v string) *UpdateJobExecutionOutput {
1473	s.JobDocument = &v
1474	return s
1475}
1476
1477const (
1478	// JobExecutionStatusQueued is a JobExecutionStatus enum value
1479	JobExecutionStatusQueued = "QUEUED"
1480
1481	// JobExecutionStatusInProgress is a JobExecutionStatus enum value
1482	JobExecutionStatusInProgress = "IN_PROGRESS"
1483
1484	// JobExecutionStatusSucceeded is a JobExecutionStatus enum value
1485	JobExecutionStatusSucceeded = "SUCCEEDED"
1486
1487	// JobExecutionStatusFailed is a JobExecutionStatus enum value
1488	JobExecutionStatusFailed = "FAILED"
1489
1490	// JobExecutionStatusTimedOut is a JobExecutionStatus enum value
1491	JobExecutionStatusTimedOut = "TIMED_OUT"
1492
1493	// JobExecutionStatusRejected is a JobExecutionStatus enum value
1494	JobExecutionStatusRejected = "REJECTED"
1495
1496	// JobExecutionStatusRemoved is a JobExecutionStatus enum value
1497	JobExecutionStatusRemoved = "REMOVED"
1498
1499	// JobExecutionStatusCanceled is a JobExecutionStatus enum value
1500	JobExecutionStatusCanceled = "CANCELED"
1501)
1502
1503// JobExecutionStatus_Values returns all elements of the JobExecutionStatus enum
1504func JobExecutionStatus_Values() []string {
1505	return []string{
1506		JobExecutionStatusQueued,
1507		JobExecutionStatusInProgress,
1508		JobExecutionStatusSucceeded,
1509		JobExecutionStatusFailed,
1510		JobExecutionStatusTimedOut,
1511		JobExecutionStatusRejected,
1512		JobExecutionStatusRemoved,
1513		JobExecutionStatusCanceled,
1514	}
1515}
1516