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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package iot1clickdevicesservice
     4  
     5  import (
     6  	"fmt"
     7  	"time"
     8  
     9  	"github.com/aavshr/aws-sdk-go/aws"
    10  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    11  	"github.com/aavshr/aws-sdk-go/aws/request"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol"
    13  	"github.com/aavshr/aws-sdk-go/private/protocol/restjson"
    14  )
    15  
    16  const opClaimDevicesByClaimCode = "ClaimDevicesByClaimCode"
    17  
    18  // ClaimDevicesByClaimCodeRequest generates a "aws/request.Request" representing the
    19  // client's request for the ClaimDevicesByClaimCode operation. The "output" return
    20  // value will be populated with the request's response once the request completes
    21  // successfully.
    22  //
    23  // Use "Send" method on the returned Request to send the API call to the service.
    24  // the "output" return value is not valid until after Send returns without error.
    25  //
    26  // See ClaimDevicesByClaimCode for more information on using the ClaimDevicesByClaimCode
    27  // API call, and error handling.
    28  //
    29  // This method is useful when you want to inject custom logic or configuration
    30  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    31  //
    32  //
    33  //    // Example sending a request using the ClaimDevicesByClaimCodeRequest method.
    34  //    req, resp := client.ClaimDevicesByClaimCodeRequest(params)
    35  //
    36  //    err := req.Send()
    37  //    if err == nil { // resp is now filled
    38  //        fmt.Println(resp)
    39  //    }
    40  //
    41  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ClaimDevicesByClaimCode
    42  func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCodeRequest(input *ClaimDevicesByClaimCodeInput) (req *request.Request, output *ClaimDevicesByClaimCodeOutput) {
    43  	op := &request.Operation{
    44  		Name:       opClaimDevicesByClaimCode,
    45  		HTTPMethod: "PUT",
    46  		HTTPPath:   "/claims/{claimCode}",
    47  	}
    48  
    49  	if input == nil {
    50  		input = &ClaimDevicesByClaimCodeInput{}
    51  	}
    52  
    53  	output = &ClaimDevicesByClaimCodeOutput{}
    54  	req = c.newRequest(op, input, output)
    55  	return
    56  }
    57  
    58  // ClaimDevicesByClaimCode API operation for AWS IoT 1-Click Devices Service.
    59  //
    60  // Adds device(s) to your account (i.e., claim one or more devices) if and only
    61  // if you received a claim code with the device(s).
    62  //
    63  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    64  // with awserr.Error's Code and Message methods to get detailed information about
    65  // the error.
    66  //
    67  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
    68  // API operation ClaimDevicesByClaimCode for usage and error information.
    69  //
    70  // Returned Error Types:
    71  //   * InvalidRequestException
    72  //
    73  //   * InternalFailureException
    74  //
    75  //   * ForbiddenException
    76  //
    77  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ClaimDevicesByClaimCode
    78  func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCode(input *ClaimDevicesByClaimCodeInput) (*ClaimDevicesByClaimCodeOutput, error) {
    79  	req, out := c.ClaimDevicesByClaimCodeRequest(input)
    80  	return out, req.Send()
    81  }
    82  
    83  // ClaimDevicesByClaimCodeWithContext is the same as ClaimDevicesByClaimCode with the addition of
    84  // the ability to pass a context and additional request options.
    85  //
    86  // See ClaimDevicesByClaimCode for details on how to use this API operation.
    87  //
    88  // The context must be non-nil and will be used for request cancellation. If
    89  // the context is nil a panic will occur. In the future the SDK may create
    90  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
    91  // for more information on using Contexts.
    92  func (c *IoT1ClickDevicesService) ClaimDevicesByClaimCodeWithContext(ctx aws.Context, input *ClaimDevicesByClaimCodeInput, opts ...request.Option) (*ClaimDevicesByClaimCodeOutput, error) {
    93  	req, out := c.ClaimDevicesByClaimCodeRequest(input)
    94  	req.SetContext(ctx)
    95  	req.ApplyOptions(opts...)
    96  	return out, req.Send()
    97  }
    98  
    99  const opDescribeDevice = "DescribeDevice"
   100  
   101  // DescribeDeviceRequest generates a "aws/request.Request" representing the
   102  // client's request for the DescribeDevice operation. The "output" return
   103  // value will be populated with the request's response once the request completes
   104  // successfully.
   105  //
   106  // Use "Send" method on the returned Request to send the API call to the service.
   107  // the "output" return value is not valid until after Send returns without error.
   108  //
   109  // See DescribeDevice for more information on using the DescribeDevice
   110  // API call, and error handling.
   111  //
   112  // This method is useful when you want to inject custom logic or configuration
   113  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   114  //
   115  //
   116  //    // Example sending a request using the DescribeDeviceRequest method.
   117  //    req, resp := client.DescribeDeviceRequest(params)
   118  //
   119  //    err := req.Send()
   120  //    if err == nil { // resp is now filled
   121  //        fmt.Println(resp)
   122  //    }
   123  //
   124  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/DescribeDevice
   125  func (c *IoT1ClickDevicesService) DescribeDeviceRequest(input *DescribeDeviceInput) (req *request.Request, output *DescribeDeviceOutput) {
   126  	op := &request.Operation{
   127  		Name:       opDescribeDevice,
   128  		HTTPMethod: "GET",
   129  		HTTPPath:   "/devices/{deviceId}",
   130  	}
   131  
   132  	if input == nil {
   133  		input = &DescribeDeviceInput{}
   134  	}
   135  
   136  	output = &DescribeDeviceOutput{}
   137  	req = c.newRequest(op, input, output)
   138  	return
   139  }
   140  
   141  // DescribeDevice API operation for AWS IoT 1-Click Devices Service.
   142  //
   143  // Given a device ID, returns a DescribeDeviceResponse object describing the
   144  // details of the device.
   145  //
   146  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   147  // with awserr.Error's Code and Message methods to get detailed information about
   148  // the error.
   149  //
   150  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   151  // API operation DescribeDevice for usage and error information.
   152  //
   153  // Returned Error Types:
   154  //   * ResourceNotFoundException
   155  //
   156  //   * InvalidRequestException
   157  //
   158  //   * InternalFailureException
   159  //
   160  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/DescribeDevice
   161  func (c *IoT1ClickDevicesService) DescribeDevice(input *DescribeDeviceInput) (*DescribeDeviceOutput, error) {
   162  	req, out := c.DescribeDeviceRequest(input)
   163  	return out, req.Send()
   164  }
   165  
   166  // DescribeDeviceWithContext is the same as DescribeDevice with the addition of
   167  // the ability to pass a context and additional request options.
   168  //
   169  // See DescribeDevice for details on how to use this API operation.
   170  //
   171  // The context must be non-nil and will be used for request cancellation. If
   172  // the context is nil a panic will occur. In the future the SDK may create
   173  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   174  // for more information on using Contexts.
   175  func (c *IoT1ClickDevicesService) DescribeDeviceWithContext(ctx aws.Context, input *DescribeDeviceInput, opts ...request.Option) (*DescribeDeviceOutput, error) {
   176  	req, out := c.DescribeDeviceRequest(input)
   177  	req.SetContext(ctx)
   178  	req.ApplyOptions(opts...)
   179  	return out, req.Send()
   180  }
   181  
   182  const opFinalizeDeviceClaim = "FinalizeDeviceClaim"
   183  
   184  // FinalizeDeviceClaimRequest generates a "aws/request.Request" representing the
   185  // client's request for the FinalizeDeviceClaim operation. The "output" return
   186  // value will be populated with the request's response once the request completes
   187  // successfully.
   188  //
   189  // Use "Send" method on the returned Request to send the API call to the service.
   190  // the "output" return value is not valid until after Send returns without error.
   191  //
   192  // See FinalizeDeviceClaim for more information on using the FinalizeDeviceClaim
   193  // API call, and error handling.
   194  //
   195  // This method is useful when you want to inject custom logic or configuration
   196  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   197  //
   198  //
   199  //    // Example sending a request using the FinalizeDeviceClaimRequest method.
   200  //    req, resp := client.FinalizeDeviceClaimRequest(params)
   201  //
   202  //    err := req.Send()
   203  //    if err == nil { // resp is now filled
   204  //        fmt.Println(resp)
   205  //    }
   206  //
   207  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/FinalizeDeviceClaim
   208  func (c *IoT1ClickDevicesService) FinalizeDeviceClaimRequest(input *FinalizeDeviceClaimInput) (req *request.Request, output *FinalizeDeviceClaimOutput) {
   209  	op := &request.Operation{
   210  		Name:       opFinalizeDeviceClaim,
   211  		HTTPMethod: "PUT",
   212  		HTTPPath:   "/devices/{deviceId}/finalize-claim",
   213  	}
   214  
   215  	if input == nil {
   216  		input = &FinalizeDeviceClaimInput{}
   217  	}
   218  
   219  	output = &FinalizeDeviceClaimOutput{}
   220  	req = c.newRequest(op, input, output)
   221  	return
   222  }
   223  
   224  // FinalizeDeviceClaim API operation for AWS IoT 1-Click Devices Service.
   225  //
   226  // Given a device ID, finalizes the claim request for the associated device.
   227  //
   228  // Claiming a device consists of initiating a claim, then publishing a device
   229  // event, and finalizing the claim. For a device of type button, a device event
   230  // can be published by simply clicking the device.
   231  //
   232  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   233  // with awserr.Error's Code and Message methods to get detailed information about
   234  // the error.
   235  //
   236  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   237  // API operation FinalizeDeviceClaim for usage and error information.
   238  //
   239  // Returned Error Types:
   240  //   * ResourceNotFoundException
   241  //
   242  //   * InvalidRequestException
   243  //
   244  //   * InternalFailureException
   245  //
   246  //   * PreconditionFailedException
   247  //
   248  //   * ResourceConflictException
   249  //
   250  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/FinalizeDeviceClaim
   251  func (c *IoT1ClickDevicesService) FinalizeDeviceClaim(input *FinalizeDeviceClaimInput) (*FinalizeDeviceClaimOutput, error) {
   252  	req, out := c.FinalizeDeviceClaimRequest(input)
   253  	return out, req.Send()
   254  }
   255  
   256  // FinalizeDeviceClaimWithContext is the same as FinalizeDeviceClaim with the addition of
   257  // the ability to pass a context and additional request options.
   258  //
   259  // See FinalizeDeviceClaim for details on how to use this API operation.
   260  //
   261  // The context must be non-nil and will be used for request cancellation. If
   262  // the context is nil a panic will occur. In the future the SDK may create
   263  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   264  // for more information on using Contexts.
   265  func (c *IoT1ClickDevicesService) FinalizeDeviceClaimWithContext(ctx aws.Context, input *FinalizeDeviceClaimInput, opts ...request.Option) (*FinalizeDeviceClaimOutput, error) {
   266  	req, out := c.FinalizeDeviceClaimRequest(input)
   267  	req.SetContext(ctx)
   268  	req.ApplyOptions(opts...)
   269  	return out, req.Send()
   270  }
   271  
   272  const opGetDeviceMethods = "GetDeviceMethods"
   273  
   274  // GetDeviceMethodsRequest generates a "aws/request.Request" representing the
   275  // client's request for the GetDeviceMethods operation. The "output" return
   276  // value will be populated with the request's response once the request completes
   277  // successfully.
   278  //
   279  // Use "Send" method on the returned Request to send the API call to the service.
   280  // the "output" return value is not valid until after Send returns without error.
   281  //
   282  // See GetDeviceMethods for more information on using the GetDeviceMethods
   283  // API call, and error handling.
   284  //
   285  // This method is useful when you want to inject custom logic or configuration
   286  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   287  //
   288  //
   289  //    // Example sending a request using the GetDeviceMethodsRequest method.
   290  //    req, resp := client.GetDeviceMethodsRequest(params)
   291  //
   292  //    err := req.Send()
   293  //    if err == nil { // resp is now filled
   294  //        fmt.Println(resp)
   295  //    }
   296  //
   297  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/GetDeviceMethods
   298  func (c *IoT1ClickDevicesService) GetDeviceMethodsRequest(input *GetDeviceMethodsInput) (req *request.Request, output *GetDeviceMethodsOutput) {
   299  	op := &request.Operation{
   300  		Name:       opGetDeviceMethods,
   301  		HTTPMethod: "GET",
   302  		HTTPPath:   "/devices/{deviceId}/methods",
   303  	}
   304  
   305  	if input == nil {
   306  		input = &GetDeviceMethodsInput{}
   307  	}
   308  
   309  	output = &GetDeviceMethodsOutput{}
   310  	req = c.newRequest(op, input, output)
   311  	return
   312  }
   313  
   314  // GetDeviceMethods API operation for AWS IoT 1-Click Devices Service.
   315  //
   316  // Given a device ID, returns the invokable methods associated with the device.
   317  //
   318  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   319  // with awserr.Error's Code and Message methods to get detailed information about
   320  // the error.
   321  //
   322  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   323  // API operation GetDeviceMethods for usage and error information.
   324  //
   325  // Returned Error Types:
   326  //   * ResourceNotFoundException
   327  //
   328  //   * InvalidRequestException
   329  //
   330  //   * InternalFailureException
   331  //
   332  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/GetDeviceMethods
   333  func (c *IoT1ClickDevicesService) GetDeviceMethods(input *GetDeviceMethodsInput) (*GetDeviceMethodsOutput, error) {
   334  	req, out := c.GetDeviceMethodsRequest(input)
   335  	return out, req.Send()
   336  }
   337  
   338  // GetDeviceMethodsWithContext is the same as GetDeviceMethods with the addition of
   339  // the ability to pass a context and additional request options.
   340  //
   341  // See GetDeviceMethods for details on how to use this API operation.
   342  //
   343  // The context must be non-nil and will be used for request cancellation. If
   344  // the context is nil a panic will occur. In the future the SDK may create
   345  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   346  // for more information on using Contexts.
   347  func (c *IoT1ClickDevicesService) GetDeviceMethodsWithContext(ctx aws.Context, input *GetDeviceMethodsInput, opts ...request.Option) (*GetDeviceMethodsOutput, error) {
   348  	req, out := c.GetDeviceMethodsRequest(input)
   349  	req.SetContext(ctx)
   350  	req.ApplyOptions(opts...)
   351  	return out, req.Send()
   352  }
   353  
   354  const opInitiateDeviceClaim = "InitiateDeviceClaim"
   355  
   356  // InitiateDeviceClaimRequest generates a "aws/request.Request" representing the
   357  // client's request for the InitiateDeviceClaim operation. The "output" return
   358  // value will be populated with the request's response once the request completes
   359  // successfully.
   360  //
   361  // Use "Send" method on the returned Request to send the API call to the service.
   362  // the "output" return value is not valid until after Send returns without error.
   363  //
   364  // See InitiateDeviceClaim for more information on using the InitiateDeviceClaim
   365  // API call, and error handling.
   366  //
   367  // This method is useful when you want to inject custom logic or configuration
   368  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   369  //
   370  //
   371  //    // Example sending a request using the InitiateDeviceClaimRequest method.
   372  //    req, resp := client.InitiateDeviceClaimRequest(params)
   373  //
   374  //    err := req.Send()
   375  //    if err == nil { // resp is now filled
   376  //        fmt.Println(resp)
   377  //    }
   378  //
   379  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InitiateDeviceClaim
   380  func (c *IoT1ClickDevicesService) InitiateDeviceClaimRequest(input *InitiateDeviceClaimInput) (req *request.Request, output *InitiateDeviceClaimOutput) {
   381  	op := &request.Operation{
   382  		Name:       opInitiateDeviceClaim,
   383  		HTTPMethod: "PUT",
   384  		HTTPPath:   "/devices/{deviceId}/initiate-claim",
   385  	}
   386  
   387  	if input == nil {
   388  		input = &InitiateDeviceClaimInput{}
   389  	}
   390  
   391  	output = &InitiateDeviceClaimOutput{}
   392  	req = c.newRequest(op, input, output)
   393  	return
   394  }
   395  
   396  // InitiateDeviceClaim API operation for AWS IoT 1-Click Devices Service.
   397  //
   398  // Given a device ID, initiates a claim request for the associated device.
   399  //
   400  // Claiming a device consists of initiating a claim, then publishing a device
   401  // event, and finalizing the claim. For a device of type button, a device event
   402  // can be published by simply clicking the device.
   403  //
   404  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   405  // with awserr.Error's Code and Message methods to get detailed information about
   406  // the error.
   407  //
   408  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   409  // API operation InitiateDeviceClaim for usage and error information.
   410  //
   411  // Returned Error Types:
   412  //   * ResourceNotFoundException
   413  //
   414  //   * InvalidRequestException
   415  //
   416  //   * InternalFailureException
   417  //
   418  //   * ResourceConflictException
   419  //
   420  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InitiateDeviceClaim
   421  func (c *IoT1ClickDevicesService) InitiateDeviceClaim(input *InitiateDeviceClaimInput) (*InitiateDeviceClaimOutput, error) {
   422  	req, out := c.InitiateDeviceClaimRequest(input)
   423  	return out, req.Send()
   424  }
   425  
   426  // InitiateDeviceClaimWithContext is the same as InitiateDeviceClaim with the addition of
   427  // the ability to pass a context and additional request options.
   428  //
   429  // See InitiateDeviceClaim for details on how to use this API operation.
   430  //
   431  // The context must be non-nil and will be used for request cancellation. If
   432  // the context is nil a panic will occur. In the future the SDK may create
   433  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   434  // for more information on using Contexts.
   435  func (c *IoT1ClickDevicesService) InitiateDeviceClaimWithContext(ctx aws.Context, input *InitiateDeviceClaimInput, opts ...request.Option) (*InitiateDeviceClaimOutput, error) {
   436  	req, out := c.InitiateDeviceClaimRequest(input)
   437  	req.SetContext(ctx)
   438  	req.ApplyOptions(opts...)
   439  	return out, req.Send()
   440  }
   441  
   442  const opInvokeDeviceMethod = "InvokeDeviceMethod"
   443  
   444  // InvokeDeviceMethodRequest generates a "aws/request.Request" representing the
   445  // client's request for the InvokeDeviceMethod operation. The "output" return
   446  // value will be populated with the request's response once the request completes
   447  // successfully.
   448  //
   449  // Use "Send" method on the returned Request to send the API call to the service.
   450  // the "output" return value is not valid until after Send returns without error.
   451  //
   452  // See InvokeDeviceMethod for more information on using the InvokeDeviceMethod
   453  // API call, and error handling.
   454  //
   455  // This method is useful when you want to inject custom logic or configuration
   456  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   457  //
   458  //
   459  //    // Example sending a request using the InvokeDeviceMethodRequest method.
   460  //    req, resp := client.InvokeDeviceMethodRequest(params)
   461  //
   462  //    err := req.Send()
   463  //    if err == nil { // resp is now filled
   464  //        fmt.Println(resp)
   465  //    }
   466  //
   467  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InvokeDeviceMethod
   468  func (c *IoT1ClickDevicesService) InvokeDeviceMethodRequest(input *InvokeDeviceMethodInput) (req *request.Request, output *InvokeDeviceMethodOutput) {
   469  	op := &request.Operation{
   470  		Name:       opInvokeDeviceMethod,
   471  		HTTPMethod: "POST",
   472  		HTTPPath:   "/devices/{deviceId}/methods",
   473  	}
   474  
   475  	if input == nil {
   476  		input = &InvokeDeviceMethodInput{}
   477  	}
   478  
   479  	output = &InvokeDeviceMethodOutput{}
   480  	req = c.newRequest(op, input, output)
   481  	return
   482  }
   483  
   484  // InvokeDeviceMethod API operation for AWS IoT 1-Click Devices Service.
   485  //
   486  // Given a device ID, issues a request to invoke a named device method (with
   487  // possible parameters). See the "Example POST" code snippet below.
   488  //
   489  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   490  // with awserr.Error's Code and Message methods to get detailed information about
   491  // the error.
   492  //
   493  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   494  // API operation InvokeDeviceMethod for usage and error information.
   495  //
   496  // Returned Error Types:
   497  //   * InvalidRequestException
   498  //
   499  //   * PreconditionFailedException
   500  //
   501  //   * InternalFailureException
   502  //
   503  //   * ResourceNotFoundException
   504  //
   505  //   * RangeNotSatisfiableException
   506  //
   507  //   * ResourceConflictException
   508  //
   509  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/InvokeDeviceMethod
   510  func (c *IoT1ClickDevicesService) InvokeDeviceMethod(input *InvokeDeviceMethodInput) (*InvokeDeviceMethodOutput, error) {
   511  	req, out := c.InvokeDeviceMethodRequest(input)
   512  	return out, req.Send()
   513  }
   514  
   515  // InvokeDeviceMethodWithContext is the same as InvokeDeviceMethod with the addition of
   516  // the ability to pass a context and additional request options.
   517  //
   518  // See InvokeDeviceMethod for details on how to use this API operation.
   519  //
   520  // The context must be non-nil and will be used for request cancellation. If
   521  // the context is nil a panic will occur. In the future the SDK may create
   522  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   523  // for more information on using Contexts.
   524  func (c *IoT1ClickDevicesService) InvokeDeviceMethodWithContext(ctx aws.Context, input *InvokeDeviceMethodInput, opts ...request.Option) (*InvokeDeviceMethodOutput, error) {
   525  	req, out := c.InvokeDeviceMethodRequest(input)
   526  	req.SetContext(ctx)
   527  	req.ApplyOptions(opts...)
   528  	return out, req.Send()
   529  }
   530  
   531  const opListDeviceEvents = "ListDeviceEvents"
   532  
   533  // ListDeviceEventsRequest generates a "aws/request.Request" representing the
   534  // client's request for the ListDeviceEvents operation. The "output" return
   535  // value will be populated with the request's response once the request completes
   536  // successfully.
   537  //
   538  // Use "Send" method on the returned Request to send the API call to the service.
   539  // the "output" return value is not valid until after Send returns without error.
   540  //
   541  // See ListDeviceEvents for more information on using the ListDeviceEvents
   542  // API call, and error handling.
   543  //
   544  // This method is useful when you want to inject custom logic or configuration
   545  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   546  //
   547  //
   548  //    // Example sending a request using the ListDeviceEventsRequest method.
   549  //    req, resp := client.ListDeviceEventsRequest(params)
   550  //
   551  //    err := req.Send()
   552  //    if err == nil { // resp is now filled
   553  //        fmt.Println(resp)
   554  //    }
   555  //
   556  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDeviceEvents
   557  func (c *IoT1ClickDevicesService) ListDeviceEventsRequest(input *ListDeviceEventsInput) (req *request.Request, output *ListDeviceEventsOutput) {
   558  	op := &request.Operation{
   559  		Name:       opListDeviceEvents,
   560  		HTTPMethod: "GET",
   561  		HTTPPath:   "/devices/{deviceId}/events",
   562  	}
   563  
   564  	if input == nil {
   565  		input = &ListDeviceEventsInput{}
   566  	}
   567  
   568  	output = &ListDeviceEventsOutput{}
   569  	req = c.newRequest(op, input, output)
   570  	return
   571  }
   572  
   573  // ListDeviceEvents API operation for AWS IoT 1-Click Devices Service.
   574  //
   575  // Using a device ID, returns a DeviceEventsResponse object containing an array
   576  // of events for the device.
   577  //
   578  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   579  // with awserr.Error's Code and Message methods to get detailed information about
   580  // the error.
   581  //
   582  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   583  // API operation ListDeviceEvents for usage and error information.
   584  //
   585  // Returned Error Types:
   586  //   * ResourceNotFoundException
   587  //
   588  //   * RangeNotSatisfiableException
   589  //
   590  //   * InvalidRequestException
   591  //
   592  //   * InternalFailureException
   593  //
   594  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDeviceEvents
   595  func (c *IoT1ClickDevicesService) ListDeviceEvents(input *ListDeviceEventsInput) (*ListDeviceEventsOutput, error) {
   596  	req, out := c.ListDeviceEventsRequest(input)
   597  	return out, req.Send()
   598  }
   599  
   600  // ListDeviceEventsWithContext is the same as ListDeviceEvents with the addition of
   601  // the ability to pass a context and additional request options.
   602  //
   603  // See ListDeviceEvents for details on how to use this API operation.
   604  //
   605  // The context must be non-nil and will be used for request cancellation. If
   606  // the context is nil a panic will occur. In the future the SDK may create
   607  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   608  // for more information on using Contexts.
   609  func (c *IoT1ClickDevicesService) ListDeviceEventsWithContext(ctx aws.Context, input *ListDeviceEventsInput, opts ...request.Option) (*ListDeviceEventsOutput, error) {
   610  	req, out := c.ListDeviceEventsRequest(input)
   611  	req.SetContext(ctx)
   612  	req.ApplyOptions(opts...)
   613  	return out, req.Send()
   614  }
   615  
   616  const opListDevices = "ListDevices"
   617  
   618  // ListDevicesRequest generates a "aws/request.Request" representing the
   619  // client's request for the ListDevices operation. The "output" return
   620  // value will be populated with the request's response once the request completes
   621  // successfully.
   622  //
   623  // Use "Send" method on the returned Request to send the API call to the service.
   624  // the "output" return value is not valid until after Send returns without error.
   625  //
   626  // See ListDevices for more information on using the ListDevices
   627  // API call, and error handling.
   628  //
   629  // This method is useful when you want to inject custom logic or configuration
   630  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   631  //
   632  //
   633  //    // Example sending a request using the ListDevicesRequest method.
   634  //    req, resp := client.ListDevicesRequest(params)
   635  //
   636  //    err := req.Send()
   637  //    if err == nil { // resp is now filled
   638  //        fmt.Println(resp)
   639  //    }
   640  //
   641  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDevices
   642  func (c *IoT1ClickDevicesService) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) {
   643  	op := &request.Operation{
   644  		Name:       opListDevices,
   645  		HTTPMethod: "GET",
   646  		HTTPPath:   "/devices",
   647  	}
   648  
   649  	if input == nil {
   650  		input = &ListDevicesInput{}
   651  	}
   652  
   653  	output = &ListDevicesOutput{}
   654  	req = c.newRequest(op, input, output)
   655  	return
   656  }
   657  
   658  // ListDevices API operation for AWS IoT 1-Click Devices Service.
   659  //
   660  // Lists the 1-Click compatible devices associated with your AWS account.
   661  //
   662  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   663  // with awserr.Error's Code and Message methods to get detailed information about
   664  // the error.
   665  //
   666  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   667  // API operation ListDevices for usage and error information.
   668  //
   669  // Returned Error Types:
   670  //   * RangeNotSatisfiableException
   671  //
   672  //   * InvalidRequestException
   673  //
   674  //   * InternalFailureException
   675  //
   676  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListDevices
   677  func (c *IoT1ClickDevicesService) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) {
   678  	req, out := c.ListDevicesRequest(input)
   679  	return out, req.Send()
   680  }
   681  
   682  // ListDevicesWithContext is the same as ListDevices with the addition of
   683  // the ability to pass a context and additional request options.
   684  //
   685  // See ListDevices for details on how to use this API operation.
   686  //
   687  // The context must be non-nil and will be used for request cancellation. If
   688  // the context is nil a panic will occur. In the future the SDK may create
   689  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   690  // for more information on using Contexts.
   691  func (c *IoT1ClickDevicesService) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error) {
   692  	req, out := c.ListDevicesRequest(input)
   693  	req.SetContext(ctx)
   694  	req.ApplyOptions(opts...)
   695  	return out, req.Send()
   696  }
   697  
   698  const opListTagsForResource = "ListTagsForResource"
   699  
   700  // ListTagsForResourceRequest generates a "aws/request.Request" representing the
   701  // client's request for the ListTagsForResource operation. The "output" return
   702  // value will be populated with the request's response once the request completes
   703  // successfully.
   704  //
   705  // Use "Send" method on the returned Request to send the API call to the service.
   706  // the "output" return value is not valid until after Send returns without error.
   707  //
   708  // See ListTagsForResource for more information on using the ListTagsForResource
   709  // API call, and error handling.
   710  //
   711  // This method is useful when you want to inject custom logic or configuration
   712  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   713  //
   714  //
   715  //    // Example sending a request using the ListTagsForResourceRequest method.
   716  //    req, resp := client.ListTagsForResourceRequest(params)
   717  //
   718  //    err := req.Send()
   719  //    if err == nil { // resp is now filled
   720  //        fmt.Println(resp)
   721  //    }
   722  //
   723  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListTagsForResource
   724  func (c *IoT1ClickDevicesService) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
   725  	op := &request.Operation{
   726  		Name:       opListTagsForResource,
   727  		HTTPMethod: "GET",
   728  		HTTPPath:   "/tags/{resource-arn}",
   729  	}
   730  
   731  	if input == nil {
   732  		input = &ListTagsForResourceInput{}
   733  	}
   734  
   735  	output = &ListTagsForResourceOutput{}
   736  	req = c.newRequest(op, input, output)
   737  	return
   738  }
   739  
   740  // ListTagsForResource API operation for AWS IoT 1-Click Devices Service.
   741  //
   742  // Lists the tags associated with the specified resource ARN.
   743  //
   744  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   745  // with awserr.Error's Code and Message methods to get detailed information about
   746  // the error.
   747  //
   748  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   749  // API operation ListTagsForResource for usage and error information.
   750  //
   751  // Returned Error Types:
   752  //   * ResourceNotFoundException
   753  //
   754  //   * InternalFailureException
   755  //
   756  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/ListTagsForResource
   757  func (c *IoT1ClickDevicesService) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
   758  	req, out := c.ListTagsForResourceRequest(input)
   759  	return out, req.Send()
   760  }
   761  
   762  // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
   763  // the ability to pass a context and additional request options.
   764  //
   765  // See ListTagsForResource for details on how to use this API operation.
   766  //
   767  // The context must be non-nil and will be used for request cancellation. If
   768  // the context is nil a panic will occur. In the future the SDK may create
   769  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   770  // for more information on using Contexts.
   771  func (c *IoT1ClickDevicesService) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
   772  	req, out := c.ListTagsForResourceRequest(input)
   773  	req.SetContext(ctx)
   774  	req.ApplyOptions(opts...)
   775  	return out, req.Send()
   776  }
   777  
   778  const opTagResource = "TagResource"
   779  
   780  // TagResourceRequest generates a "aws/request.Request" representing the
   781  // client's request for the TagResource operation. The "output" return
   782  // value will be populated with the request's response once the request completes
   783  // successfully.
   784  //
   785  // Use "Send" method on the returned Request to send the API call to the service.
   786  // the "output" return value is not valid until after Send returns without error.
   787  //
   788  // See TagResource for more information on using the TagResource
   789  // API call, and error handling.
   790  //
   791  // This method is useful when you want to inject custom logic or configuration
   792  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   793  //
   794  //
   795  //    // Example sending a request using the TagResourceRequest method.
   796  //    req, resp := client.TagResourceRequest(params)
   797  //
   798  //    err := req.Send()
   799  //    if err == nil { // resp is now filled
   800  //        fmt.Println(resp)
   801  //    }
   802  //
   803  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/TagResource
   804  func (c *IoT1ClickDevicesService) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
   805  	op := &request.Operation{
   806  		Name:       opTagResource,
   807  		HTTPMethod: "POST",
   808  		HTTPPath:   "/tags/{resource-arn}",
   809  	}
   810  
   811  	if input == nil {
   812  		input = &TagResourceInput{}
   813  	}
   814  
   815  	output = &TagResourceOutput{}
   816  	req = c.newRequest(op, input, output)
   817  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   818  	return
   819  }
   820  
   821  // TagResource API operation for AWS IoT 1-Click Devices Service.
   822  //
   823  // Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click
   824  // Service Limits (https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits)
   825  // for the maximum number of tags allowed per resource.
   826  //
   827  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   828  // with awserr.Error's Code and Message methods to get detailed information about
   829  // the error.
   830  //
   831  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   832  // API operation TagResource for usage and error information.
   833  //
   834  // Returned Error Types:
   835  //   * ResourceNotFoundException
   836  //
   837  //   * InvalidRequestException
   838  //
   839  //   * InternalFailureException
   840  //
   841  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/TagResource
   842  func (c *IoT1ClickDevicesService) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
   843  	req, out := c.TagResourceRequest(input)
   844  	return out, req.Send()
   845  }
   846  
   847  // TagResourceWithContext is the same as TagResource with the addition of
   848  // the ability to pass a context and additional request options.
   849  //
   850  // See TagResource for details on how to use this API operation.
   851  //
   852  // The context must be non-nil and will be used for request cancellation. If
   853  // the context is nil a panic will occur. In the future the SDK may create
   854  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   855  // for more information on using Contexts.
   856  func (c *IoT1ClickDevicesService) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
   857  	req, out := c.TagResourceRequest(input)
   858  	req.SetContext(ctx)
   859  	req.ApplyOptions(opts...)
   860  	return out, req.Send()
   861  }
   862  
   863  const opUnclaimDevice = "UnclaimDevice"
   864  
   865  // UnclaimDeviceRequest generates a "aws/request.Request" representing the
   866  // client's request for the UnclaimDevice operation. The "output" return
   867  // value will be populated with the request's response once the request completes
   868  // successfully.
   869  //
   870  // Use "Send" method on the returned Request to send the API call to the service.
   871  // the "output" return value is not valid until after Send returns without error.
   872  //
   873  // See UnclaimDevice for more information on using the UnclaimDevice
   874  // API call, and error handling.
   875  //
   876  // This method is useful when you want to inject custom logic or configuration
   877  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   878  //
   879  //
   880  //    // Example sending a request using the UnclaimDeviceRequest method.
   881  //    req, resp := client.UnclaimDeviceRequest(params)
   882  //
   883  //    err := req.Send()
   884  //    if err == nil { // resp is now filled
   885  //        fmt.Println(resp)
   886  //    }
   887  //
   888  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UnclaimDevice
   889  func (c *IoT1ClickDevicesService) UnclaimDeviceRequest(input *UnclaimDeviceInput) (req *request.Request, output *UnclaimDeviceOutput) {
   890  	op := &request.Operation{
   891  		Name:       opUnclaimDevice,
   892  		HTTPMethod: "PUT",
   893  		HTTPPath:   "/devices/{deviceId}/unclaim",
   894  	}
   895  
   896  	if input == nil {
   897  		input = &UnclaimDeviceInput{}
   898  	}
   899  
   900  	output = &UnclaimDeviceOutput{}
   901  	req = c.newRequest(op, input, output)
   902  	return
   903  }
   904  
   905  // UnclaimDevice API operation for AWS IoT 1-Click Devices Service.
   906  //
   907  // Disassociates a device from your AWS account using its device ID.
   908  //
   909  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   910  // with awserr.Error's Code and Message methods to get detailed information about
   911  // the error.
   912  //
   913  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   914  // API operation UnclaimDevice for usage and error information.
   915  //
   916  // Returned Error Types:
   917  //   * ResourceNotFoundException
   918  //
   919  //   * InvalidRequestException
   920  //
   921  //   * InternalFailureException
   922  //
   923  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UnclaimDevice
   924  func (c *IoT1ClickDevicesService) UnclaimDevice(input *UnclaimDeviceInput) (*UnclaimDeviceOutput, error) {
   925  	req, out := c.UnclaimDeviceRequest(input)
   926  	return out, req.Send()
   927  }
   928  
   929  // UnclaimDeviceWithContext is the same as UnclaimDevice with the addition of
   930  // the ability to pass a context and additional request options.
   931  //
   932  // See UnclaimDevice for details on how to use this API operation.
   933  //
   934  // The context must be non-nil and will be used for request cancellation. If
   935  // the context is nil a panic will occur. In the future the SDK may create
   936  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   937  // for more information on using Contexts.
   938  func (c *IoT1ClickDevicesService) UnclaimDeviceWithContext(ctx aws.Context, input *UnclaimDeviceInput, opts ...request.Option) (*UnclaimDeviceOutput, error) {
   939  	req, out := c.UnclaimDeviceRequest(input)
   940  	req.SetContext(ctx)
   941  	req.ApplyOptions(opts...)
   942  	return out, req.Send()
   943  }
   944  
   945  const opUntagResource = "UntagResource"
   946  
   947  // UntagResourceRequest generates a "aws/request.Request" representing the
   948  // client's request for the UntagResource operation. The "output" return
   949  // value will be populated with the request's response once the request completes
   950  // successfully.
   951  //
   952  // Use "Send" method on the returned Request to send the API call to the service.
   953  // the "output" return value is not valid until after Send returns without error.
   954  //
   955  // See UntagResource for more information on using the UntagResource
   956  // API call, and error handling.
   957  //
   958  // This method is useful when you want to inject custom logic or configuration
   959  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   960  //
   961  //
   962  //    // Example sending a request using the UntagResourceRequest method.
   963  //    req, resp := client.UntagResourceRequest(params)
   964  //
   965  //    err := req.Send()
   966  //    if err == nil { // resp is now filled
   967  //        fmt.Println(resp)
   968  //    }
   969  //
   970  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UntagResource
   971  func (c *IoT1ClickDevicesService) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
   972  	op := &request.Operation{
   973  		Name:       opUntagResource,
   974  		HTTPMethod: "DELETE",
   975  		HTTPPath:   "/tags/{resource-arn}",
   976  	}
   977  
   978  	if input == nil {
   979  		input = &UntagResourceInput{}
   980  	}
   981  
   982  	output = &UntagResourceOutput{}
   983  	req = c.newRequest(op, input, output)
   984  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   985  	return
   986  }
   987  
   988  // UntagResource API operation for AWS IoT 1-Click Devices Service.
   989  //
   990  // Using tag keys, deletes the tags (key/value pairs) associated with the specified
   991  // resource ARN.
   992  //
   993  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   994  // with awserr.Error's Code and Message methods to get detailed information about
   995  // the error.
   996  //
   997  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
   998  // API operation UntagResource for usage and error information.
   999  //
  1000  // Returned Error Types:
  1001  //   * ResourceNotFoundException
  1002  //
  1003  //   * InvalidRequestException
  1004  //
  1005  //   * InternalFailureException
  1006  //
  1007  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UntagResource
  1008  func (c *IoT1ClickDevicesService) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  1009  	req, out := c.UntagResourceRequest(input)
  1010  	return out, req.Send()
  1011  }
  1012  
  1013  // UntagResourceWithContext is the same as UntagResource with the addition of
  1014  // the ability to pass a context and additional request options.
  1015  //
  1016  // See UntagResource for details on how to use this API operation.
  1017  //
  1018  // The context must be non-nil and will be used for request cancellation. If
  1019  // the context is nil a panic will occur. In the future the SDK may create
  1020  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1021  // for more information on using Contexts.
  1022  func (c *IoT1ClickDevicesService) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  1023  	req, out := c.UntagResourceRequest(input)
  1024  	req.SetContext(ctx)
  1025  	req.ApplyOptions(opts...)
  1026  	return out, req.Send()
  1027  }
  1028  
  1029  const opUpdateDeviceState = "UpdateDeviceState"
  1030  
  1031  // UpdateDeviceStateRequest generates a "aws/request.Request" representing the
  1032  // client's request for the UpdateDeviceState operation. The "output" return
  1033  // value will be populated with the request's response once the request completes
  1034  // successfully.
  1035  //
  1036  // Use "Send" method on the returned Request to send the API call to the service.
  1037  // the "output" return value is not valid until after Send returns without error.
  1038  //
  1039  // See UpdateDeviceState for more information on using the UpdateDeviceState
  1040  // API call, and error handling.
  1041  //
  1042  // This method is useful when you want to inject custom logic or configuration
  1043  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1044  //
  1045  //
  1046  //    // Example sending a request using the UpdateDeviceStateRequest method.
  1047  //    req, resp := client.UpdateDeviceStateRequest(params)
  1048  //
  1049  //    err := req.Send()
  1050  //    if err == nil { // resp is now filled
  1051  //        fmt.Println(resp)
  1052  //    }
  1053  //
  1054  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UpdateDeviceState
  1055  func (c *IoT1ClickDevicesService) UpdateDeviceStateRequest(input *UpdateDeviceStateInput) (req *request.Request, output *UpdateDeviceStateOutput) {
  1056  	op := &request.Operation{
  1057  		Name:       opUpdateDeviceState,
  1058  		HTTPMethod: "PUT",
  1059  		HTTPPath:   "/devices/{deviceId}/state",
  1060  	}
  1061  
  1062  	if input == nil {
  1063  		input = &UpdateDeviceStateInput{}
  1064  	}
  1065  
  1066  	output = &UpdateDeviceStateOutput{}
  1067  	req = c.newRequest(op, input, output)
  1068  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1069  	return
  1070  }
  1071  
  1072  // UpdateDeviceState API operation for AWS IoT 1-Click Devices Service.
  1073  //
  1074  // Using a Boolean value (true or false), this operation enables or disables
  1075  // the device given a device ID.
  1076  //
  1077  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1078  // with awserr.Error's Code and Message methods to get detailed information about
  1079  // the error.
  1080  //
  1081  // See the AWS API reference guide for AWS IoT 1-Click Devices Service's
  1082  // API operation UpdateDeviceState for usage and error information.
  1083  //
  1084  // Returned Error Types:
  1085  //   * ResourceNotFoundException
  1086  //
  1087  //   * InvalidRequestException
  1088  //
  1089  //   * InternalFailureException
  1090  //
  1091  // See also, https://docs.aws.amazon.com/goto/WebAPI/devices-2018-05-14/UpdateDeviceState
  1092  func (c *IoT1ClickDevicesService) UpdateDeviceState(input *UpdateDeviceStateInput) (*UpdateDeviceStateOutput, error) {
  1093  	req, out := c.UpdateDeviceStateRequest(input)
  1094  	return out, req.Send()
  1095  }
  1096  
  1097  // UpdateDeviceStateWithContext is the same as UpdateDeviceState with the addition of
  1098  // the ability to pass a context and additional request options.
  1099  //
  1100  // See UpdateDeviceState for details on how to use this API operation.
  1101  //
  1102  // The context must be non-nil and will be used for request cancellation. If
  1103  // the context is nil a panic will occur. In the future the SDK may create
  1104  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1105  // for more information on using Contexts.
  1106  func (c *IoT1ClickDevicesService) UpdateDeviceStateWithContext(ctx aws.Context, input *UpdateDeviceStateInput, opts ...request.Option) (*UpdateDeviceStateOutput, error) {
  1107  	req, out := c.UpdateDeviceStateRequest(input)
  1108  	req.SetContext(ctx)
  1109  	req.ApplyOptions(opts...)
  1110  	return out, req.Send()
  1111  }
  1112  
  1113  type Attributes struct {
  1114  	_ struct{} `type:"structure" nopayload:"true"`
  1115  }
  1116  
  1117  // String returns the string representation.
  1118  //
  1119  // API parameter values that are decorated as "sensitive" in the API will not
  1120  // be included in the string output. The member name will be present, but the
  1121  // value will be replaced with "sensitive".
  1122  func (s Attributes) String() string {
  1123  	return awsutil.Prettify(s)
  1124  }
  1125  
  1126  // GoString returns the string representation.
  1127  //
  1128  // API parameter values that are decorated as "sensitive" in the API will not
  1129  // be included in the string output. The member name will be present, but the
  1130  // value will be replaced with "sensitive".
  1131  func (s Attributes) GoString() string {
  1132  	return s.String()
  1133  }
  1134  
  1135  type ClaimDevicesByClaimCodeInput struct {
  1136  	_ struct{} `type:"structure" nopayload:"true"`
  1137  
  1138  	// ClaimCode is a required field
  1139  	ClaimCode *string `location:"uri" locationName:"claimCode" type:"string" required:"true"`
  1140  }
  1141  
  1142  // String 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 ClaimDevicesByClaimCodeInput) String() string {
  1148  	return awsutil.Prettify(s)
  1149  }
  1150  
  1151  // GoString returns the string representation.
  1152  //
  1153  // API parameter values that are decorated as "sensitive" in the API will not
  1154  // be included in the string output. The member name will be present, but the
  1155  // value will be replaced with "sensitive".
  1156  func (s ClaimDevicesByClaimCodeInput) GoString() string {
  1157  	return s.String()
  1158  }
  1159  
  1160  // Validate inspects the fields of the type to determine if they are valid.
  1161  func (s *ClaimDevicesByClaimCodeInput) Validate() error {
  1162  	invalidParams := request.ErrInvalidParams{Context: "ClaimDevicesByClaimCodeInput"}
  1163  	if s.ClaimCode == nil {
  1164  		invalidParams.Add(request.NewErrParamRequired("ClaimCode"))
  1165  	}
  1166  	if s.ClaimCode != nil && len(*s.ClaimCode) < 1 {
  1167  		invalidParams.Add(request.NewErrParamMinLen("ClaimCode", 1))
  1168  	}
  1169  
  1170  	if invalidParams.Len() > 0 {
  1171  		return invalidParams
  1172  	}
  1173  	return nil
  1174  }
  1175  
  1176  // SetClaimCode sets the ClaimCode field's value.
  1177  func (s *ClaimDevicesByClaimCodeInput) SetClaimCode(v string) *ClaimDevicesByClaimCodeInput {
  1178  	s.ClaimCode = &v
  1179  	return s
  1180  }
  1181  
  1182  type ClaimDevicesByClaimCodeOutput struct {
  1183  	_ struct{} `type:"structure"`
  1184  
  1185  	// The claim code provided by the device manufacturer.
  1186  	ClaimCode *string `locationName:"claimCode" min:"12" type:"string"`
  1187  
  1188  	// The total number of devices associated with the claim code that has been
  1189  	// processed in the claim request.
  1190  	Total *int64 `locationName:"total" type:"integer"`
  1191  }
  1192  
  1193  // String returns the string representation.
  1194  //
  1195  // API parameter values that are decorated as "sensitive" in the API will not
  1196  // be included in the string output. The member name will be present, but the
  1197  // value will be replaced with "sensitive".
  1198  func (s ClaimDevicesByClaimCodeOutput) String() string {
  1199  	return awsutil.Prettify(s)
  1200  }
  1201  
  1202  // GoString returns the string representation.
  1203  //
  1204  // API parameter values that are decorated as "sensitive" in the API will not
  1205  // be included in the string output. The member name will be present, but the
  1206  // value will be replaced with "sensitive".
  1207  func (s ClaimDevicesByClaimCodeOutput) GoString() string {
  1208  	return s.String()
  1209  }
  1210  
  1211  // SetClaimCode sets the ClaimCode field's value.
  1212  func (s *ClaimDevicesByClaimCodeOutput) SetClaimCode(v string) *ClaimDevicesByClaimCodeOutput {
  1213  	s.ClaimCode = &v
  1214  	return s
  1215  }
  1216  
  1217  // SetTotal sets the Total field's value.
  1218  func (s *ClaimDevicesByClaimCodeOutput) SetTotal(v int64) *ClaimDevicesByClaimCodeOutput {
  1219  	s.Total = &v
  1220  	return s
  1221  }
  1222  
  1223  type DescribeDeviceInput struct {
  1224  	_ struct{} `type:"structure" nopayload:"true"`
  1225  
  1226  	// DeviceId is a required field
  1227  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  1228  }
  1229  
  1230  // String returns the string representation.
  1231  //
  1232  // API parameter values that are decorated as "sensitive" in the API will not
  1233  // be included in the string output. The member name will be present, but the
  1234  // value will be replaced with "sensitive".
  1235  func (s DescribeDeviceInput) String() string {
  1236  	return awsutil.Prettify(s)
  1237  }
  1238  
  1239  // GoString returns the string representation.
  1240  //
  1241  // API parameter values that are decorated as "sensitive" in the API will not
  1242  // be included in the string output. The member name will be present, but the
  1243  // value will be replaced with "sensitive".
  1244  func (s DescribeDeviceInput) GoString() string {
  1245  	return s.String()
  1246  }
  1247  
  1248  // Validate inspects the fields of the type to determine if they are valid.
  1249  func (s *DescribeDeviceInput) Validate() error {
  1250  	invalidParams := request.ErrInvalidParams{Context: "DescribeDeviceInput"}
  1251  	if s.DeviceId == nil {
  1252  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1253  	}
  1254  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1255  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1256  	}
  1257  
  1258  	if invalidParams.Len() > 0 {
  1259  		return invalidParams
  1260  	}
  1261  	return nil
  1262  }
  1263  
  1264  // SetDeviceId sets the DeviceId field's value.
  1265  func (s *DescribeDeviceInput) SetDeviceId(v string) *DescribeDeviceInput {
  1266  	s.DeviceId = &v
  1267  	return s
  1268  }
  1269  
  1270  type DescribeDeviceOutput struct {
  1271  	_ struct{} `type:"structure"`
  1272  
  1273  	// Device details.
  1274  	DeviceDescription *DeviceDescription `locationName:"deviceDescription" type:"structure"`
  1275  }
  1276  
  1277  // String returns the string representation.
  1278  //
  1279  // API parameter values that are decorated as "sensitive" in the API will not
  1280  // be included in the string output. The member name will be present, but the
  1281  // value will be replaced with "sensitive".
  1282  func (s DescribeDeviceOutput) String() string {
  1283  	return awsutil.Prettify(s)
  1284  }
  1285  
  1286  // GoString returns the string representation.
  1287  //
  1288  // API parameter values that are decorated as "sensitive" in the API will not
  1289  // be included in the string output. The member name will be present, but the
  1290  // value will be replaced with "sensitive".
  1291  func (s DescribeDeviceOutput) GoString() string {
  1292  	return s.String()
  1293  }
  1294  
  1295  // SetDeviceDescription sets the DeviceDescription field's value.
  1296  func (s *DescribeDeviceOutput) SetDeviceDescription(v *DeviceDescription) *DescribeDeviceOutput {
  1297  	s.DeviceDescription = v
  1298  	return s
  1299  }
  1300  
  1301  type Device struct {
  1302  	_ struct{} `type:"structure"`
  1303  
  1304  	// The user specified attributes associated with the device for an event.
  1305  	Attributes *Attributes `locationName:"attributes" type:"structure"`
  1306  
  1307  	// The unique identifier of the device.
  1308  	DeviceId *string `locationName:"deviceId" type:"string"`
  1309  
  1310  	// The device type, such as "button".
  1311  	Type *string `locationName:"type" type:"string"`
  1312  }
  1313  
  1314  // String returns the string representation.
  1315  //
  1316  // API parameter values that are decorated as "sensitive" in the API will not
  1317  // be included in the string output. The member name will be present, but the
  1318  // value will be replaced with "sensitive".
  1319  func (s Device) String() string {
  1320  	return awsutil.Prettify(s)
  1321  }
  1322  
  1323  // GoString returns the string representation.
  1324  //
  1325  // API parameter values that are decorated as "sensitive" in the API will not
  1326  // be included in the string output. The member name will be present, but the
  1327  // value will be replaced with "sensitive".
  1328  func (s Device) GoString() string {
  1329  	return s.String()
  1330  }
  1331  
  1332  // SetAttributes sets the Attributes field's value.
  1333  func (s *Device) SetAttributes(v *Attributes) *Device {
  1334  	s.Attributes = v
  1335  	return s
  1336  }
  1337  
  1338  // SetDeviceId sets the DeviceId field's value.
  1339  func (s *Device) SetDeviceId(v string) *Device {
  1340  	s.DeviceId = &v
  1341  	return s
  1342  }
  1343  
  1344  // SetType sets the Type field's value.
  1345  func (s *Device) SetType(v string) *Device {
  1346  	s.Type = &v
  1347  	return s
  1348  }
  1349  
  1350  type DeviceDescription struct {
  1351  	_ struct{} `type:"structure"`
  1352  
  1353  	// The ARN of the device.
  1354  	Arn *string `locationName:"arn" type:"string"`
  1355  
  1356  	// An array of zero or more elements of DeviceAttribute objects providing user
  1357  	// specified device attributes.
  1358  	Attributes map[string]*string `locationName:"attributes" type:"map"`
  1359  
  1360  	// The unique identifier of the device.
  1361  	DeviceId *string `locationName:"deviceId" type:"string"`
  1362  
  1363  	// A Boolean value indicating whether or not the device is enabled.
  1364  	Enabled *bool `locationName:"enabled" type:"boolean"`
  1365  
  1366  	// A value between 0 and 1 inclusive, representing the fraction of life remaining
  1367  	// for the device.
  1368  	RemainingLife *float64 `locationName:"remainingLife" type:"double"`
  1369  
  1370  	Tags map[string]*string `locationName:"tags" type:"map"`
  1371  
  1372  	// The type of the device, such as "button".
  1373  	Type *string `locationName:"type" type:"string"`
  1374  }
  1375  
  1376  // String returns the string representation.
  1377  //
  1378  // API parameter values that are decorated as "sensitive" in the API will not
  1379  // be included in the string output. The member name will be present, but the
  1380  // value will be replaced with "sensitive".
  1381  func (s DeviceDescription) String() string {
  1382  	return awsutil.Prettify(s)
  1383  }
  1384  
  1385  // GoString returns the string representation.
  1386  //
  1387  // API parameter values that are decorated as "sensitive" in the API will not
  1388  // be included in the string output. The member name will be present, but the
  1389  // value will be replaced with "sensitive".
  1390  func (s DeviceDescription) GoString() string {
  1391  	return s.String()
  1392  }
  1393  
  1394  // SetArn sets the Arn field's value.
  1395  func (s *DeviceDescription) SetArn(v string) *DeviceDescription {
  1396  	s.Arn = &v
  1397  	return s
  1398  }
  1399  
  1400  // SetAttributes sets the Attributes field's value.
  1401  func (s *DeviceDescription) SetAttributes(v map[string]*string) *DeviceDescription {
  1402  	s.Attributes = v
  1403  	return s
  1404  }
  1405  
  1406  // SetDeviceId sets the DeviceId field's value.
  1407  func (s *DeviceDescription) SetDeviceId(v string) *DeviceDescription {
  1408  	s.DeviceId = &v
  1409  	return s
  1410  }
  1411  
  1412  // SetEnabled sets the Enabled field's value.
  1413  func (s *DeviceDescription) SetEnabled(v bool) *DeviceDescription {
  1414  	s.Enabled = &v
  1415  	return s
  1416  }
  1417  
  1418  // SetRemainingLife sets the RemainingLife field's value.
  1419  func (s *DeviceDescription) SetRemainingLife(v float64) *DeviceDescription {
  1420  	s.RemainingLife = &v
  1421  	return s
  1422  }
  1423  
  1424  // SetTags sets the Tags field's value.
  1425  func (s *DeviceDescription) SetTags(v map[string]*string) *DeviceDescription {
  1426  	s.Tags = v
  1427  	return s
  1428  }
  1429  
  1430  // SetType sets the Type field's value.
  1431  func (s *DeviceDescription) SetType(v string) *DeviceDescription {
  1432  	s.Type = &v
  1433  	return s
  1434  }
  1435  
  1436  type DeviceEvent struct {
  1437  	_ struct{} `type:"structure"`
  1438  
  1439  	// An object representing the device associated with the event.
  1440  	Device *Device `locationName:"device" type:"structure"`
  1441  
  1442  	// A serialized JSON object representing the device-type specific event.
  1443  	StdEvent *string `locationName:"stdEvent" type:"string"`
  1444  }
  1445  
  1446  // String returns the string representation.
  1447  //
  1448  // API parameter values that are decorated as "sensitive" in the API will not
  1449  // be included in the string output. The member name will be present, but the
  1450  // value will be replaced with "sensitive".
  1451  func (s DeviceEvent) String() string {
  1452  	return awsutil.Prettify(s)
  1453  }
  1454  
  1455  // GoString returns the string representation.
  1456  //
  1457  // API parameter values that are decorated as "sensitive" in the API will not
  1458  // be included in the string output. The member name will be present, but the
  1459  // value will be replaced with "sensitive".
  1460  func (s DeviceEvent) GoString() string {
  1461  	return s.String()
  1462  }
  1463  
  1464  // SetDevice sets the Device field's value.
  1465  func (s *DeviceEvent) SetDevice(v *Device) *DeviceEvent {
  1466  	s.Device = v
  1467  	return s
  1468  }
  1469  
  1470  // SetStdEvent sets the StdEvent field's value.
  1471  func (s *DeviceEvent) SetStdEvent(v string) *DeviceEvent {
  1472  	s.StdEvent = &v
  1473  	return s
  1474  }
  1475  
  1476  type DeviceMethod struct {
  1477  	_ struct{} `type:"structure"`
  1478  
  1479  	// The type of the device, such as "button".
  1480  	DeviceType *string `locationName:"deviceType" type:"string"`
  1481  
  1482  	// The name of the method applicable to the deviceType.
  1483  	MethodName *string `locationName:"methodName" type:"string"`
  1484  }
  1485  
  1486  // String returns the string representation.
  1487  //
  1488  // API parameter values that are decorated as "sensitive" in the API will not
  1489  // be included in the string output. The member name will be present, but the
  1490  // value will be replaced with "sensitive".
  1491  func (s DeviceMethod) String() string {
  1492  	return awsutil.Prettify(s)
  1493  }
  1494  
  1495  // GoString returns the string representation.
  1496  //
  1497  // API parameter values that are decorated as "sensitive" in the API will not
  1498  // be included in the string output. The member name will be present, but the
  1499  // value will be replaced with "sensitive".
  1500  func (s DeviceMethod) GoString() string {
  1501  	return s.String()
  1502  }
  1503  
  1504  // SetDeviceType sets the DeviceType field's value.
  1505  func (s *DeviceMethod) SetDeviceType(v string) *DeviceMethod {
  1506  	s.DeviceType = &v
  1507  	return s
  1508  }
  1509  
  1510  // SetMethodName sets the MethodName field's value.
  1511  func (s *DeviceMethod) SetMethodName(v string) *DeviceMethod {
  1512  	s.MethodName = &v
  1513  	return s
  1514  }
  1515  
  1516  type FinalizeDeviceClaimInput struct {
  1517  	_ struct{} `type:"structure"`
  1518  
  1519  	// DeviceId is a required field
  1520  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  1521  
  1522  	Tags map[string]*string `locationName:"tags" type:"map"`
  1523  }
  1524  
  1525  // String returns the string representation.
  1526  //
  1527  // API parameter values that are decorated as "sensitive" in the API will not
  1528  // be included in the string output. The member name will be present, but the
  1529  // value will be replaced with "sensitive".
  1530  func (s FinalizeDeviceClaimInput) String() string {
  1531  	return awsutil.Prettify(s)
  1532  }
  1533  
  1534  // GoString returns the string representation.
  1535  //
  1536  // API parameter values that are decorated as "sensitive" in the API will not
  1537  // be included in the string output. The member name will be present, but the
  1538  // value will be replaced with "sensitive".
  1539  func (s FinalizeDeviceClaimInput) GoString() string {
  1540  	return s.String()
  1541  }
  1542  
  1543  // Validate inspects the fields of the type to determine if they are valid.
  1544  func (s *FinalizeDeviceClaimInput) Validate() error {
  1545  	invalidParams := request.ErrInvalidParams{Context: "FinalizeDeviceClaimInput"}
  1546  	if s.DeviceId == nil {
  1547  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1548  	}
  1549  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1550  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1551  	}
  1552  
  1553  	if invalidParams.Len() > 0 {
  1554  		return invalidParams
  1555  	}
  1556  	return nil
  1557  }
  1558  
  1559  // SetDeviceId sets the DeviceId field's value.
  1560  func (s *FinalizeDeviceClaimInput) SetDeviceId(v string) *FinalizeDeviceClaimInput {
  1561  	s.DeviceId = &v
  1562  	return s
  1563  }
  1564  
  1565  // SetTags sets the Tags field's value.
  1566  func (s *FinalizeDeviceClaimInput) SetTags(v map[string]*string) *FinalizeDeviceClaimInput {
  1567  	s.Tags = v
  1568  	return s
  1569  }
  1570  
  1571  type FinalizeDeviceClaimOutput struct {
  1572  	_ struct{} `type:"structure"`
  1573  
  1574  	State *string `locationName:"state" type:"string"`
  1575  }
  1576  
  1577  // String returns the string representation.
  1578  //
  1579  // API parameter values that are decorated as "sensitive" in the API will not
  1580  // be included in the string output. The member name will be present, but the
  1581  // value will be replaced with "sensitive".
  1582  func (s FinalizeDeviceClaimOutput) String() string {
  1583  	return awsutil.Prettify(s)
  1584  }
  1585  
  1586  // GoString returns the string representation.
  1587  //
  1588  // API parameter values that are decorated as "sensitive" in the API will not
  1589  // be included in the string output. The member name will be present, but the
  1590  // value will be replaced with "sensitive".
  1591  func (s FinalizeDeviceClaimOutput) GoString() string {
  1592  	return s.String()
  1593  }
  1594  
  1595  // SetState sets the State field's value.
  1596  func (s *FinalizeDeviceClaimOutput) SetState(v string) *FinalizeDeviceClaimOutput {
  1597  	s.State = &v
  1598  	return s
  1599  }
  1600  
  1601  type ForbiddenException struct {
  1602  	_            struct{}                  `type:"structure"`
  1603  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1604  
  1605  	// 403
  1606  	Code_ *string `locationName:"code" type:"string"`
  1607  
  1608  	// The 403 error message returned by the web server.
  1609  	Message_ *string `locationName:"message" type:"string"`
  1610  }
  1611  
  1612  // String returns the string representation.
  1613  //
  1614  // API parameter values that are decorated as "sensitive" in the API will not
  1615  // be included in the string output. The member name will be present, but the
  1616  // value will be replaced with "sensitive".
  1617  func (s ForbiddenException) String() string {
  1618  	return awsutil.Prettify(s)
  1619  }
  1620  
  1621  // GoString returns the string representation.
  1622  //
  1623  // API parameter values that are decorated as "sensitive" in the API will not
  1624  // be included in the string output. The member name will be present, but the
  1625  // value will be replaced with "sensitive".
  1626  func (s ForbiddenException) GoString() string {
  1627  	return s.String()
  1628  }
  1629  
  1630  func newErrorForbiddenException(v protocol.ResponseMetadata) error {
  1631  	return &ForbiddenException{
  1632  		RespMetadata: v,
  1633  	}
  1634  }
  1635  
  1636  // Code returns the exception type name.
  1637  func (s *ForbiddenException) Code() string {
  1638  	return "ForbiddenException"
  1639  }
  1640  
  1641  // Message returns the exception's message.
  1642  func (s *ForbiddenException) Message() string {
  1643  	if s.Message_ != nil {
  1644  		return *s.Message_
  1645  	}
  1646  	return ""
  1647  }
  1648  
  1649  // OrigErr always returns nil, satisfies awserr.Error interface.
  1650  func (s *ForbiddenException) OrigErr() error {
  1651  	return nil
  1652  }
  1653  
  1654  func (s *ForbiddenException) Error() string {
  1655  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1656  }
  1657  
  1658  // Status code returns the HTTP status code for the request's response error.
  1659  func (s *ForbiddenException) StatusCode() int {
  1660  	return s.RespMetadata.StatusCode
  1661  }
  1662  
  1663  // RequestID returns the service's response RequestID for request.
  1664  func (s *ForbiddenException) RequestID() string {
  1665  	return s.RespMetadata.RequestID
  1666  }
  1667  
  1668  type GetDeviceMethodsInput struct {
  1669  	_ struct{} `type:"structure" nopayload:"true"`
  1670  
  1671  	// DeviceId is a required field
  1672  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  1673  }
  1674  
  1675  // String returns the string representation.
  1676  //
  1677  // API parameter values that are decorated as "sensitive" in the API will not
  1678  // be included in the string output. The member name will be present, but the
  1679  // value will be replaced with "sensitive".
  1680  func (s GetDeviceMethodsInput) String() string {
  1681  	return awsutil.Prettify(s)
  1682  }
  1683  
  1684  // GoString returns the string representation.
  1685  //
  1686  // API parameter values that are decorated as "sensitive" in the API will not
  1687  // be included in the string output. The member name will be present, but the
  1688  // value will be replaced with "sensitive".
  1689  func (s GetDeviceMethodsInput) GoString() string {
  1690  	return s.String()
  1691  }
  1692  
  1693  // Validate inspects the fields of the type to determine if they are valid.
  1694  func (s *GetDeviceMethodsInput) Validate() error {
  1695  	invalidParams := request.ErrInvalidParams{Context: "GetDeviceMethodsInput"}
  1696  	if s.DeviceId == nil {
  1697  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1698  	}
  1699  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1700  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1701  	}
  1702  
  1703  	if invalidParams.Len() > 0 {
  1704  		return invalidParams
  1705  	}
  1706  	return nil
  1707  }
  1708  
  1709  // SetDeviceId sets the DeviceId field's value.
  1710  func (s *GetDeviceMethodsInput) SetDeviceId(v string) *GetDeviceMethodsInput {
  1711  	s.DeviceId = &v
  1712  	return s
  1713  }
  1714  
  1715  type GetDeviceMethodsOutput struct {
  1716  	_ struct{} `type:"structure"`
  1717  
  1718  	// List of available device APIs.
  1719  	DeviceMethods []*DeviceMethod `locationName:"deviceMethods" type:"list"`
  1720  }
  1721  
  1722  // String returns the string representation.
  1723  //
  1724  // API parameter values that are decorated as "sensitive" in the API will not
  1725  // be included in the string output. The member name will be present, but the
  1726  // value will be replaced with "sensitive".
  1727  func (s GetDeviceMethodsOutput) String() string {
  1728  	return awsutil.Prettify(s)
  1729  }
  1730  
  1731  // GoString returns the string representation.
  1732  //
  1733  // API parameter values that are decorated as "sensitive" in the API will not
  1734  // be included in the string output. The member name will be present, but the
  1735  // value will be replaced with "sensitive".
  1736  func (s GetDeviceMethodsOutput) GoString() string {
  1737  	return s.String()
  1738  }
  1739  
  1740  // SetDeviceMethods sets the DeviceMethods field's value.
  1741  func (s *GetDeviceMethodsOutput) SetDeviceMethods(v []*DeviceMethod) *GetDeviceMethodsOutput {
  1742  	s.DeviceMethods = v
  1743  	return s
  1744  }
  1745  
  1746  type InitiateDeviceClaimInput struct {
  1747  	_ struct{} `type:"structure" nopayload:"true"`
  1748  
  1749  	// DeviceId is a required field
  1750  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  1751  }
  1752  
  1753  // String returns the string representation.
  1754  //
  1755  // API parameter values that are decorated as "sensitive" in the API will not
  1756  // be included in the string output. The member name will be present, but the
  1757  // value will be replaced with "sensitive".
  1758  func (s InitiateDeviceClaimInput) String() string {
  1759  	return awsutil.Prettify(s)
  1760  }
  1761  
  1762  // GoString returns the string representation.
  1763  //
  1764  // API parameter values that are decorated as "sensitive" in the API will not
  1765  // be included in the string output. The member name will be present, but the
  1766  // value will be replaced with "sensitive".
  1767  func (s InitiateDeviceClaimInput) GoString() string {
  1768  	return s.String()
  1769  }
  1770  
  1771  // Validate inspects the fields of the type to determine if they are valid.
  1772  func (s *InitiateDeviceClaimInput) Validate() error {
  1773  	invalidParams := request.ErrInvalidParams{Context: "InitiateDeviceClaimInput"}
  1774  	if s.DeviceId == nil {
  1775  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1776  	}
  1777  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1778  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1779  	}
  1780  
  1781  	if invalidParams.Len() > 0 {
  1782  		return invalidParams
  1783  	}
  1784  	return nil
  1785  }
  1786  
  1787  // SetDeviceId sets the DeviceId field's value.
  1788  func (s *InitiateDeviceClaimInput) SetDeviceId(v string) *InitiateDeviceClaimInput {
  1789  	s.DeviceId = &v
  1790  	return s
  1791  }
  1792  
  1793  type InitiateDeviceClaimOutput struct {
  1794  	_ struct{} `type:"structure"`
  1795  
  1796  	State *string `locationName:"state" type:"string"`
  1797  }
  1798  
  1799  // String returns the string representation.
  1800  //
  1801  // API parameter values that are decorated as "sensitive" in the API will not
  1802  // be included in the string output. The member name will be present, but the
  1803  // value will be replaced with "sensitive".
  1804  func (s InitiateDeviceClaimOutput) String() string {
  1805  	return awsutil.Prettify(s)
  1806  }
  1807  
  1808  // GoString returns the string representation.
  1809  //
  1810  // API parameter values that are decorated as "sensitive" in the API will not
  1811  // be included in the string output. The member name will be present, but the
  1812  // value will be replaced with "sensitive".
  1813  func (s InitiateDeviceClaimOutput) GoString() string {
  1814  	return s.String()
  1815  }
  1816  
  1817  // SetState sets the State field's value.
  1818  func (s *InitiateDeviceClaimOutput) SetState(v string) *InitiateDeviceClaimOutput {
  1819  	s.State = &v
  1820  	return s
  1821  }
  1822  
  1823  type InternalFailureException struct {
  1824  	_            struct{}                  `type:"structure"`
  1825  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1826  
  1827  	// 500
  1828  	Code_ *string `locationName:"code" type:"string"`
  1829  
  1830  	// The 500 error message returned by the web server.
  1831  	Message_ *string `locationName:"message" type:"string"`
  1832  }
  1833  
  1834  // String returns the string representation.
  1835  //
  1836  // API parameter values that are decorated as "sensitive" in the API will not
  1837  // be included in the string output. The member name will be present, but the
  1838  // value will be replaced with "sensitive".
  1839  func (s InternalFailureException) String() string {
  1840  	return awsutil.Prettify(s)
  1841  }
  1842  
  1843  // GoString returns the string representation.
  1844  //
  1845  // API parameter values that are decorated as "sensitive" in the API will not
  1846  // be included in the string output. The member name will be present, but the
  1847  // value will be replaced with "sensitive".
  1848  func (s InternalFailureException) GoString() string {
  1849  	return s.String()
  1850  }
  1851  
  1852  func newErrorInternalFailureException(v protocol.ResponseMetadata) error {
  1853  	return &InternalFailureException{
  1854  		RespMetadata: v,
  1855  	}
  1856  }
  1857  
  1858  // Code returns the exception type name.
  1859  func (s *InternalFailureException) Code() string {
  1860  	return "InternalFailureException"
  1861  }
  1862  
  1863  // Message returns the exception's message.
  1864  func (s *InternalFailureException) Message() string {
  1865  	if s.Message_ != nil {
  1866  		return *s.Message_
  1867  	}
  1868  	return ""
  1869  }
  1870  
  1871  // OrigErr always returns nil, satisfies awserr.Error interface.
  1872  func (s *InternalFailureException) OrigErr() error {
  1873  	return nil
  1874  }
  1875  
  1876  func (s *InternalFailureException) Error() string {
  1877  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1878  }
  1879  
  1880  // Status code returns the HTTP status code for the request's response error.
  1881  func (s *InternalFailureException) StatusCode() int {
  1882  	return s.RespMetadata.StatusCode
  1883  }
  1884  
  1885  // RequestID returns the service's response RequestID for request.
  1886  func (s *InternalFailureException) RequestID() string {
  1887  	return s.RespMetadata.RequestID
  1888  }
  1889  
  1890  type InvalidRequestException struct {
  1891  	_            struct{}                  `type:"structure"`
  1892  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1893  
  1894  	// 400
  1895  	Code_ *string `locationName:"code" type:"string"`
  1896  
  1897  	// The 400 error message returned by the web server.
  1898  	Message_ *string `locationName:"message" type:"string"`
  1899  }
  1900  
  1901  // String returns the string representation.
  1902  //
  1903  // API parameter values that are decorated as "sensitive" in the API will not
  1904  // be included in the string output. The member name will be present, but the
  1905  // value will be replaced with "sensitive".
  1906  func (s InvalidRequestException) String() string {
  1907  	return awsutil.Prettify(s)
  1908  }
  1909  
  1910  // GoString returns the string representation.
  1911  //
  1912  // API parameter values that are decorated as "sensitive" in the API will not
  1913  // be included in the string output. The member name will be present, but the
  1914  // value will be replaced with "sensitive".
  1915  func (s InvalidRequestException) GoString() string {
  1916  	return s.String()
  1917  }
  1918  
  1919  func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
  1920  	return &InvalidRequestException{
  1921  		RespMetadata: v,
  1922  	}
  1923  }
  1924  
  1925  // Code returns the exception type name.
  1926  func (s *InvalidRequestException) Code() string {
  1927  	return "InvalidRequestException"
  1928  }
  1929  
  1930  // Message returns the exception's message.
  1931  func (s *InvalidRequestException) Message() string {
  1932  	if s.Message_ != nil {
  1933  		return *s.Message_
  1934  	}
  1935  	return ""
  1936  }
  1937  
  1938  // OrigErr always returns nil, satisfies awserr.Error interface.
  1939  func (s *InvalidRequestException) OrigErr() error {
  1940  	return nil
  1941  }
  1942  
  1943  func (s *InvalidRequestException) Error() string {
  1944  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1945  }
  1946  
  1947  // Status code returns the HTTP status code for the request's response error.
  1948  func (s *InvalidRequestException) StatusCode() int {
  1949  	return s.RespMetadata.StatusCode
  1950  }
  1951  
  1952  // RequestID returns the service's response RequestID for request.
  1953  func (s *InvalidRequestException) RequestID() string {
  1954  	return s.RespMetadata.RequestID
  1955  }
  1956  
  1957  type InvokeDeviceMethodInput struct {
  1958  	_ struct{} `type:"structure"`
  1959  
  1960  	// DeviceId is a required field
  1961  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  1962  
  1963  	// The device method to invoke.
  1964  	DeviceMethod *DeviceMethod `locationName:"deviceMethod" type:"structure"`
  1965  
  1966  	// A JSON encoded string containing the device method request parameters.
  1967  	DeviceMethodParameters *string `locationName:"deviceMethodParameters" type:"string"`
  1968  }
  1969  
  1970  // String returns the string representation.
  1971  //
  1972  // API parameter values that are decorated as "sensitive" in the API will not
  1973  // be included in the string output. The member name will be present, but the
  1974  // value will be replaced with "sensitive".
  1975  func (s InvokeDeviceMethodInput) String() string {
  1976  	return awsutil.Prettify(s)
  1977  }
  1978  
  1979  // GoString returns the string representation.
  1980  //
  1981  // API parameter values that are decorated as "sensitive" in the API will not
  1982  // be included in the string output. The member name will be present, but the
  1983  // value will be replaced with "sensitive".
  1984  func (s InvokeDeviceMethodInput) GoString() string {
  1985  	return s.String()
  1986  }
  1987  
  1988  // Validate inspects the fields of the type to determine if they are valid.
  1989  func (s *InvokeDeviceMethodInput) Validate() error {
  1990  	invalidParams := request.ErrInvalidParams{Context: "InvokeDeviceMethodInput"}
  1991  	if s.DeviceId == nil {
  1992  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  1993  	}
  1994  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  1995  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  1996  	}
  1997  
  1998  	if invalidParams.Len() > 0 {
  1999  		return invalidParams
  2000  	}
  2001  	return nil
  2002  }
  2003  
  2004  // SetDeviceId sets the DeviceId field's value.
  2005  func (s *InvokeDeviceMethodInput) SetDeviceId(v string) *InvokeDeviceMethodInput {
  2006  	s.DeviceId = &v
  2007  	return s
  2008  }
  2009  
  2010  // SetDeviceMethod sets the DeviceMethod field's value.
  2011  func (s *InvokeDeviceMethodInput) SetDeviceMethod(v *DeviceMethod) *InvokeDeviceMethodInput {
  2012  	s.DeviceMethod = v
  2013  	return s
  2014  }
  2015  
  2016  // SetDeviceMethodParameters sets the DeviceMethodParameters field's value.
  2017  func (s *InvokeDeviceMethodInput) SetDeviceMethodParameters(v string) *InvokeDeviceMethodInput {
  2018  	s.DeviceMethodParameters = &v
  2019  	return s
  2020  }
  2021  
  2022  type InvokeDeviceMethodOutput struct {
  2023  	_ struct{} `type:"structure"`
  2024  
  2025  	// A JSON encoded string containing the device method response.
  2026  	DeviceMethodResponse *string `locationName:"deviceMethodResponse" type:"string"`
  2027  }
  2028  
  2029  // String returns the string representation.
  2030  //
  2031  // API parameter values that are decorated as "sensitive" in the API will not
  2032  // be included in the string output. The member name will be present, but the
  2033  // value will be replaced with "sensitive".
  2034  func (s InvokeDeviceMethodOutput) String() string {
  2035  	return awsutil.Prettify(s)
  2036  }
  2037  
  2038  // GoString returns the string representation.
  2039  //
  2040  // API parameter values that are decorated as "sensitive" in the API will not
  2041  // be included in the string output. The member name will be present, but the
  2042  // value will be replaced with "sensitive".
  2043  func (s InvokeDeviceMethodOutput) GoString() string {
  2044  	return s.String()
  2045  }
  2046  
  2047  // SetDeviceMethodResponse sets the DeviceMethodResponse field's value.
  2048  func (s *InvokeDeviceMethodOutput) SetDeviceMethodResponse(v string) *InvokeDeviceMethodOutput {
  2049  	s.DeviceMethodResponse = &v
  2050  	return s
  2051  }
  2052  
  2053  type ListDeviceEventsInput struct {
  2054  	_ struct{} `type:"structure" nopayload:"true"`
  2055  
  2056  	// DeviceId is a required field
  2057  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  2058  
  2059  	// FromTimeStamp is a required field
  2060  	FromTimeStamp *time.Time `location:"querystring" locationName:"fromTimeStamp" type:"timestamp" timestampFormat:"iso8601" required:"true"`
  2061  
  2062  	MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  2063  
  2064  	NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2065  
  2066  	// ToTimeStamp is a required field
  2067  	ToTimeStamp *time.Time `location:"querystring" locationName:"toTimeStamp" type:"timestamp" timestampFormat:"iso8601" required:"true"`
  2068  }
  2069  
  2070  // String returns the string representation.
  2071  //
  2072  // API parameter values that are decorated as "sensitive" in the API will not
  2073  // be included in the string output. The member name will be present, but the
  2074  // value will be replaced with "sensitive".
  2075  func (s ListDeviceEventsInput) String() string {
  2076  	return awsutil.Prettify(s)
  2077  }
  2078  
  2079  // GoString returns the string representation.
  2080  //
  2081  // API parameter values that are decorated as "sensitive" in the API will not
  2082  // be included in the string output. The member name will be present, but the
  2083  // value will be replaced with "sensitive".
  2084  func (s ListDeviceEventsInput) GoString() string {
  2085  	return s.String()
  2086  }
  2087  
  2088  // Validate inspects the fields of the type to determine if they are valid.
  2089  func (s *ListDeviceEventsInput) Validate() error {
  2090  	invalidParams := request.ErrInvalidParams{Context: "ListDeviceEventsInput"}
  2091  	if s.DeviceId == nil {
  2092  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  2093  	}
  2094  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2095  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2096  	}
  2097  	if s.FromTimeStamp == nil {
  2098  		invalidParams.Add(request.NewErrParamRequired("FromTimeStamp"))
  2099  	}
  2100  	if s.MaxResults != nil && *s.MaxResults < 1 {
  2101  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2102  	}
  2103  	if s.ToTimeStamp == nil {
  2104  		invalidParams.Add(request.NewErrParamRequired("ToTimeStamp"))
  2105  	}
  2106  
  2107  	if invalidParams.Len() > 0 {
  2108  		return invalidParams
  2109  	}
  2110  	return nil
  2111  }
  2112  
  2113  // SetDeviceId sets the DeviceId field's value.
  2114  func (s *ListDeviceEventsInput) SetDeviceId(v string) *ListDeviceEventsInput {
  2115  	s.DeviceId = &v
  2116  	return s
  2117  }
  2118  
  2119  // SetFromTimeStamp sets the FromTimeStamp field's value.
  2120  func (s *ListDeviceEventsInput) SetFromTimeStamp(v time.Time) *ListDeviceEventsInput {
  2121  	s.FromTimeStamp = &v
  2122  	return s
  2123  }
  2124  
  2125  // SetMaxResults sets the MaxResults field's value.
  2126  func (s *ListDeviceEventsInput) SetMaxResults(v int64) *ListDeviceEventsInput {
  2127  	s.MaxResults = &v
  2128  	return s
  2129  }
  2130  
  2131  // SetNextToken sets the NextToken field's value.
  2132  func (s *ListDeviceEventsInput) SetNextToken(v string) *ListDeviceEventsInput {
  2133  	s.NextToken = &v
  2134  	return s
  2135  }
  2136  
  2137  // SetToTimeStamp sets the ToTimeStamp field's value.
  2138  func (s *ListDeviceEventsInput) SetToTimeStamp(v time.Time) *ListDeviceEventsInput {
  2139  	s.ToTimeStamp = &v
  2140  	return s
  2141  }
  2142  
  2143  type ListDeviceEventsOutput struct {
  2144  	_ struct{} `type:"structure"`
  2145  
  2146  	Events []*DeviceEvent `locationName:"events" type:"list"`
  2147  
  2148  	NextToken *string `locationName:"nextToken" type:"string"`
  2149  }
  2150  
  2151  // String returns the string representation.
  2152  //
  2153  // API parameter values that are decorated as "sensitive" in the API will not
  2154  // be included in the string output. The member name will be present, but the
  2155  // value will be replaced with "sensitive".
  2156  func (s ListDeviceEventsOutput) String() string {
  2157  	return awsutil.Prettify(s)
  2158  }
  2159  
  2160  // GoString returns the string representation.
  2161  //
  2162  // API parameter values that are decorated as "sensitive" in the API will not
  2163  // be included in the string output. The member name will be present, but the
  2164  // value will be replaced with "sensitive".
  2165  func (s ListDeviceEventsOutput) GoString() string {
  2166  	return s.String()
  2167  }
  2168  
  2169  // SetEvents sets the Events field's value.
  2170  func (s *ListDeviceEventsOutput) SetEvents(v []*DeviceEvent) *ListDeviceEventsOutput {
  2171  	s.Events = v
  2172  	return s
  2173  }
  2174  
  2175  // SetNextToken sets the NextToken field's value.
  2176  func (s *ListDeviceEventsOutput) SetNextToken(v string) *ListDeviceEventsOutput {
  2177  	s.NextToken = &v
  2178  	return s
  2179  }
  2180  
  2181  type ListDevicesInput struct {
  2182  	_ struct{} `type:"structure" nopayload:"true"`
  2183  
  2184  	DeviceType *string `location:"querystring" locationName:"deviceType" type:"string"`
  2185  
  2186  	MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  2187  
  2188  	NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2189  }
  2190  
  2191  // String returns the string representation.
  2192  //
  2193  // API parameter values that are decorated as "sensitive" in the API will not
  2194  // be included in the string output. The member name will be present, but the
  2195  // value will be replaced with "sensitive".
  2196  func (s ListDevicesInput) String() string {
  2197  	return awsutil.Prettify(s)
  2198  }
  2199  
  2200  // GoString returns the string representation.
  2201  //
  2202  // API parameter values that are decorated as "sensitive" in the API will not
  2203  // be included in the string output. The member name will be present, but the
  2204  // value will be replaced with "sensitive".
  2205  func (s ListDevicesInput) GoString() string {
  2206  	return s.String()
  2207  }
  2208  
  2209  // Validate inspects the fields of the type to determine if they are valid.
  2210  func (s *ListDevicesInput) Validate() error {
  2211  	invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"}
  2212  	if s.MaxResults != nil && *s.MaxResults < 1 {
  2213  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2214  	}
  2215  
  2216  	if invalidParams.Len() > 0 {
  2217  		return invalidParams
  2218  	}
  2219  	return nil
  2220  }
  2221  
  2222  // SetDeviceType sets the DeviceType field's value.
  2223  func (s *ListDevicesInput) SetDeviceType(v string) *ListDevicesInput {
  2224  	s.DeviceType = &v
  2225  	return s
  2226  }
  2227  
  2228  // SetMaxResults sets the MaxResults field's value.
  2229  func (s *ListDevicesInput) SetMaxResults(v int64) *ListDevicesInput {
  2230  	s.MaxResults = &v
  2231  	return s
  2232  }
  2233  
  2234  // SetNextToken sets the NextToken field's value.
  2235  func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput {
  2236  	s.NextToken = &v
  2237  	return s
  2238  }
  2239  
  2240  type ListDevicesOutput struct {
  2241  	_ struct{} `type:"structure"`
  2242  
  2243  	// A list of devices.
  2244  	Devices []*DeviceDescription `locationName:"devices" type:"list"`
  2245  
  2246  	// The token to retrieve the next set of results.
  2247  	NextToken *string `locationName:"nextToken" type:"string"`
  2248  }
  2249  
  2250  // String returns the string representation.
  2251  //
  2252  // API parameter values that are decorated as "sensitive" in the API will not
  2253  // be included in the string output. The member name will be present, but the
  2254  // value will be replaced with "sensitive".
  2255  func (s ListDevicesOutput) String() string {
  2256  	return awsutil.Prettify(s)
  2257  }
  2258  
  2259  // GoString returns the string representation.
  2260  //
  2261  // API parameter values that are decorated as "sensitive" in the API will not
  2262  // be included in the string output. The member name will be present, but the
  2263  // value will be replaced with "sensitive".
  2264  func (s ListDevicesOutput) GoString() string {
  2265  	return s.String()
  2266  }
  2267  
  2268  // SetDevices sets the Devices field's value.
  2269  func (s *ListDevicesOutput) SetDevices(v []*DeviceDescription) *ListDevicesOutput {
  2270  	s.Devices = v
  2271  	return s
  2272  }
  2273  
  2274  // SetNextToken sets the NextToken field's value.
  2275  func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput {
  2276  	s.NextToken = &v
  2277  	return s
  2278  }
  2279  
  2280  type ListTagsForResourceInput struct {
  2281  	_ struct{} `type:"structure" nopayload:"true"`
  2282  
  2283  	// ResourceArn is a required field
  2284  	ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"`
  2285  }
  2286  
  2287  // String returns the string representation.
  2288  //
  2289  // API parameter values that are decorated as "sensitive" in the API will not
  2290  // be included in the string output. The member name will be present, but the
  2291  // value will be replaced with "sensitive".
  2292  func (s ListTagsForResourceInput) String() string {
  2293  	return awsutil.Prettify(s)
  2294  }
  2295  
  2296  // GoString returns the string representation.
  2297  //
  2298  // API parameter values that are decorated as "sensitive" in the API will not
  2299  // be included in the string output. The member name will be present, but the
  2300  // value will be replaced with "sensitive".
  2301  func (s ListTagsForResourceInput) GoString() string {
  2302  	return s.String()
  2303  }
  2304  
  2305  // Validate inspects the fields of the type to determine if they are valid.
  2306  func (s *ListTagsForResourceInput) Validate() error {
  2307  	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  2308  	if s.ResourceArn == nil {
  2309  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  2310  	}
  2311  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  2312  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  2313  	}
  2314  
  2315  	if invalidParams.Len() > 0 {
  2316  		return invalidParams
  2317  	}
  2318  	return nil
  2319  }
  2320  
  2321  // SetResourceArn sets the ResourceArn field's value.
  2322  func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
  2323  	s.ResourceArn = &v
  2324  	return s
  2325  }
  2326  
  2327  type ListTagsForResourceOutput struct {
  2328  	_ struct{} `type:"structure"`
  2329  
  2330  	Tags map[string]*string `locationName:"tags" type:"map"`
  2331  }
  2332  
  2333  // String returns the string representation.
  2334  //
  2335  // API parameter values that are decorated as "sensitive" in the API will not
  2336  // be included in the string output. The member name will be present, but the
  2337  // value will be replaced with "sensitive".
  2338  func (s ListTagsForResourceOutput) String() string {
  2339  	return awsutil.Prettify(s)
  2340  }
  2341  
  2342  // GoString returns the string representation.
  2343  //
  2344  // API parameter values that are decorated as "sensitive" in the API will not
  2345  // be included in the string output. The member name will be present, but the
  2346  // value will be replaced with "sensitive".
  2347  func (s ListTagsForResourceOutput) GoString() string {
  2348  	return s.String()
  2349  }
  2350  
  2351  // SetTags sets the Tags field's value.
  2352  func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput {
  2353  	s.Tags = v
  2354  	return s
  2355  }
  2356  
  2357  type PreconditionFailedException struct {
  2358  	_            struct{}                  `type:"structure"`
  2359  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2360  
  2361  	// 412
  2362  	Code_ *string `locationName:"code" type:"string"`
  2363  
  2364  	// An error message explaining the error or its remedy.
  2365  	Message_ *string `locationName:"message" type:"string"`
  2366  }
  2367  
  2368  // String returns the string representation.
  2369  //
  2370  // API parameter values that are decorated as "sensitive" in the API will not
  2371  // be included in the string output. The member name will be present, but the
  2372  // value will be replaced with "sensitive".
  2373  func (s PreconditionFailedException) String() string {
  2374  	return awsutil.Prettify(s)
  2375  }
  2376  
  2377  // GoString returns the string representation.
  2378  //
  2379  // API parameter values that are decorated as "sensitive" in the API will not
  2380  // be included in the string output. The member name will be present, but the
  2381  // value will be replaced with "sensitive".
  2382  func (s PreconditionFailedException) GoString() string {
  2383  	return s.String()
  2384  }
  2385  
  2386  func newErrorPreconditionFailedException(v protocol.ResponseMetadata) error {
  2387  	return &PreconditionFailedException{
  2388  		RespMetadata: v,
  2389  	}
  2390  }
  2391  
  2392  // Code returns the exception type name.
  2393  func (s *PreconditionFailedException) Code() string {
  2394  	return "PreconditionFailedException"
  2395  }
  2396  
  2397  // Message returns the exception's message.
  2398  func (s *PreconditionFailedException) Message() string {
  2399  	if s.Message_ != nil {
  2400  		return *s.Message_
  2401  	}
  2402  	return ""
  2403  }
  2404  
  2405  // OrigErr always returns nil, satisfies awserr.Error interface.
  2406  func (s *PreconditionFailedException) OrigErr() error {
  2407  	return nil
  2408  }
  2409  
  2410  func (s *PreconditionFailedException) Error() string {
  2411  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  2412  }
  2413  
  2414  // Status code returns the HTTP status code for the request's response error.
  2415  func (s *PreconditionFailedException) StatusCode() int {
  2416  	return s.RespMetadata.StatusCode
  2417  }
  2418  
  2419  // RequestID returns the service's response RequestID for request.
  2420  func (s *PreconditionFailedException) RequestID() string {
  2421  	return s.RespMetadata.RequestID
  2422  }
  2423  
  2424  type RangeNotSatisfiableException struct {
  2425  	_            struct{}                  `type:"structure"`
  2426  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2427  
  2428  	// 416
  2429  	Code_ *string `locationName:"code" type:"string"`
  2430  
  2431  	// The requested number of results specified by nextToken cannot be satisfied.
  2432  	Message_ *string `locationName:"message" type:"string"`
  2433  }
  2434  
  2435  // String returns the string representation.
  2436  //
  2437  // API parameter values that are decorated as "sensitive" in the API will not
  2438  // be included in the string output. The member name will be present, but the
  2439  // value will be replaced with "sensitive".
  2440  func (s RangeNotSatisfiableException) String() string {
  2441  	return awsutil.Prettify(s)
  2442  }
  2443  
  2444  // GoString returns the string representation.
  2445  //
  2446  // API parameter values that are decorated as "sensitive" in the API will not
  2447  // be included in the string output. The member name will be present, but the
  2448  // value will be replaced with "sensitive".
  2449  func (s RangeNotSatisfiableException) GoString() string {
  2450  	return s.String()
  2451  }
  2452  
  2453  func newErrorRangeNotSatisfiableException(v protocol.ResponseMetadata) error {
  2454  	return &RangeNotSatisfiableException{
  2455  		RespMetadata: v,
  2456  	}
  2457  }
  2458  
  2459  // Code returns the exception type name.
  2460  func (s *RangeNotSatisfiableException) Code() string {
  2461  	return "RangeNotSatisfiableException"
  2462  }
  2463  
  2464  // Message returns the exception's message.
  2465  func (s *RangeNotSatisfiableException) Message() string {
  2466  	if s.Message_ != nil {
  2467  		return *s.Message_
  2468  	}
  2469  	return ""
  2470  }
  2471  
  2472  // OrigErr always returns nil, satisfies awserr.Error interface.
  2473  func (s *RangeNotSatisfiableException) OrigErr() error {
  2474  	return nil
  2475  }
  2476  
  2477  func (s *RangeNotSatisfiableException) Error() string {
  2478  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  2479  }
  2480  
  2481  // Status code returns the HTTP status code for the request's response error.
  2482  func (s *RangeNotSatisfiableException) StatusCode() int {
  2483  	return s.RespMetadata.StatusCode
  2484  }
  2485  
  2486  // RequestID returns the service's response RequestID for request.
  2487  func (s *RangeNotSatisfiableException) RequestID() string {
  2488  	return s.RespMetadata.RequestID
  2489  }
  2490  
  2491  type ResourceConflictException struct {
  2492  	_            struct{}                  `type:"structure"`
  2493  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2494  
  2495  	// 409
  2496  	Code_ *string `locationName:"code" type:"string"`
  2497  
  2498  	// An error message explaining the error or its remedy.
  2499  	Message_ *string `locationName:"message" type:"string"`
  2500  }
  2501  
  2502  // String returns the string representation.
  2503  //
  2504  // API parameter values that are decorated as "sensitive" in the API will not
  2505  // be included in the string output. The member name will be present, but the
  2506  // value will be replaced with "sensitive".
  2507  func (s ResourceConflictException) String() string {
  2508  	return awsutil.Prettify(s)
  2509  }
  2510  
  2511  // GoString returns the string representation.
  2512  //
  2513  // API parameter values that are decorated as "sensitive" in the API will not
  2514  // be included in the string output. The member name will be present, but the
  2515  // value will be replaced with "sensitive".
  2516  func (s ResourceConflictException) GoString() string {
  2517  	return s.String()
  2518  }
  2519  
  2520  func newErrorResourceConflictException(v protocol.ResponseMetadata) error {
  2521  	return &ResourceConflictException{
  2522  		RespMetadata: v,
  2523  	}
  2524  }
  2525  
  2526  // Code returns the exception type name.
  2527  func (s *ResourceConflictException) Code() string {
  2528  	return "ResourceConflictException"
  2529  }
  2530  
  2531  // Message returns the exception's message.
  2532  func (s *ResourceConflictException) Message() string {
  2533  	if s.Message_ != nil {
  2534  		return *s.Message_
  2535  	}
  2536  	return ""
  2537  }
  2538  
  2539  // OrigErr always returns nil, satisfies awserr.Error interface.
  2540  func (s *ResourceConflictException) OrigErr() error {
  2541  	return nil
  2542  }
  2543  
  2544  func (s *ResourceConflictException) Error() string {
  2545  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  2546  }
  2547  
  2548  // Status code returns the HTTP status code for the request's response error.
  2549  func (s *ResourceConflictException) StatusCode() int {
  2550  	return s.RespMetadata.StatusCode
  2551  }
  2552  
  2553  // RequestID returns the service's response RequestID for request.
  2554  func (s *ResourceConflictException) RequestID() string {
  2555  	return s.RespMetadata.RequestID
  2556  }
  2557  
  2558  type ResourceNotFoundException struct {
  2559  	_            struct{}                  `type:"structure"`
  2560  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2561  
  2562  	// 404
  2563  	Code_ *string `locationName:"code" type:"string"`
  2564  
  2565  	// The requested device could not be found.
  2566  	Message_ *string `locationName:"message" type:"string"`
  2567  }
  2568  
  2569  // String returns the string representation.
  2570  //
  2571  // API parameter values that are decorated as "sensitive" in the API will not
  2572  // be included in the string output. The member name will be present, but the
  2573  // value will be replaced with "sensitive".
  2574  func (s ResourceNotFoundException) String() string {
  2575  	return awsutil.Prettify(s)
  2576  }
  2577  
  2578  // GoString returns the string representation.
  2579  //
  2580  // API parameter values that are decorated as "sensitive" in the API will not
  2581  // be included in the string output. The member name will be present, but the
  2582  // value will be replaced with "sensitive".
  2583  func (s ResourceNotFoundException) GoString() string {
  2584  	return s.String()
  2585  }
  2586  
  2587  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  2588  	return &ResourceNotFoundException{
  2589  		RespMetadata: v,
  2590  	}
  2591  }
  2592  
  2593  // Code returns the exception type name.
  2594  func (s *ResourceNotFoundException) Code() string {
  2595  	return "ResourceNotFoundException"
  2596  }
  2597  
  2598  // Message returns the exception's message.
  2599  func (s *ResourceNotFoundException) Message() string {
  2600  	if s.Message_ != nil {
  2601  		return *s.Message_
  2602  	}
  2603  	return ""
  2604  }
  2605  
  2606  // OrigErr always returns nil, satisfies awserr.Error interface.
  2607  func (s *ResourceNotFoundException) OrigErr() error {
  2608  	return nil
  2609  }
  2610  
  2611  func (s *ResourceNotFoundException) Error() string {
  2612  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  2613  }
  2614  
  2615  // Status code returns the HTTP status code for the request's response error.
  2616  func (s *ResourceNotFoundException) StatusCode() int {
  2617  	return s.RespMetadata.StatusCode
  2618  }
  2619  
  2620  // RequestID returns the service's response RequestID for request.
  2621  func (s *ResourceNotFoundException) RequestID() string {
  2622  	return s.RespMetadata.RequestID
  2623  }
  2624  
  2625  type TagResourceInput struct {
  2626  	_ struct{} `type:"structure"`
  2627  
  2628  	// ResourceArn is a required field
  2629  	ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"`
  2630  
  2631  	// Tags is a required field
  2632  	Tags map[string]*string `locationName:"tags" type:"map" required:"true"`
  2633  }
  2634  
  2635  // String returns the string representation.
  2636  //
  2637  // API parameter values that are decorated as "sensitive" in the API will not
  2638  // be included in the string output. The member name will be present, but the
  2639  // value will be replaced with "sensitive".
  2640  func (s TagResourceInput) String() string {
  2641  	return awsutil.Prettify(s)
  2642  }
  2643  
  2644  // GoString returns the string representation.
  2645  //
  2646  // API parameter values that are decorated as "sensitive" in the API will not
  2647  // be included in the string output. The member name will be present, but the
  2648  // value will be replaced with "sensitive".
  2649  func (s TagResourceInput) GoString() string {
  2650  	return s.String()
  2651  }
  2652  
  2653  // Validate inspects the fields of the type to determine if they are valid.
  2654  func (s *TagResourceInput) Validate() error {
  2655  	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  2656  	if s.ResourceArn == nil {
  2657  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  2658  	}
  2659  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  2660  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  2661  	}
  2662  	if s.Tags == nil {
  2663  		invalidParams.Add(request.NewErrParamRequired("Tags"))
  2664  	}
  2665  
  2666  	if invalidParams.Len() > 0 {
  2667  		return invalidParams
  2668  	}
  2669  	return nil
  2670  }
  2671  
  2672  // SetResourceArn sets the ResourceArn field's value.
  2673  func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  2674  	s.ResourceArn = &v
  2675  	return s
  2676  }
  2677  
  2678  // SetTags sets the Tags field's value.
  2679  func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
  2680  	s.Tags = v
  2681  	return s
  2682  }
  2683  
  2684  type TagResourceOutput struct {
  2685  	_ struct{} `type:"structure" nopayload:"true"`
  2686  }
  2687  
  2688  // String returns the string representation.
  2689  //
  2690  // API parameter values that are decorated as "sensitive" in the API will not
  2691  // be included in the string output. The member name will be present, but the
  2692  // value will be replaced with "sensitive".
  2693  func (s TagResourceOutput) String() string {
  2694  	return awsutil.Prettify(s)
  2695  }
  2696  
  2697  // GoString returns the string representation.
  2698  //
  2699  // API parameter values that are decorated as "sensitive" in the API will not
  2700  // be included in the string output. The member name will be present, but the
  2701  // value will be replaced with "sensitive".
  2702  func (s TagResourceOutput) GoString() string {
  2703  	return s.String()
  2704  }
  2705  
  2706  type UnclaimDeviceInput struct {
  2707  	_ struct{} `type:"structure" nopayload:"true"`
  2708  
  2709  	// DeviceId is a required field
  2710  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  2711  }
  2712  
  2713  // String returns the string representation.
  2714  //
  2715  // API parameter values that are decorated as "sensitive" in the API will not
  2716  // be included in the string output. The member name will be present, but the
  2717  // value will be replaced with "sensitive".
  2718  func (s UnclaimDeviceInput) String() string {
  2719  	return awsutil.Prettify(s)
  2720  }
  2721  
  2722  // GoString returns the string representation.
  2723  //
  2724  // API parameter values that are decorated as "sensitive" in the API will not
  2725  // be included in the string output. The member name will be present, but the
  2726  // value will be replaced with "sensitive".
  2727  func (s UnclaimDeviceInput) GoString() string {
  2728  	return s.String()
  2729  }
  2730  
  2731  // Validate inspects the fields of the type to determine if they are valid.
  2732  func (s *UnclaimDeviceInput) Validate() error {
  2733  	invalidParams := request.ErrInvalidParams{Context: "UnclaimDeviceInput"}
  2734  	if s.DeviceId == nil {
  2735  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  2736  	}
  2737  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2738  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2739  	}
  2740  
  2741  	if invalidParams.Len() > 0 {
  2742  		return invalidParams
  2743  	}
  2744  	return nil
  2745  }
  2746  
  2747  // SetDeviceId sets the DeviceId field's value.
  2748  func (s *UnclaimDeviceInput) SetDeviceId(v string) *UnclaimDeviceInput {
  2749  	s.DeviceId = &v
  2750  	return s
  2751  }
  2752  
  2753  type UnclaimDeviceOutput struct {
  2754  	_ struct{} `type:"structure"`
  2755  
  2756  	State *string `locationName:"state" type:"string"`
  2757  }
  2758  
  2759  // String returns the string representation.
  2760  //
  2761  // API parameter values that are decorated as "sensitive" in the API will not
  2762  // be included in the string output. The member name will be present, but the
  2763  // value will be replaced with "sensitive".
  2764  func (s UnclaimDeviceOutput) String() string {
  2765  	return awsutil.Prettify(s)
  2766  }
  2767  
  2768  // GoString returns the string representation.
  2769  //
  2770  // API parameter values that are decorated as "sensitive" in the API will not
  2771  // be included in the string output. The member name will be present, but the
  2772  // value will be replaced with "sensitive".
  2773  func (s UnclaimDeviceOutput) GoString() string {
  2774  	return s.String()
  2775  }
  2776  
  2777  // SetState sets the State field's value.
  2778  func (s *UnclaimDeviceOutput) SetState(v string) *UnclaimDeviceOutput {
  2779  	s.State = &v
  2780  	return s
  2781  }
  2782  
  2783  type UntagResourceInput struct {
  2784  	_ struct{} `type:"structure" nopayload:"true"`
  2785  
  2786  	// ResourceArn is a required field
  2787  	ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"`
  2788  
  2789  	// TagKeys is a required field
  2790  	TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"`
  2791  }
  2792  
  2793  // String returns the string representation.
  2794  //
  2795  // API parameter values that are decorated as "sensitive" in the API will not
  2796  // be included in the string output. The member name will be present, but the
  2797  // value will be replaced with "sensitive".
  2798  func (s UntagResourceInput) String() string {
  2799  	return awsutil.Prettify(s)
  2800  }
  2801  
  2802  // GoString returns the string representation.
  2803  //
  2804  // API parameter values that are decorated as "sensitive" in the API will not
  2805  // be included in the string output. The member name will be present, but the
  2806  // value will be replaced with "sensitive".
  2807  func (s UntagResourceInput) GoString() string {
  2808  	return s.String()
  2809  }
  2810  
  2811  // Validate inspects the fields of the type to determine if they are valid.
  2812  func (s *UntagResourceInput) Validate() error {
  2813  	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  2814  	if s.ResourceArn == nil {
  2815  		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  2816  	}
  2817  	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  2818  		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  2819  	}
  2820  	if s.TagKeys == nil {
  2821  		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  2822  	}
  2823  
  2824  	if invalidParams.Len() > 0 {
  2825  		return invalidParams
  2826  	}
  2827  	return nil
  2828  }
  2829  
  2830  // SetResourceArn sets the ResourceArn field's value.
  2831  func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  2832  	s.ResourceArn = &v
  2833  	return s
  2834  }
  2835  
  2836  // SetTagKeys sets the TagKeys field's value.
  2837  func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  2838  	s.TagKeys = v
  2839  	return s
  2840  }
  2841  
  2842  type UntagResourceOutput struct {
  2843  	_ struct{} `type:"structure" nopayload:"true"`
  2844  }
  2845  
  2846  // String returns the string representation.
  2847  //
  2848  // API parameter values that are decorated as "sensitive" in the API will not
  2849  // be included in the string output. The member name will be present, but the
  2850  // value will be replaced with "sensitive".
  2851  func (s UntagResourceOutput) String() string {
  2852  	return awsutil.Prettify(s)
  2853  }
  2854  
  2855  // GoString returns the string representation.
  2856  //
  2857  // API parameter values that are decorated as "sensitive" in the API will not
  2858  // be included in the string output. The member name will be present, but the
  2859  // value will be replaced with "sensitive".
  2860  func (s UntagResourceOutput) GoString() string {
  2861  	return s.String()
  2862  }
  2863  
  2864  type UpdateDeviceStateInput struct {
  2865  	_ struct{} `type:"structure"`
  2866  
  2867  	// DeviceId is a required field
  2868  	DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"`
  2869  
  2870  	// If true, the device is enabled. If false, the device is disabled.
  2871  	Enabled *bool `locationName:"enabled" type:"boolean"`
  2872  }
  2873  
  2874  // String returns the string representation.
  2875  //
  2876  // API parameter values that are decorated as "sensitive" in the API will not
  2877  // be included in the string output. The member name will be present, but the
  2878  // value will be replaced with "sensitive".
  2879  func (s UpdateDeviceStateInput) String() string {
  2880  	return awsutil.Prettify(s)
  2881  }
  2882  
  2883  // GoString returns the string representation.
  2884  //
  2885  // API parameter values that are decorated as "sensitive" in the API will not
  2886  // be included in the string output. The member name will be present, but the
  2887  // value will be replaced with "sensitive".
  2888  func (s UpdateDeviceStateInput) GoString() string {
  2889  	return s.String()
  2890  }
  2891  
  2892  // Validate inspects the fields of the type to determine if they are valid.
  2893  func (s *UpdateDeviceStateInput) Validate() error {
  2894  	invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceStateInput"}
  2895  	if s.DeviceId == nil {
  2896  		invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  2897  	}
  2898  	if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2899  		invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2900  	}
  2901  
  2902  	if invalidParams.Len() > 0 {
  2903  		return invalidParams
  2904  	}
  2905  	return nil
  2906  }
  2907  
  2908  // SetDeviceId sets the DeviceId field's value.
  2909  func (s *UpdateDeviceStateInput) SetDeviceId(v string) *UpdateDeviceStateInput {
  2910  	s.DeviceId = &v
  2911  	return s
  2912  }
  2913  
  2914  // SetEnabled sets the Enabled field's value.
  2915  func (s *UpdateDeviceStateInput) SetEnabled(v bool) *UpdateDeviceStateInput {
  2916  	s.Enabled = &v
  2917  	return s
  2918  }
  2919  
  2920  type UpdateDeviceStateOutput struct {
  2921  	_ struct{} `type:"structure" nopayload:"true"`
  2922  }
  2923  
  2924  // String returns the string representation.
  2925  //
  2926  // API parameter values that are decorated as "sensitive" in the API will not
  2927  // be included in the string output. The member name will be present, but the
  2928  // value will be replaced with "sensitive".
  2929  func (s UpdateDeviceStateOutput) String() string {
  2930  	return awsutil.Prettify(s)
  2931  }
  2932  
  2933  // GoString returns the string representation.
  2934  //
  2935  // API parameter values that are decorated as "sensitive" in the API will not
  2936  // be included in the string output. The member name will be present, but the
  2937  // value will be replaced with "sensitive".
  2938  func (s UpdateDeviceStateOutput) GoString() string {
  2939  	return s.String()
  2940  }