Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package iot1clickprojects provides the client and types for making API
// requests to AWS IoT 1-Click Projects Service.
//
// The AWS IoT 1-Click Projects API Reference
//
// See https://docs.aws.amazon.com/goto/WebAPI/iot1click-projects-2018-05-14 for more information on this service.
//
// See iot1clickprojects package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iot1clickprojects/
//
// Using the Client
//
// To contact AWS IoT 1-Click Projects Service with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS IoT 1-Click Projects Service client IoT1ClickProjects for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/iot1clickprojects/#New
package iot1clickprojects
+26
View File
@@ -0,0 +1,26 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot1clickprojects
const (
// ErrCodeInternalFailureException for service response error code
// "InternalFailureException".
ErrCodeInternalFailureException = "InternalFailureException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeResourceConflictException for service response error code
// "ResourceConflictException".
ErrCodeResourceConflictException = "ResourceConflictException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
ErrCodeTooManyRequestsException = "TooManyRequestsException"
)
@@ -0,0 +1,134 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package iot1clickprojectsiface provides an interface to enable mocking the AWS IoT 1-Click Projects Service service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package iot1clickprojectsiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/iot1clickprojects"
)
// IoT1ClickProjectsAPI provides an interface to enable mocking the
// iot1clickprojects.IoT1ClickProjects service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS IoT 1-Click Projects Service.
// func myFunc(svc iot1clickprojectsiface.IoT1ClickProjectsAPI) bool {
// // Make svc.AssociateDeviceWithPlacement request
// }
//
// func main() {
// sess := session.New()
// svc := iot1clickprojects.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockIoT1ClickProjectsClient struct {
// iot1clickprojectsiface.IoT1ClickProjectsAPI
// }
// func (m *mockIoT1ClickProjectsClient) AssociateDeviceWithPlacement(input *iot1clickprojects.AssociateDeviceWithPlacementInput) (*iot1clickprojects.AssociateDeviceWithPlacementOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockIoT1ClickProjectsClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type IoT1ClickProjectsAPI interface {
AssociateDeviceWithPlacement(*iot1clickprojects.AssociateDeviceWithPlacementInput) (*iot1clickprojects.AssociateDeviceWithPlacementOutput, error)
AssociateDeviceWithPlacementWithContext(aws.Context, *iot1clickprojects.AssociateDeviceWithPlacementInput, ...request.Option) (*iot1clickprojects.AssociateDeviceWithPlacementOutput, error)
AssociateDeviceWithPlacementRequest(*iot1clickprojects.AssociateDeviceWithPlacementInput) (*request.Request, *iot1clickprojects.AssociateDeviceWithPlacementOutput)
CreatePlacement(*iot1clickprojects.CreatePlacementInput) (*iot1clickprojects.CreatePlacementOutput, error)
CreatePlacementWithContext(aws.Context, *iot1clickprojects.CreatePlacementInput, ...request.Option) (*iot1clickprojects.CreatePlacementOutput, error)
CreatePlacementRequest(*iot1clickprojects.CreatePlacementInput) (*request.Request, *iot1clickprojects.CreatePlacementOutput)
CreateProject(*iot1clickprojects.CreateProjectInput) (*iot1clickprojects.CreateProjectOutput, error)
CreateProjectWithContext(aws.Context, *iot1clickprojects.CreateProjectInput, ...request.Option) (*iot1clickprojects.CreateProjectOutput, error)
CreateProjectRequest(*iot1clickprojects.CreateProjectInput) (*request.Request, *iot1clickprojects.CreateProjectOutput)
DeletePlacement(*iot1clickprojects.DeletePlacementInput) (*iot1clickprojects.DeletePlacementOutput, error)
DeletePlacementWithContext(aws.Context, *iot1clickprojects.DeletePlacementInput, ...request.Option) (*iot1clickprojects.DeletePlacementOutput, error)
DeletePlacementRequest(*iot1clickprojects.DeletePlacementInput) (*request.Request, *iot1clickprojects.DeletePlacementOutput)
DeleteProject(*iot1clickprojects.DeleteProjectInput) (*iot1clickprojects.DeleteProjectOutput, error)
DeleteProjectWithContext(aws.Context, *iot1clickprojects.DeleteProjectInput, ...request.Option) (*iot1clickprojects.DeleteProjectOutput, error)
DeleteProjectRequest(*iot1clickprojects.DeleteProjectInput) (*request.Request, *iot1clickprojects.DeleteProjectOutput)
DescribePlacement(*iot1clickprojects.DescribePlacementInput) (*iot1clickprojects.DescribePlacementOutput, error)
DescribePlacementWithContext(aws.Context, *iot1clickprojects.DescribePlacementInput, ...request.Option) (*iot1clickprojects.DescribePlacementOutput, error)
DescribePlacementRequest(*iot1clickprojects.DescribePlacementInput) (*request.Request, *iot1clickprojects.DescribePlacementOutput)
DescribeProject(*iot1clickprojects.DescribeProjectInput) (*iot1clickprojects.DescribeProjectOutput, error)
DescribeProjectWithContext(aws.Context, *iot1clickprojects.DescribeProjectInput, ...request.Option) (*iot1clickprojects.DescribeProjectOutput, error)
DescribeProjectRequest(*iot1clickprojects.DescribeProjectInput) (*request.Request, *iot1clickprojects.DescribeProjectOutput)
DisassociateDeviceFromPlacement(*iot1clickprojects.DisassociateDeviceFromPlacementInput) (*iot1clickprojects.DisassociateDeviceFromPlacementOutput, error)
DisassociateDeviceFromPlacementWithContext(aws.Context, *iot1clickprojects.DisassociateDeviceFromPlacementInput, ...request.Option) (*iot1clickprojects.DisassociateDeviceFromPlacementOutput, error)
DisassociateDeviceFromPlacementRequest(*iot1clickprojects.DisassociateDeviceFromPlacementInput) (*request.Request, *iot1clickprojects.DisassociateDeviceFromPlacementOutput)
GetDevicesInPlacement(*iot1clickprojects.GetDevicesInPlacementInput) (*iot1clickprojects.GetDevicesInPlacementOutput, error)
GetDevicesInPlacementWithContext(aws.Context, *iot1clickprojects.GetDevicesInPlacementInput, ...request.Option) (*iot1clickprojects.GetDevicesInPlacementOutput, error)
GetDevicesInPlacementRequest(*iot1clickprojects.GetDevicesInPlacementInput) (*request.Request, *iot1clickprojects.GetDevicesInPlacementOutput)
ListPlacements(*iot1clickprojects.ListPlacementsInput) (*iot1clickprojects.ListPlacementsOutput, error)
ListPlacementsWithContext(aws.Context, *iot1clickprojects.ListPlacementsInput, ...request.Option) (*iot1clickprojects.ListPlacementsOutput, error)
ListPlacementsRequest(*iot1clickprojects.ListPlacementsInput) (*request.Request, *iot1clickprojects.ListPlacementsOutput)
ListPlacementsPages(*iot1clickprojects.ListPlacementsInput, func(*iot1clickprojects.ListPlacementsOutput, bool) bool) error
ListPlacementsPagesWithContext(aws.Context, *iot1clickprojects.ListPlacementsInput, func(*iot1clickprojects.ListPlacementsOutput, bool) bool, ...request.Option) error
ListProjects(*iot1clickprojects.ListProjectsInput) (*iot1clickprojects.ListProjectsOutput, error)
ListProjectsWithContext(aws.Context, *iot1clickprojects.ListProjectsInput, ...request.Option) (*iot1clickprojects.ListProjectsOutput, error)
ListProjectsRequest(*iot1clickprojects.ListProjectsInput) (*request.Request, *iot1clickprojects.ListProjectsOutput)
ListProjectsPages(*iot1clickprojects.ListProjectsInput, func(*iot1clickprojects.ListProjectsOutput, bool) bool) error
ListProjectsPagesWithContext(aws.Context, *iot1clickprojects.ListProjectsInput, func(*iot1clickprojects.ListProjectsOutput, bool) bool, ...request.Option) error
ListTagsForResource(*iot1clickprojects.ListTagsForResourceInput) (*iot1clickprojects.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *iot1clickprojects.ListTagsForResourceInput, ...request.Option) (*iot1clickprojects.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*iot1clickprojects.ListTagsForResourceInput) (*request.Request, *iot1clickprojects.ListTagsForResourceOutput)
TagResource(*iot1clickprojects.TagResourceInput) (*iot1clickprojects.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *iot1clickprojects.TagResourceInput, ...request.Option) (*iot1clickprojects.TagResourceOutput, error)
TagResourceRequest(*iot1clickprojects.TagResourceInput) (*request.Request, *iot1clickprojects.TagResourceOutput)
UntagResource(*iot1clickprojects.UntagResourceInput) (*iot1clickprojects.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *iot1clickprojects.UntagResourceInput, ...request.Option) (*iot1clickprojects.UntagResourceOutput, error)
UntagResourceRequest(*iot1clickprojects.UntagResourceInput) (*request.Request, *iot1clickprojects.UntagResourceOutput)
UpdatePlacement(*iot1clickprojects.UpdatePlacementInput) (*iot1clickprojects.UpdatePlacementOutput, error)
UpdatePlacementWithContext(aws.Context, *iot1clickprojects.UpdatePlacementInput, ...request.Option) (*iot1clickprojects.UpdatePlacementOutput, error)
UpdatePlacementRequest(*iot1clickprojects.UpdatePlacementInput) (*request.Request, *iot1clickprojects.UpdatePlacementOutput)
UpdateProject(*iot1clickprojects.UpdateProjectInput) (*iot1clickprojects.UpdateProjectOutput, error)
UpdateProjectWithContext(aws.Context, *iot1clickprojects.UpdateProjectInput, ...request.Option) (*iot1clickprojects.UpdateProjectOutput, error)
UpdateProjectRequest(*iot1clickprojects.UpdateProjectInput) (*request.Request, *iot1clickprojects.UpdateProjectOutput)
}
var _ IoT1ClickProjectsAPI = (*iot1clickprojects.IoT1ClickProjects)(nil)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot1clickprojects
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// IoT1ClickProjects provides the API operation methods for making requests to
// AWS IoT 1-Click Projects Service. See this package's package overview docs
// for details on the service.
//
// IoT1ClickProjects methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type IoT1ClickProjects struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "projects.iot1click" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "IoT 1Click Projects" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the IoT1ClickProjects client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a IoT1ClickProjects client from just a session.
// svc := iot1clickprojects.New(mySession)
//
// // Create a IoT1ClickProjects client with additional configuration
// svc := iot1clickprojects.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoT1ClickProjects {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "iot1click"
}
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *IoT1ClickProjects {
svc := &IoT1ClickProjects{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-05-14",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a IoT1ClickProjects operation and runs any
// custom request initialization.
func (c *IoT1ClickProjects) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}