1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package marketplacecatalog
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)
12
13const opCancelChangeSet = "CancelChangeSet"
14
15// CancelChangeSetRequest generates a "aws/request.Request" representing the
16// client's request for the CancelChangeSet operation. The "output" return
17// value will be populated with the request's response once the request completes
18// successfully.
19//
20// Use "Send" method on the returned Request to send the API call to the service.
21// the "output" return value is not valid until after Send returns without error.
22//
23// See CancelChangeSet for more information on using the CancelChangeSet
24// API call, and error handling.
25//
26// This method is useful when you want to inject custom logic or configuration
27// into the SDK's request lifecycle. Such as custom headers, or retry logic.
28//
29//
30//    // Example sending a request using the CancelChangeSetRequest method.
31//    req, resp := client.CancelChangeSetRequest(params)
32//
33//    err := req.Send()
34//    if err == nil { // resp is now filled
35//        fmt.Println(resp)
36//    }
37//
38// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/CancelChangeSet
39func (c *MarketplaceCatalog) CancelChangeSetRequest(input *CancelChangeSetInput) (req *request.Request, output *CancelChangeSetOutput) {
40	op := &request.Operation{
41		Name:       opCancelChangeSet,
42		HTTPMethod: "PATCH",
43		HTTPPath:   "/CancelChangeSet",
44	}
45
46	if input == nil {
47		input = &CancelChangeSetInput{}
48	}
49
50	output = &CancelChangeSetOutput{}
51	req = c.newRequest(op, input, output)
52	return
53}
54
55// CancelChangeSet API operation for AWS Marketplace Catalog Service.
56//
57// Used to cancel an open change request. Must be sent before the status of
58// the request changes to APPLYING, the final stage of completing your change
59// request. You can describe a change during the 60-day request history retention
60// period for API calls.
61//
62// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
63// with awserr.Error's Code and Message methods to get detailed information about
64// the error.
65//
66// See the AWS API reference guide for AWS Marketplace Catalog Service's
67// API operation CancelChangeSet for usage and error information.
68//
69// Returned Error Codes:
70//   * ErrCodeInternalServiceException "InternalServiceException"
71//   There was an internal service exception.
72//
73//   * ErrCodeAccessDeniedException "AccessDeniedException"
74//   Access is denied.
75//
76//   * ErrCodeValidationException "ValidationException"
77//   An error occurred during validation.
78//
79//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
80//   The specified resource wasn't found.
81//
82//   * ErrCodeResourceInUseException "ResourceInUseException"
83//   The resource is currently in use.
84//
85//   * ErrCodeThrottlingException "ThrottlingException"
86//   Too many requests.
87//
88// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/CancelChangeSet
89func (c *MarketplaceCatalog) CancelChangeSet(input *CancelChangeSetInput) (*CancelChangeSetOutput, error) {
90	req, out := c.CancelChangeSetRequest(input)
91	return out, req.Send()
92}
93
94// CancelChangeSetWithContext is the same as CancelChangeSet with the addition of
95// the ability to pass a context and additional request options.
96//
97// See CancelChangeSet for details on how to use this API operation.
98//
99// The context must be non-nil and will be used for request cancellation. If
100// the context is nil a panic will occur. In the future the SDK may create
101// sub-contexts for http.Requests. See https://golang.org/pkg/context/
102// for more information on using Contexts.
103func (c *MarketplaceCatalog) CancelChangeSetWithContext(ctx aws.Context, input *CancelChangeSetInput, opts ...request.Option) (*CancelChangeSetOutput, error) {
104	req, out := c.CancelChangeSetRequest(input)
105	req.SetContext(ctx)
106	req.ApplyOptions(opts...)
107	return out, req.Send()
108}
109
110const opDescribeChangeSet = "DescribeChangeSet"
111
112// DescribeChangeSetRequest generates a "aws/request.Request" representing the
113// client's request for the DescribeChangeSet operation. The "output" return
114// value will be populated with the request's response once the request completes
115// successfully.
116//
117// Use "Send" method on the returned Request to send the API call to the service.
118// the "output" return value is not valid until after Send returns without error.
119//
120// See DescribeChangeSet for more information on using the DescribeChangeSet
121// API call, and error handling.
122//
123// This method is useful when you want to inject custom logic or configuration
124// into the SDK's request lifecycle. Such as custom headers, or retry logic.
125//
126//
127//    // Example sending a request using the DescribeChangeSetRequest method.
128//    req, resp := client.DescribeChangeSetRequest(params)
129//
130//    err := req.Send()
131//    if err == nil { // resp is now filled
132//        fmt.Println(resp)
133//    }
134//
135// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/DescribeChangeSet
136func (c *MarketplaceCatalog) DescribeChangeSetRequest(input *DescribeChangeSetInput) (req *request.Request, output *DescribeChangeSetOutput) {
137	op := &request.Operation{
138		Name:       opDescribeChangeSet,
139		HTTPMethod: "GET",
140		HTTPPath:   "/DescribeChangeSet",
141	}
142
143	if input == nil {
144		input = &DescribeChangeSetInput{}
145	}
146
147	output = &DescribeChangeSetOutput{}
148	req = c.newRequest(op, input, output)
149	return
150}
151
152// DescribeChangeSet API operation for AWS Marketplace Catalog Service.
153//
154// Provides information about a given change set.
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 Marketplace Catalog Service's
161// API operation DescribeChangeSet for usage and error information.
162//
163// Returned Error Codes:
164//   * ErrCodeInternalServiceException "InternalServiceException"
165//   There was an internal service exception.
166//
167//   * ErrCodeAccessDeniedException "AccessDeniedException"
168//   Access is denied.
169//
170//   * ErrCodeValidationException "ValidationException"
171//   An error occurred during validation.
172//
173//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
174//   The specified resource wasn't found.
175//
176//   * ErrCodeThrottlingException "ThrottlingException"
177//   Too many requests.
178//
179// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/DescribeChangeSet
180func (c *MarketplaceCatalog) DescribeChangeSet(input *DescribeChangeSetInput) (*DescribeChangeSetOutput, error) {
181	req, out := c.DescribeChangeSetRequest(input)
182	return out, req.Send()
183}
184
185// DescribeChangeSetWithContext is the same as DescribeChangeSet with the addition of
186// the ability to pass a context and additional request options.
187//
188// See DescribeChangeSet for details on how to use this API operation.
189//
190// The context must be non-nil and will be used for request cancellation. If
191// the context is nil a panic will occur. In the future the SDK may create
192// sub-contexts for http.Requests. See https://golang.org/pkg/context/
193// for more information on using Contexts.
194func (c *MarketplaceCatalog) DescribeChangeSetWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.Option) (*DescribeChangeSetOutput, error) {
195	req, out := c.DescribeChangeSetRequest(input)
196	req.SetContext(ctx)
197	req.ApplyOptions(opts...)
198	return out, req.Send()
199}
200
201const opDescribeEntity = "DescribeEntity"
202
203// DescribeEntityRequest generates a "aws/request.Request" representing the
204// client's request for the DescribeEntity operation. The "output" return
205// value will be populated with the request's response once the request completes
206// successfully.
207//
208// Use "Send" method on the returned Request to send the API call to the service.
209// the "output" return value is not valid until after Send returns without error.
210//
211// See DescribeEntity for more information on using the DescribeEntity
212// API call, and error handling.
213//
214// This method is useful when you want to inject custom logic or configuration
215// into the SDK's request lifecycle. Such as custom headers, or retry logic.
216//
217//
218//    // Example sending a request using the DescribeEntityRequest method.
219//    req, resp := client.DescribeEntityRequest(params)
220//
221//    err := req.Send()
222//    if err == nil { // resp is now filled
223//        fmt.Println(resp)
224//    }
225//
226// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/DescribeEntity
227func (c *MarketplaceCatalog) DescribeEntityRequest(input *DescribeEntityInput) (req *request.Request, output *DescribeEntityOutput) {
228	op := &request.Operation{
229		Name:       opDescribeEntity,
230		HTTPMethod: "GET",
231		HTTPPath:   "/DescribeEntity",
232	}
233
234	if input == nil {
235		input = &DescribeEntityInput{}
236	}
237
238	output = &DescribeEntityOutput{}
239	req = c.newRequest(op, input, output)
240	return
241}
242
243// DescribeEntity API operation for AWS Marketplace Catalog Service.
244//
245// Returns the metadata and content of the entity.
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 Marketplace Catalog Service's
252// API operation DescribeEntity for usage and error information.
253//
254// Returned Error Codes:
255//   * ErrCodeInternalServiceException "InternalServiceException"
256//   There was an internal service exception.
257//
258//   * ErrCodeAccessDeniedException "AccessDeniedException"
259//   Access is denied.
260//
261//   * ErrCodeValidationException "ValidationException"
262//   An error occurred during validation.
263//
264//   * ErrCodeResourceNotSupportedException "ResourceNotSupportedException"
265//   Currently, the specified resource is not supported.
266//
267//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
268//   The specified resource wasn't found.
269//
270//   * ErrCodeThrottlingException "ThrottlingException"
271//   Too many requests.
272//
273// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/DescribeEntity
274func (c *MarketplaceCatalog) DescribeEntity(input *DescribeEntityInput) (*DescribeEntityOutput, error) {
275	req, out := c.DescribeEntityRequest(input)
276	return out, req.Send()
277}
278
279// DescribeEntityWithContext is the same as DescribeEntity with the addition of
280// the ability to pass a context and additional request options.
281//
282// See DescribeEntity for details on how to use this API operation.
283//
284// The context must be non-nil and will be used for request cancellation. If
285// the context is nil a panic will occur. In the future the SDK may create
286// sub-contexts for http.Requests. See https://golang.org/pkg/context/
287// for more information on using Contexts.
288func (c *MarketplaceCatalog) DescribeEntityWithContext(ctx aws.Context, input *DescribeEntityInput, opts ...request.Option) (*DescribeEntityOutput, error) {
289	req, out := c.DescribeEntityRequest(input)
290	req.SetContext(ctx)
291	req.ApplyOptions(opts...)
292	return out, req.Send()
293}
294
295const opListChangeSets = "ListChangeSets"
296
297// ListChangeSetsRequest generates a "aws/request.Request" representing the
298// client's request for the ListChangeSets operation. The "output" return
299// value will be populated with the request's response once the request completes
300// successfully.
301//
302// Use "Send" method on the returned Request to send the API call to the service.
303// the "output" return value is not valid until after Send returns without error.
304//
305// See ListChangeSets for more information on using the ListChangeSets
306// API call, and error handling.
307//
308// This method is useful when you want to inject custom logic or configuration
309// into the SDK's request lifecycle. Such as custom headers, or retry logic.
310//
311//
312//    // Example sending a request using the ListChangeSetsRequest method.
313//    req, resp := client.ListChangeSetsRequest(params)
314//
315//    err := req.Send()
316//    if err == nil { // resp is now filled
317//        fmt.Println(resp)
318//    }
319//
320// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/ListChangeSets
321func (c *MarketplaceCatalog) ListChangeSetsRequest(input *ListChangeSetsInput) (req *request.Request, output *ListChangeSetsOutput) {
322	op := &request.Operation{
323		Name:       opListChangeSets,
324		HTTPMethod: "POST",
325		HTTPPath:   "/ListChangeSets",
326		Paginator: &request.Paginator{
327			InputTokens:     []string{"NextToken"},
328			OutputTokens:    []string{"NextToken"},
329			LimitToken:      "MaxResults",
330			TruncationToken: "",
331		},
332	}
333
334	if input == nil {
335		input = &ListChangeSetsInput{}
336	}
337
338	output = &ListChangeSetsOutput{}
339	req = c.newRequest(op, input, output)
340	return
341}
342
343// ListChangeSets API operation for AWS Marketplace Catalog Service.
344//
345// Returns the list of change sets owned by the account being used to make the
346// call. You can filter this list by providing any combination of entityId,
347// ChangeSetName, and status. If you provide more than one filter, the API operation
348// applies a logical AND between the filters.
349//
350// You can describe a change during the 60-day request history retention period
351// for API calls.
352//
353// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
354// with awserr.Error's Code and Message methods to get detailed information about
355// the error.
356//
357// See the AWS API reference guide for AWS Marketplace Catalog Service's
358// API operation ListChangeSets for usage and error information.
359//
360// Returned Error Codes:
361//   * ErrCodeInternalServiceException "InternalServiceException"
362//   There was an internal service exception.
363//
364//   * ErrCodeAccessDeniedException "AccessDeniedException"
365//   Access is denied.
366//
367//   * ErrCodeValidationException "ValidationException"
368//   An error occurred during validation.
369//
370//   * ErrCodeThrottlingException "ThrottlingException"
371//   Too many requests.
372//
373// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/ListChangeSets
374func (c *MarketplaceCatalog) ListChangeSets(input *ListChangeSetsInput) (*ListChangeSetsOutput, error) {
375	req, out := c.ListChangeSetsRequest(input)
376	return out, req.Send()
377}
378
379// ListChangeSetsWithContext is the same as ListChangeSets with the addition of
380// the ability to pass a context and additional request options.
381//
382// See ListChangeSets for details on how to use this API operation.
383//
384// The context must be non-nil and will be used for request cancellation. If
385// the context is nil a panic will occur. In the future the SDK may create
386// sub-contexts for http.Requests. See https://golang.org/pkg/context/
387// for more information on using Contexts.
388func (c *MarketplaceCatalog) ListChangeSetsWithContext(ctx aws.Context, input *ListChangeSetsInput, opts ...request.Option) (*ListChangeSetsOutput, error) {
389	req, out := c.ListChangeSetsRequest(input)
390	req.SetContext(ctx)
391	req.ApplyOptions(opts...)
392	return out, req.Send()
393}
394
395// ListChangeSetsPages iterates over the pages of a ListChangeSets operation,
396// calling the "fn" function with the response data for each page. To stop
397// iterating, return false from the fn function.
398//
399// See ListChangeSets method for more information on how to use this operation.
400//
401// Note: This operation can generate multiple requests to a service.
402//
403//    // Example iterating over at most 3 pages of a ListChangeSets operation.
404//    pageNum := 0
405//    err := client.ListChangeSetsPages(params,
406//        func(page *marketplacecatalog.ListChangeSetsOutput, lastPage bool) bool {
407//            pageNum++
408//            fmt.Println(page)
409//            return pageNum <= 3
410//        })
411//
412func (c *MarketplaceCatalog) ListChangeSetsPages(input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool) error {
413	return c.ListChangeSetsPagesWithContext(aws.BackgroundContext(), input, fn)
414}
415
416// ListChangeSetsPagesWithContext same as ListChangeSetsPages except
417// it takes a Context and allows setting request options on the pages.
418//
419// The context must be non-nil and will be used for request cancellation. If
420// the context is nil a panic will occur. In the future the SDK may create
421// sub-contexts for http.Requests. See https://golang.org/pkg/context/
422// for more information on using Contexts.
423func (c *MarketplaceCatalog) ListChangeSetsPagesWithContext(ctx aws.Context, input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool, opts ...request.Option) error {
424	p := request.Pagination{
425		NewRequest: func() (*request.Request, error) {
426			var inCpy *ListChangeSetsInput
427			if input != nil {
428				tmp := *input
429				inCpy = &tmp
430			}
431			req, _ := c.ListChangeSetsRequest(inCpy)
432			req.SetContext(ctx)
433			req.ApplyOptions(opts...)
434			return req, nil
435		},
436	}
437
438	for p.Next() {
439		if !fn(p.Page().(*ListChangeSetsOutput), !p.HasNextPage()) {
440			break
441		}
442	}
443
444	return p.Err()
445}
446
447const opListEntities = "ListEntities"
448
449// ListEntitiesRequest generates a "aws/request.Request" representing the
450// client's request for the ListEntities operation. The "output" return
451// value will be populated with the request's response once the request completes
452// successfully.
453//
454// Use "Send" method on the returned Request to send the API call to the service.
455// the "output" return value is not valid until after Send returns without error.
456//
457// See ListEntities for more information on using the ListEntities
458// API call, and error handling.
459//
460// This method is useful when you want to inject custom logic or configuration
461// into the SDK's request lifecycle. Such as custom headers, or retry logic.
462//
463//
464//    // Example sending a request using the ListEntitiesRequest method.
465//    req, resp := client.ListEntitiesRequest(params)
466//
467//    err := req.Send()
468//    if err == nil { // resp is now filled
469//        fmt.Println(resp)
470//    }
471//
472// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/ListEntities
473func (c *MarketplaceCatalog) ListEntitiesRequest(input *ListEntitiesInput) (req *request.Request, output *ListEntitiesOutput) {
474	op := &request.Operation{
475		Name:       opListEntities,
476		HTTPMethod: "POST",
477		HTTPPath:   "/ListEntities",
478		Paginator: &request.Paginator{
479			InputTokens:     []string{"NextToken"},
480			OutputTokens:    []string{"NextToken"},
481			LimitToken:      "MaxResults",
482			TruncationToken: "",
483		},
484	}
485
486	if input == nil {
487		input = &ListEntitiesInput{}
488	}
489
490	output = &ListEntitiesOutput{}
491	req = c.newRequest(op, input, output)
492	return
493}
494
495// ListEntities API operation for AWS Marketplace Catalog Service.
496//
497// Provides the list of entities of a given type.
498//
499// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
500// with awserr.Error's Code and Message methods to get detailed information about
501// the error.
502//
503// See the AWS API reference guide for AWS Marketplace Catalog Service's
504// API operation ListEntities for usage and error information.
505//
506// Returned Error Codes:
507//   * ErrCodeInternalServiceException "InternalServiceException"
508//   There was an internal service exception.
509//
510//   * ErrCodeAccessDeniedException "AccessDeniedException"
511//   Access is denied.
512//
513//   * ErrCodeValidationException "ValidationException"
514//   An error occurred during validation.
515//
516//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
517//   The specified resource wasn't found.
518//
519//   * ErrCodeThrottlingException "ThrottlingException"
520//   Too many requests.
521//
522// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/ListEntities
523func (c *MarketplaceCatalog) ListEntities(input *ListEntitiesInput) (*ListEntitiesOutput, error) {
524	req, out := c.ListEntitiesRequest(input)
525	return out, req.Send()
526}
527
528// ListEntitiesWithContext is the same as ListEntities with the addition of
529// the ability to pass a context and additional request options.
530//
531// See ListEntities for details on how to use this API operation.
532//
533// The context must be non-nil and will be used for request cancellation. If
534// the context is nil a panic will occur. In the future the SDK may create
535// sub-contexts for http.Requests. See https://golang.org/pkg/context/
536// for more information on using Contexts.
537func (c *MarketplaceCatalog) ListEntitiesWithContext(ctx aws.Context, input *ListEntitiesInput, opts ...request.Option) (*ListEntitiesOutput, error) {
538	req, out := c.ListEntitiesRequest(input)
539	req.SetContext(ctx)
540	req.ApplyOptions(opts...)
541	return out, req.Send()
542}
543
544// ListEntitiesPages iterates over the pages of a ListEntities operation,
545// calling the "fn" function with the response data for each page. To stop
546// iterating, return false from the fn function.
547//
548// See ListEntities method for more information on how to use this operation.
549//
550// Note: This operation can generate multiple requests to a service.
551//
552//    // Example iterating over at most 3 pages of a ListEntities operation.
553//    pageNum := 0
554//    err := client.ListEntitiesPages(params,
555//        func(page *marketplacecatalog.ListEntitiesOutput, lastPage bool) bool {
556//            pageNum++
557//            fmt.Println(page)
558//            return pageNum <= 3
559//        })
560//
561func (c *MarketplaceCatalog) ListEntitiesPages(input *ListEntitiesInput, fn func(*ListEntitiesOutput, bool) bool) error {
562	return c.ListEntitiesPagesWithContext(aws.BackgroundContext(), input, fn)
563}
564
565// ListEntitiesPagesWithContext same as ListEntitiesPages except
566// it takes a Context and allows setting request options on the pages.
567//
568// The context must be non-nil and will be used for request cancellation. If
569// the context is nil a panic will occur. In the future the SDK may create
570// sub-contexts for http.Requests. See https://golang.org/pkg/context/
571// for more information on using Contexts.
572func (c *MarketplaceCatalog) ListEntitiesPagesWithContext(ctx aws.Context, input *ListEntitiesInput, fn func(*ListEntitiesOutput, bool) bool, opts ...request.Option) error {
573	p := request.Pagination{
574		NewRequest: func() (*request.Request, error) {
575			var inCpy *ListEntitiesInput
576			if input != nil {
577				tmp := *input
578				inCpy = &tmp
579			}
580			req, _ := c.ListEntitiesRequest(inCpy)
581			req.SetContext(ctx)
582			req.ApplyOptions(opts...)
583			return req, nil
584		},
585	}
586
587	for p.Next() {
588		if !fn(p.Page().(*ListEntitiesOutput), !p.HasNextPage()) {
589			break
590		}
591	}
592
593	return p.Err()
594}
595
596const opStartChangeSet = "StartChangeSet"
597
598// StartChangeSetRequest generates a "aws/request.Request" representing the
599// client's request for the StartChangeSet operation. The "output" return
600// value will be populated with the request's response once the request completes
601// successfully.
602//
603// Use "Send" method on the returned Request to send the API call to the service.
604// the "output" return value is not valid until after Send returns without error.
605//
606// See StartChangeSet for more information on using the StartChangeSet
607// API call, and error handling.
608//
609// This method is useful when you want to inject custom logic or configuration
610// into the SDK's request lifecycle. Such as custom headers, or retry logic.
611//
612//
613//    // Example sending a request using the StartChangeSetRequest method.
614//    req, resp := client.StartChangeSetRequest(params)
615//
616//    err := req.Send()
617//    if err == nil { // resp is now filled
618//        fmt.Println(resp)
619//    }
620//
621// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/StartChangeSet
622func (c *MarketplaceCatalog) StartChangeSetRequest(input *StartChangeSetInput) (req *request.Request, output *StartChangeSetOutput) {
623	op := &request.Operation{
624		Name:       opStartChangeSet,
625		HTTPMethod: "POST",
626		HTTPPath:   "/StartChangeSet",
627	}
628
629	if input == nil {
630		input = &StartChangeSetInput{}
631	}
632
633	output = &StartChangeSetOutput{}
634	req = c.newRequest(op, input, output)
635	return
636}
637
638// StartChangeSet API operation for AWS Marketplace Catalog Service.
639//
640// This operation allows you to request changes in your entities.
641//
642// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
643// with awserr.Error's Code and Message methods to get detailed information about
644// the error.
645//
646// See the AWS API reference guide for AWS Marketplace Catalog Service's
647// API operation StartChangeSet for usage and error information.
648//
649// Returned Error Codes:
650//   * ErrCodeInternalServiceException "InternalServiceException"
651//   There was an internal service exception.
652//
653//   * ErrCodeAccessDeniedException "AccessDeniedException"
654//   Access is denied.
655//
656//   * ErrCodeValidationException "ValidationException"
657//   An error occurred during validation.
658//
659//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
660//   The specified resource wasn't found.
661//
662//   * ErrCodeResourceInUseException "ResourceInUseException"
663//   The resource is currently in use.
664//
665//   * ErrCodeThrottlingException "ThrottlingException"
666//   Too many requests.
667//
668//   * ErrCodeServiceQuotaExceededException "ServiceQuotaExceededException"
669//   The maximum number of open requests per account has been exceeded.
670//
671// See also, https://docs.aws.amazon.com/goto/WebAPI/marketplace-catalog-2018-09-17/StartChangeSet
672func (c *MarketplaceCatalog) StartChangeSet(input *StartChangeSetInput) (*StartChangeSetOutput, error) {
673	req, out := c.StartChangeSetRequest(input)
674	return out, req.Send()
675}
676
677// StartChangeSetWithContext is the same as StartChangeSet with the addition of
678// the ability to pass a context and additional request options.
679//
680// See StartChangeSet for details on how to use this API operation.
681//
682// The context must be non-nil and will be used for request cancellation. If
683// the context is nil a panic will occur. In the future the SDK may create
684// sub-contexts for http.Requests. See https://golang.org/pkg/context/
685// for more information on using Contexts.
686func (c *MarketplaceCatalog) StartChangeSetWithContext(ctx aws.Context, input *StartChangeSetInput, opts ...request.Option) (*StartChangeSetOutput, error) {
687	req, out := c.StartChangeSetRequest(input)
688	req.SetContext(ctx)
689	req.ApplyOptions(opts...)
690	return out, req.Send()
691}
692
693type CancelChangeSetInput struct {
694	_ struct{} `type:"structure"`
695
696	// Required. The catalog related to the request. Fixed value: AWSMarketplace.
697	//
698	// Catalog is a required field
699	Catalog *string `location:"querystring" locationName:"catalog" min:"1" type:"string" required:"true"`
700
701	// Required. The unique identifier of the StartChangeSet request that you want
702	// to cancel.
703	//
704	// ChangeSetId is a required field
705	ChangeSetId *string `location:"querystring" locationName:"changeSetId" min:"1" type:"string" required:"true"`
706}
707
708// String returns the string representation
709func (s CancelChangeSetInput) String() string {
710	return awsutil.Prettify(s)
711}
712
713// GoString returns the string representation
714func (s CancelChangeSetInput) GoString() string {
715	return s.String()
716}
717
718// Validate inspects the fields of the type to determine if they are valid.
719func (s *CancelChangeSetInput) Validate() error {
720	invalidParams := request.ErrInvalidParams{Context: "CancelChangeSetInput"}
721	if s.Catalog == nil {
722		invalidParams.Add(request.NewErrParamRequired("Catalog"))
723	}
724	if s.Catalog != nil && len(*s.Catalog) < 1 {
725		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
726	}
727	if s.ChangeSetId == nil {
728		invalidParams.Add(request.NewErrParamRequired("ChangeSetId"))
729	}
730	if s.ChangeSetId != nil && len(*s.ChangeSetId) < 1 {
731		invalidParams.Add(request.NewErrParamMinLen("ChangeSetId", 1))
732	}
733
734	if invalidParams.Len() > 0 {
735		return invalidParams
736	}
737	return nil
738}
739
740// SetCatalog sets the Catalog field's value.
741func (s *CancelChangeSetInput) SetCatalog(v string) *CancelChangeSetInput {
742	s.Catalog = &v
743	return s
744}
745
746// SetChangeSetId sets the ChangeSetId field's value.
747func (s *CancelChangeSetInput) SetChangeSetId(v string) *CancelChangeSetInput {
748	s.ChangeSetId = &v
749	return s
750}
751
752type CancelChangeSetOutput struct {
753	_ struct{} `type:"structure"`
754
755	// The ARN associated with the change set referenced in this request.
756	ChangeSetArn *string `min:"1" type:"string"`
757
758	// The unique identifier for the change set referenced in this request.
759	ChangeSetId *string `min:"1" type:"string"`
760}
761
762// String returns the string representation
763func (s CancelChangeSetOutput) String() string {
764	return awsutil.Prettify(s)
765}
766
767// GoString returns the string representation
768func (s CancelChangeSetOutput) GoString() string {
769	return s.String()
770}
771
772// SetChangeSetArn sets the ChangeSetArn field's value.
773func (s *CancelChangeSetOutput) SetChangeSetArn(v string) *CancelChangeSetOutput {
774	s.ChangeSetArn = &v
775	return s
776}
777
778// SetChangeSetId sets the ChangeSetId field's value.
779func (s *CancelChangeSetOutput) SetChangeSetId(v string) *CancelChangeSetOutput {
780	s.ChangeSetId = &v
781	return s
782}
783
784// An object that contains the ChangeType, Details, and Entity.
785type Change struct {
786	_ struct{} `type:"structure"`
787
788	// Change types are single string values that describe your intention for the
789	// change. Each change type is unique for each EntityType provided in the change's
790	// scope.
791	//
792	// ChangeType is a required field
793	ChangeType *string `min:"1" type:"string" required:"true"`
794
795	// This object contains details specific to the change type of the requested
796	// change.
797	//
798	// Details is a required field
799	Details *string `min:"2" type:"string" required:"true"`
800
801	// The entity to be changed.
802	//
803	// Entity is a required field
804	Entity *Entity `type:"structure" required:"true"`
805}
806
807// String returns the string representation
808func (s Change) String() string {
809	return awsutil.Prettify(s)
810}
811
812// GoString returns the string representation
813func (s Change) GoString() string {
814	return s.String()
815}
816
817// Validate inspects the fields of the type to determine if they are valid.
818func (s *Change) Validate() error {
819	invalidParams := request.ErrInvalidParams{Context: "Change"}
820	if s.ChangeType == nil {
821		invalidParams.Add(request.NewErrParamRequired("ChangeType"))
822	}
823	if s.ChangeType != nil && len(*s.ChangeType) < 1 {
824		invalidParams.Add(request.NewErrParamMinLen("ChangeType", 1))
825	}
826	if s.Details == nil {
827		invalidParams.Add(request.NewErrParamRequired("Details"))
828	}
829	if s.Details != nil && len(*s.Details) < 2 {
830		invalidParams.Add(request.NewErrParamMinLen("Details", 2))
831	}
832	if s.Entity == nil {
833		invalidParams.Add(request.NewErrParamRequired("Entity"))
834	}
835	if s.Entity != nil {
836		if err := s.Entity.Validate(); err != nil {
837			invalidParams.AddNested("Entity", err.(request.ErrInvalidParams))
838		}
839	}
840
841	if invalidParams.Len() > 0 {
842		return invalidParams
843	}
844	return nil
845}
846
847// SetChangeType sets the ChangeType field's value.
848func (s *Change) SetChangeType(v string) *Change {
849	s.ChangeType = &v
850	return s
851}
852
853// SetDetails sets the Details field's value.
854func (s *Change) SetDetails(v string) *Change {
855	s.Details = &v
856	return s
857}
858
859// SetEntity sets the Entity field's value.
860func (s *Change) SetEntity(v *Entity) *Change {
861	s.Entity = v
862	return s
863}
864
865// A summary of a change set returned in a list of change sets when the ListChangeSets
866// action is called.
867type ChangeSetSummaryListItem struct {
868	_ struct{} `type:"structure"`
869
870	// The ARN associated with the unique identifier for the change set referenced
871	// in this request.
872	ChangeSetArn *string `min:"1" type:"string"`
873
874	// The unique identifier for a change set.
875	ChangeSetId *string `min:"1" type:"string"`
876
877	// The non-unique name for the change set.
878	ChangeSetName *string `min:"1" type:"string"`
879
880	// The time, in ISO 8601 format (2018-02-27T13:45:22Z), when the change set
881	// was finished.
882	EndTime *string `min:"20" type:"string"`
883
884	// This object is a list of entity IDs (string) that are a part of a change
885	// set. The entity ID list is a maximum of 20 entities. It must contain at least
886	// one entity.
887	EntityIdList []*string `type:"list"`
888
889	// The time, in ISO 8601 format (2018-02-27T13:45:22Z), when the change set
890	// was started.
891	StartTime *string `min:"20" type:"string"`
892
893	// The current status of the change set.
894	Status *string `type:"string" enum:"ChangeStatus"`
895}
896
897// String returns the string representation
898func (s ChangeSetSummaryListItem) String() string {
899	return awsutil.Prettify(s)
900}
901
902// GoString returns the string representation
903func (s ChangeSetSummaryListItem) GoString() string {
904	return s.String()
905}
906
907// SetChangeSetArn sets the ChangeSetArn field's value.
908func (s *ChangeSetSummaryListItem) SetChangeSetArn(v string) *ChangeSetSummaryListItem {
909	s.ChangeSetArn = &v
910	return s
911}
912
913// SetChangeSetId sets the ChangeSetId field's value.
914func (s *ChangeSetSummaryListItem) SetChangeSetId(v string) *ChangeSetSummaryListItem {
915	s.ChangeSetId = &v
916	return s
917}
918
919// SetChangeSetName sets the ChangeSetName field's value.
920func (s *ChangeSetSummaryListItem) SetChangeSetName(v string) *ChangeSetSummaryListItem {
921	s.ChangeSetName = &v
922	return s
923}
924
925// SetEndTime sets the EndTime field's value.
926func (s *ChangeSetSummaryListItem) SetEndTime(v string) *ChangeSetSummaryListItem {
927	s.EndTime = &v
928	return s
929}
930
931// SetEntityIdList sets the EntityIdList field's value.
932func (s *ChangeSetSummaryListItem) SetEntityIdList(v []*string) *ChangeSetSummaryListItem {
933	s.EntityIdList = v
934	return s
935}
936
937// SetStartTime sets the StartTime field's value.
938func (s *ChangeSetSummaryListItem) SetStartTime(v string) *ChangeSetSummaryListItem {
939	s.StartTime = &v
940	return s
941}
942
943// SetStatus sets the Status field's value.
944func (s *ChangeSetSummaryListItem) SetStatus(v string) *ChangeSetSummaryListItem {
945	s.Status = &v
946	return s
947}
948
949// This object is a container for common summary information about the change.
950// The summary doesn't contain the whole change structure.
951type ChangeSummary struct {
952	_ struct{} `type:"structure"`
953
954	// The type of the change.
955	ChangeType *string `min:"1" type:"string"`
956
957	// The entity to be changed.
958	Entity *Entity `type:"structure"`
959
960	// An array of ErrorDetail objects associated with the change.
961	ErrorDetailList []*ErrorDetail `type:"list"`
962}
963
964// String returns the string representation
965func (s ChangeSummary) String() string {
966	return awsutil.Prettify(s)
967}
968
969// GoString returns the string representation
970func (s ChangeSummary) GoString() string {
971	return s.String()
972}
973
974// SetChangeType sets the ChangeType field's value.
975func (s *ChangeSummary) SetChangeType(v string) *ChangeSummary {
976	s.ChangeType = &v
977	return s
978}
979
980// SetEntity sets the Entity field's value.
981func (s *ChangeSummary) SetEntity(v *Entity) *ChangeSummary {
982	s.Entity = v
983	return s
984}
985
986// SetErrorDetailList sets the ErrorDetailList field's value.
987func (s *ChangeSummary) SetErrorDetailList(v []*ErrorDetail) *ChangeSummary {
988	s.ErrorDetailList = v
989	return s
990}
991
992type DescribeChangeSetInput struct {
993	_ struct{} `type:"structure"`
994
995	// Required. The catalog related to the request. Fixed value: AWSMarketplace
996	//
997	// Catalog is a required field
998	Catalog *string `location:"querystring" locationName:"catalog" min:"1" type:"string" required:"true"`
999
1000	// Required. The unique identifier for the StartChangeSet request that you want
1001	// to describe the details for.
1002	//
1003	// ChangeSetId is a required field
1004	ChangeSetId *string `location:"querystring" locationName:"changeSetId" min:"1" type:"string" required:"true"`
1005}
1006
1007// String returns the string representation
1008func (s DescribeChangeSetInput) String() string {
1009	return awsutil.Prettify(s)
1010}
1011
1012// GoString returns the string representation
1013func (s DescribeChangeSetInput) GoString() string {
1014	return s.String()
1015}
1016
1017// Validate inspects the fields of the type to determine if they are valid.
1018func (s *DescribeChangeSetInput) Validate() error {
1019	invalidParams := request.ErrInvalidParams{Context: "DescribeChangeSetInput"}
1020	if s.Catalog == nil {
1021		invalidParams.Add(request.NewErrParamRequired("Catalog"))
1022	}
1023	if s.Catalog != nil && len(*s.Catalog) < 1 {
1024		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
1025	}
1026	if s.ChangeSetId == nil {
1027		invalidParams.Add(request.NewErrParamRequired("ChangeSetId"))
1028	}
1029	if s.ChangeSetId != nil && len(*s.ChangeSetId) < 1 {
1030		invalidParams.Add(request.NewErrParamMinLen("ChangeSetId", 1))
1031	}
1032
1033	if invalidParams.Len() > 0 {
1034		return invalidParams
1035	}
1036	return nil
1037}
1038
1039// SetCatalog sets the Catalog field's value.
1040func (s *DescribeChangeSetInput) SetCatalog(v string) *DescribeChangeSetInput {
1041	s.Catalog = &v
1042	return s
1043}
1044
1045// SetChangeSetId sets the ChangeSetId field's value.
1046func (s *DescribeChangeSetInput) SetChangeSetId(v string) *DescribeChangeSetInput {
1047	s.ChangeSetId = &v
1048	return s
1049}
1050
1051type DescribeChangeSetOutput struct {
1052	_ struct{} `type:"structure"`
1053
1054	// An array of ChangeSummary objects.
1055	ChangeSet []*ChangeSummary `type:"list"`
1056
1057	// The ARN associated with the unique identifier for the change set referenced
1058	// in this request.
1059	ChangeSetArn *string `min:"1" type:"string"`
1060
1061	// Required. The unique identifier for the change set referenced in this request.
1062	ChangeSetId *string `min:"1" type:"string"`
1063
1064	// The optional name provided in the StartChangeSet request. If you do not provide
1065	// a name, one is set by default.
1066	ChangeSetName *string `min:"1" type:"string"`
1067
1068	// The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the request
1069	// transitioned to a terminal state. The change cannot transition to a different
1070	// state. Null if the request is not in a terminal state.
1071	EndTime *string `min:"20" type:"string"`
1072
1073	// Returned if there is a failure on the change set, but that failure is not
1074	// related to any of the changes in the request.
1075	FailureDescription *string `type:"string"`
1076
1077	// The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the request
1078	// started.
1079	StartTime *string `min:"20" type:"string"`
1080
1081	// The status of the change request.
1082	Status *string `type:"string" enum:"ChangeStatus"`
1083}
1084
1085// String returns the string representation
1086func (s DescribeChangeSetOutput) String() string {
1087	return awsutil.Prettify(s)
1088}
1089
1090// GoString returns the string representation
1091func (s DescribeChangeSetOutput) GoString() string {
1092	return s.String()
1093}
1094
1095// SetChangeSet sets the ChangeSet field's value.
1096func (s *DescribeChangeSetOutput) SetChangeSet(v []*ChangeSummary) *DescribeChangeSetOutput {
1097	s.ChangeSet = v
1098	return s
1099}
1100
1101// SetChangeSetArn sets the ChangeSetArn field's value.
1102func (s *DescribeChangeSetOutput) SetChangeSetArn(v string) *DescribeChangeSetOutput {
1103	s.ChangeSetArn = &v
1104	return s
1105}
1106
1107// SetChangeSetId sets the ChangeSetId field's value.
1108func (s *DescribeChangeSetOutput) SetChangeSetId(v string) *DescribeChangeSetOutput {
1109	s.ChangeSetId = &v
1110	return s
1111}
1112
1113// SetChangeSetName sets the ChangeSetName field's value.
1114func (s *DescribeChangeSetOutput) SetChangeSetName(v string) *DescribeChangeSetOutput {
1115	s.ChangeSetName = &v
1116	return s
1117}
1118
1119// SetEndTime sets the EndTime field's value.
1120func (s *DescribeChangeSetOutput) SetEndTime(v string) *DescribeChangeSetOutput {
1121	s.EndTime = &v
1122	return s
1123}
1124
1125// SetFailureDescription sets the FailureDescription field's value.
1126func (s *DescribeChangeSetOutput) SetFailureDescription(v string) *DescribeChangeSetOutput {
1127	s.FailureDescription = &v
1128	return s
1129}
1130
1131// SetStartTime sets the StartTime field's value.
1132func (s *DescribeChangeSetOutput) SetStartTime(v string) *DescribeChangeSetOutput {
1133	s.StartTime = &v
1134	return s
1135}
1136
1137// SetStatus sets the Status field's value.
1138func (s *DescribeChangeSetOutput) SetStatus(v string) *DescribeChangeSetOutput {
1139	s.Status = &v
1140	return s
1141}
1142
1143type DescribeEntityInput struct {
1144	_ struct{} `type:"structure"`
1145
1146	// Required. The catalog related to the request. Fixed value: AWSMarketplace
1147	//
1148	// Catalog is a required field
1149	Catalog *string `location:"querystring" locationName:"catalog" min:"1" type:"string" required:"true"`
1150
1151	// Required. The unique ID of the entity to describe.
1152	//
1153	// EntityId is a required field
1154	EntityId *string `location:"querystring" locationName:"entityId" min:"1" type:"string" required:"true"`
1155}
1156
1157// String returns the string representation
1158func (s DescribeEntityInput) String() string {
1159	return awsutil.Prettify(s)
1160}
1161
1162// GoString returns the string representation
1163func (s DescribeEntityInput) GoString() string {
1164	return s.String()
1165}
1166
1167// Validate inspects the fields of the type to determine if they are valid.
1168func (s *DescribeEntityInput) Validate() error {
1169	invalidParams := request.ErrInvalidParams{Context: "DescribeEntityInput"}
1170	if s.Catalog == nil {
1171		invalidParams.Add(request.NewErrParamRequired("Catalog"))
1172	}
1173	if s.Catalog != nil && len(*s.Catalog) < 1 {
1174		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
1175	}
1176	if s.EntityId == nil {
1177		invalidParams.Add(request.NewErrParamRequired("EntityId"))
1178	}
1179	if s.EntityId != nil && len(*s.EntityId) < 1 {
1180		invalidParams.Add(request.NewErrParamMinLen("EntityId", 1))
1181	}
1182
1183	if invalidParams.Len() > 0 {
1184		return invalidParams
1185	}
1186	return nil
1187}
1188
1189// SetCatalog sets the Catalog field's value.
1190func (s *DescribeEntityInput) SetCatalog(v string) *DescribeEntityInput {
1191	s.Catalog = &v
1192	return s
1193}
1194
1195// SetEntityId sets the EntityId field's value.
1196func (s *DescribeEntityInput) SetEntityId(v string) *DescribeEntityInput {
1197	s.EntityId = &v
1198	return s
1199}
1200
1201type DescribeEntityOutput struct {
1202	_ struct{} `type:"structure"`
1203
1204	// This stringified JSON object includes the details of the entity.
1205	Details *string `min:"2" type:"string"`
1206
1207	// The ARN associated to the unique identifier for the change set referenced
1208	// in this request.
1209	EntityArn *string `min:"1" type:"string"`
1210
1211	// The identifier of the entity, in the format of EntityId@RevisionId.
1212	EntityIdentifier *string `min:"1" type:"string"`
1213
1214	// The named type of the entity, in the format of EntityType@Version.
1215	EntityType *string `min:"1" type:"string"`
1216
1217	// The last modified date of the entity, in ISO 8601 format (2018-02-27T13:45:22Z).
1218	LastModifiedDate *string `type:"string"`
1219}
1220
1221// String returns the string representation
1222func (s DescribeEntityOutput) String() string {
1223	return awsutil.Prettify(s)
1224}
1225
1226// GoString returns the string representation
1227func (s DescribeEntityOutput) GoString() string {
1228	return s.String()
1229}
1230
1231// SetDetails sets the Details field's value.
1232func (s *DescribeEntityOutput) SetDetails(v string) *DescribeEntityOutput {
1233	s.Details = &v
1234	return s
1235}
1236
1237// SetEntityArn sets the EntityArn field's value.
1238func (s *DescribeEntityOutput) SetEntityArn(v string) *DescribeEntityOutput {
1239	s.EntityArn = &v
1240	return s
1241}
1242
1243// SetEntityIdentifier sets the EntityIdentifier field's value.
1244func (s *DescribeEntityOutput) SetEntityIdentifier(v string) *DescribeEntityOutput {
1245	s.EntityIdentifier = &v
1246	return s
1247}
1248
1249// SetEntityType sets the EntityType field's value.
1250func (s *DescribeEntityOutput) SetEntityType(v string) *DescribeEntityOutput {
1251	s.EntityType = &v
1252	return s
1253}
1254
1255// SetLastModifiedDate sets the LastModifiedDate field's value.
1256func (s *DescribeEntityOutput) SetLastModifiedDate(v string) *DescribeEntityOutput {
1257	s.LastModifiedDate = &v
1258	return s
1259}
1260
1261// A product entity contains data that describes your product, its supported
1262// features, and how it can be used or launched by your customer.
1263type Entity struct {
1264	_ struct{} `type:"structure"`
1265
1266	// The identifier for the entity.
1267	Identifier *string `min:"1" type:"string"`
1268
1269	// The type of entity.
1270	//
1271	// Type is a required field
1272	Type *string `min:"1" type:"string" required:"true"`
1273}
1274
1275// String returns the string representation
1276func (s Entity) String() string {
1277	return awsutil.Prettify(s)
1278}
1279
1280// GoString returns the string representation
1281func (s Entity) GoString() string {
1282	return s.String()
1283}
1284
1285// Validate inspects the fields of the type to determine if they are valid.
1286func (s *Entity) Validate() error {
1287	invalidParams := request.ErrInvalidParams{Context: "Entity"}
1288	if s.Identifier != nil && len(*s.Identifier) < 1 {
1289		invalidParams.Add(request.NewErrParamMinLen("Identifier", 1))
1290	}
1291	if s.Type == nil {
1292		invalidParams.Add(request.NewErrParamRequired("Type"))
1293	}
1294	if s.Type != nil && len(*s.Type) < 1 {
1295		invalidParams.Add(request.NewErrParamMinLen("Type", 1))
1296	}
1297
1298	if invalidParams.Len() > 0 {
1299		return invalidParams
1300	}
1301	return nil
1302}
1303
1304// SetIdentifier sets the Identifier field's value.
1305func (s *Entity) SetIdentifier(v string) *Entity {
1306	s.Identifier = &v
1307	return s
1308}
1309
1310// SetType sets the Type field's value.
1311func (s *Entity) SetType(v string) *Entity {
1312	s.Type = &v
1313	return s
1314}
1315
1316// This object is a container for common summary information about the entity.
1317// The summary doesn't contain the whole entity structure, but it does contain
1318// information common across all entities.
1319type EntitySummary struct {
1320	_ struct{} `type:"structure"`
1321
1322	// The ARN associated with the unique identifier for the entity.
1323	EntityArn *string `min:"1" type:"string"`
1324
1325	// The unique identifier for the entity.
1326	EntityId *string `min:"1" type:"string"`
1327
1328	// The type of the entity.
1329	EntityType *string `min:"1" type:"string"`
1330
1331	// The last time the entity was published, using ISO 8601 format (2018-02-27T13:45:22Z).
1332	LastModifiedDate *string `type:"string"`
1333
1334	// The name for the entity. This value is not unique. It is defined by the provider.
1335	Name *string `type:"string"`
1336
1337	// The visibility status of the entity to subscribers. This value can be Public
1338	// (everyone can view the entity), Limited (the entity is visible to limited
1339	// accounts only), or Restricted (the entity was published and then unpublished
1340	// and only existing subscribers can view it).
1341	Visibility *string `type:"string"`
1342}
1343
1344// String returns the string representation
1345func (s EntitySummary) String() string {
1346	return awsutil.Prettify(s)
1347}
1348
1349// GoString returns the string representation
1350func (s EntitySummary) GoString() string {
1351	return s.String()
1352}
1353
1354// SetEntityArn sets the EntityArn field's value.
1355func (s *EntitySummary) SetEntityArn(v string) *EntitySummary {
1356	s.EntityArn = &v
1357	return s
1358}
1359
1360// SetEntityId sets the EntityId field's value.
1361func (s *EntitySummary) SetEntityId(v string) *EntitySummary {
1362	s.EntityId = &v
1363	return s
1364}
1365
1366// SetEntityType sets the EntityType field's value.
1367func (s *EntitySummary) SetEntityType(v string) *EntitySummary {
1368	s.EntityType = &v
1369	return s
1370}
1371
1372// SetLastModifiedDate sets the LastModifiedDate field's value.
1373func (s *EntitySummary) SetLastModifiedDate(v string) *EntitySummary {
1374	s.LastModifiedDate = &v
1375	return s
1376}
1377
1378// SetName sets the Name field's value.
1379func (s *EntitySummary) SetName(v string) *EntitySummary {
1380	s.Name = &v
1381	return s
1382}
1383
1384// SetVisibility sets the Visibility field's value.
1385func (s *EntitySummary) SetVisibility(v string) *EntitySummary {
1386	s.Visibility = &v
1387	return s
1388}
1389
1390// Details about the error.
1391type ErrorDetail struct {
1392	_ struct{} `type:"structure"`
1393
1394	// The error code that identifies the type of error.
1395	ErrorCode *string `type:"string"`
1396
1397	// The message for the error.
1398	ErrorMessage *string `type:"string"`
1399}
1400
1401// String returns the string representation
1402func (s ErrorDetail) String() string {
1403	return awsutil.Prettify(s)
1404}
1405
1406// GoString returns the string representation
1407func (s ErrorDetail) GoString() string {
1408	return s.String()
1409}
1410
1411// SetErrorCode sets the ErrorCode field's value.
1412func (s *ErrorDetail) SetErrorCode(v string) *ErrorDetail {
1413	s.ErrorCode = &v
1414	return s
1415}
1416
1417// SetErrorMessage sets the ErrorMessage field's value.
1418func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail {
1419	s.ErrorMessage = &v
1420	return s
1421}
1422
1423// A filter object, used to optionally filter results from calls to the ListEntities
1424// and ListChangeSets actions.
1425type Filter struct {
1426	_ struct{} `type:"structure"`
1427
1428	// For ListEntities, the supported value for this is an EntityId.
1429	//
1430	// For ListChangeSets, the supported values are as follows:
1431	Name *string `min:"1" type:"string"`
1432
1433	// ListEntities - This is a list of unique EntityIds.
1434	//
1435	// ListChangeSets - The supported filter names and associated ValueLists is
1436	// as follows:
1437	//
1438	//    * ChangeSetName - The supported ValueList is a list of non-unique ChangeSetNames.
1439	//    These are defined when you call the StartChangeSet action.
1440	//
1441	//    * Status - The supported ValueList is a list of statuses for all change
1442	//    set requests.
1443	//
1444	//    * EntityId - The supported ValueList is a list of unique EntityIds.
1445	//
1446	//    * BeforeStartTime - The supported ValueList is a list of all change sets
1447	//    that started before the filter value.
1448	//
1449	//    * AfterStartTime - The supported ValueList is a list of all change sets
1450	//    that started after the filter value.
1451	//
1452	//    * BeforeEndTime - The supported ValueList is a list of all change sets
1453	//    that ended before the filter value.
1454	//
1455	//    * AfterEndTime - The supported ValueList is a list of all change sets
1456	//    that ended after the filter value.
1457	ValueList []*string `min:"1" type:"list"`
1458}
1459
1460// String returns the string representation
1461func (s Filter) String() string {
1462	return awsutil.Prettify(s)
1463}
1464
1465// GoString returns the string representation
1466func (s Filter) GoString() string {
1467	return s.String()
1468}
1469
1470// Validate inspects the fields of the type to determine if they are valid.
1471func (s *Filter) Validate() error {
1472	invalidParams := request.ErrInvalidParams{Context: "Filter"}
1473	if s.Name != nil && len(*s.Name) < 1 {
1474		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
1475	}
1476	if s.ValueList != nil && len(s.ValueList) < 1 {
1477		invalidParams.Add(request.NewErrParamMinLen("ValueList", 1))
1478	}
1479
1480	if invalidParams.Len() > 0 {
1481		return invalidParams
1482	}
1483	return nil
1484}
1485
1486// SetName sets the Name field's value.
1487func (s *Filter) SetName(v string) *Filter {
1488	s.Name = &v
1489	return s
1490}
1491
1492// SetValueList sets the ValueList field's value.
1493func (s *Filter) SetValueList(v []*string) *Filter {
1494	s.ValueList = v
1495	return s
1496}
1497
1498type ListChangeSetsInput struct {
1499	_ struct{} `type:"structure"`
1500
1501	// The catalog related to the request. Fixed value: AWSMarketplace
1502	//
1503	// Catalog is a required field
1504	Catalog *string `min:"1" type:"string" required:"true"`
1505
1506	// An array of filter objects.
1507	FilterList []*Filter `min:"1" type:"list"`
1508
1509	// The maximum number of results returned by a single call. This value must
1510	// be provided in the next call to retrieve the next set of results. By default,
1511	// this value is 20.
1512	MaxResults *int64 `min:"1" type:"integer"`
1513
1514	// The token value retrieved from a previous call to access the next page of
1515	// results.
1516	NextToken *string `min:"1" type:"string"`
1517
1518	// An object that contains two attributes, sortBy and sortOrder.
1519	Sort *Sort `type:"structure"`
1520}
1521
1522// String returns the string representation
1523func (s ListChangeSetsInput) String() string {
1524	return awsutil.Prettify(s)
1525}
1526
1527// GoString returns the string representation
1528func (s ListChangeSetsInput) GoString() string {
1529	return s.String()
1530}
1531
1532// Validate inspects the fields of the type to determine if they are valid.
1533func (s *ListChangeSetsInput) Validate() error {
1534	invalidParams := request.ErrInvalidParams{Context: "ListChangeSetsInput"}
1535	if s.Catalog == nil {
1536		invalidParams.Add(request.NewErrParamRequired("Catalog"))
1537	}
1538	if s.Catalog != nil && len(*s.Catalog) < 1 {
1539		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
1540	}
1541	if s.FilterList != nil && len(s.FilterList) < 1 {
1542		invalidParams.Add(request.NewErrParamMinLen("FilterList", 1))
1543	}
1544	if s.MaxResults != nil && *s.MaxResults < 1 {
1545		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
1546	}
1547	if s.NextToken != nil && len(*s.NextToken) < 1 {
1548		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
1549	}
1550	if s.FilterList != nil {
1551		for i, v := range s.FilterList {
1552			if v == nil {
1553				continue
1554			}
1555			if err := v.Validate(); err != nil {
1556				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FilterList", i), err.(request.ErrInvalidParams))
1557			}
1558		}
1559	}
1560	if s.Sort != nil {
1561		if err := s.Sort.Validate(); err != nil {
1562			invalidParams.AddNested("Sort", err.(request.ErrInvalidParams))
1563		}
1564	}
1565
1566	if invalidParams.Len() > 0 {
1567		return invalidParams
1568	}
1569	return nil
1570}
1571
1572// SetCatalog sets the Catalog field's value.
1573func (s *ListChangeSetsInput) SetCatalog(v string) *ListChangeSetsInput {
1574	s.Catalog = &v
1575	return s
1576}
1577
1578// SetFilterList sets the FilterList field's value.
1579func (s *ListChangeSetsInput) SetFilterList(v []*Filter) *ListChangeSetsInput {
1580	s.FilterList = v
1581	return s
1582}
1583
1584// SetMaxResults sets the MaxResults field's value.
1585func (s *ListChangeSetsInput) SetMaxResults(v int64) *ListChangeSetsInput {
1586	s.MaxResults = &v
1587	return s
1588}
1589
1590// SetNextToken sets the NextToken field's value.
1591func (s *ListChangeSetsInput) SetNextToken(v string) *ListChangeSetsInput {
1592	s.NextToken = &v
1593	return s
1594}
1595
1596// SetSort sets the Sort field's value.
1597func (s *ListChangeSetsInput) SetSort(v *Sort) *ListChangeSetsInput {
1598	s.Sort = v
1599	return s
1600}
1601
1602type ListChangeSetsOutput struct {
1603	_ struct{} `type:"structure"`
1604
1605	// Array of ChangeSetSummaryListItem objects.
1606	ChangeSetSummaryList []*ChangeSetSummaryListItem `type:"list"`
1607
1608	// The value of the next token, if it exists. Null if there are no more results.
1609	NextToken *string `min:"1" type:"string"`
1610}
1611
1612// String returns the string representation
1613func (s ListChangeSetsOutput) String() string {
1614	return awsutil.Prettify(s)
1615}
1616
1617// GoString returns the string representation
1618func (s ListChangeSetsOutput) GoString() string {
1619	return s.String()
1620}
1621
1622// SetChangeSetSummaryList sets the ChangeSetSummaryList field's value.
1623func (s *ListChangeSetsOutput) SetChangeSetSummaryList(v []*ChangeSetSummaryListItem) *ListChangeSetsOutput {
1624	s.ChangeSetSummaryList = v
1625	return s
1626}
1627
1628// SetNextToken sets the NextToken field's value.
1629func (s *ListChangeSetsOutput) SetNextToken(v string) *ListChangeSetsOutput {
1630	s.NextToken = &v
1631	return s
1632}
1633
1634type ListEntitiesInput struct {
1635	_ struct{} `type:"structure"`
1636
1637	// The catalog related to the request. Fixed value: AWSMarketplace
1638	//
1639	// Catalog is a required field
1640	Catalog *string `min:"1" type:"string" required:"true"`
1641
1642	// The type of entities to retrieve.
1643	//
1644	// EntityType is a required field
1645	EntityType *string `min:"1" type:"string" required:"true"`
1646
1647	// An array of filter objects. Each filter object contains two attributes, filterName
1648	// and filterValues.
1649	FilterList []*Filter `min:"1" type:"list"`
1650
1651	// Specifies the upper limit of the elements on a single page. If a value isn't
1652	// provided, the default value is 20.
1653	MaxResults *int64 `min:"1" type:"integer"`
1654
1655	// The value of the next token, if it exists. Null if there are no more results.
1656	NextToken *string `min:"1" type:"string"`
1657
1658	// An object that contains two attributes, sortBy and sortOrder.
1659	Sort *Sort `type:"structure"`
1660}
1661
1662// String returns the string representation
1663func (s ListEntitiesInput) String() string {
1664	return awsutil.Prettify(s)
1665}
1666
1667// GoString returns the string representation
1668func (s ListEntitiesInput) GoString() string {
1669	return s.String()
1670}
1671
1672// Validate inspects the fields of the type to determine if they are valid.
1673func (s *ListEntitiesInput) Validate() error {
1674	invalidParams := request.ErrInvalidParams{Context: "ListEntitiesInput"}
1675	if s.Catalog == nil {
1676		invalidParams.Add(request.NewErrParamRequired("Catalog"))
1677	}
1678	if s.Catalog != nil && len(*s.Catalog) < 1 {
1679		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
1680	}
1681	if s.EntityType == nil {
1682		invalidParams.Add(request.NewErrParamRequired("EntityType"))
1683	}
1684	if s.EntityType != nil && len(*s.EntityType) < 1 {
1685		invalidParams.Add(request.NewErrParamMinLen("EntityType", 1))
1686	}
1687	if s.FilterList != nil && len(s.FilterList) < 1 {
1688		invalidParams.Add(request.NewErrParamMinLen("FilterList", 1))
1689	}
1690	if s.MaxResults != nil && *s.MaxResults < 1 {
1691		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
1692	}
1693	if s.NextToken != nil && len(*s.NextToken) < 1 {
1694		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
1695	}
1696	if s.FilterList != nil {
1697		for i, v := range s.FilterList {
1698			if v == nil {
1699				continue
1700			}
1701			if err := v.Validate(); err != nil {
1702				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FilterList", i), err.(request.ErrInvalidParams))
1703			}
1704		}
1705	}
1706	if s.Sort != nil {
1707		if err := s.Sort.Validate(); err != nil {
1708			invalidParams.AddNested("Sort", err.(request.ErrInvalidParams))
1709		}
1710	}
1711
1712	if invalidParams.Len() > 0 {
1713		return invalidParams
1714	}
1715	return nil
1716}
1717
1718// SetCatalog sets the Catalog field's value.
1719func (s *ListEntitiesInput) SetCatalog(v string) *ListEntitiesInput {
1720	s.Catalog = &v
1721	return s
1722}
1723
1724// SetEntityType sets the EntityType field's value.
1725func (s *ListEntitiesInput) SetEntityType(v string) *ListEntitiesInput {
1726	s.EntityType = &v
1727	return s
1728}
1729
1730// SetFilterList sets the FilterList field's value.
1731func (s *ListEntitiesInput) SetFilterList(v []*Filter) *ListEntitiesInput {
1732	s.FilterList = v
1733	return s
1734}
1735
1736// SetMaxResults sets the MaxResults field's value.
1737func (s *ListEntitiesInput) SetMaxResults(v int64) *ListEntitiesInput {
1738	s.MaxResults = &v
1739	return s
1740}
1741
1742// SetNextToken sets the NextToken field's value.
1743func (s *ListEntitiesInput) SetNextToken(v string) *ListEntitiesInput {
1744	s.NextToken = &v
1745	return s
1746}
1747
1748// SetSort sets the Sort field's value.
1749func (s *ListEntitiesInput) SetSort(v *Sort) *ListEntitiesInput {
1750	s.Sort = v
1751	return s
1752}
1753
1754type ListEntitiesOutput struct {
1755	_ struct{} `type:"structure"`
1756
1757	// Array of EntitySummary object.
1758	EntitySummaryList []*EntitySummary `type:"list"`
1759
1760	// The value of the next token if it exists. Null if there is no more result.
1761	NextToken *string `min:"1" type:"string"`
1762}
1763
1764// String returns the string representation
1765func (s ListEntitiesOutput) String() string {
1766	return awsutil.Prettify(s)
1767}
1768
1769// GoString returns the string representation
1770func (s ListEntitiesOutput) GoString() string {
1771	return s.String()
1772}
1773
1774// SetEntitySummaryList sets the EntitySummaryList field's value.
1775func (s *ListEntitiesOutput) SetEntitySummaryList(v []*EntitySummary) *ListEntitiesOutput {
1776	s.EntitySummaryList = v
1777	return s
1778}
1779
1780// SetNextToken sets the NextToken field's value.
1781func (s *ListEntitiesOutput) SetNextToken(v string) *ListEntitiesOutput {
1782	s.NextToken = &v
1783	return s
1784}
1785
1786// An object that contains two attributes, sortBy and sortOrder.
1787type Sort struct {
1788	_ struct{} `type:"structure"`
1789
1790	// For ListEntities, supported attributes include LastModifiedDate (default),
1791	// Visibility, EntityId, and Name.
1792	//
1793	// For ListChangeSets, supported attributes include StartTime and EndTime.
1794	SortBy *string `min:"1" type:"string"`
1795
1796	// The sorting order. Can be ASCENDING or DESCENDING. The default value is DESCENDING.
1797	SortOrder *string `type:"string" enum:"SortOrder"`
1798}
1799
1800// String returns the string representation
1801func (s Sort) String() string {
1802	return awsutil.Prettify(s)
1803}
1804
1805// GoString returns the string representation
1806func (s Sort) GoString() string {
1807	return s.String()
1808}
1809
1810// Validate inspects the fields of the type to determine if they are valid.
1811func (s *Sort) Validate() error {
1812	invalidParams := request.ErrInvalidParams{Context: "Sort"}
1813	if s.SortBy != nil && len(*s.SortBy) < 1 {
1814		invalidParams.Add(request.NewErrParamMinLen("SortBy", 1))
1815	}
1816
1817	if invalidParams.Len() > 0 {
1818		return invalidParams
1819	}
1820	return nil
1821}
1822
1823// SetSortBy sets the SortBy field's value.
1824func (s *Sort) SetSortBy(v string) *Sort {
1825	s.SortBy = &v
1826	return s
1827}
1828
1829// SetSortOrder sets the SortOrder field's value.
1830func (s *Sort) SetSortOrder(v string) *Sort {
1831	s.SortOrder = &v
1832	return s
1833}
1834
1835type StartChangeSetInput struct {
1836	_ struct{} `type:"structure"`
1837
1838	// The catalog related to the request. Fixed value: AWSMarketplace
1839	//
1840	// Catalog is a required field
1841	Catalog *string `min:"1" type:"string" required:"true"`
1842
1843	// Array of change object.
1844	//
1845	// ChangeSet is a required field
1846	ChangeSet []*Change `min:"1" type:"list" required:"true"`
1847
1848	// Optional case sensitive string of up to 100 ASCII characters. The change
1849	// set name can be used to filter the list of change sets.
1850	ChangeSetName *string `min:"1" type:"string"`
1851
1852	// A unique token to identify the request to ensure idempotency.
1853	ClientRequestToken *string `min:"1" type:"string"`
1854}
1855
1856// String returns the string representation
1857func (s StartChangeSetInput) String() string {
1858	return awsutil.Prettify(s)
1859}
1860
1861// GoString returns the string representation
1862func (s StartChangeSetInput) GoString() string {
1863	return s.String()
1864}
1865
1866// Validate inspects the fields of the type to determine if they are valid.
1867func (s *StartChangeSetInput) Validate() error {
1868	invalidParams := request.ErrInvalidParams{Context: "StartChangeSetInput"}
1869	if s.Catalog == nil {
1870		invalidParams.Add(request.NewErrParamRequired("Catalog"))
1871	}
1872	if s.Catalog != nil && len(*s.Catalog) < 1 {
1873		invalidParams.Add(request.NewErrParamMinLen("Catalog", 1))
1874	}
1875	if s.ChangeSet == nil {
1876		invalidParams.Add(request.NewErrParamRequired("ChangeSet"))
1877	}
1878	if s.ChangeSet != nil && len(s.ChangeSet) < 1 {
1879		invalidParams.Add(request.NewErrParamMinLen("ChangeSet", 1))
1880	}
1881	if s.ChangeSetName != nil && len(*s.ChangeSetName) < 1 {
1882		invalidParams.Add(request.NewErrParamMinLen("ChangeSetName", 1))
1883	}
1884	if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
1885		invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
1886	}
1887	if s.ChangeSet != nil {
1888		for i, v := range s.ChangeSet {
1889			if v == nil {
1890				continue
1891			}
1892			if err := v.Validate(); err != nil {
1893				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ChangeSet", i), err.(request.ErrInvalidParams))
1894			}
1895		}
1896	}
1897
1898	if invalidParams.Len() > 0 {
1899		return invalidParams
1900	}
1901	return nil
1902}
1903
1904// SetCatalog sets the Catalog field's value.
1905func (s *StartChangeSetInput) SetCatalog(v string) *StartChangeSetInput {
1906	s.Catalog = &v
1907	return s
1908}
1909
1910// SetChangeSet sets the ChangeSet field's value.
1911func (s *StartChangeSetInput) SetChangeSet(v []*Change) *StartChangeSetInput {
1912	s.ChangeSet = v
1913	return s
1914}
1915
1916// SetChangeSetName sets the ChangeSetName field's value.
1917func (s *StartChangeSetInput) SetChangeSetName(v string) *StartChangeSetInput {
1918	s.ChangeSetName = &v
1919	return s
1920}
1921
1922// SetClientRequestToken sets the ClientRequestToken field's value.
1923func (s *StartChangeSetInput) SetClientRequestToken(v string) *StartChangeSetInput {
1924	s.ClientRequestToken = &v
1925	return s
1926}
1927
1928type StartChangeSetOutput struct {
1929	_ struct{} `type:"structure"`
1930
1931	// The ARN associated to the unique identifier generated for the request.
1932	ChangeSetArn *string `min:"1" type:"string"`
1933
1934	// Unique identifier generated for the request.
1935	ChangeSetId *string `min:"1" type:"string"`
1936}
1937
1938// String returns the string representation
1939func (s StartChangeSetOutput) String() string {
1940	return awsutil.Prettify(s)
1941}
1942
1943// GoString returns the string representation
1944func (s StartChangeSetOutput) GoString() string {
1945	return s.String()
1946}
1947
1948// SetChangeSetArn sets the ChangeSetArn field's value.
1949func (s *StartChangeSetOutput) SetChangeSetArn(v string) *StartChangeSetOutput {
1950	s.ChangeSetArn = &v
1951	return s
1952}
1953
1954// SetChangeSetId sets the ChangeSetId field's value.
1955func (s *StartChangeSetOutput) SetChangeSetId(v string) *StartChangeSetOutput {
1956	s.ChangeSetId = &v
1957	return s
1958}
1959
1960const (
1961	// ChangeStatusPreparing is a ChangeStatus enum value
1962	ChangeStatusPreparing = "PREPARING"
1963
1964	// ChangeStatusApplying is a ChangeStatus enum value
1965	ChangeStatusApplying = "APPLYING"
1966
1967	// ChangeStatusSucceeded is a ChangeStatus enum value
1968	ChangeStatusSucceeded = "SUCCEEDED"
1969
1970	// ChangeStatusCancelled is a ChangeStatus enum value
1971	ChangeStatusCancelled = "CANCELLED"
1972
1973	// ChangeStatusFailed is a ChangeStatus enum value
1974	ChangeStatusFailed = "FAILED"
1975)
1976
1977const (
1978	// SortOrderAscending is a SortOrder enum value
1979	SortOrderAscending = "ASCENDING"
1980
1981	// SortOrderDescending is a SortOrder enum value
1982	SortOrderDescending = "DESCENDING"
1983)
1984