1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package iotfleethub
4
5import (
6	"fmt"
7
8	"github.com/aws/aws-sdk-go/aws"
9	"github.com/aws/aws-sdk-go/aws/awsutil"
10	"github.com/aws/aws-sdk-go/aws/request"
11	"github.com/aws/aws-sdk-go/private/protocol"
12	"github.com/aws/aws-sdk-go/private/protocol/restjson"
13)
14
15const opCreateApplication = "CreateApplication"
16
17// CreateApplicationRequest generates a "aws/request.Request" representing the
18// client's request for the CreateApplication operation. The "output" return
19// value will be populated with the request's response once the request completes
20// successfully.
21//
22// Use "Send" method on the returned Request to send the API call to the service.
23// the "output" return value is not valid until after Send returns without error.
24//
25// See CreateApplication for more information on using the CreateApplication
26// API call, and error handling.
27//
28// This method is useful when you want to inject custom logic or configuration
29// into the SDK's request lifecycle. Such as custom headers, or retry logic.
30//
31//
32//    // Example sending a request using the CreateApplicationRequest method.
33//    req, resp := client.CreateApplicationRequest(params)
34//
35//    err := req.Send()
36//    if err == nil { // resp is now filled
37//        fmt.Println(resp)
38//    }
39//
40// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/CreateApplication
41func (c *IoTFleetHub) CreateApplicationRequest(input *CreateApplicationInput) (req *request.Request, output *CreateApplicationOutput) {
42	op := &request.Operation{
43		Name:       opCreateApplication,
44		HTTPMethod: "POST",
45		HTTPPath:   "/applications",
46	}
47
48	if input == nil {
49		input = &CreateApplicationInput{}
50	}
51
52	output = &CreateApplicationOutput{}
53	req = c.newRequest(op, input, output)
54	return
55}
56
57// CreateApplication API operation for AWS IoT Fleet Hub.
58//
59// Creates a Fleet Hub for AWS IoT Device Management web application.
60//
61// Fleet Hub for AWS IoT Device Management is in public preview and is subject
62// to change.
63//
64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
65// with awserr.Error's Code and Message methods to get detailed information about
66// the error.
67//
68// See the AWS API reference guide for AWS IoT Fleet Hub's
69// API operation CreateApplication for usage and error information.
70//
71// Returned Error Types:
72//   * InvalidRequestException
73//   The request is not valid.
74//
75//   * InternalFailureException
76//   An unexpected error has occurred.
77//
78//   * ThrottlingException
79//   The rate exceeds the limit.
80//
81//   * LimitExceededException
82//   A limit has been exceeded.
83//
84// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/CreateApplication
85func (c *IoTFleetHub) CreateApplication(input *CreateApplicationInput) (*CreateApplicationOutput, error) {
86	req, out := c.CreateApplicationRequest(input)
87	return out, req.Send()
88}
89
90// CreateApplicationWithContext is the same as CreateApplication with the addition of
91// the ability to pass a context and additional request options.
92//
93// See CreateApplication for details on how to use this API operation.
94//
95// The context must be non-nil and will be used for request cancellation. If
96// the context is nil a panic will occur. In the future the SDK may create
97// sub-contexts for http.Requests. See https://golang.org/pkg/context/
98// for more information on using Contexts.
99func (c *IoTFleetHub) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationInput, opts ...request.Option) (*CreateApplicationOutput, error) {
100	req, out := c.CreateApplicationRequest(input)
101	req.SetContext(ctx)
102	req.ApplyOptions(opts...)
103	return out, req.Send()
104}
105
106const opDeleteApplication = "DeleteApplication"
107
108// DeleteApplicationRequest generates a "aws/request.Request" representing the
109// client's request for the DeleteApplication operation. The "output" return
110// value will be populated with the request's response once the request completes
111// successfully.
112//
113// Use "Send" method on the returned Request to send the API call to the service.
114// the "output" return value is not valid until after Send returns without error.
115//
116// See DeleteApplication for more information on using the DeleteApplication
117// API call, and error handling.
118//
119// This method is useful when you want to inject custom logic or configuration
120// into the SDK's request lifecycle. Such as custom headers, or retry logic.
121//
122//
123//    // Example sending a request using the DeleteApplicationRequest method.
124//    req, resp := client.DeleteApplicationRequest(params)
125//
126//    err := req.Send()
127//    if err == nil { // resp is now filled
128//        fmt.Println(resp)
129//    }
130//
131// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/DeleteApplication
132func (c *IoTFleetHub) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) {
133	op := &request.Operation{
134		Name:       opDeleteApplication,
135		HTTPMethod: "DELETE",
136		HTTPPath:   "/applications/{applicationId}",
137	}
138
139	if input == nil {
140		input = &DeleteApplicationInput{}
141	}
142
143	output = &DeleteApplicationOutput{}
144	req = c.newRequest(op, input, output)
145	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
146	return
147}
148
149// DeleteApplication API operation for AWS IoT Fleet Hub.
150//
151// Deletes a Fleet Hub for AWS IoT Device Management web application.
152//
153// Fleet Hub for AWS IoT Device Management is in public preview and is subject
154// to change.
155//
156// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
157// with awserr.Error's Code and Message methods to get detailed information about
158// the error.
159//
160// See the AWS API reference guide for AWS IoT Fleet Hub's
161// API operation DeleteApplication for usage and error information.
162//
163// Returned Error Types:
164//   * InvalidRequestException
165//   The request is not valid.
166//
167//   * ResourceNotFoundException
168//   The specified resource does not exist.
169//
170//   * InternalFailureException
171//   An unexpected error has occurred.
172//
173//   * ThrottlingException
174//   The rate exceeds the limit.
175//
176// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/DeleteApplication
177func (c *IoTFleetHub) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) {
178	req, out := c.DeleteApplicationRequest(input)
179	return out, req.Send()
180}
181
182// DeleteApplicationWithContext is the same as DeleteApplication with the addition of
183// the ability to pass a context and additional request options.
184//
185// See DeleteApplication for details on how to use this API operation.
186//
187// The context must be non-nil and will be used for request cancellation. If
188// the context is nil a panic will occur. In the future the SDK may create
189// sub-contexts for http.Requests. See https://golang.org/pkg/context/
190// for more information on using Contexts.
191func (c *IoTFleetHub) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) {
192	req, out := c.DeleteApplicationRequest(input)
193	req.SetContext(ctx)
194	req.ApplyOptions(opts...)
195	return out, req.Send()
196}
197
198const opDescribeApplication = "DescribeApplication"
199
200// DescribeApplicationRequest generates a "aws/request.Request" representing the
201// client's request for the DescribeApplication operation. The "output" return
202// value will be populated with the request's response once the request completes
203// successfully.
204//
205// Use "Send" method on the returned Request to send the API call to the service.
206// the "output" return value is not valid until after Send returns without error.
207//
208// See DescribeApplication for more information on using the DescribeApplication
209// API call, and error handling.
210//
211// This method is useful when you want to inject custom logic or configuration
212// into the SDK's request lifecycle. Such as custom headers, or retry logic.
213//
214//
215//    // Example sending a request using the DescribeApplicationRequest method.
216//    req, resp := client.DescribeApplicationRequest(params)
217//
218//    err := req.Send()
219//    if err == nil { // resp is now filled
220//        fmt.Println(resp)
221//    }
222//
223// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/DescribeApplication
224func (c *IoTFleetHub) DescribeApplicationRequest(input *DescribeApplicationInput) (req *request.Request, output *DescribeApplicationOutput) {
225	op := &request.Operation{
226		Name:       opDescribeApplication,
227		HTTPMethod: "GET",
228		HTTPPath:   "/applications/{applicationId}",
229	}
230
231	if input == nil {
232		input = &DescribeApplicationInput{}
233	}
234
235	output = &DescribeApplicationOutput{}
236	req = c.newRequest(op, input, output)
237	return
238}
239
240// DescribeApplication API operation for AWS IoT Fleet Hub.
241//
242// Gets information about a Fleet Hub for AWS IoT Device Management web application.
243//
244// Fleet Hub for AWS IoT Device Management is in public preview and is subject
245// to change.
246//
247// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
248// with awserr.Error's Code and Message methods to get detailed information about
249// the error.
250//
251// See the AWS API reference guide for AWS IoT Fleet Hub's
252// API operation DescribeApplication for usage and error information.
253//
254// Returned Error Types:
255//   * InvalidRequestException
256//   The request is not valid.
257//
258//   * ResourceNotFoundException
259//   The specified resource does not exist.
260//
261//   * InternalFailureException
262//   An unexpected error has occurred.
263//
264//   * ThrottlingException
265//   The rate exceeds the limit.
266//
267// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/DescribeApplication
268func (c *IoTFleetHub) DescribeApplication(input *DescribeApplicationInput) (*DescribeApplicationOutput, error) {
269	req, out := c.DescribeApplicationRequest(input)
270	return out, req.Send()
271}
272
273// DescribeApplicationWithContext is the same as DescribeApplication with the addition of
274// the ability to pass a context and additional request options.
275//
276// See DescribeApplication for details on how to use this API operation.
277//
278// The context must be non-nil and will be used for request cancellation. If
279// the context is nil a panic will occur. In the future the SDK may create
280// sub-contexts for http.Requests. See https://golang.org/pkg/context/
281// for more information on using Contexts.
282func (c *IoTFleetHub) DescribeApplicationWithContext(ctx aws.Context, input *DescribeApplicationInput, opts ...request.Option) (*DescribeApplicationOutput, error) {
283	req, out := c.DescribeApplicationRequest(input)
284	req.SetContext(ctx)
285	req.ApplyOptions(opts...)
286	return out, req.Send()
287}
288
289const opListApplications = "ListApplications"
290
291// ListApplicationsRequest generates a "aws/request.Request" representing the
292// client's request for the ListApplications operation. The "output" return
293// value will be populated with the request's response once the request completes
294// successfully.
295//
296// Use "Send" method on the returned Request to send the API call to the service.
297// the "output" return value is not valid until after Send returns without error.
298//
299// See ListApplications for more information on using the ListApplications
300// API call, and error handling.
301//
302// This method is useful when you want to inject custom logic or configuration
303// into the SDK's request lifecycle. Such as custom headers, or retry logic.
304//
305//
306//    // Example sending a request using the ListApplicationsRequest method.
307//    req, resp := client.ListApplicationsRequest(params)
308//
309//    err := req.Send()
310//    if err == nil { // resp is now filled
311//        fmt.Println(resp)
312//    }
313//
314// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/ListApplications
315func (c *IoTFleetHub) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) {
316	op := &request.Operation{
317		Name:       opListApplications,
318		HTTPMethod: "GET",
319		HTTPPath:   "/applications",
320		Paginator: &request.Paginator{
321			InputTokens:     []string{"nextToken"},
322			OutputTokens:    []string{"nextToken"},
323			LimitToken:      "",
324			TruncationToken: "",
325		},
326	}
327
328	if input == nil {
329		input = &ListApplicationsInput{}
330	}
331
332	output = &ListApplicationsOutput{}
333	req = c.newRequest(op, input, output)
334	return
335}
336
337// ListApplications API operation for AWS IoT Fleet Hub.
338//
339// Gets a list of Fleet Hub for AWS IoT Device Management web applications for
340// the current account.
341//
342// Fleet Hub for AWS IoT Device Management is in public preview and is subject
343// to change.
344//
345// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
346// with awserr.Error's Code and Message methods to get detailed information about
347// the error.
348//
349// See the AWS API reference guide for AWS IoT Fleet Hub's
350// API operation ListApplications for usage and error information.
351//
352// Returned Error Types:
353//   * InvalidRequestException
354//   The request is not valid.
355//
356//   * InternalFailureException
357//   An unexpected error has occurred.
358//
359//   * ThrottlingException
360//   The rate exceeds the limit.
361//
362// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/ListApplications
363func (c *IoTFleetHub) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) {
364	req, out := c.ListApplicationsRequest(input)
365	return out, req.Send()
366}
367
368// ListApplicationsWithContext is the same as ListApplications with the addition of
369// the ability to pass a context and additional request options.
370//
371// See ListApplications for details on how to use this API operation.
372//
373// The context must be non-nil and will be used for request cancellation. If
374// the context is nil a panic will occur. In the future the SDK may create
375// sub-contexts for http.Requests. See https://golang.org/pkg/context/
376// for more information on using Contexts.
377func (c *IoTFleetHub) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) {
378	req, out := c.ListApplicationsRequest(input)
379	req.SetContext(ctx)
380	req.ApplyOptions(opts...)
381	return out, req.Send()
382}
383
384// ListApplicationsPages iterates over the pages of a ListApplications operation,
385// calling the "fn" function with the response data for each page. To stop
386// iterating, return false from the fn function.
387//
388// See ListApplications method for more information on how to use this operation.
389//
390// Note: This operation can generate multiple requests to a service.
391//
392//    // Example iterating over at most 3 pages of a ListApplications operation.
393//    pageNum := 0
394//    err := client.ListApplicationsPages(params,
395//        func(page *iotfleethub.ListApplicationsOutput, lastPage bool) bool {
396//            pageNum++
397//            fmt.Println(page)
398//            return pageNum <= 3
399//        })
400//
401func (c *IoTFleetHub) ListApplicationsPages(input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool) error {
402	return c.ListApplicationsPagesWithContext(aws.BackgroundContext(), input, fn)
403}
404
405// ListApplicationsPagesWithContext same as ListApplicationsPages except
406// it takes a Context and allows setting request options on the pages.
407//
408// The context must be non-nil and will be used for request cancellation. If
409// the context is nil a panic will occur. In the future the SDK may create
410// sub-contexts for http.Requests. See https://golang.org/pkg/context/
411// for more information on using Contexts.
412func (c *IoTFleetHub) ListApplicationsPagesWithContext(ctx aws.Context, input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool, opts ...request.Option) error {
413	p := request.Pagination{
414		NewRequest: func() (*request.Request, error) {
415			var inCpy *ListApplicationsInput
416			if input != nil {
417				tmp := *input
418				inCpy = &tmp
419			}
420			req, _ := c.ListApplicationsRequest(inCpy)
421			req.SetContext(ctx)
422			req.ApplyOptions(opts...)
423			return req, nil
424		},
425	}
426
427	for p.Next() {
428		if !fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) {
429			break
430		}
431	}
432
433	return p.Err()
434}
435
436const opListTagsForResource = "ListTagsForResource"
437
438// ListTagsForResourceRequest generates a "aws/request.Request" representing the
439// client's request for the ListTagsForResource operation. The "output" return
440// value will be populated with the request's response once the request completes
441// successfully.
442//
443// Use "Send" method on the returned Request to send the API call to the service.
444// the "output" return value is not valid until after Send returns without error.
445//
446// See ListTagsForResource for more information on using the ListTagsForResource
447// API call, and error handling.
448//
449// This method is useful when you want to inject custom logic or configuration
450// into the SDK's request lifecycle. Such as custom headers, or retry logic.
451//
452//
453//    // Example sending a request using the ListTagsForResourceRequest method.
454//    req, resp := client.ListTagsForResourceRequest(params)
455//
456//    err := req.Send()
457//    if err == nil { // resp is now filled
458//        fmt.Println(resp)
459//    }
460//
461// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/ListTagsForResource
462func (c *IoTFleetHub) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
463	op := &request.Operation{
464		Name:       opListTagsForResource,
465		HTTPMethod: "GET",
466		HTTPPath:   "/tags/{resourceArn}",
467	}
468
469	if input == nil {
470		input = &ListTagsForResourceInput{}
471	}
472
473	output = &ListTagsForResourceOutput{}
474	req = c.newRequest(op, input, output)
475	return
476}
477
478// ListTagsForResource API operation for AWS IoT Fleet Hub.
479//
480// Lists the tags for the specified resource.
481//
482// Fleet Hub for AWS IoT Device Management is in public preview and is subject
483// to change.
484//
485// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
486// with awserr.Error's Code and Message methods to get detailed information about
487// the error.
488//
489// See the AWS API reference guide for AWS IoT Fleet Hub's
490// API operation ListTagsForResource for usage and error information.
491//
492// Returned Error Types:
493//   * InternalFailureException
494//   An unexpected error has occurred.
495//
496//   * InvalidRequestException
497//   The request is not valid.
498//
499//   * ResourceNotFoundException
500//   The specified resource does not exist.
501//
502// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/ListTagsForResource
503func (c *IoTFleetHub) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
504	req, out := c.ListTagsForResourceRequest(input)
505	return out, req.Send()
506}
507
508// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
509// the ability to pass a context and additional request options.
510//
511// See ListTagsForResource for details on how to use this API operation.
512//
513// The context must be non-nil and will be used for request cancellation. If
514// the context is nil a panic will occur. In the future the SDK may create
515// sub-contexts for http.Requests. See https://golang.org/pkg/context/
516// for more information on using Contexts.
517func (c *IoTFleetHub) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
518	req, out := c.ListTagsForResourceRequest(input)
519	req.SetContext(ctx)
520	req.ApplyOptions(opts...)
521	return out, req.Send()
522}
523
524const opTagResource = "TagResource"
525
526// TagResourceRequest generates a "aws/request.Request" representing the
527// client's request for the TagResource operation. The "output" return
528// value will be populated with the request's response once the request completes
529// successfully.
530//
531// Use "Send" method on the returned Request to send the API call to the service.
532// the "output" return value is not valid until after Send returns without error.
533//
534// See TagResource for more information on using the TagResource
535// API call, and error handling.
536//
537// This method is useful when you want to inject custom logic or configuration
538// into the SDK's request lifecycle. Such as custom headers, or retry logic.
539//
540//
541//    // Example sending a request using the TagResourceRequest method.
542//    req, resp := client.TagResourceRequest(params)
543//
544//    err := req.Send()
545//    if err == nil { // resp is now filled
546//        fmt.Println(resp)
547//    }
548//
549// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/TagResource
550func (c *IoTFleetHub) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
551	op := &request.Operation{
552		Name:       opTagResource,
553		HTTPMethod: "POST",
554		HTTPPath:   "/tags/{resourceArn}",
555	}
556
557	if input == nil {
558		input = &TagResourceInput{}
559	}
560
561	output = &TagResourceOutput{}
562	req = c.newRequest(op, input, output)
563	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
564	return
565}
566
567// TagResource API operation for AWS IoT Fleet Hub.
568//
569// Adds to or modifies the tags of the specified resource. Tags are metadata
570// which can be used to manage a resource.
571//
572// Fleet Hub for AWS IoT Device Management is in public preview and is subject
573// to change.
574//
575// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
576// with awserr.Error's Code and Message methods to get detailed information about
577// the error.
578//
579// See the AWS API reference guide for AWS IoT Fleet Hub's
580// API operation TagResource for usage and error information.
581//
582// Returned Error Types:
583//   * InternalFailureException
584//   An unexpected error has occurred.
585//
586//   * InvalidRequestException
587//   The request is not valid.
588//
589//   * ResourceNotFoundException
590//   The specified resource does not exist.
591//
592// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/TagResource
593func (c *IoTFleetHub) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
594	req, out := c.TagResourceRequest(input)
595	return out, req.Send()
596}
597
598// TagResourceWithContext is the same as TagResource with the addition of
599// the ability to pass a context and additional request options.
600//
601// See TagResource for details on how to use this API operation.
602//
603// The context must be non-nil and will be used for request cancellation. If
604// the context is nil a panic will occur. In the future the SDK may create
605// sub-contexts for http.Requests. See https://golang.org/pkg/context/
606// for more information on using Contexts.
607func (c *IoTFleetHub) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
608	req, out := c.TagResourceRequest(input)
609	req.SetContext(ctx)
610	req.ApplyOptions(opts...)
611	return out, req.Send()
612}
613
614const opUntagResource = "UntagResource"
615
616// UntagResourceRequest generates a "aws/request.Request" representing the
617// client's request for the UntagResource operation. The "output" return
618// value will be populated with the request's response once the request completes
619// successfully.
620//
621// Use "Send" method on the returned Request to send the API call to the service.
622// the "output" return value is not valid until after Send returns without error.
623//
624// See UntagResource for more information on using the UntagResource
625// API call, and error handling.
626//
627// This method is useful when you want to inject custom logic or configuration
628// into the SDK's request lifecycle. Such as custom headers, or retry logic.
629//
630//
631//    // Example sending a request using the UntagResourceRequest method.
632//    req, resp := client.UntagResourceRequest(params)
633//
634//    err := req.Send()
635//    if err == nil { // resp is now filled
636//        fmt.Println(resp)
637//    }
638//
639// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/UntagResource
640func (c *IoTFleetHub) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
641	op := &request.Operation{
642		Name:       opUntagResource,
643		HTTPMethod: "DELETE",
644		HTTPPath:   "/tags/{resourceArn}",
645	}
646
647	if input == nil {
648		input = &UntagResourceInput{}
649	}
650
651	output = &UntagResourceOutput{}
652	req = c.newRequest(op, input, output)
653	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
654	return
655}
656
657// UntagResource API operation for AWS IoT Fleet Hub.
658//
659// Removes the specified tags (metadata) from the resource.
660//
661// Fleet Hub for AWS IoT Device Management is in public preview and is subject
662// to change.
663//
664// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
665// with awserr.Error's Code and Message methods to get detailed information about
666// the error.
667//
668// See the AWS API reference guide for AWS IoT Fleet Hub's
669// API operation UntagResource for usage and error information.
670//
671// Returned Error Types:
672//   * InternalFailureException
673//   An unexpected error has occurred.
674//
675//   * InvalidRequestException
676//   The request is not valid.
677//
678//   * ResourceNotFoundException
679//   The specified resource does not exist.
680//
681// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/UntagResource
682func (c *IoTFleetHub) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
683	req, out := c.UntagResourceRequest(input)
684	return out, req.Send()
685}
686
687// UntagResourceWithContext is the same as UntagResource with the addition of
688// the ability to pass a context and additional request options.
689//
690// See UntagResource for details on how to use this API operation.
691//
692// The context must be non-nil and will be used for request cancellation. If
693// the context is nil a panic will occur. In the future the SDK may create
694// sub-contexts for http.Requests. See https://golang.org/pkg/context/
695// for more information on using Contexts.
696func (c *IoTFleetHub) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
697	req, out := c.UntagResourceRequest(input)
698	req.SetContext(ctx)
699	req.ApplyOptions(opts...)
700	return out, req.Send()
701}
702
703const opUpdateApplication = "UpdateApplication"
704
705// UpdateApplicationRequest generates a "aws/request.Request" representing the
706// client's request for the UpdateApplication operation. The "output" return
707// value will be populated with the request's response once the request completes
708// successfully.
709//
710// Use "Send" method on the returned Request to send the API call to the service.
711// the "output" return value is not valid until after Send returns without error.
712//
713// See UpdateApplication for more information on using the UpdateApplication
714// API call, and error handling.
715//
716// This method is useful when you want to inject custom logic or configuration
717// into the SDK's request lifecycle. Such as custom headers, or retry logic.
718//
719//
720//    // Example sending a request using the UpdateApplicationRequest method.
721//    req, resp := client.UpdateApplicationRequest(params)
722//
723//    err := req.Send()
724//    if err == nil { // resp is now filled
725//        fmt.Println(resp)
726//    }
727//
728// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/UpdateApplication
729func (c *IoTFleetHub) UpdateApplicationRequest(input *UpdateApplicationInput) (req *request.Request, output *UpdateApplicationOutput) {
730	op := &request.Operation{
731		Name:       opUpdateApplication,
732		HTTPMethod: "PATCH",
733		HTTPPath:   "/applications/{applicationId}",
734	}
735
736	if input == nil {
737		input = &UpdateApplicationInput{}
738	}
739
740	output = &UpdateApplicationOutput{}
741	req = c.newRequest(op, input, output)
742	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
743	return
744}
745
746// UpdateApplication API operation for AWS IoT Fleet Hub.
747//
748// Updates information about a Fleet Hub for a AWS IoT Device Management web
749// application.
750//
751// Fleet Hub for AWS IoT Device Management is in public preview and is subject
752// to change.
753//
754// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
755// with awserr.Error's Code and Message methods to get detailed information about
756// the error.
757//
758// See the AWS API reference guide for AWS IoT Fleet Hub's
759// API operation UpdateApplication for usage and error information.
760//
761// Returned Error Types:
762//   * InvalidRequestException
763//   The request is not valid.
764//
765//   * ResourceNotFoundException
766//   The specified resource does not exist.
767//
768//   * InternalFailureException
769//   An unexpected error has occurred.
770//
771//   * ConflictException
772//   The request conflicts with the current state of the resource.
773//
774//   * ThrottlingException
775//   The rate exceeds the limit.
776//
777// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleethub-2020-11-03/UpdateApplication
778func (c *IoTFleetHub) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) {
779	req, out := c.UpdateApplicationRequest(input)
780	return out, req.Send()
781}
782
783// UpdateApplicationWithContext is the same as UpdateApplication with the addition of
784// the ability to pass a context and additional request options.
785//
786// See UpdateApplication for details on how to use this API operation.
787//
788// The context must be non-nil and will be used for request cancellation. If
789// the context is nil a panic will occur. In the future the SDK may create
790// sub-contexts for http.Requests. See https://golang.org/pkg/context/
791// for more information on using Contexts.
792func (c *IoTFleetHub) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationInput, opts ...request.Option) (*UpdateApplicationOutput, error) {
793	req, out := c.UpdateApplicationRequest(input)
794	req.SetContext(ctx)
795	req.ApplyOptions(opts...)
796	return out, req.Send()
797}
798
799// A summary of information about a AWS IoT Device Management web application.
800//
801// Fleet Hub for AWS IoT Device Management is in public preview and is subject
802// to change.
803type ApplicationSummary struct {
804	_ struct{} `type:"structure"`
805
806	// The date (in Unix epoch time) when the web application was created.
807	ApplicationCreationDate *int64 `locationName:"applicationCreationDate" type:"long"`
808
809	// An optional description of the web application.
810	ApplicationDescription *string `locationName:"applicationDescription" min:"1" type:"string"`
811
812	// The unique Id of the web application.
813	//
814	// ApplicationId is a required field
815	ApplicationId *string `locationName:"applicationId" min:"36" type:"string" required:"true"`
816
817	// The date (in Unix epoch time) when the web application was last updated.
818	ApplicationLastUpdateDate *int64 `locationName:"applicationLastUpdateDate" type:"long"`
819
820	// The name of the web application.
821	//
822	// ApplicationName is a required field
823	ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"`
824
825	// The current state of the web application.
826	ApplicationState *string `locationName:"applicationState" type:"string" enum:"ApplicationState"`
827
828	// The URL of the web application.
829	//
830	// ApplicationUrl is a required field
831	ApplicationUrl *string `locationName:"applicationUrl" min:"1" type:"string" required:"true"`
832}
833
834// String returns the string representation
835func (s ApplicationSummary) String() string {
836	return awsutil.Prettify(s)
837}
838
839// GoString returns the string representation
840func (s ApplicationSummary) GoString() string {
841	return s.String()
842}
843
844// SetApplicationCreationDate sets the ApplicationCreationDate field's value.
845func (s *ApplicationSummary) SetApplicationCreationDate(v int64) *ApplicationSummary {
846	s.ApplicationCreationDate = &v
847	return s
848}
849
850// SetApplicationDescription sets the ApplicationDescription field's value.
851func (s *ApplicationSummary) SetApplicationDescription(v string) *ApplicationSummary {
852	s.ApplicationDescription = &v
853	return s
854}
855
856// SetApplicationId sets the ApplicationId field's value.
857func (s *ApplicationSummary) SetApplicationId(v string) *ApplicationSummary {
858	s.ApplicationId = &v
859	return s
860}
861
862// SetApplicationLastUpdateDate sets the ApplicationLastUpdateDate field's value.
863func (s *ApplicationSummary) SetApplicationLastUpdateDate(v int64) *ApplicationSummary {
864	s.ApplicationLastUpdateDate = &v
865	return s
866}
867
868// SetApplicationName sets the ApplicationName field's value.
869func (s *ApplicationSummary) SetApplicationName(v string) *ApplicationSummary {
870	s.ApplicationName = &v
871	return s
872}
873
874// SetApplicationState sets the ApplicationState field's value.
875func (s *ApplicationSummary) SetApplicationState(v string) *ApplicationSummary {
876	s.ApplicationState = &v
877	return s
878}
879
880// SetApplicationUrl sets the ApplicationUrl field's value.
881func (s *ApplicationSummary) SetApplicationUrl(v string) *ApplicationSummary {
882	s.ApplicationUrl = &v
883	return s
884}
885
886// The request conflicts with the current state of the resource.
887type ConflictException struct {
888	_            struct{}                  `type:"structure"`
889	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
890
891	Message_ *string `locationName:"message" type:"string"`
892}
893
894// String returns the string representation
895func (s ConflictException) String() string {
896	return awsutil.Prettify(s)
897}
898
899// GoString returns the string representation
900func (s ConflictException) GoString() string {
901	return s.String()
902}
903
904func newErrorConflictException(v protocol.ResponseMetadata) error {
905	return &ConflictException{
906		RespMetadata: v,
907	}
908}
909
910// Code returns the exception type name.
911func (s *ConflictException) Code() string {
912	return "ConflictException"
913}
914
915// Message returns the exception's message.
916func (s *ConflictException) Message() string {
917	if s.Message_ != nil {
918		return *s.Message_
919	}
920	return ""
921}
922
923// OrigErr always returns nil, satisfies awserr.Error interface.
924func (s *ConflictException) OrigErr() error {
925	return nil
926}
927
928func (s *ConflictException) Error() string {
929	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
930}
931
932// Status code returns the HTTP status code for the request's response error.
933func (s *ConflictException) StatusCode() int {
934	return s.RespMetadata.StatusCode
935}
936
937// RequestID returns the service's response RequestID for request.
938func (s *ConflictException) RequestID() string {
939	return s.RespMetadata.RequestID
940}
941
942type CreateApplicationInput struct {
943	_ struct{} `type:"structure"`
944
945	// An optional description of the web application.
946	ApplicationDescription *string `locationName:"applicationDescription" min:"1" type:"string"`
947
948	// The name of the web application.
949	//
950	// ApplicationName is a required field
951	ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"`
952
953	// A unique case-sensitive identifier that you can provide to ensure the idempotency
954	// of the request. Don't reuse this client token if a new idempotent request
955	// is required.
956	ClientToken *string `locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
957
958	// The ARN of the role that the web application assumes when it interacts with
959	// AWS IoT Core.
960	//
961	// The name of the role must be in the form AWSIotFleetHub_random_string .
962	//
963	// RoleArn is a required field
964	RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
965
966	// A set of key/value pairs that you can use to manage the web application resource.
967	Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
968}
969
970// String returns the string representation
971func (s CreateApplicationInput) String() string {
972	return awsutil.Prettify(s)
973}
974
975// GoString returns the string representation
976func (s CreateApplicationInput) GoString() string {
977	return s.String()
978}
979
980// Validate inspects the fields of the type to determine if they are valid.
981func (s *CreateApplicationInput) Validate() error {
982	invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"}
983	if s.ApplicationDescription != nil && len(*s.ApplicationDescription) < 1 {
984		invalidParams.Add(request.NewErrParamMinLen("ApplicationDescription", 1))
985	}
986	if s.ApplicationName == nil {
987		invalidParams.Add(request.NewErrParamRequired("ApplicationName"))
988	}
989	if s.ApplicationName != nil && len(*s.ApplicationName) < 1 {
990		invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1))
991	}
992	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
993		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
994	}
995	if s.RoleArn == nil {
996		invalidParams.Add(request.NewErrParamRequired("RoleArn"))
997	}
998	if s.RoleArn != nil && len(*s.RoleArn) < 1 {
999		invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
1000	}
1001	if s.Tags != nil && len(s.Tags) < 1 {
1002		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
1003	}
1004
1005	if invalidParams.Len() > 0 {
1006		return invalidParams
1007	}
1008	return nil
1009}
1010
1011// SetApplicationDescription sets the ApplicationDescription field's value.
1012func (s *CreateApplicationInput) SetApplicationDescription(v string) *CreateApplicationInput {
1013	s.ApplicationDescription = &v
1014	return s
1015}
1016
1017// SetApplicationName sets the ApplicationName field's value.
1018func (s *CreateApplicationInput) SetApplicationName(v string) *CreateApplicationInput {
1019	s.ApplicationName = &v
1020	return s
1021}
1022
1023// SetClientToken sets the ClientToken field's value.
1024func (s *CreateApplicationInput) SetClientToken(v string) *CreateApplicationInput {
1025	s.ClientToken = &v
1026	return s
1027}
1028
1029// SetRoleArn sets the RoleArn field's value.
1030func (s *CreateApplicationInput) SetRoleArn(v string) *CreateApplicationInput {
1031	s.RoleArn = &v
1032	return s
1033}
1034
1035// SetTags sets the Tags field's value.
1036func (s *CreateApplicationInput) SetTags(v map[string]*string) *CreateApplicationInput {
1037	s.Tags = v
1038	return s
1039}
1040
1041type CreateApplicationOutput struct {
1042	_ struct{} `type:"structure"`
1043
1044	// The ARN of the web application.
1045	//
1046	// ApplicationArn is a required field
1047	ApplicationArn *string `locationName:"applicationArn" min:"1" type:"string" required:"true"`
1048
1049	// The unique Id of the web application.
1050	//
1051	// ApplicationId is a required field
1052	ApplicationId *string `locationName:"applicationId" min:"36" type:"string" required:"true"`
1053}
1054
1055// String returns the string representation
1056func (s CreateApplicationOutput) String() string {
1057	return awsutil.Prettify(s)
1058}
1059
1060// GoString returns the string representation
1061func (s CreateApplicationOutput) GoString() string {
1062	return s.String()
1063}
1064
1065// SetApplicationArn sets the ApplicationArn field's value.
1066func (s *CreateApplicationOutput) SetApplicationArn(v string) *CreateApplicationOutput {
1067	s.ApplicationArn = &v
1068	return s
1069}
1070
1071// SetApplicationId sets the ApplicationId field's value.
1072func (s *CreateApplicationOutput) SetApplicationId(v string) *CreateApplicationOutput {
1073	s.ApplicationId = &v
1074	return s
1075}
1076
1077type DeleteApplicationInput struct {
1078	_ struct{} `type:"structure"`
1079
1080	// The unique Id of the web application.
1081	//
1082	// ApplicationId is a required field
1083	ApplicationId *string `location:"uri" locationName:"applicationId" min:"36" type:"string" required:"true"`
1084
1085	// A unique case-sensitive identifier that you can provide to ensure the idempotency
1086	// of the request. Don't reuse this client token if a new idempotent request
1087	// is required.
1088	ClientToken *string `location:"querystring" locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
1089}
1090
1091// String returns the string representation
1092func (s DeleteApplicationInput) String() string {
1093	return awsutil.Prettify(s)
1094}
1095
1096// GoString returns the string representation
1097func (s DeleteApplicationInput) GoString() string {
1098	return s.String()
1099}
1100
1101// Validate inspects the fields of the type to determine if they are valid.
1102func (s *DeleteApplicationInput) Validate() error {
1103	invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"}
1104	if s.ApplicationId == nil {
1105		invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
1106	}
1107	if s.ApplicationId != nil && len(*s.ApplicationId) < 36 {
1108		invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 36))
1109	}
1110	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
1111		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
1112	}
1113
1114	if invalidParams.Len() > 0 {
1115		return invalidParams
1116	}
1117	return nil
1118}
1119
1120// SetApplicationId sets the ApplicationId field's value.
1121func (s *DeleteApplicationInput) SetApplicationId(v string) *DeleteApplicationInput {
1122	s.ApplicationId = &v
1123	return s
1124}
1125
1126// SetClientToken sets the ClientToken field's value.
1127func (s *DeleteApplicationInput) SetClientToken(v string) *DeleteApplicationInput {
1128	s.ClientToken = &v
1129	return s
1130}
1131
1132type DeleteApplicationOutput struct {
1133	_ struct{} `type:"structure"`
1134}
1135
1136// String returns the string representation
1137func (s DeleteApplicationOutput) String() string {
1138	return awsutil.Prettify(s)
1139}
1140
1141// GoString returns the string representation
1142func (s DeleteApplicationOutput) GoString() string {
1143	return s.String()
1144}
1145
1146type DescribeApplicationInput struct {
1147	_ struct{} `type:"structure"`
1148
1149	// The unique Id of the web application.
1150	//
1151	// ApplicationId is a required field
1152	ApplicationId *string `location:"uri" locationName:"applicationId" min:"36" type:"string" required:"true"`
1153}
1154
1155// String returns the string representation
1156func (s DescribeApplicationInput) String() string {
1157	return awsutil.Prettify(s)
1158}
1159
1160// GoString returns the string representation
1161func (s DescribeApplicationInput) GoString() string {
1162	return s.String()
1163}
1164
1165// Validate inspects the fields of the type to determine if they are valid.
1166func (s *DescribeApplicationInput) Validate() error {
1167	invalidParams := request.ErrInvalidParams{Context: "DescribeApplicationInput"}
1168	if s.ApplicationId == nil {
1169		invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
1170	}
1171	if s.ApplicationId != nil && len(*s.ApplicationId) < 36 {
1172		invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 36))
1173	}
1174
1175	if invalidParams.Len() > 0 {
1176		return invalidParams
1177	}
1178	return nil
1179}
1180
1181// SetApplicationId sets the ApplicationId field's value.
1182func (s *DescribeApplicationInput) SetApplicationId(v string) *DescribeApplicationInput {
1183	s.ApplicationId = &v
1184	return s
1185}
1186
1187type DescribeApplicationOutput struct {
1188	_ struct{} `type:"structure"`
1189
1190	// The ARN of the web application.
1191	//
1192	// ApplicationArn is a required field
1193	ApplicationArn *string `locationName:"applicationArn" min:"1" type:"string" required:"true"`
1194
1195	// The date (in Unix epoch time) when the application was created.
1196	//
1197	// ApplicationCreationDate is a required field
1198	ApplicationCreationDate *int64 `locationName:"applicationCreationDate" type:"long" required:"true"`
1199
1200	// An optional description of the web application.
1201	ApplicationDescription *string `locationName:"applicationDescription" min:"1" type:"string"`
1202
1203	// The unique Id of the web application.
1204	//
1205	// ApplicationId is a required field
1206	ApplicationId *string `locationName:"applicationId" min:"36" type:"string" required:"true"`
1207
1208	// The date (in Unix epoch time) when the application was last updated.
1209	//
1210	// ApplicationLastUpdateDate is a required field
1211	ApplicationLastUpdateDate *int64 `locationName:"applicationLastUpdateDate" type:"long" required:"true"`
1212
1213	// The name of the web application.
1214	//
1215	// ApplicationName is a required field
1216	ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"`
1217
1218	// The current state of the web application.
1219	//
1220	// ApplicationState is a required field
1221	ApplicationState *string `locationName:"applicationState" type:"string" required:"true" enum:"ApplicationState"`
1222
1223	// The URL of the web application.
1224	//
1225	// ApplicationUrl is a required field
1226	ApplicationUrl *string `locationName:"applicationUrl" min:"1" type:"string" required:"true"`
1227
1228	// A message indicating why the DescribeApplication API failed.
1229	ErrorMessage *string `locationName:"errorMessage" type:"string"`
1230
1231	// The ARN of the role that the web application assumes when it interacts with
1232	// AWS IoT Core.
1233	//
1234	// RoleArn is a required field
1235	RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
1236
1237	// The Id of the single sign-on client that you use to authenticate and authorize
1238	// users on the web application.
1239	SsoClientId *string `locationName:"ssoClientId" type:"string"`
1240
1241	// A set of key/value pairs that you can use to manage the web application resource.
1242	Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
1243}
1244
1245// String returns the string representation
1246func (s DescribeApplicationOutput) String() string {
1247	return awsutil.Prettify(s)
1248}
1249
1250// GoString returns the string representation
1251func (s DescribeApplicationOutput) GoString() string {
1252	return s.String()
1253}
1254
1255// SetApplicationArn sets the ApplicationArn field's value.
1256func (s *DescribeApplicationOutput) SetApplicationArn(v string) *DescribeApplicationOutput {
1257	s.ApplicationArn = &v
1258	return s
1259}
1260
1261// SetApplicationCreationDate sets the ApplicationCreationDate field's value.
1262func (s *DescribeApplicationOutput) SetApplicationCreationDate(v int64) *DescribeApplicationOutput {
1263	s.ApplicationCreationDate = &v
1264	return s
1265}
1266
1267// SetApplicationDescription sets the ApplicationDescription field's value.
1268func (s *DescribeApplicationOutput) SetApplicationDescription(v string) *DescribeApplicationOutput {
1269	s.ApplicationDescription = &v
1270	return s
1271}
1272
1273// SetApplicationId sets the ApplicationId field's value.
1274func (s *DescribeApplicationOutput) SetApplicationId(v string) *DescribeApplicationOutput {
1275	s.ApplicationId = &v
1276	return s
1277}
1278
1279// SetApplicationLastUpdateDate sets the ApplicationLastUpdateDate field's value.
1280func (s *DescribeApplicationOutput) SetApplicationLastUpdateDate(v int64) *DescribeApplicationOutput {
1281	s.ApplicationLastUpdateDate = &v
1282	return s
1283}
1284
1285// SetApplicationName sets the ApplicationName field's value.
1286func (s *DescribeApplicationOutput) SetApplicationName(v string) *DescribeApplicationOutput {
1287	s.ApplicationName = &v
1288	return s
1289}
1290
1291// SetApplicationState sets the ApplicationState field's value.
1292func (s *DescribeApplicationOutput) SetApplicationState(v string) *DescribeApplicationOutput {
1293	s.ApplicationState = &v
1294	return s
1295}
1296
1297// SetApplicationUrl sets the ApplicationUrl field's value.
1298func (s *DescribeApplicationOutput) SetApplicationUrl(v string) *DescribeApplicationOutput {
1299	s.ApplicationUrl = &v
1300	return s
1301}
1302
1303// SetErrorMessage sets the ErrorMessage field's value.
1304func (s *DescribeApplicationOutput) SetErrorMessage(v string) *DescribeApplicationOutput {
1305	s.ErrorMessage = &v
1306	return s
1307}
1308
1309// SetRoleArn sets the RoleArn field's value.
1310func (s *DescribeApplicationOutput) SetRoleArn(v string) *DescribeApplicationOutput {
1311	s.RoleArn = &v
1312	return s
1313}
1314
1315// SetSsoClientId sets the SsoClientId field's value.
1316func (s *DescribeApplicationOutput) SetSsoClientId(v string) *DescribeApplicationOutput {
1317	s.SsoClientId = &v
1318	return s
1319}
1320
1321// SetTags sets the Tags field's value.
1322func (s *DescribeApplicationOutput) SetTags(v map[string]*string) *DescribeApplicationOutput {
1323	s.Tags = v
1324	return s
1325}
1326
1327// An unexpected error has occurred.
1328type InternalFailureException struct {
1329	_            struct{}                  `type:"structure"`
1330	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1331
1332	Message_ *string `locationName:"message" type:"string"`
1333}
1334
1335// String returns the string representation
1336func (s InternalFailureException) String() string {
1337	return awsutil.Prettify(s)
1338}
1339
1340// GoString returns the string representation
1341func (s InternalFailureException) GoString() string {
1342	return s.String()
1343}
1344
1345func newErrorInternalFailureException(v protocol.ResponseMetadata) error {
1346	return &InternalFailureException{
1347		RespMetadata: v,
1348	}
1349}
1350
1351// Code returns the exception type name.
1352func (s *InternalFailureException) Code() string {
1353	return "InternalFailureException"
1354}
1355
1356// Message returns the exception's message.
1357func (s *InternalFailureException) Message() string {
1358	if s.Message_ != nil {
1359		return *s.Message_
1360	}
1361	return ""
1362}
1363
1364// OrigErr always returns nil, satisfies awserr.Error interface.
1365func (s *InternalFailureException) OrigErr() error {
1366	return nil
1367}
1368
1369func (s *InternalFailureException) Error() string {
1370	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1371}
1372
1373// Status code returns the HTTP status code for the request's response error.
1374func (s *InternalFailureException) StatusCode() int {
1375	return s.RespMetadata.StatusCode
1376}
1377
1378// RequestID returns the service's response RequestID for request.
1379func (s *InternalFailureException) RequestID() string {
1380	return s.RespMetadata.RequestID
1381}
1382
1383// The request is not valid.
1384type InvalidRequestException struct {
1385	_            struct{}                  `type:"structure"`
1386	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1387
1388	Message_ *string `locationName:"message" type:"string"`
1389}
1390
1391// String returns the string representation
1392func (s InvalidRequestException) String() string {
1393	return awsutil.Prettify(s)
1394}
1395
1396// GoString returns the string representation
1397func (s InvalidRequestException) GoString() string {
1398	return s.String()
1399}
1400
1401func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
1402	return &InvalidRequestException{
1403		RespMetadata: v,
1404	}
1405}
1406
1407// Code returns the exception type name.
1408func (s *InvalidRequestException) Code() string {
1409	return "InvalidRequestException"
1410}
1411
1412// Message returns the exception's message.
1413func (s *InvalidRequestException) Message() string {
1414	if s.Message_ != nil {
1415		return *s.Message_
1416	}
1417	return ""
1418}
1419
1420// OrigErr always returns nil, satisfies awserr.Error interface.
1421func (s *InvalidRequestException) OrigErr() error {
1422	return nil
1423}
1424
1425func (s *InvalidRequestException) Error() string {
1426	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1427}
1428
1429// Status code returns the HTTP status code for the request's response error.
1430func (s *InvalidRequestException) StatusCode() int {
1431	return s.RespMetadata.StatusCode
1432}
1433
1434// RequestID returns the service's response RequestID for request.
1435func (s *InvalidRequestException) RequestID() string {
1436	return s.RespMetadata.RequestID
1437}
1438
1439// A limit has been exceeded.
1440type LimitExceededException struct {
1441	_            struct{}                  `type:"structure"`
1442	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1443
1444	Message_ *string `locationName:"message" type:"string"`
1445}
1446
1447// String returns the string representation
1448func (s LimitExceededException) String() string {
1449	return awsutil.Prettify(s)
1450}
1451
1452// GoString returns the string representation
1453func (s LimitExceededException) GoString() string {
1454	return s.String()
1455}
1456
1457func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
1458	return &LimitExceededException{
1459		RespMetadata: v,
1460	}
1461}
1462
1463// Code returns the exception type name.
1464func (s *LimitExceededException) Code() string {
1465	return "LimitExceededException"
1466}
1467
1468// Message returns the exception's message.
1469func (s *LimitExceededException) Message() string {
1470	if s.Message_ != nil {
1471		return *s.Message_
1472	}
1473	return ""
1474}
1475
1476// OrigErr always returns nil, satisfies awserr.Error interface.
1477func (s *LimitExceededException) OrigErr() error {
1478	return nil
1479}
1480
1481func (s *LimitExceededException) Error() string {
1482	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1483}
1484
1485// Status code returns the HTTP status code for the request's response error.
1486func (s *LimitExceededException) StatusCode() int {
1487	return s.RespMetadata.StatusCode
1488}
1489
1490// RequestID returns the service's response RequestID for request.
1491func (s *LimitExceededException) RequestID() string {
1492	return s.RespMetadata.RequestID
1493}
1494
1495type ListApplicationsInput struct {
1496	_ struct{} `type:"structure"`
1497
1498	// A token used to get the next set of results.
1499	NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"`
1500}
1501
1502// String returns the string representation
1503func (s ListApplicationsInput) String() string {
1504	return awsutil.Prettify(s)
1505}
1506
1507// GoString returns the string representation
1508func (s ListApplicationsInput) GoString() string {
1509	return s.String()
1510}
1511
1512// Validate inspects the fields of the type to determine if they are valid.
1513func (s *ListApplicationsInput) Validate() error {
1514	invalidParams := request.ErrInvalidParams{Context: "ListApplicationsInput"}
1515	if s.NextToken != nil && len(*s.NextToken) < 1 {
1516		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
1517	}
1518
1519	if invalidParams.Len() > 0 {
1520		return invalidParams
1521	}
1522	return nil
1523}
1524
1525// SetNextToken sets the NextToken field's value.
1526func (s *ListApplicationsInput) SetNextToken(v string) *ListApplicationsInput {
1527	s.NextToken = &v
1528	return s
1529}
1530
1531type ListApplicationsOutput struct {
1532	_ struct{} `type:"structure"`
1533
1534	// An array of objects that provide summaries of information about the web applications
1535	// in the list.
1536	ApplicationSummaries []*ApplicationSummary `locationName:"applicationSummaries" type:"list"`
1537
1538	// A token used to get the next set of results.
1539	NextToken *string `locationName:"nextToken" min:"1" type:"string"`
1540}
1541
1542// String returns the string representation
1543func (s ListApplicationsOutput) String() string {
1544	return awsutil.Prettify(s)
1545}
1546
1547// GoString returns the string representation
1548func (s ListApplicationsOutput) GoString() string {
1549	return s.String()
1550}
1551
1552// SetApplicationSummaries sets the ApplicationSummaries field's value.
1553func (s *ListApplicationsOutput) SetApplicationSummaries(v []*ApplicationSummary) *ListApplicationsOutput {
1554	s.ApplicationSummaries = v
1555	return s
1556}
1557
1558// SetNextToken sets the NextToken field's value.
1559func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput {
1560	s.NextToken = &v
1561	return s
1562}
1563
1564type ListTagsForResourceInput struct {
1565	_ struct{} `type:"structure"`
1566
1567	// The ARN of the resource.
1568	//
1569	// ResourceArn is a required field
1570	ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
1571}
1572
1573// String returns the string representation
1574func (s ListTagsForResourceInput) String() string {
1575	return awsutil.Prettify(s)
1576}
1577
1578// GoString returns the string representation
1579func (s ListTagsForResourceInput) GoString() string {
1580	return s.String()
1581}
1582
1583// Validate inspects the fields of the type to determine if they are valid.
1584func (s *ListTagsForResourceInput) Validate() error {
1585	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
1586	if s.ResourceArn == nil {
1587		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
1588	}
1589	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
1590		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
1591	}
1592
1593	if invalidParams.Len() > 0 {
1594		return invalidParams
1595	}
1596	return nil
1597}
1598
1599// SetResourceArn sets the ResourceArn field's value.
1600func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
1601	s.ResourceArn = &v
1602	return s
1603}
1604
1605type ListTagsForResourceOutput struct {
1606	_ struct{} `type:"structure"`
1607
1608	// The list of tags assigned to the resource.
1609	Tags map[string]*string `locationName:"tags" min:"1" type:"map"`
1610}
1611
1612// String returns the string representation
1613func (s ListTagsForResourceOutput) String() string {
1614	return awsutil.Prettify(s)
1615}
1616
1617// GoString returns the string representation
1618func (s ListTagsForResourceOutput) GoString() string {
1619	return s.String()
1620}
1621
1622// SetTags sets the Tags field's value.
1623func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput {
1624	s.Tags = v
1625	return s
1626}
1627
1628// The specified resource does not exist.
1629type ResourceNotFoundException struct {
1630	_            struct{}                  `type:"structure"`
1631	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1632
1633	Message_ *string `locationName:"message" type:"string"`
1634}
1635
1636// String returns the string representation
1637func (s ResourceNotFoundException) String() string {
1638	return awsutil.Prettify(s)
1639}
1640
1641// GoString returns the string representation
1642func (s ResourceNotFoundException) GoString() string {
1643	return s.String()
1644}
1645
1646func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
1647	return &ResourceNotFoundException{
1648		RespMetadata: v,
1649	}
1650}
1651
1652// Code returns the exception type name.
1653func (s *ResourceNotFoundException) Code() string {
1654	return "ResourceNotFoundException"
1655}
1656
1657// Message returns the exception's message.
1658func (s *ResourceNotFoundException) Message() string {
1659	if s.Message_ != nil {
1660		return *s.Message_
1661	}
1662	return ""
1663}
1664
1665// OrigErr always returns nil, satisfies awserr.Error interface.
1666func (s *ResourceNotFoundException) OrigErr() error {
1667	return nil
1668}
1669
1670func (s *ResourceNotFoundException) Error() string {
1671	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1672}
1673
1674// Status code returns the HTTP status code for the request's response error.
1675func (s *ResourceNotFoundException) StatusCode() int {
1676	return s.RespMetadata.StatusCode
1677}
1678
1679// RequestID returns the service's response RequestID for request.
1680func (s *ResourceNotFoundException) RequestID() string {
1681	return s.RespMetadata.RequestID
1682}
1683
1684type TagResourceInput struct {
1685	_ struct{} `type:"structure"`
1686
1687	// The ARN of the resource.
1688	//
1689	// ResourceArn is a required field
1690	ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
1691
1692	// The new or modified tags for the resource.
1693	//
1694	// Tags is a required field
1695	Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"`
1696}
1697
1698// String returns the string representation
1699func (s TagResourceInput) String() string {
1700	return awsutil.Prettify(s)
1701}
1702
1703// GoString returns the string representation
1704func (s TagResourceInput) GoString() string {
1705	return s.String()
1706}
1707
1708// Validate inspects the fields of the type to determine if they are valid.
1709func (s *TagResourceInput) Validate() error {
1710	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
1711	if s.ResourceArn == nil {
1712		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
1713	}
1714	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
1715		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
1716	}
1717	if s.Tags == nil {
1718		invalidParams.Add(request.NewErrParamRequired("Tags"))
1719	}
1720	if s.Tags != nil && len(s.Tags) < 1 {
1721		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
1722	}
1723
1724	if invalidParams.Len() > 0 {
1725		return invalidParams
1726	}
1727	return nil
1728}
1729
1730// SetResourceArn sets the ResourceArn field's value.
1731func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
1732	s.ResourceArn = &v
1733	return s
1734}
1735
1736// SetTags sets the Tags field's value.
1737func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
1738	s.Tags = v
1739	return s
1740}
1741
1742type TagResourceOutput struct {
1743	_ struct{} `type:"structure"`
1744}
1745
1746// String returns the string representation
1747func (s TagResourceOutput) String() string {
1748	return awsutil.Prettify(s)
1749}
1750
1751// GoString returns the string representation
1752func (s TagResourceOutput) GoString() string {
1753	return s.String()
1754}
1755
1756// The rate exceeds the limit.
1757type ThrottlingException struct {
1758	_            struct{}                  `type:"structure"`
1759	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1760
1761	Message_ *string `locationName:"message" type:"string"`
1762}
1763
1764// String returns the string representation
1765func (s ThrottlingException) String() string {
1766	return awsutil.Prettify(s)
1767}
1768
1769// GoString returns the string representation
1770func (s ThrottlingException) GoString() string {
1771	return s.String()
1772}
1773
1774func newErrorThrottlingException(v protocol.ResponseMetadata) error {
1775	return &ThrottlingException{
1776		RespMetadata: v,
1777	}
1778}
1779
1780// Code returns the exception type name.
1781func (s *ThrottlingException) Code() string {
1782	return "ThrottlingException"
1783}
1784
1785// Message returns the exception's message.
1786func (s *ThrottlingException) Message() string {
1787	if s.Message_ != nil {
1788		return *s.Message_
1789	}
1790	return ""
1791}
1792
1793// OrigErr always returns nil, satisfies awserr.Error interface.
1794func (s *ThrottlingException) OrigErr() error {
1795	return nil
1796}
1797
1798func (s *ThrottlingException) Error() string {
1799	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1800}
1801
1802// Status code returns the HTTP status code for the request's response error.
1803func (s *ThrottlingException) StatusCode() int {
1804	return s.RespMetadata.StatusCode
1805}
1806
1807// RequestID returns the service's response RequestID for request.
1808func (s *ThrottlingException) RequestID() string {
1809	return s.RespMetadata.RequestID
1810}
1811
1812type UntagResourceInput struct {
1813	_ struct{} `type:"structure"`
1814
1815	// The ARN of the resource.
1816	//
1817	// ResourceArn is a required field
1818	ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"`
1819
1820	// A list of the keys of the tags to be removed from the resource.
1821	//
1822	// TagKeys is a required field
1823	TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"`
1824}
1825
1826// String returns the string representation
1827func (s UntagResourceInput) String() string {
1828	return awsutil.Prettify(s)
1829}
1830
1831// GoString returns the string representation
1832func (s UntagResourceInput) GoString() string {
1833	return s.String()
1834}
1835
1836// Validate inspects the fields of the type to determine if they are valid.
1837func (s *UntagResourceInput) Validate() error {
1838	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
1839	if s.ResourceArn == nil {
1840		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
1841	}
1842	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
1843		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
1844	}
1845	if s.TagKeys == nil {
1846		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
1847	}
1848
1849	if invalidParams.Len() > 0 {
1850		return invalidParams
1851	}
1852	return nil
1853}
1854
1855// SetResourceArn sets the ResourceArn field's value.
1856func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
1857	s.ResourceArn = &v
1858	return s
1859}
1860
1861// SetTagKeys sets the TagKeys field's value.
1862func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
1863	s.TagKeys = v
1864	return s
1865}
1866
1867type UntagResourceOutput struct {
1868	_ struct{} `type:"structure"`
1869}
1870
1871// String returns the string representation
1872func (s UntagResourceOutput) String() string {
1873	return awsutil.Prettify(s)
1874}
1875
1876// GoString returns the string representation
1877func (s UntagResourceOutput) GoString() string {
1878	return s.String()
1879}
1880
1881type UpdateApplicationInput struct {
1882	_ struct{} `type:"structure"`
1883
1884	// An optional description of the web application.
1885	ApplicationDescription *string `locationName:"applicationDescription" min:"1" type:"string"`
1886
1887	// The unique Id of the web application.
1888	//
1889	// ApplicationId is a required field
1890	ApplicationId *string `location:"uri" locationName:"applicationId" min:"36" type:"string" required:"true"`
1891
1892	// The name of the web application.
1893	ApplicationName *string `locationName:"applicationName" min:"1" type:"string"`
1894
1895	// A unique case-sensitive identifier that you can provide to ensure the idempotency
1896	// of the request. Don't reuse this client token if a new idempotent request
1897	// is required.
1898	ClientToken *string `locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
1899}
1900
1901// String returns the string representation
1902func (s UpdateApplicationInput) String() string {
1903	return awsutil.Prettify(s)
1904}
1905
1906// GoString returns the string representation
1907func (s UpdateApplicationInput) GoString() string {
1908	return s.String()
1909}
1910
1911// Validate inspects the fields of the type to determine if they are valid.
1912func (s *UpdateApplicationInput) Validate() error {
1913	invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"}
1914	if s.ApplicationDescription != nil && len(*s.ApplicationDescription) < 1 {
1915		invalidParams.Add(request.NewErrParamMinLen("ApplicationDescription", 1))
1916	}
1917	if s.ApplicationId == nil {
1918		invalidParams.Add(request.NewErrParamRequired("ApplicationId"))
1919	}
1920	if s.ApplicationId != nil && len(*s.ApplicationId) < 36 {
1921		invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 36))
1922	}
1923	if s.ApplicationName != nil && len(*s.ApplicationName) < 1 {
1924		invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1))
1925	}
1926	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
1927		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
1928	}
1929
1930	if invalidParams.Len() > 0 {
1931		return invalidParams
1932	}
1933	return nil
1934}
1935
1936// SetApplicationDescription sets the ApplicationDescription field's value.
1937func (s *UpdateApplicationInput) SetApplicationDescription(v string) *UpdateApplicationInput {
1938	s.ApplicationDescription = &v
1939	return s
1940}
1941
1942// SetApplicationId sets the ApplicationId field's value.
1943func (s *UpdateApplicationInput) SetApplicationId(v string) *UpdateApplicationInput {
1944	s.ApplicationId = &v
1945	return s
1946}
1947
1948// SetApplicationName sets the ApplicationName field's value.
1949func (s *UpdateApplicationInput) SetApplicationName(v string) *UpdateApplicationInput {
1950	s.ApplicationName = &v
1951	return s
1952}
1953
1954// SetClientToken sets the ClientToken field's value.
1955func (s *UpdateApplicationInput) SetClientToken(v string) *UpdateApplicationInput {
1956	s.ClientToken = &v
1957	return s
1958}
1959
1960type UpdateApplicationOutput struct {
1961	_ struct{} `type:"structure"`
1962}
1963
1964// String returns the string representation
1965func (s UpdateApplicationOutput) String() string {
1966	return awsutil.Prettify(s)
1967}
1968
1969// GoString returns the string representation
1970func (s UpdateApplicationOutput) GoString() string {
1971	return s.String()
1972}
1973
1974const (
1975	// ApplicationStateCreating is a ApplicationState enum value
1976	ApplicationStateCreating = "CREATING"
1977
1978	// ApplicationStateDeleting is a ApplicationState enum value
1979	ApplicationStateDeleting = "DELETING"
1980
1981	// ApplicationStateActive is a ApplicationState enum value
1982	ApplicationStateActive = "ACTIVE"
1983
1984	// ApplicationStateCreateFailed is a ApplicationState enum value
1985	ApplicationStateCreateFailed = "CREATE_FAILED"
1986
1987	// ApplicationStateDeleteFailed is a ApplicationState enum value
1988	ApplicationStateDeleteFailed = "DELETE_FAILED"
1989)
1990
1991// ApplicationState_Values returns all elements of the ApplicationState enum
1992func ApplicationState_Values() []string {
1993	return []string{
1994		ApplicationStateCreating,
1995		ApplicationStateDeleting,
1996		ApplicationStateActive,
1997		ApplicationStateCreateFailed,
1998		ApplicationStateDeleteFailed,
1999	}
2000}
2001