github.com/aavshr/aws-sdk-go@v1.41.3/service/iotjobsdataplane/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package iotjobsdataplane
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/aavshr/aws-sdk-go/aws"
     9  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    10  	"github.com/aavshr/aws-sdk-go/aws/request"
    11  	"github.com/aavshr/aws-sdk-go/private/protocol"
    12  )
    13  
    14  const 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
    40  func (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
    89  func (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.
   103  func (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  
   110  const 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
   136  func (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
   182  func (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.
   196  func (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  
   203  const 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
   229  func (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
   276  func (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.
   290  func (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  
   297  const 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
   323  func (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
   375  func (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.
   389  func (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.
   397  type 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.
   406  //
   407  // API parameter values that are decorated as "sensitive" in the API will not
   408  // be included in the string output. The member name will be present, but the
   409  // value will be replaced with "sensitive".
   410  func (s CertificateValidationException) String() string {
   411  	return awsutil.Prettify(s)
   412  }
   413  
   414  // GoString returns the string representation.
   415  //
   416  // API parameter values that are decorated as "sensitive" in the API will not
   417  // be included in the string output. The member name will be present, but the
   418  // value will be replaced with "sensitive".
   419  func (s CertificateValidationException) GoString() string {
   420  	return s.String()
   421  }
   422  
   423  func newErrorCertificateValidationException(v protocol.ResponseMetadata) error {
   424  	return &CertificateValidationException{
   425  		RespMetadata: v,
   426  	}
   427  }
   428  
   429  // Code returns the exception type name.
   430  func (s *CertificateValidationException) Code() string {
   431  	return "CertificateValidationException"
   432  }
   433  
   434  // Message returns the exception's message.
   435  func (s *CertificateValidationException) Message() string {
   436  	if s.Message_ != nil {
   437  		return *s.Message_
   438  	}
   439  	return ""
   440  }
   441  
   442  // OrigErr always returns nil, satisfies awserr.Error interface.
   443  func (s *CertificateValidationException) OrigErr() error {
   444  	return nil
   445  }
   446  
   447  func (s *CertificateValidationException) Error() string {
   448  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   449  }
   450  
   451  // Status code returns the HTTP status code for the request's response error.
   452  func (s *CertificateValidationException) StatusCode() int {
   453  	return s.RespMetadata.StatusCode
   454  }
   455  
   456  // RequestID returns the service's response RequestID for request.
   457  func (s *CertificateValidationException) RequestID() string {
   458  	return s.RespMetadata.RequestID
   459  }
   460  
   461  type DescribeJobExecutionInput struct {
   462  	_ struct{} `type:"structure" nopayload:"true"`
   463  
   464  	// Optional. A number that identifies a particular job execution on a particular
   465  	// device. If not specified, the latest job execution is returned.
   466  	ExecutionNumber *int64 `location:"querystring" locationName:"executionNumber" type:"long"`
   467  
   468  	// Optional. When set to true, the response contains the job document. The default
   469  	// is false.
   470  	IncludeJobDocument *bool `location:"querystring" locationName:"includeJobDocument" type:"boolean"`
   471  
   472  	// The unique identifier assigned to this job when it was created.
   473  	//
   474  	// JobId is a required field
   475  	JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
   476  
   477  	// The thing name associated with the device the job execution is running on.
   478  	//
   479  	// ThingName is a required field
   480  	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
   481  }
   482  
   483  // String returns the string representation.
   484  //
   485  // API parameter values that are decorated as "sensitive" in the API will not
   486  // be included in the string output. The member name will be present, but the
   487  // value will be replaced with "sensitive".
   488  func (s DescribeJobExecutionInput) String() string {
   489  	return awsutil.Prettify(s)
   490  }
   491  
   492  // GoString returns the string representation.
   493  //
   494  // API parameter values that are decorated as "sensitive" in the API will not
   495  // be included in the string output. The member name will be present, but the
   496  // value will be replaced with "sensitive".
   497  func (s DescribeJobExecutionInput) GoString() string {
   498  	return s.String()
   499  }
   500  
   501  // Validate inspects the fields of the type to determine if they are valid.
   502  func (s *DescribeJobExecutionInput) Validate() error {
   503  	invalidParams := request.ErrInvalidParams{Context: "DescribeJobExecutionInput"}
   504  	if s.JobId == nil {
   505  		invalidParams.Add(request.NewErrParamRequired("JobId"))
   506  	}
   507  	if s.JobId != nil && len(*s.JobId) < 1 {
   508  		invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
   509  	}
   510  	if s.ThingName == nil {
   511  		invalidParams.Add(request.NewErrParamRequired("ThingName"))
   512  	}
   513  	if s.ThingName != nil && len(*s.ThingName) < 1 {
   514  		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
   515  	}
   516  
   517  	if invalidParams.Len() > 0 {
   518  		return invalidParams
   519  	}
   520  	return nil
   521  }
   522  
   523  // SetExecutionNumber sets the ExecutionNumber field's value.
   524  func (s *DescribeJobExecutionInput) SetExecutionNumber(v int64) *DescribeJobExecutionInput {
   525  	s.ExecutionNumber = &v
   526  	return s
   527  }
   528  
   529  // SetIncludeJobDocument sets the IncludeJobDocument field's value.
   530  func (s *DescribeJobExecutionInput) SetIncludeJobDocument(v bool) *DescribeJobExecutionInput {
   531  	s.IncludeJobDocument = &v
   532  	return s
   533  }
   534  
   535  // SetJobId sets the JobId field's value.
   536  func (s *DescribeJobExecutionInput) SetJobId(v string) *DescribeJobExecutionInput {
   537  	s.JobId = &v
   538  	return s
   539  }
   540  
   541  // SetThingName sets the ThingName field's value.
   542  func (s *DescribeJobExecutionInput) SetThingName(v string) *DescribeJobExecutionInput {
   543  	s.ThingName = &v
   544  	return s
   545  }
   546  
   547  type DescribeJobExecutionOutput struct {
   548  	_ struct{} `type:"structure"`
   549  
   550  	// Contains data about a job execution.
   551  	Execution *JobExecution `locationName:"execution" type:"structure"`
   552  }
   553  
   554  // String returns the string representation.
   555  //
   556  // API parameter values that are decorated as "sensitive" in the API will not
   557  // be included in the string output. The member name will be present, but the
   558  // value will be replaced with "sensitive".
   559  func (s DescribeJobExecutionOutput) String() string {
   560  	return awsutil.Prettify(s)
   561  }
   562  
   563  // GoString returns the string representation.
   564  //
   565  // API parameter values that are decorated as "sensitive" in the API will not
   566  // be included in the string output. The member name will be present, but the
   567  // value will be replaced with "sensitive".
   568  func (s DescribeJobExecutionOutput) GoString() string {
   569  	return s.String()
   570  }
   571  
   572  // SetExecution sets the Execution field's value.
   573  func (s *DescribeJobExecutionOutput) SetExecution(v *JobExecution) *DescribeJobExecutionOutput {
   574  	s.Execution = v
   575  	return s
   576  }
   577  
   578  type GetPendingJobExecutionsInput struct {
   579  	_ struct{} `type:"structure" nopayload:"true"`
   580  
   581  	// The name of the thing that is executing the job.
   582  	//
   583  	// ThingName is a required field
   584  	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
   585  }
   586  
   587  // String returns the string representation.
   588  //
   589  // API parameter values that are decorated as "sensitive" in the API will not
   590  // be included in the string output. The member name will be present, but the
   591  // value will be replaced with "sensitive".
   592  func (s GetPendingJobExecutionsInput) String() string {
   593  	return awsutil.Prettify(s)
   594  }
   595  
   596  // GoString returns the string representation.
   597  //
   598  // API parameter values that are decorated as "sensitive" in the API will not
   599  // be included in the string output. The member name will be present, but the
   600  // value will be replaced with "sensitive".
   601  func (s GetPendingJobExecutionsInput) GoString() string {
   602  	return s.String()
   603  }
   604  
   605  // Validate inspects the fields of the type to determine if they are valid.
   606  func (s *GetPendingJobExecutionsInput) Validate() error {
   607  	invalidParams := request.ErrInvalidParams{Context: "GetPendingJobExecutionsInput"}
   608  	if s.ThingName == nil {
   609  		invalidParams.Add(request.NewErrParamRequired("ThingName"))
   610  	}
   611  	if s.ThingName != nil && len(*s.ThingName) < 1 {
   612  		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
   613  	}
   614  
   615  	if invalidParams.Len() > 0 {
   616  		return invalidParams
   617  	}
   618  	return nil
   619  }
   620  
   621  // SetThingName sets the ThingName field's value.
   622  func (s *GetPendingJobExecutionsInput) SetThingName(v string) *GetPendingJobExecutionsInput {
   623  	s.ThingName = &v
   624  	return s
   625  }
   626  
   627  type GetPendingJobExecutionsOutput struct {
   628  	_ struct{} `type:"structure"`
   629  
   630  	// A list of JobExecutionSummary objects with status IN_PROGRESS.
   631  	InProgressJobs []*JobExecutionSummary `locationName:"inProgressJobs" type:"list"`
   632  
   633  	// A list of JobExecutionSummary objects with status QUEUED.
   634  	QueuedJobs []*JobExecutionSummary `locationName:"queuedJobs" type:"list"`
   635  }
   636  
   637  // String returns the string representation.
   638  //
   639  // API parameter values that are decorated as "sensitive" in the API will not
   640  // be included in the string output. The member name will be present, but the
   641  // value will be replaced with "sensitive".
   642  func (s GetPendingJobExecutionsOutput) String() string {
   643  	return awsutil.Prettify(s)
   644  }
   645  
   646  // GoString returns the string representation.
   647  //
   648  // API parameter values that are decorated as "sensitive" in the API will not
   649  // be included in the string output. The member name will be present, but the
   650  // value will be replaced with "sensitive".
   651  func (s GetPendingJobExecutionsOutput) GoString() string {
   652  	return s.String()
   653  }
   654  
   655  // SetInProgressJobs sets the InProgressJobs field's value.
   656  func (s *GetPendingJobExecutionsOutput) SetInProgressJobs(v []*JobExecutionSummary) *GetPendingJobExecutionsOutput {
   657  	s.InProgressJobs = v
   658  	return s
   659  }
   660  
   661  // SetQueuedJobs sets the QueuedJobs field's value.
   662  func (s *GetPendingJobExecutionsOutput) SetQueuedJobs(v []*JobExecutionSummary) *GetPendingJobExecutionsOutput {
   663  	s.QueuedJobs = v
   664  	return s
   665  }
   666  
   667  // The contents of the request were invalid. For example, this code is returned
   668  // when an UpdateJobExecution request contains invalid status details. The message
   669  // contains details about the error.
   670  type InvalidRequestException struct {
   671  	_            struct{}                  `type:"structure"`
   672  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   673  
   674  	// The message for the exception.
   675  	Message_ *string `locationName:"message" type:"string"`
   676  }
   677  
   678  // String returns the string representation.
   679  //
   680  // API parameter values that are decorated as "sensitive" in the API will not
   681  // be included in the string output. The member name will be present, but the
   682  // value will be replaced with "sensitive".
   683  func (s InvalidRequestException) String() string {
   684  	return awsutil.Prettify(s)
   685  }
   686  
   687  // GoString returns the string representation.
   688  //
   689  // API parameter values that are decorated as "sensitive" in the API will not
   690  // be included in the string output. The member name will be present, but the
   691  // value will be replaced with "sensitive".
   692  func (s InvalidRequestException) GoString() string {
   693  	return s.String()
   694  }
   695  
   696  func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
   697  	return &InvalidRequestException{
   698  		RespMetadata: v,
   699  	}
   700  }
   701  
   702  // Code returns the exception type name.
   703  func (s *InvalidRequestException) Code() string {
   704  	return "InvalidRequestException"
   705  }
   706  
   707  // Message returns the exception's message.
   708  func (s *InvalidRequestException) Message() string {
   709  	if s.Message_ != nil {
   710  		return *s.Message_
   711  	}
   712  	return ""
   713  }
   714  
   715  // OrigErr always returns nil, satisfies awserr.Error interface.
   716  func (s *InvalidRequestException) OrigErr() error {
   717  	return nil
   718  }
   719  
   720  func (s *InvalidRequestException) Error() string {
   721  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   722  }
   723  
   724  // Status code returns the HTTP status code for the request's response error.
   725  func (s *InvalidRequestException) StatusCode() int {
   726  	return s.RespMetadata.StatusCode
   727  }
   728  
   729  // RequestID returns the service's response RequestID for request.
   730  func (s *InvalidRequestException) RequestID() string {
   731  	return s.RespMetadata.RequestID
   732  }
   733  
   734  // An update attempted to change the job execution to a state that is invalid
   735  // because of the job execution's current state (for example, an attempt to
   736  // change a request in state SUCCESS to state IN_PROGRESS). In this case, the
   737  // body of the error message also contains the executionState field.
   738  type InvalidStateTransitionException struct {
   739  	_            struct{}                  `type:"structure"`
   740  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   741  
   742  	Message_ *string `locationName:"message" type:"string"`
   743  }
   744  
   745  // String returns the string representation.
   746  //
   747  // API parameter values that are decorated as "sensitive" in the API will not
   748  // be included in the string output. The member name will be present, but the
   749  // value will be replaced with "sensitive".
   750  func (s InvalidStateTransitionException) String() string {
   751  	return awsutil.Prettify(s)
   752  }
   753  
   754  // GoString returns the string representation.
   755  //
   756  // API parameter values that are decorated as "sensitive" in the API will not
   757  // be included in the string output. The member name will be present, but the
   758  // value will be replaced with "sensitive".
   759  func (s InvalidStateTransitionException) GoString() string {
   760  	return s.String()
   761  }
   762  
   763  func newErrorInvalidStateTransitionException(v protocol.ResponseMetadata) error {
   764  	return &InvalidStateTransitionException{
   765  		RespMetadata: v,
   766  	}
   767  }
   768  
   769  // Code returns the exception type name.
   770  func (s *InvalidStateTransitionException) Code() string {
   771  	return "InvalidStateTransitionException"
   772  }
   773  
   774  // Message returns the exception's message.
   775  func (s *InvalidStateTransitionException) Message() string {
   776  	if s.Message_ != nil {
   777  		return *s.Message_
   778  	}
   779  	return ""
   780  }
   781  
   782  // OrigErr always returns nil, satisfies awserr.Error interface.
   783  func (s *InvalidStateTransitionException) OrigErr() error {
   784  	return nil
   785  }
   786  
   787  func (s *InvalidStateTransitionException) Error() string {
   788  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   789  }
   790  
   791  // Status code returns the HTTP status code for the request's response error.
   792  func (s *InvalidStateTransitionException) StatusCode() int {
   793  	return s.RespMetadata.StatusCode
   794  }
   795  
   796  // RequestID returns the service's response RequestID for request.
   797  func (s *InvalidStateTransitionException) RequestID() string {
   798  	return s.RespMetadata.RequestID
   799  }
   800  
   801  // Contains data about a job execution.
   802  type JobExecution struct {
   803  	_ struct{} `type:"structure"`
   804  
   805  	// The estimated number of seconds that remain before the job execution status
   806  	// will be changed to TIMED_OUT.
   807  	ApproximateSecondsBeforeTimedOut *int64 `locationName:"approximateSecondsBeforeTimedOut" type:"long"`
   808  
   809  	// A number that identifies a particular job execution on a particular device.
   810  	// It can be used later in commands that return or update job execution information.
   811  	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
   812  
   813  	// The content of the job document.
   814  	JobDocument *string `locationName:"jobDocument" type:"string"`
   815  
   816  	// The unique identifier you assigned to this job when it was created.
   817  	JobId *string `locationName:"jobId" min:"1" type:"string"`
   818  
   819  	// The time, in milliseconds since the epoch, when the job execution was last
   820  	// updated.
   821  	LastUpdatedAt *int64 `locationName:"lastUpdatedAt" type:"long"`
   822  
   823  	// The time, in milliseconds since the epoch, when the job execution was enqueued.
   824  	QueuedAt *int64 `locationName:"queuedAt" type:"long"`
   825  
   826  	// The time, in milliseconds since the epoch, when the job execution was started.
   827  	StartedAt *int64 `locationName:"startedAt" type:"long"`
   828  
   829  	// The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS",
   830  	// "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
   831  	Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"`
   832  
   833  	// A collection of name/value pairs that describe the status of the job execution.
   834  	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
   835  
   836  	// The name of the thing that is executing the job.
   837  	ThingName *string `locationName:"thingName" min:"1" type:"string"`
   838  
   839  	// The version of the job execution. Job execution versions are incremented
   840  	// each time they are updated by a device.
   841  	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
   842  }
   843  
   844  // String returns the string representation.
   845  //
   846  // API parameter values that are decorated as "sensitive" in the API will not
   847  // be included in the string output. The member name will be present, but the
   848  // value will be replaced with "sensitive".
   849  func (s JobExecution) String() string {
   850  	return awsutil.Prettify(s)
   851  }
   852  
   853  // GoString returns the string representation.
   854  //
   855  // API parameter values that are decorated as "sensitive" in the API will not
   856  // be included in the string output. The member name will be present, but the
   857  // value will be replaced with "sensitive".
   858  func (s JobExecution) GoString() string {
   859  	return s.String()
   860  }
   861  
   862  // SetApproximateSecondsBeforeTimedOut sets the ApproximateSecondsBeforeTimedOut field's value.
   863  func (s *JobExecution) SetApproximateSecondsBeforeTimedOut(v int64) *JobExecution {
   864  	s.ApproximateSecondsBeforeTimedOut = &v
   865  	return s
   866  }
   867  
   868  // SetExecutionNumber sets the ExecutionNumber field's value.
   869  func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution {
   870  	s.ExecutionNumber = &v
   871  	return s
   872  }
   873  
   874  // SetJobDocument sets the JobDocument field's value.
   875  func (s *JobExecution) SetJobDocument(v string) *JobExecution {
   876  	s.JobDocument = &v
   877  	return s
   878  }
   879  
   880  // SetJobId sets the JobId field's value.
   881  func (s *JobExecution) SetJobId(v string) *JobExecution {
   882  	s.JobId = &v
   883  	return s
   884  }
   885  
   886  // SetLastUpdatedAt sets the LastUpdatedAt field's value.
   887  func (s *JobExecution) SetLastUpdatedAt(v int64) *JobExecution {
   888  	s.LastUpdatedAt = &v
   889  	return s
   890  }
   891  
   892  // SetQueuedAt sets the QueuedAt field's value.
   893  func (s *JobExecution) SetQueuedAt(v int64) *JobExecution {
   894  	s.QueuedAt = &v
   895  	return s
   896  }
   897  
   898  // SetStartedAt sets the StartedAt field's value.
   899  func (s *JobExecution) SetStartedAt(v int64) *JobExecution {
   900  	s.StartedAt = &v
   901  	return s
   902  }
   903  
   904  // SetStatus sets the Status field's value.
   905  func (s *JobExecution) SetStatus(v string) *JobExecution {
   906  	s.Status = &v
   907  	return s
   908  }
   909  
   910  // SetStatusDetails sets the StatusDetails field's value.
   911  func (s *JobExecution) SetStatusDetails(v map[string]*string) *JobExecution {
   912  	s.StatusDetails = v
   913  	return s
   914  }
   915  
   916  // SetThingName sets the ThingName field's value.
   917  func (s *JobExecution) SetThingName(v string) *JobExecution {
   918  	s.ThingName = &v
   919  	return s
   920  }
   921  
   922  // SetVersionNumber sets the VersionNumber field's value.
   923  func (s *JobExecution) SetVersionNumber(v int64) *JobExecution {
   924  	s.VersionNumber = &v
   925  	return s
   926  }
   927  
   928  // Contains data about the state of a job execution.
   929  type JobExecutionState struct {
   930  	_ struct{} `type:"structure"`
   931  
   932  	// The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS",
   933  	// "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".
   934  	Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"`
   935  
   936  	// A collection of name/value pairs that describe the status of the job execution.
   937  	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
   938  
   939  	// The version of the job execution. Job execution versions are incremented
   940  	// each time they are updated by a device.
   941  	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
   942  }
   943  
   944  // String returns the string representation.
   945  //
   946  // API parameter values that are decorated as "sensitive" in the API will not
   947  // be included in the string output. The member name will be present, but the
   948  // value will be replaced with "sensitive".
   949  func (s JobExecutionState) String() string {
   950  	return awsutil.Prettify(s)
   951  }
   952  
   953  // GoString returns the string representation.
   954  //
   955  // API parameter values that are decorated as "sensitive" in the API will not
   956  // be included in the string output. The member name will be present, but the
   957  // value will be replaced with "sensitive".
   958  func (s JobExecutionState) GoString() string {
   959  	return s.String()
   960  }
   961  
   962  // SetStatus sets the Status field's value.
   963  func (s *JobExecutionState) SetStatus(v string) *JobExecutionState {
   964  	s.Status = &v
   965  	return s
   966  }
   967  
   968  // SetStatusDetails sets the StatusDetails field's value.
   969  func (s *JobExecutionState) SetStatusDetails(v map[string]*string) *JobExecutionState {
   970  	s.StatusDetails = v
   971  	return s
   972  }
   973  
   974  // SetVersionNumber sets the VersionNumber field's value.
   975  func (s *JobExecutionState) SetVersionNumber(v int64) *JobExecutionState {
   976  	s.VersionNumber = &v
   977  	return s
   978  }
   979  
   980  // Contains a subset of information about a job execution.
   981  type JobExecutionSummary struct {
   982  	_ struct{} `type:"structure"`
   983  
   984  	// A number that identifies a particular job execution on a particular device.
   985  	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
   986  
   987  	// The unique identifier you assigned to this job when it was created.
   988  	JobId *string `locationName:"jobId" min:"1" type:"string"`
   989  
   990  	// The time, in milliseconds since the epoch, when the job execution was last
   991  	// updated.
   992  	LastUpdatedAt *int64 `locationName:"lastUpdatedAt" type:"long"`
   993  
   994  	// The time, in milliseconds since the epoch, when the job execution was enqueued.
   995  	QueuedAt *int64 `locationName:"queuedAt" type:"long"`
   996  
   997  	// The time, in milliseconds since the epoch, when the job execution started.
   998  	StartedAt *int64 `locationName:"startedAt" type:"long"`
   999  
  1000  	// The version of the job execution. Job execution versions are incremented
  1001  	// each time AWS IoT Jobs receives an update from a device.
  1002  	VersionNumber *int64 `locationName:"versionNumber" type:"long"`
  1003  }
  1004  
  1005  // String returns the string representation.
  1006  //
  1007  // API parameter values that are decorated as "sensitive" in the API will not
  1008  // be included in the string output. The member name will be present, but the
  1009  // value will be replaced with "sensitive".
  1010  func (s JobExecutionSummary) String() string {
  1011  	return awsutil.Prettify(s)
  1012  }
  1013  
  1014  // GoString returns the string representation.
  1015  //
  1016  // API parameter values that are decorated as "sensitive" in the API will not
  1017  // be included in the string output. The member name will be present, but the
  1018  // value will be replaced with "sensitive".
  1019  func (s JobExecutionSummary) GoString() string {
  1020  	return s.String()
  1021  }
  1022  
  1023  // SetExecutionNumber sets the ExecutionNumber field's value.
  1024  func (s *JobExecutionSummary) SetExecutionNumber(v int64) *JobExecutionSummary {
  1025  	s.ExecutionNumber = &v
  1026  	return s
  1027  }
  1028  
  1029  // SetJobId sets the JobId field's value.
  1030  func (s *JobExecutionSummary) SetJobId(v string) *JobExecutionSummary {
  1031  	s.JobId = &v
  1032  	return s
  1033  }
  1034  
  1035  // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  1036  func (s *JobExecutionSummary) SetLastUpdatedAt(v int64) *JobExecutionSummary {
  1037  	s.LastUpdatedAt = &v
  1038  	return s
  1039  }
  1040  
  1041  // SetQueuedAt sets the QueuedAt field's value.
  1042  func (s *JobExecutionSummary) SetQueuedAt(v int64) *JobExecutionSummary {
  1043  	s.QueuedAt = &v
  1044  	return s
  1045  }
  1046  
  1047  // SetStartedAt sets the StartedAt field's value.
  1048  func (s *JobExecutionSummary) SetStartedAt(v int64) *JobExecutionSummary {
  1049  	s.StartedAt = &v
  1050  	return s
  1051  }
  1052  
  1053  // SetVersionNumber sets the VersionNumber field's value.
  1054  func (s *JobExecutionSummary) SetVersionNumber(v int64) *JobExecutionSummary {
  1055  	s.VersionNumber = &v
  1056  	return s
  1057  }
  1058  
  1059  // The specified resource does not exist.
  1060  type ResourceNotFoundException struct {
  1061  	_            struct{}                  `type:"structure"`
  1062  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1063  
  1064  	// The message for the exception.
  1065  	Message_ *string `locationName:"message" type:"string"`
  1066  }
  1067  
  1068  // String returns the string representation.
  1069  //
  1070  // API parameter values that are decorated as "sensitive" in the API will not
  1071  // be included in the string output. The member name will be present, but the
  1072  // value will be replaced with "sensitive".
  1073  func (s ResourceNotFoundException) String() string {
  1074  	return awsutil.Prettify(s)
  1075  }
  1076  
  1077  // GoString returns the string representation.
  1078  //
  1079  // API parameter values that are decorated as "sensitive" in the API will not
  1080  // be included in the string output. The member name will be present, but the
  1081  // value will be replaced with "sensitive".
  1082  func (s ResourceNotFoundException) GoString() string {
  1083  	return s.String()
  1084  }
  1085  
  1086  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  1087  	return &ResourceNotFoundException{
  1088  		RespMetadata: v,
  1089  	}
  1090  }
  1091  
  1092  // Code returns the exception type name.
  1093  func (s *ResourceNotFoundException) Code() string {
  1094  	return "ResourceNotFoundException"
  1095  }
  1096  
  1097  // Message returns the exception's message.
  1098  func (s *ResourceNotFoundException) Message() string {
  1099  	if s.Message_ != nil {
  1100  		return *s.Message_
  1101  	}
  1102  	return ""
  1103  }
  1104  
  1105  // OrigErr always returns nil, satisfies awserr.Error interface.
  1106  func (s *ResourceNotFoundException) OrigErr() error {
  1107  	return nil
  1108  }
  1109  
  1110  func (s *ResourceNotFoundException) Error() string {
  1111  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1112  }
  1113  
  1114  // Status code returns the HTTP status code for the request's response error.
  1115  func (s *ResourceNotFoundException) StatusCode() int {
  1116  	return s.RespMetadata.StatusCode
  1117  }
  1118  
  1119  // RequestID returns the service's response RequestID for request.
  1120  func (s *ResourceNotFoundException) RequestID() string {
  1121  	return s.RespMetadata.RequestID
  1122  }
  1123  
  1124  // The service is temporarily unavailable.
  1125  type ServiceUnavailableException struct {
  1126  	_            struct{}                  `type:"structure"`
  1127  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1128  
  1129  	// The message for the exception.
  1130  	Message_ *string `locationName:"message" type:"string"`
  1131  }
  1132  
  1133  // String returns the string representation.
  1134  //
  1135  // API parameter values that are decorated as "sensitive" in the API will not
  1136  // be included in the string output. The member name will be present, but the
  1137  // value will be replaced with "sensitive".
  1138  func (s ServiceUnavailableException) String() string {
  1139  	return awsutil.Prettify(s)
  1140  }
  1141  
  1142  // GoString returns the string representation.
  1143  //
  1144  // API parameter values that are decorated as "sensitive" in the API will not
  1145  // be included in the string output. The member name will be present, but the
  1146  // value will be replaced with "sensitive".
  1147  func (s ServiceUnavailableException) GoString() string {
  1148  	return s.String()
  1149  }
  1150  
  1151  func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error {
  1152  	return &ServiceUnavailableException{
  1153  		RespMetadata: v,
  1154  	}
  1155  }
  1156  
  1157  // Code returns the exception type name.
  1158  func (s *ServiceUnavailableException) Code() string {
  1159  	return "ServiceUnavailableException"
  1160  }
  1161  
  1162  // Message returns the exception's message.
  1163  func (s *ServiceUnavailableException) Message() string {
  1164  	if s.Message_ != nil {
  1165  		return *s.Message_
  1166  	}
  1167  	return ""
  1168  }
  1169  
  1170  // OrigErr always returns nil, satisfies awserr.Error interface.
  1171  func (s *ServiceUnavailableException) OrigErr() error {
  1172  	return nil
  1173  }
  1174  
  1175  func (s *ServiceUnavailableException) Error() string {
  1176  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1177  }
  1178  
  1179  // Status code returns the HTTP status code for the request's response error.
  1180  func (s *ServiceUnavailableException) StatusCode() int {
  1181  	return s.RespMetadata.StatusCode
  1182  }
  1183  
  1184  // RequestID returns the service's response RequestID for request.
  1185  func (s *ServiceUnavailableException) RequestID() string {
  1186  	return s.RespMetadata.RequestID
  1187  }
  1188  
  1189  type StartNextPendingJobExecutionInput struct {
  1190  	_ struct{} `type:"structure"`
  1191  
  1192  	// A collection of name/value pairs that describe the status of the job execution.
  1193  	// If not specified, the statusDetails are unchanged.
  1194  	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
  1195  
  1196  	// Specifies the amount of time this device has to finish execution of this
  1197  	// job. If the job execution status is not set to a terminal state before this
  1198  	// timer expires, or before the timer is reset (by calling UpdateJobExecution,
  1199  	// setting the status to IN_PROGRESS and specifying a new timeout value in field
  1200  	// stepTimeoutInMinutes) the job execution status will be automatically set
  1201  	// to TIMED_OUT. Note that setting this timeout has no effect on that job execution
  1202  	// timeout which may have been specified when the job was created (CreateJob
  1203  	// using field timeoutConfig).
  1204  	StepTimeoutInMinutes *int64 `locationName:"stepTimeoutInMinutes" type:"long"`
  1205  
  1206  	// The name of the thing associated with the device.
  1207  	//
  1208  	// ThingName is a required field
  1209  	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
  1210  }
  1211  
  1212  // String returns the string representation.
  1213  //
  1214  // API parameter values that are decorated as "sensitive" in the API will not
  1215  // be included in the string output. The member name will be present, but the
  1216  // value will be replaced with "sensitive".
  1217  func (s StartNextPendingJobExecutionInput) String() string {
  1218  	return awsutil.Prettify(s)
  1219  }
  1220  
  1221  // GoString returns the string representation.
  1222  //
  1223  // API parameter values that are decorated as "sensitive" in the API will not
  1224  // be included in the string output. The member name will be present, but the
  1225  // value will be replaced with "sensitive".
  1226  func (s StartNextPendingJobExecutionInput) GoString() string {
  1227  	return s.String()
  1228  }
  1229  
  1230  // Validate inspects the fields of the type to determine if they are valid.
  1231  func (s *StartNextPendingJobExecutionInput) Validate() error {
  1232  	invalidParams := request.ErrInvalidParams{Context: "StartNextPendingJobExecutionInput"}
  1233  	if s.ThingName == nil {
  1234  		invalidParams.Add(request.NewErrParamRequired("ThingName"))
  1235  	}
  1236  	if s.ThingName != nil && len(*s.ThingName) < 1 {
  1237  		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
  1238  	}
  1239  
  1240  	if invalidParams.Len() > 0 {
  1241  		return invalidParams
  1242  	}
  1243  	return nil
  1244  }
  1245  
  1246  // SetStatusDetails sets the StatusDetails field's value.
  1247  func (s *StartNextPendingJobExecutionInput) SetStatusDetails(v map[string]*string) *StartNextPendingJobExecutionInput {
  1248  	s.StatusDetails = v
  1249  	return s
  1250  }
  1251  
  1252  // SetStepTimeoutInMinutes sets the StepTimeoutInMinutes field's value.
  1253  func (s *StartNextPendingJobExecutionInput) SetStepTimeoutInMinutes(v int64) *StartNextPendingJobExecutionInput {
  1254  	s.StepTimeoutInMinutes = &v
  1255  	return s
  1256  }
  1257  
  1258  // SetThingName sets the ThingName field's value.
  1259  func (s *StartNextPendingJobExecutionInput) SetThingName(v string) *StartNextPendingJobExecutionInput {
  1260  	s.ThingName = &v
  1261  	return s
  1262  }
  1263  
  1264  type StartNextPendingJobExecutionOutput struct {
  1265  	_ struct{} `type:"structure"`
  1266  
  1267  	// A JobExecution object.
  1268  	Execution *JobExecution `locationName:"execution" type:"structure"`
  1269  }
  1270  
  1271  // String returns the string representation.
  1272  //
  1273  // API parameter values that are decorated as "sensitive" in the API will not
  1274  // be included in the string output. The member name will be present, but the
  1275  // value will be replaced with "sensitive".
  1276  func (s StartNextPendingJobExecutionOutput) String() string {
  1277  	return awsutil.Prettify(s)
  1278  }
  1279  
  1280  // GoString returns the string representation.
  1281  //
  1282  // API parameter values that are decorated as "sensitive" in the API will not
  1283  // be included in the string output. The member name will be present, but the
  1284  // value will be replaced with "sensitive".
  1285  func (s StartNextPendingJobExecutionOutput) GoString() string {
  1286  	return s.String()
  1287  }
  1288  
  1289  // SetExecution sets the Execution field's value.
  1290  func (s *StartNextPendingJobExecutionOutput) SetExecution(v *JobExecution) *StartNextPendingJobExecutionOutput {
  1291  	s.Execution = v
  1292  	return s
  1293  }
  1294  
  1295  // The job is in a terminal state.
  1296  type TerminalStateException struct {
  1297  	_            struct{}                  `type:"structure"`
  1298  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1299  
  1300  	Message_ *string `locationName:"message" type:"string"`
  1301  }
  1302  
  1303  // String returns the string representation.
  1304  //
  1305  // API parameter values that are decorated as "sensitive" in the API will not
  1306  // be included in the string output. The member name will be present, but the
  1307  // value will be replaced with "sensitive".
  1308  func (s TerminalStateException) String() string {
  1309  	return awsutil.Prettify(s)
  1310  }
  1311  
  1312  // GoString returns the string representation.
  1313  //
  1314  // API parameter values that are decorated as "sensitive" in the API will not
  1315  // be included in the string output. The member name will be present, but the
  1316  // value will be replaced with "sensitive".
  1317  func (s TerminalStateException) GoString() string {
  1318  	return s.String()
  1319  }
  1320  
  1321  func newErrorTerminalStateException(v protocol.ResponseMetadata) error {
  1322  	return &TerminalStateException{
  1323  		RespMetadata: v,
  1324  	}
  1325  }
  1326  
  1327  // Code returns the exception type name.
  1328  func (s *TerminalStateException) Code() string {
  1329  	return "TerminalStateException"
  1330  }
  1331  
  1332  // Message returns the exception's message.
  1333  func (s *TerminalStateException) Message() string {
  1334  	if s.Message_ != nil {
  1335  		return *s.Message_
  1336  	}
  1337  	return ""
  1338  }
  1339  
  1340  // OrigErr always returns nil, satisfies awserr.Error interface.
  1341  func (s *TerminalStateException) OrigErr() error {
  1342  	return nil
  1343  }
  1344  
  1345  func (s *TerminalStateException) Error() string {
  1346  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1347  }
  1348  
  1349  // Status code returns the HTTP status code for the request's response error.
  1350  func (s *TerminalStateException) StatusCode() int {
  1351  	return s.RespMetadata.StatusCode
  1352  }
  1353  
  1354  // RequestID returns the service's response RequestID for request.
  1355  func (s *TerminalStateException) RequestID() string {
  1356  	return s.RespMetadata.RequestID
  1357  }
  1358  
  1359  // The rate exceeds the limit.
  1360  type ThrottlingException struct {
  1361  	_            struct{}                  `type:"structure"`
  1362  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1363  
  1364  	// The message associated with the exception.
  1365  	Message_ *string `locationName:"message" type:"string"`
  1366  
  1367  	// The payload associated with the exception.
  1368  	// Payload is automatically base64 encoded/decoded by the SDK.
  1369  	Payload []byte `locationName:"payload" type:"blob"`
  1370  }
  1371  
  1372  // String returns the string representation.
  1373  //
  1374  // API parameter values that are decorated as "sensitive" in the API will not
  1375  // be included in the string output. The member name will be present, but the
  1376  // value will be replaced with "sensitive".
  1377  func (s ThrottlingException) String() string {
  1378  	return awsutil.Prettify(s)
  1379  }
  1380  
  1381  // GoString returns the string representation.
  1382  //
  1383  // API parameter values that are decorated as "sensitive" in the API will not
  1384  // be included in the string output. The member name will be present, but the
  1385  // value will be replaced with "sensitive".
  1386  func (s ThrottlingException) GoString() string {
  1387  	return s.String()
  1388  }
  1389  
  1390  func newErrorThrottlingException(v protocol.ResponseMetadata) error {
  1391  	return &ThrottlingException{
  1392  		RespMetadata: v,
  1393  	}
  1394  }
  1395  
  1396  // Code returns the exception type name.
  1397  func (s *ThrottlingException) Code() string {
  1398  	return "ThrottlingException"
  1399  }
  1400  
  1401  // Message returns the exception's message.
  1402  func (s *ThrottlingException) Message() string {
  1403  	if s.Message_ != nil {
  1404  		return *s.Message_
  1405  	}
  1406  	return ""
  1407  }
  1408  
  1409  // OrigErr always returns nil, satisfies awserr.Error interface.
  1410  func (s *ThrottlingException) OrigErr() error {
  1411  	return nil
  1412  }
  1413  
  1414  func (s *ThrottlingException) Error() string {
  1415  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1416  }
  1417  
  1418  // Status code returns the HTTP status code for the request's response error.
  1419  func (s *ThrottlingException) StatusCode() int {
  1420  	return s.RespMetadata.StatusCode
  1421  }
  1422  
  1423  // RequestID returns the service's response RequestID for request.
  1424  func (s *ThrottlingException) RequestID() string {
  1425  	return s.RespMetadata.RequestID
  1426  }
  1427  
  1428  type UpdateJobExecutionInput struct {
  1429  	_ struct{} `type:"structure"`
  1430  
  1431  	// Optional. A number that identifies a particular job execution on a particular
  1432  	// device.
  1433  	ExecutionNumber *int64 `locationName:"executionNumber" type:"long"`
  1434  
  1435  	// Optional. The expected current version of the job execution. Each time you
  1436  	// update the job execution, its version is incremented. If the version of the
  1437  	// job execution stored in Jobs does not match, the update is rejected with
  1438  	// a VersionMismatch error, and an ErrorResponse that contains the current job
  1439  	// execution status data is returned. (This makes it unnecessary to perform
  1440  	// a separate DescribeJobExecution request in order to obtain the job execution
  1441  	// status data.)
  1442  	ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"`
  1443  
  1444  	// Optional. When set to true, the response contains the job document. The default
  1445  	// is false.
  1446  	IncludeJobDocument *bool `locationName:"includeJobDocument" type:"boolean"`
  1447  
  1448  	// Optional. When included and set to true, the response contains the JobExecutionState
  1449  	// data. The default is false.
  1450  	IncludeJobExecutionState *bool `locationName:"includeJobExecutionState" type:"boolean"`
  1451  
  1452  	// The unique identifier assigned to this job when it was created.
  1453  	//
  1454  	// JobId is a required field
  1455  	JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"`
  1456  
  1457  	// The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED).
  1458  	// This must be specified on every update.
  1459  	//
  1460  	// Status is a required field
  1461  	Status *string `locationName:"status" type:"string" required:"true" enum:"JobExecutionStatus"`
  1462  
  1463  	// Optional. A collection of name/value pairs that describe the status of the
  1464  	// job execution. If not specified, the statusDetails are unchanged.
  1465  	StatusDetails map[string]*string `locationName:"statusDetails" type:"map"`
  1466  
  1467  	// Specifies the amount of time this device has to finish execution of this
  1468  	// job. If the job execution status is not set to a terminal state before this
  1469  	// timer expires, or before the timer is reset (by again calling UpdateJobExecution,
  1470  	// setting the status to IN_PROGRESS and specifying a new timeout value in this
  1471  	// field) the job execution status will be automatically set to TIMED_OUT. Note
  1472  	// that setting or resetting this timeout has no effect on that job execution
  1473  	// timeout which may have been specified when the job was created (CreateJob
  1474  	// using field timeoutConfig).
  1475  	StepTimeoutInMinutes *int64 `locationName:"stepTimeoutInMinutes" type:"long"`
  1476  
  1477  	// The name of the thing associated with the device.
  1478  	//
  1479  	// ThingName is a required field
  1480  	ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"`
  1481  }
  1482  
  1483  // String returns the string representation.
  1484  //
  1485  // API parameter values that are decorated as "sensitive" in the API will not
  1486  // be included in the string output. The member name will be present, but the
  1487  // value will be replaced with "sensitive".
  1488  func (s UpdateJobExecutionInput) String() string {
  1489  	return awsutil.Prettify(s)
  1490  }
  1491  
  1492  // GoString returns the string representation.
  1493  //
  1494  // API parameter values that are decorated as "sensitive" in the API will not
  1495  // be included in the string output. The member name will be present, but the
  1496  // value will be replaced with "sensitive".
  1497  func (s UpdateJobExecutionInput) GoString() string {
  1498  	return s.String()
  1499  }
  1500  
  1501  // Validate inspects the fields of the type to determine if they are valid.
  1502  func (s *UpdateJobExecutionInput) Validate() error {
  1503  	invalidParams := request.ErrInvalidParams{Context: "UpdateJobExecutionInput"}
  1504  	if s.JobId == nil {
  1505  		invalidParams.Add(request.NewErrParamRequired("JobId"))
  1506  	}
  1507  	if s.JobId != nil && len(*s.JobId) < 1 {
  1508  		invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  1509  	}
  1510  	if s.Status == nil {
  1511  		invalidParams.Add(request.NewErrParamRequired("Status"))
  1512  	}
  1513  	if s.ThingName == nil {
  1514  		invalidParams.Add(request.NewErrParamRequired("ThingName"))
  1515  	}
  1516  	if s.ThingName != nil && len(*s.ThingName) < 1 {
  1517  		invalidParams.Add(request.NewErrParamMinLen("ThingName", 1))
  1518  	}
  1519  
  1520  	if invalidParams.Len() > 0 {
  1521  		return invalidParams
  1522  	}
  1523  	return nil
  1524  }
  1525  
  1526  // SetExecutionNumber sets the ExecutionNumber field's value.
  1527  func (s *UpdateJobExecutionInput) SetExecutionNumber(v int64) *UpdateJobExecutionInput {
  1528  	s.ExecutionNumber = &v
  1529  	return s
  1530  }
  1531  
  1532  // SetExpectedVersion sets the ExpectedVersion field's value.
  1533  func (s *UpdateJobExecutionInput) SetExpectedVersion(v int64) *UpdateJobExecutionInput {
  1534  	s.ExpectedVersion = &v
  1535  	return s
  1536  }
  1537  
  1538  // SetIncludeJobDocument sets the IncludeJobDocument field's value.
  1539  func (s *UpdateJobExecutionInput) SetIncludeJobDocument(v bool) *UpdateJobExecutionInput {
  1540  	s.IncludeJobDocument = &v
  1541  	return s
  1542  }
  1543  
  1544  // SetIncludeJobExecutionState sets the IncludeJobExecutionState field's value.
  1545  func (s *UpdateJobExecutionInput) SetIncludeJobExecutionState(v bool) *UpdateJobExecutionInput {
  1546  	s.IncludeJobExecutionState = &v
  1547  	return s
  1548  }
  1549  
  1550  // SetJobId sets the JobId field's value.
  1551  func (s *UpdateJobExecutionInput) SetJobId(v string) *UpdateJobExecutionInput {
  1552  	s.JobId = &v
  1553  	return s
  1554  }
  1555  
  1556  // SetStatus sets the Status field's value.
  1557  func (s *UpdateJobExecutionInput) SetStatus(v string) *UpdateJobExecutionInput {
  1558  	s.Status = &v
  1559  	return s
  1560  }
  1561  
  1562  // SetStatusDetails sets the StatusDetails field's value.
  1563  func (s *UpdateJobExecutionInput) SetStatusDetails(v map[string]*string) *UpdateJobExecutionInput {
  1564  	s.StatusDetails = v
  1565  	return s
  1566  }
  1567  
  1568  // SetStepTimeoutInMinutes sets the StepTimeoutInMinutes field's value.
  1569  func (s *UpdateJobExecutionInput) SetStepTimeoutInMinutes(v int64) *UpdateJobExecutionInput {
  1570  	s.StepTimeoutInMinutes = &v
  1571  	return s
  1572  }
  1573  
  1574  // SetThingName sets the ThingName field's value.
  1575  func (s *UpdateJobExecutionInput) SetThingName(v string) *UpdateJobExecutionInput {
  1576  	s.ThingName = &v
  1577  	return s
  1578  }
  1579  
  1580  type UpdateJobExecutionOutput struct {
  1581  	_ struct{} `type:"structure"`
  1582  
  1583  	// A JobExecutionState object.
  1584  	ExecutionState *JobExecutionState `locationName:"executionState" type:"structure"`
  1585  
  1586  	// The contents of the Job Documents.
  1587  	JobDocument *string `locationName:"jobDocument" type:"string"`
  1588  }
  1589  
  1590  // String returns the string representation.
  1591  //
  1592  // API parameter values that are decorated as "sensitive" in the API will not
  1593  // be included in the string output. The member name will be present, but the
  1594  // value will be replaced with "sensitive".
  1595  func (s UpdateJobExecutionOutput) String() string {
  1596  	return awsutil.Prettify(s)
  1597  }
  1598  
  1599  // GoString returns the string representation.
  1600  //
  1601  // API parameter values that are decorated as "sensitive" in the API will not
  1602  // be included in the string output. The member name will be present, but the
  1603  // value will be replaced with "sensitive".
  1604  func (s UpdateJobExecutionOutput) GoString() string {
  1605  	return s.String()
  1606  }
  1607  
  1608  // SetExecutionState sets the ExecutionState field's value.
  1609  func (s *UpdateJobExecutionOutput) SetExecutionState(v *JobExecutionState) *UpdateJobExecutionOutput {
  1610  	s.ExecutionState = v
  1611  	return s
  1612  }
  1613  
  1614  // SetJobDocument sets the JobDocument field's value.
  1615  func (s *UpdateJobExecutionOutput) SetJobDocument(v string) *UpdateJobExecutionOutput {
  1616  	s.JobDocument = &v
  1617  	return s
  1618  }
  1619  
  1620  const (
  1621  	// JobExecutionStatusQueued is a JobExecutionStatus enum value
  1622  	JobExecutionStatusQueued = "QUEUED"
  1623  
  1624  	// JobExecutionStatusInProgress is a JobExecutionStatus enum value
  1625  	JobExecutionStatusInProgress = "IN_PROGRESS"
  1626  
  1627  	// JobExecutionStatusSucceeded is a JobExecutionStatus enum value
  1628  	JobExecutionStatusSucceeded = "SUCCEEDED"
  1629  
  1630  	// JobExecutionStatusFailed is a JobExecutionStatus enum value
  1631  	JobExecutionStatusFailed = "FAILED"
  1632  
  1633  	// JobExecutionStatusTimedOut is a JobExecutionStatus enum value
  1634  	JobExecutionStatusTimedOut = "TIMED_OUT"
  1635  
  1636  	// JobExecutionStatusRejected is a JobExecutionStatus enum value
  1637  	JobExecutionStatusRejected = "REJECTED"
  1638  
  1639  	// JobExecutionStatusRemoved is a JobExecutionStatus enum value
  1640  	JobExecutionStatusRemoved = "REMOVED"
  1641  
  1642  	// JobExecutionStatusCanceled is a JobExecutionStatus enum value
  1643  	JobExecutionStatusCanceled = "CANCELED"
  1644  )
  1645  
  1646  // JobExecutionStatus_Values returns all elements of the JobExecutionStatus enum
  1647  func JobExecutionStatus_Values() []string {
  1648  	return []string{
  1649  		JobExecutionStatusQueued,
  1650  		JobExecutionStatusInProgress,
  1651  		JobExecutionStatusSucceeded,
  1652  		JobExecutionStatusFailed,
  1653  		JobExecutionStatusTimedOut,
  1654  		JobExecutionStatusRejected,
  1655  		JobExecutionStatusRemoved,
  1656  		JobExecutionStatusCanceled,
  1657  	}
  1658  }