1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package s3outposts
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/restjson"
14)
15
16const opCreateEndpoint = "CreateEndpoint"
17
18// CreateEndpointRequest generates a "aws/request.Request" representing the
19// client's request for the CreateEndpoint operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See CreateEndpoint for more information on using the CreateEndpoint
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the CreateEndpointRequest method.
34//    req, resp := client.CreateEndpointRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/CreateEndpoint
42func (c *S3Outposts) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) {
43	op := &request.Operation{
44		Name:       opCreateEndpoint,
45		HTTPMethod: "POST",
46		HTTPPath:   "/S3Outposts/CreateEndpoint",
47	}
48
49	if input == nil {
50		input = &CreateEndpointInput{}
51	}
52
53	output = &CreateEndpointOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// CreateEndpoint API operation for Amazon S3 on Outposts.
59//
60// S3 on Outposts access points simplify managing data access at scale for shared
61// datasets in Amazon S3 on Outposts. S3 on Outposts uses endpoints to connect
62// to Outposts buckets so that you can perform actions within your virtual private
63// cloud (VPC).
64//
65// This action creates an endpoint and associates it with the specified Outpost.
66//
67// Related actions include:
68//
69//    * DeleteEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html)
70//
71//    * ListEndpoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html)
72//
73// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
74// with awserr.Error's Code and Message methods to get detailed information about
75// the error.
76//
77// See the AWS API reference guide for Amazon S3 on Outposts's
78// API operation CreateEndpoint for usage and error information.
79//
80// Returned Error Types:
81//   * InternalServerException
82//   There was an exception with the internal server.
83//
84//   * ValidationException
85//   There was an exception validating this data.
86//
87//   * AccessDeniedException
88//   Access was denied for this action.
89//
90//   * ResourceNotFoundException
91//   The requested resource was not found.
92//
93//   * ConflictException
94//   There was a conflict with this action, and it could not be completed.
95//
96// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/CreateEndpoint
97func (c *S3Outposts) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) {
98	req, out := c.CreateEndpointRequest(input)
99	return out, req.Send()
100}
101
102// CreateEndpointWithContext is the same as CreateEndpoint with the addition of
103// the ability to pass a context and additional request options.
104//
105// See CreateEndpoint for details on how to use this API operation.
106//
107// The context must be non-nil and will be used for request cancellation. If
108// the context is nil a panic will occur. In the future the SDK may create
109// sub-contexts for http.Requests. See https://golang.org/pkg/context/
110// for more information on using Contexts.
111func (c *S3Outposts) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) {
112	req, out := c.CreateEndpointRequest(input)
113	req.SetContext(ctx)
114	req.ApplyOptions(opts...)
115	return out, req.Send()
116}
117
118const opDeleteEndpoint = "DeleteEndpoint"
119
120// DeleteEndpointRequest generates a "aws/request.Request" representing the
121// client's request for the DeleteEndpoint operation. The "output" return
122// value will be populated with the request's response once the request completes
123// successfully.
124//
125// Use "Send" method on the returned Request to send the API call to the service.
126// the "output" return value is not valid until after Send returns without error.
127//
128// See DeleteEndpoint for more information on using the DeleteEndpoint
129// API call, and error handling.
130//
131// This method is useful when you want to inject custom logic or configuration
132// into the SDK's request lifecycle. Such as custom headers, or retry logic.
133//
134//
135//    // Example sending a request using the DeleteEndpointRequest method.
136//    req, resp := client.DeleteEndpointRequest(params)
137//
138//    err := req.Send()
139//    if err == nil { // resp is now filled
140//        fmt.Println(resp)
141//    }
142//
143// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/DeleteEndpoint
144func (c *S3Outposts) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) {
145	op := &request.Operation{
146		Name:       opDeleteEndpoint,
147		HTTPMethod: "DELETE",
148		HTTPPath:   "/S3Outposts/DeleteEndpoint",
149	}
150
151	if input == nil {
152		input = &DeleteEndpointInput{}
153	}
154
155	output = &DeleteEndpointOutput{}
156	req = c.newRequest(op, input, output)
157	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
158	return
159}
160
161// DeleteEndpoint API operation for Amazon S3 on Outposts.
162//
163// S3 on Outposts access points simplify managing data access at scale for shared
164// datasets in Amazon S3 on Outposts. S3 on Outposts uses endpoints to connect
165// to Outposts buckets so that you can perform actions within your virtual private
166// cloud (VPC).
167//
168// This action deletes an endpoint.
169//
170// Related actions include:
171//
172//    * CreateEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html)
173//
174//    * ListEndpoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html)
175//
176// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
177// with awserr.Error's Code and Message methods to get detailed information about
178// the error.
179//
180// See the AWS API reference guide for Amazon S3 on Outposts's
181// API operation DeleteEndpoint for usage and error information.
182//
183// Returned Error Types:
184//   * InternalServerException
185//   There was an exception with the internal server.
186//
187//   * AccessDeniedException
188//   Access was denied for this action.
189//
190//   * ResourceNotFoundException
191//   The requested resource was not found.
192//
193//   * ValidationException
194//   There was an exception validating this data.
195//
196// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/DeleteEndpoint
197func (c *S3Outposts) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) {
198	req, out := c.DeleteEndpointRequest(input)
199	return out, req.Send()
200}
201
202// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of
203// the ability to pass a context and additional request options.
204//
205// See DeleteEndpoint for details on how to use this API operation.
206//
207// The context must be non-nil and will be used for request cancellation. If
208// the context is nil a panic will occur. In the future the SDK may create
209// sub-contexts for http.Requests. See https://golang.org/pkg/context/
210// for more information on using Contexts.
211func (c *S3Outposts) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) {
212	req, out := c.DeleteEndpointRequest(input)
213	req.SetContext(ctx)
214	req.ApplyOptions(opts...)
215	return out, req.Send()
216}
217
218const opListEndpoints = "ListEndpoints"
219
220// ListEndpointsRequest generates a "aws/request.Request" representing the
221// client's request for the ListEndpoints operation. The "output" return
222// value will be populated with the request's response once the request completes
223// successfully.
224//
225// Use "Send" method on the returned Request to send the API call to the service.
226// the "output" return value is not valid until after Send returns without error.
227//
228// See ListEndpoints for more information on using the ListEndpoints
229// API call, and error handling.
230//
231// This method is useful when you want to inject custom logic or configuration
232// into the SDK's request lifecycle. Such as custom headers, or retry logic.
233//
234//
235//    // Example sending a request using the ListEndpointsRequest method.
236//    req, resp := client.ListEndpointsRequest(params)
237//
238//    err := req.Send()
239//    if err == nil { // resp is now filled
240//        fmt.Println(resp)
241//    }
242//
243// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/ListEndpoints
244func (c *S3Outposts) ListEndpointsRequest(input *ListEndpointsInput) (req *request.Request, output *ListEndpointsOutput) {
245	op := &request.Operation{
246		Name:       opListEndpoints,
247		HTTPMethod: "GET",
248		HTTPPath:   "/S3Outposts/ListEndpoints",
249		Paginator: &request.Paginator{
250			InputTokens:     []string{"NextToken"},
251			OutputTokens:    []string{"NextToken"},
252			LimitToken:      "MaxResults",
253			TruncationToken: "",
254		},
255	}
256
257	if input == nil {
258		input = &ListEndpointsInput{}
259	}
260
261	output = &ListEndpointsOutput{}
262	req = c.newRequest(op, input, output)
263	return
264}
265
266// ListEndpoints API operation for Amazon S3 on Outposts.
267//
268// S3 on Outposts access points simplify managing data access at scale for shared
269// datasets in Amazon S3 on Outposts. S3 on Outposts uses endpoints to connect
270// to Outposts buckets so that you can perform actions within your virtual private
271// cloud (VPC).
272//
273// This action lists endpoints associated with the Outpost.
274//
275// Related actions include:
276//
277//    * CreateEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html)
278//
279//    * DeleteEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html)
280//
281// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
282// with awserr.Error's Code and Message methods to get detailed information about
283// the error.
284//
285// See the AWS API reference guide for Amazon S3 on Outposts's
286// API operation ListEndpoints for usage and error information.
287//
288// Returned Error Types:
289//   * InternalServerException
290//   There was an exception with the internal server.
291//
292//   * ResourceNotFoundException
293//   The requested resource was not found.
294//
295//   * AccessDeniedException
296//   Access was denied for this action.
297//
298//   * ValidationException
299//   There was an exception validating this data.
300//
301// See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/ListEndpoints
302func (c *S3Outposts) ListEndpoints(input *ListEndpointsInput) (*ListEndpointsOutput, error) {
303	req, out := c.ListEndpointsRequest(input)
304	return out, req.Send()
305}
306
307// ListEndpointsWithContext is the same as ListEndpoints with the addition of
308// the ability to pass a context and additional request options.
309//
310// See ListEndpoints for details on how to use this API operation.
311//
312// The context must be non-nil and will be used for request cancellation. If
313// the context is nil a panic will occur. In the future the SDK may create
314// sub-contexts for http.Requests. See https://golang.org/pkg/context/
315// for more information on using Contexts.
316func (c *S3Outposts) ListEndpointsWithContext(ctx aws.Context, input *ListEndpointsInput, opts ...request.Option) (*ListEndpointsOutput, error) {
317	req, out := c.ListEndpointsRequest(input)
318	req.SetContext(ctx)
319	req.ApplyOptions(opts...)
320	return out, req.Send()
321}
322
323// ListEndpointsPages iterates over the pages of a ListEndpoints operation,
324// calling the "fn" function with the response data for each page. To stop
325// iterating, return false from the fn function.
326//
327// See ListEndpoints method for more information on how to use this operation.
328//
329// Note: This operation can generate multiple requests to a service.
330//
331//    // Example iterating over at most 3 pages of a ListEndpoints operation.
332//    pageNum := 0
333//    err := client.ListEndpointsPages(params,
334//        func(page *s3outposts.ListEndpointsOutput, lastPage bool) bool {
335//            pageNum++
336//            fmt.Println(page)
337//            return pageNum <= 3
338//        })
339//
340func (c *S3Outposts) ListEndpointsPages(input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool) error {
341	return c.ListEndpointsPagesWithContext(aws.BackgroundContext(), input, fn)
342}
343
344// ListEndpointsPagesWithContext same as ListEndpointsPages except
345// it takes a Context and allows setting request options on the pages.
346//
347// The context must be non-nil and will be used for request cancellation. If
348// the context is nil a panic will occur. In the future the SDK may create
349// sub-contexts for http.Requests. See https://golang.org/pkg/context/
350// for more information on using Contexts.
351func (c *S3Outposts) ListEndpointsPagesWithContext(ctx aws.Context, input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool, opts ...request.Option) error {
352	p := request.Pagination{
353		NewRequest: func() (*request.Request, error) {
354			var inCpy *ListEndpointsInput
355			if input != nil {
356				tmp := *input
357				inCpy = &tmp
358			}
359			req, _ := c.ListEndpointsRequest(inCpy)
360			req.SetContext(ctx)
361			req.ApplyOptions(opts...)
362			return req, nil
363		},
364	}
365
366	for p.Next() {
367		if !fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) {
368			break
369		}
370	}
371
372	return p.Err()
373}
374
375// Access was denied for this action.
376type AccessDeniedException struct {
377	_            struct{}                  `type:"structure"`
378	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
379
380	Message_ *string `locationName:"Message" type:"string"`
381}
382
383// String returns the string representation
384func (s AccessDeniedException) String() string {
385	return awsutil.Prettify(s)
386}
387
388// GoString returns the string representation
389func (s AccessDeniedException) GoString() string {
390	return s.String()
391}
392
393func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
394	return &AccessDeniedException{
395		RespMetadata: v,
396	}
397}
398
399// Code returns the exception type name.
400func (s *AccessDeniedException) Code() string {
401	return "AccessDeniedException"
402}
403
404// Message returns the exception's message.
405func (s *AccessDeniedException) Message() string {
406	if s.Message_ != nil {
407		return *s.Message_
408	}
409	return ""
410}
411
412// OrigErr always returns nil, satisfies awserr.Error interface.
413func (s *AccessDeniedException) OrigErr() error {
414	return nil
415}
416
417func (s *AccessDeniedException) Error() string {
418	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
419}
420
421// Status code returns the HTTP status code for the request's response error.
422func (s *AccessDeniedException) StatusCode() int {
423	return s.RespMetadata.StatusCode
424}
425
426// RequestID returns the service's response RequestID for request.
427func (s *AccessDeniedException) RequestID() string {
428	return s.RespMetadata.RequestID
429}
430
431// There was a conflict with this action, and it could not be completed.
432type ConflictException struct {
433	_            struct{}                  `type:"structure"`
434	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
435
436	Message_ *string `locationName:"Message" type:"string"`
437}
438
439// String returns the string representation
440func (s ConflictException) String() string {
441	return awsutil.Prettify(s)
442}
443
444// GoString returns the string representation
445func (s ConflictException) GoString() string {
446	return s.String()
447}
448
449func newErrorConflictException(v protocol.ResponseMetadata) error {
450	return &ConflictException{
451		RespMetadata: v,
452	}
453}
454
455// Code returns the exception type name.
456func (s *ConflictException) Code() string {
457	return "ConflictException"
458}
459
460// Message returns the exception's message.
461func (s *ConflictException) Message() string {
462	if s.Message_ != nil {
463		return *s.Message_
464	}
465	return ""
466}
467
468// OrigErr always returns nil, satisfies awserr.Error interface.
469func (s *ConflictException) OrigErr() error {
470	return nil
471}
472
473func (s *ConflictException) Error() string {
474	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
475}
476
477// Status code returns the HTTP status code for the request's response error.
478func (s *ConflictException) StatusCode() int {
479	return s.RespMetadata.StatusCode
480}
481
482// RequestID returns the service's response RequestID for request.
483func (s *ConflictException) RequestID() string {
484	return s.RespMetadata.RequestID
485}
486
487type CreateEndpointInput struct {
488	_ struct{} `type:"structure"`
489
490	// The ID of the AWS Outpost.
491	//
492	// OutpostId is a required field
493	OutpostId *string `min:"1" type:"string" required:"true"`
494
495	// The ID of the security group to use with the endpoint.
496	//
497	// SecurityGroupId is a required field
498	SecurityGroupId *string `min:"1" type:"string" required:"true"`
499
500	// The ID of the subnet in the selected VPC.
501	//
502	// SubnetId is a required field
503	SubnetId *string `min:"1" type:"string" required:"true"`
504}
505
506// String returns the string representation
507func (s CreateEndpointInput) String() string {
508	return awsutil.Prettify(s)
509}
510
511// GoString returns the string representation
512func (s CreateEndpointInput) GoString() string {
513	return s.String()
514}
515
516// Validate inspects the fields of the type to determine if they are valid.
517func (s *CreateEndpointInput) Validate() error {
518	invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"}
519	if s.OutpostId == nil {
520		invalidParams.Add(request.NewErrParamRequired("OutpostId"))
521	}
522	if s.OutpostId != nil && len(*s.OutpostId) < 1 {
523		invalidParams.Add(request.NewErrParamMinLen("OutpostId", 1))
524	}
525	if s.SecurityGroupId == nil {
526		invalidParams.Add(request.NewErrParamRequired("SecurityGroupId"))
527	}
528	if s.SecurityGroupId != nil && len(*s.SecurityGroupId) < 1 {
529		invalidParams.Add(request.NewErrParamMinLen("SecurityGroupId", 1))
530	}
531	if s.SubnetId == nil {
532		invalidParams.Add(request.NewErrParamRequired("SubnetId"))
533	}
534	if s.SubnetId != nil && len(*s.SubnetId) < 1 {
535		invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1))
536	}
537
538	if invalidParams.Len() > 0 {
539		return invalidParams
540	}
541	return nil
542}
543
544// SetOutpostId sets the OutpostId field's value.
545func (s *CreateEndpointInput) SetOutpostId(v string) *CreateEndpointInput {
546	s.OutpostId = &v
547	return s
548}
549
550// SetSecurityGroupId sets the SecurityGroupId field's value.
551func (s *CreateEndpointInput) SetSecurityGroupId(v string) *CreateEndpointInput {
552	s.SecurityGroupId = &v
553	return s
554}
555
556// SetSubnetId sets the SubnetId field's value.
557func (s *CreateEndpointInput) SetSubnetId(v string) *CreateEndpointInput {
558	s.SubnetId = &v
559	return s
560}
561
562type CreateEndpointOutput struct {
563	_ struct{} `type:"structure"`
564
565	// The Amazon Resource Name (ARN) of the endpoint.
566	EndpointArn *string `min:"5" type:"string"`
567}
568
569// String returns the string representation
570func (s CreateEndpointOutput) String() string {
571	return awsutil.Prettify(s)
572}
573
574// GoString returns the string representation
575func (s CreateEndpointOutput) GoString() string {
576	return s.String()
577}
578
579// SetEndpointArn sets the EndpointArn field's value.
580func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput {
581	s.EndpointArn = &v
582	return s
583}
584
585type DeleteEndpointInput struct {
586	_ struct{} `type:"structure"`
587
588	// The ID of the end point.
589	//
590	// EndpointId is a required field
591	EndpointId *string `location:"querystring" locationName:"endpointId" min:"5" type:"string" required:"true"`
592
593	// The ID of the AWS Outpost.
594	//
595	// OutpostId is a required field
596	OutpostId *string `location:"querystring" locationName:"outpostId" min:"1" type:"string" required:"true"`
597}
598
599// String returns the string representation
600func (s DeleteEndpointInput) String() string {
601	return awsutil.Prettify(s)
602}
603
604// GoString returns the string representation
605func (s DeleteEndpointInput) GoString() string {
606	return s.String()
607}
608
609// Validate inspects the fields of the type to determine if they are valid.
610func (s *DeleteEndpointInput) Validate() error {
611	invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"}
612	if s.EndpointId == nil {
613		invalidParams.Add(request.NewErrParamRequired("EndpointId"))
614	}
615	if s.EndpointId != nil && len(*s.EndpointId) < 5 {
616		invalidParams.Add(request.NewErrParamMinLen("EndpointId", 5))
617	}
618	if s.OutpostId == nil {
619		invalidParams.Add(request.NewErrParamRequired("OutpostId"))
620	}
621	if s.OutpostId != nil && len(*s.OutpostId) < 1 {
622		invalidParams.Add(request.NewErrParamMinLen("OutpostId", 1))
623	}
624
625	if invalidParams.Len() > 0 {
626		return invalidParams
627	}
628	return nil
629}
630
631// SetEndpointId sets the EndpointId field's value.
632func (s *DeleteEndpointInput) SetEndpointId(v string) *DeleteEndpointInput {
633	s.EndpointId = &v
634	return s
635}
636
637// SetOutpostId sets the OutpostId field's value.
638func (s *DeleteEndpointInput) SetOutpostId(v string) *DeleteEndpointInput {
639	s.OutpostId = &v
640	return s
641}
642
643type DeleteEndpointOutput struct {
644	_ struct{} `type:"structure"`
645}
646
647// String returns the string representation
648func (s DeleteEndpointOutput) String() string {
649	return awsutil.Prettify(s)
650}
651
652// GoString returns the string representation
653func (s DeleteEndpointOutput) GoString() string {
654	return s.String()
655}
656
657// S3 on Outposts access points simplify managing data access at scale for shared
658// datasets in Amazon S3 on Outposts. S3 on Outposts uses endpoints to connect
659// to Outposts buckets so that you can perform actions within your virtual private
660// cloud (VPC).
661type Endpoint struct {
662	_ struct{} `type:"structure"`
663
664	// The VPC CIDR committed by this endpoint.
665	CidrBlock *string `min:"1" type:"string"`
666
667	// The time the endpoint was created.
668	CreationTime *time.Time `type:"timestamp"`
669
670	// The Amazon Resource Name (ARN) of the endpoint.
671	EndpointArn *string `min:"5" type:"string"`
672
673	// The network interface of the endpoint.
674	NetworkInterfaces []*NetworkInterface `type:"list"`
675
676	// The ID of the AWS Outpost.
677	OutpostsId *string `min:"1" type:"string"`
678
679	// The status of the endpoint.
680	Status *string `type:"string" enum:"EndpointStatus"`
681}
682
683// String returns the string representation
684func (s Endpoint) String() string {
685	return awsutil.Prettify(s)
686}
687
688// GoString returns the string representation
689func (s Endpoint) GoString() string {
690	return s.String()
691}
692
693// SetCidrBlock sets the CidrBlock field's value.
694func (s *Endpoint) SetCidrBlock(v string) *Endpoint {
695	s.CidrBlock = &v
696	return s
697}
698
699// SetCreationTime sets the CreationTime field's value.
700func (s *Endpoint) SetCreationTime(v time.Time) *Endpoint {
701	s.CreationTime = &v
702	return s
703}
704
705// SetEndpointArn sets the EndpointArn field's value.
706func (s *Endpoint) SetEndpointArn(v string) *Endpoint {
707	s.EndpointArn = &v
708	return s
709}
710
711// SetNetworkInterfaces sets the NetworkInterfaces field's value.
712func (s *Endpoint) SetNetworkInterfaces(v []*NetworkInterface) *Endpoint {
713	s.NetworkInterfaces = v
714	return s
715}
716
717// SetOutpostsId sets the OutpostsId field's value.
718func (s *Endpoint) SetOutpostsId(v string) *Endpoint {
719	s.OutpostsId = &v
720	return s
721}
722
723// SetStatus sets the Status field's value.
724func (s *Endpoint) SetStatus(v string) *Endpoint {
725	s.Status = &v
726	return s
727}
728
729// There was an exception with the internal server.
730type InternalServerException struct {
731	_            struct{}                  `type:"structure"`
732	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
733
734	Message_ *string `locationName:"Message" type:"string"`
735}
736
737// String returns the string representation
738func (s InternalServerException) String() string {
739	return awsutil.Prettify(s)
740}
741
742// GoString returns the string representation
743func (s InternalServerException) GoString() string {
744	return s.String()
745}
746
747func newErrorInternalServerException(v protocol.ResponseMetadata) error {
748	return &InternalServerException{
749		RespMetadata: v,
750	}
751}
752
753// Code returns the exception type name.
754func (s *InternalServerException) Code() string {
755	return "InternalServerException"
756}
757
758// Message returns the exception's message.
759func (s *InternalServerException) Message() string {
760	if s.Message_ != nil {
761		return *s.Message_
762	}
763	return ""
764}
765
766// OrigErr always returns nil, satisfies awserr.Error interface.
767func (s *InternalServerException) OrigErr() error {
768	return nil
769}
770
771func (s *InternalServerException) Error() string {
772	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
773}
774
775// Status code returns the HTTP status code for the request's response error.
776func (s *InternalServerException) StatusCode() int {
777	return s.RespMetadata.StatusCode
778}
779
780// RequestID returns the service's response RequestID for request.
781func (s *InternalServerException) RequestID() string {
782	return s.RespMetadata.RequestID
783}
784
785type ListEndpointsInput struct {
786	_ struct{} `type:"structure"`
787
788	// The max number of endpoints that can be returned on the request.
789	MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
790
791	// The next endpoint requested in the list.
792	NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"`
793}
794
795// String returns the string representation
796func (s ListEndpointsInput) String() string {
797	return awsutil.Prettify(s)
798}
799
800// GoString returns the string representation
801func (s ListEndpointsInput) GoString() string {
802	return s.String()
803}
804
805// Validate inspects the fields of the type to determine if they are valid.
806func (s *ListEndpointsInput) Validate() error {
807	invalidParams := request.ErrInvalidParams{Context: "ListEndpointsInput"}
808	if s.NextToken != nil && len(*s.NextToken) < 1 {
809		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
810	}
811
812	if invalidParams.Len() > 0 {
813		return invalidParams
814	}
815	return nil
816}
817
818// SetMaxResults sets the MaxResults field's value.
819func (s *ListEndpointsInput) SetMaxResults(v int64) *ListEndpointsInput {
820	s.MaxResults = &v
821	return s
822}
823
824// SetNextToken sets the NextToken field's value.
825func (s *ListEndpointsInput) SetNextToken(v string) *ListEndpointsInput {
826	s.NextToken = &v
827	return s
828}
829
830type ListEndpointsOutput struct {
831	_ struct{} `type:"structure"`
832
833	// Returns an array of endpoints associated with AWS Outpost.
834	Endpoints []*Endpoint `type:"list"`
835
836	// The next endpoint returned in the list.
837	NextToken *string `min:"1" type:"string"`
838}
839
840// String returns the string representation
841func (s ListEndpointsOutput) String() string {
842	return awsutil.Prettify(s)
843}
844
845// GoString returns the string representation
846func (s ListEndpointsOutput) GoString() string {
847	return s.String()
848}
849
850// SetEndpoints sets the Endpoints field's value.
851func (s *ListEndpointsOutput) SetEndpoints(v []*Endpoint) *ListEndpointsOutput {
852	s.Endpoints = v
853	return s
854}
855
856// SetNextToken sets the NextToken field's value.
857func (s *ListEndpointsOutput) SetNextToken(v string) *ListEndpointsOutput {
858	s.NextToken = &v
859	return s
860}
861
862// The container for the network interface.
863type NetworkInterface struct {
864	_ struct{} `type:"structure"`
865
866	// The ID for the network interface.
867	NetworkInterfaceId *string `min:"1" type:"string"`
868}
869
870// String returns the string representation
871func (s NetworkInterface) String() string {
872	return awsutil.Prettify(s)
873}
874
875// GoString returns the string representation
876func (s NetworkInterface) GoString() string {
877	return s.String()
878}
879
880// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
881func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface {
882	s.NetworkInterfaceId = &v
883	return s
884}
885
886// The requested resource was not found.
887type ResourceNotFoundException 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 ResourceNotFoundException) String() string {
896	return awsutil.Prettify(s)
897}
898
899// GoString returns the string representation
900func (s ResourceNotFoundException) GoString() string {
901	return s.String()
902}
903
904func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
905	return &ResourceNotFoundException{
906		RespMetadata: v,
907	}
908}
909
910// Code returns the exception type name.
911func (s *ResourceNotFoundException) Code() string {
912	return "ResourceNotFoundException"
913}
914
915// Message returns the exception's message.
916func (s *ResourceNotFoundException) 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 *ResourceNotFoundException) OrigErr() error {
925	return nil
926}
927
928func (s *ResourceNotFoundException) 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 *ResourceNotFoundException) StatusCode() int {
934	return s.RespMetadata.StatusCode
935}
936
937// RequestID returns the service's response RequestID for request.
938func (s *ResourceNotFoundException) RequestID() string {
939	return s.RespMetadata.RequestID
940}
941
942// There was an exception validating this data.
943type ValidationException struct {
944	_            struct{}                  `type:"structure"`
945	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
946
947	Message_ *string `locationName:"Message" type:"string"`
948}
949
950// String returns the string representation
951func (s ValidationException) String() string {
952	return awsutil.Prettify(s)
953}
954
955// GoString returns the string representation
956func (s ValidationException) GoString() string {
957	return s.String()
958}
959
960func newErrorValidationException(v protocol.ResponseMetadata) error {
961	return &ValidationException{
962		RespMetadata: v,
963	}
964}
965
966// Code returns the exception type name.
967func (s *ValidationException) Code() string {
968	return "ValidationException"
969}
970
971// Message returns the exception's message.
972func (s *ValidationException) Message() string {
973	if s.Message_ != nil {
974		return *s.Message_
975	}
976	return ""
977}
978
979// OrigErr always returns nil, satisfies awserr.Error interface.
980func (s *ValidationException) OrigErr() error {
981	return nil
982}
983
984func (s *ValidationException) Error() string {
985	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
986}
987
988// Status code returns the HTTP status code for the request's response error.
989func (s *ValidationException) StatusCode() int {
990	return s.RespMetadata.StatusCode
991}
992
993// RequestID returns the service's response RequestID for request.
994func (s *ValidationException) RequestID() string {
995	return s.RespMetadata.RequestID
996}
997
998const (
999	// EndpointStatusPending is a EndpointStatus enum value
1000	EndpointStatusPending = "PENDING"
1001
1002	// EndpointStatusAvailable is a EndpointStatus enum value
1003	EndpointStatusAvailable = "AVAILABLE"
1004)
1005
1006// EndpointStatus_Values returns all elements of the EndpointStatus enum
1007func EndpointStatus_Values() []string {
1008	return []string{
1009		EndpointStatusPending,
1010		EndpointStatusAvailable,
1011	}
1012}
1013