1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package prometheusservice
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 opCreateWorkspace = "CreateWorkspace"
17
18// CreateWorkspaceRequest generates a "aws/request.Request" representing the
19// client's request for the CreateWorkspace 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 CreateWorkspace for more information on using the CreateWorkspace
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 CreateWorkspaceRequest method.
34//    req, resp := client.CreateWorkspaceRequest(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/amp-2020-08-01/CreateWorkspace
42func (c *PrometheusService) CreateWorkspaceRequest(input *CreateWorkspaceInput) (req *request.Request, output *CreateWorkspaceOutput) {
43	op := &request.Operation{
44		Name:       opCreateWorkspace,
45		HTTPMethod: "POST",
46		HTTPPath:   "/workspaces",
47	}
48
49	if input == nil {
50		input = &CreateWorkspaceInput{}
51	}
52
53	output = &CreateWorkspaceOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// CreateWorkspace API operation for Amazon Prometheus Service.
59//
60// Creates a new AMP workspace.
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 Amazon Prometheus Service's
67// API operation CreateWorkspace for usage and error information.
68//
69// Returned Error Types:
70//   * ThrottlingException
71//   Request was denied due to request throttling.
72//
73//   * ConflictException
74//   Updating or deleting a resource can cause an inconsistent state.
75//
76//   * ValidationException
77//   The input fails to satisfy the constraints specified by an AWS service.
78//
79//   * AccessDeniedException
80//   User does not have sufficient access to perform this action.
81//
82//   * InternalServerException
83//   Unexpected error during processing of request.
84//
85//   * ServiceQuotaExceededException
86//   Request would cause a service quota to be exceeded.
87//
88// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateWorkspace
89func (c *PrometheusService) CreateWorkspace(input *CreateWorkspaceInput) (*CreateWorkspaceOutput, error) {
90	req, out := c.CreateWorkspaceRequest(input)
91	return out, req.Send()
92}
93
94// CreateWorkspaceWithContext is the same as CreateWorkspace with the addition of
95// the ability to pass a context and additional request options.
96//
97// See CreateWorkspace 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 *PrometheusService) CreateWorkspaceWithContext(ctx aws.Context, input *CreateWorkspaceInput, opts ...request.Option) (*CreateWorkspaceOutput, error) {
104	req, out := c.CreateWorkspaceRequest(input)
105	req.SetContext(ctx)
106	req.ApplyOptions(opts...)
107	return out, req.Send()
108}
109
110const opDeleteWorkspace = "DeleteWorkspace"
111
112// DeleteWorkspaceRequest generates a "aws/request.Request" representing the
113// client's request for the DeleteWorkspace 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 DeleteWorkspace for more information on using the DeleteWorkspace
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 DeleteWorkspaceRequest method.
128//    req, resp := client.DeleteWorkspaceRequest(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/amp-2020-08-01/DeleteWorkspace
136func (c *PrometheusService) DeleteWorkspaceRequest(input *DeleteWorkspaceInput) (req *request.Request, output *DeleteWorkspaceOutput) {
137	op := &request.Operation{
138		Name:       opDeleteWorkspace,
139		HTTPMethod: "DELETE",
140		HTTPPath:   "/workspaces/{workspaceId}",
141	}
142
143	if input == nil {
144		input = &DeleteWorkspaceInput{}
145	}
146
147	output = &DeleteWorkspaceOutput{}
148	req = c.newRequest(op, input, output)
149	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
150	return
151}
152
153// DeleteWorkspace API operation for Amazon Prometheus Service.
154//
155// Deletes an AMP workspace.
156//
157// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
158// with awserr.Error's Code and Message methods to get detailed information about
159// the error.
160//
161// See the AWS API reference guide for Amazon Prometheus Service's
162// API operation DeleteWorkspace for usage and error information.
163//
164// Returned Error Types:
165//   * ThrottlingException
166//   Request was denied due to request throttling.
167//
168//   * ValidationException
169//   The input fails to satisfy the constraints specified by an AWS service.
170//
171//   * ResourceNotFoundException
172//   Request references a resource which does not exist.
173//
174//   * AccessDeniedException
175//   User does not have sufficient access to perform this action.
176//
177//   * InternalServerException
178//   Unexpected error during processing of request.
179//
180// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteWorkspace
181func (c *PrometheusService) DeleteWorkspace(input *DeleteWorkspaceInput) (*DeleteWorkspaceOutput, error) {
182	req, out := c.DeleteWorkspaceRequest(input)
183	return out, req.Send()
184}
185
186// DeleteWorkspaceWithContext is the same as DeleteWorkspace with the addition of
187// the ability to pass a context and additional request options.
188//
189// See DeleteWorkspace for details on how to use this API operation.
190//
191// The context must be non-nil and will be used for request cancellation. If
192// the context is nil a panic will occur. In the future the SDK may create
193// sub-contexts for http.Requests. See https://golang.org/pkg/context/
194// for more information on using Contexts.
195func (c *PrometheusService) DeleteWorkspaceWithContext(ctx aws.Context, input *DeleteWorkspaceInput, opts ...request.Option) (*DeleteWorkspaceOutput, error) {
196	req, out := c.DeleteWorkspaceRequest(input)
197	req.SetContext(ctx)
198	req.ApplyOptions(opts...)
199	return out, req.Send()
200}
201
202const opDescribeWorkspace = "DescribeWorkspace"
203
204// DescribeWorkspaceRequest generates a "aws/request.Request" representing the
205// client's request for the DescribeWorkspace operation. The "output" return
206// value will be populated with the request's response once the request completes
207// successfully.
208//
209// Use "Send" method on the returned Request to send the API call to the service.
210// the "output" return value is not valid until after Send returns without error.
211//
212// See DescribeWorkspace for more information on using the DescribeWorkspace
213// API call, and error handling.
214//
215// This method is useful when you want to inject custom logic or configuration
216// into the SDK's request lifecycle. Such as custom headers, or retry logic.
217//
218//
219//    // Example sending a request using the DescribeWorkspaceRequest method.
220//    req, resp := client.DescribeWorkspaceRequest(params)
221//
222//    err := req.Send()
223//    if err == nil { // resp is now filled
224//        fmt.Println(resp)
225//    }
226//
227// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspace
228func (c *PrometheusService) DescribeWorkspaceRequest(input *DescribeWorkspaceInput) (req *request.Request, output *DescribeWorkspaceOutput) {
229	op := &request.Operation{
230		Name:       opDescribeWorkspace,
231		HTTPMethod: "GET",
232		HTTPPath:   "/workspaces/{workspaceId}",
233	}
234
235	if input == nil {
236		input = &DescribeWorkspaceInput{}
237	}
238
239	output = &DescribeWorkspaceOutput{}
240	req = c.newRequest(op, input, output)
241	return
242}
243
244// DescribeWorkspace API operation for Amazon Prometheus Service.
245//
246// Describes an existing AMP workspace.
247//
248// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
249// with awserr.Error's Code and Message methods to get detailed information about
250// the error.
251//
252// See the AWS API reference guide for Amazon Prometheus Service's
253// API operation DescribeWorkspace for usage and error information.
254//
255// Returned Error Types:
256//   * ThrottlingException
257//   Request was denied due to request throttling.
258//
259//   * ValidationException
260//   The input fails to satisfy the constraints specified by an AWS service.
261//
262//   * ResourceNotFoundException
263//   Request references a resource which does not exist.
264//
265//   * AccessDeniedException
266//   User does not have sufficient access to perform this action.
267//
268//   * InternalServerException
269//   Unexpected error during processing of request.
270//
271// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspace
272func (c *PrometheusService) DescribeWorkspace(input *DescribeWorkspaceInput) (*DescribeWorkspaceOutput, error) {
273	req, out := c.DescribeWorkspaceRequest(input)
274	return out, req.Send()
275}
276
277// DescribeWorkspaceWithContext is the same as DescribeWorkspace with the addition of
278// the ability to pass a context and additional request options.
279//
280// See DescribeWorkspace for details on how to use this API operation.
281//
282// The context must be non-nil and will be used for request cancellation. If
283// the context is nil a panic will occur. In the future the SDK may create
284// sub-contexts for http.Requests. See https://golang.org/pkg/context/
285// for more information on using Contexts.
286func (c *PrometheusService) DescribeWorkspaceWithContext(ctx aws.Context, input *DescribeWorkspaceInput, opts ...request.Option) (*DescribeWorkspaceOutput, error) {
287	req, out := c.DescribeWorkspaceRequest(input)
288	req.SetContext(ctx)
289	req.ApplyOptions(opts...)
290	return out, req.Send()
291}
292
293const opListWorkspaces = "ListWorkspaces"
294
295// ListWorkspacesRequest generates a "aws/request.Request" representing the
296// client's request for the ListWorkspaces operation. The "output" return
297// value will be populated with the request's response once the request completes
298// successfully.
299//
300// Use "Send" method on the returned Request to send the API call to the service.
301// the "output" return value is not valid until after Send returns without error.
302//
303// See ListWorkspaces for more information on using the ListWorkspaces
304// API call, and error handling.
305//
306// This method is useful when you want to inject custom logic or configuration
307// into the SDK's request lifecycle. Such as custom headers, or retry logic.
308//
309//
310//    // Example sending a request using the ListWorkspacesRequest method.
311//    req, resp := client.ListWorkspacesRequest(params)
312//
313//    err := req.Send()
314//    if err == nil { // resp is now filled
315//        fmt.Println(resp)
316//    }
317//
318// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces
319func (c *PrometheusService) ListWorkspacesRequest(input *ListWorkspacesInput) (req *request.Request, output *ListWorkspacesOutput) {
320	op := &request.Operation{
321		Name:       opListWorkspaces,
322		HTTPMethod: "GET",
323		HTTPPath:   "/workspaces",
324		Paginator: &request.Paginator{
325			InputTokens:     []string{"nextToken"},
326			OutputTokens:    []string{"nextToken"},
327			LimitToken:      "maxResults",
328			TruncationToken: "",
329		},
330	}
331
332	if input == nil {
333		input = &ListWorkspacesInput{}
334	}
335
336	output = &ListWorkspacesOutput{}
337	req = c.newRequest(op, input, output)
338	return
339}
340
341// ListWorkspaces API operation for Amazon Prometheus Service.
342//
343// Lists all AMP workspaces, including workspaces being created or deleted.
344//
345// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
346// with awserr.Error's Code and Message methods to get detailed information about
347// the error.
348//
349// See the AWS API reference guide for Amazon Prometheus Service's
350// API operation ListWorkspaces for usage and error information.
351//
352// Returned Error Types:
353//   * ThrottlingException
354//   Request was denied due to request throttling.
355//
356//   * ValidationException
357//   The input fails to satisfy the constraints specified by an AWS service.
358//
359//   * AccessDeniedException
360//   User does not have sufficient access to perform this action.
361//
362//   * InternalServerException
363//   Unexpected error during processing of request.
364//
365// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces
366func (c *PrometheusService) ListWorkspaces(input *ListWorkspacesInput) (*ListWorkspacesOutput, error) {
367	req, out := c.ListWorkspacesRequest(input)
368	return out, req.Send()
369}
370
371// ListWorkspacesWithContext is the same as ListWorkspaces with the addition of
372// the ability to pass a context and additional request options.
373//
374// See ListWorkspaces for details on how to use this API operation.
375//
376// The context must be non-nil and will be used for request cancellation. If
377// the context is nil a panic will occur. In the future the SDK may create
378// sub-contexts for http.Requests. See https://golang.org/pkg/context/
379// for more information on using Contexts.
380func (c *PrometheusService) ListWorkspacesWithContext(ctx aws.Context, input *ListWorkspacesInput, opts ...request.Option) (*ListWorkspacesOutput, error) {
381	req, out := c.ListWorkspacesRequest(input)
382	req.SetContext(ctx)
383	req.ApplyOptions(opts...)
384	return out, req.Send()
385}
386
387// ListWorkspacesPages iterates over the pages of a ListWorkspaces operation,
388// calling the "fn" function with the response data for each page. To stop
389// iterating, return false from the fn function.
390//
391// See ListWorkspaces method for more information on how to use this operation.
392//
393// Note: This operation can generate multiple requests to a service.
394//
395//    // Example iterating over at most 3 pages of a ListWorkspaces operation.
396//    pageNum := 0
397//    err := client.ListWorkspacesPages(params,
398//        func(page *prometheusservice.ListWorkspacesOutput, lastPage bool) bool {
399//            pageNum++
400//            fmt.Println(page)
401//            return pageNum <= 3
402//        })
403//
404func (c *PrometheusService) ListWorkspacesPages(input *ListWorkspacesInput, fn func(*ListWorkspacesOutput, bool) bool) error {
405	return c.ListWorkspacesPagesWithContext(aws.BackgroundContext(), input, fn)
406}
407
408// ListWorkspacesPagesWithContext same as ListWorkspacesPages except
409// it takes a Context and allows setting request options on the pages.
410//
411// The context must be non-nil and will be used for request cancellation. If
412// the context is nil a panic will occur. In the future the SDK may create
413// sub-contexts for http.Requests. See https://golang.org/pkg/context/
414// for more information on using Contexts.
415func (c *PrometheusService) ListWorkspacesPagesWithContext(ctx aws.Context, input *ListWorkspacesInput, fn func(*ListWorkspacesOutput, bool) bool, opts ...request.Option) error {
416	p := request.Pagination{
417		NewRequest: func() (*request.Request, error) {
418			var inCpy *ListWorkspacesInput
419			if input != nil {
420				tmp := *input
421				inCpy = &tmp
422			}
423			req, _ := c.ListWorkspacesRequest(inCpy)
424			req.SetContext(ctx)
425			req.ApplyOptions(opts...)
426			return req, nil
427		},
428	}
429
430	for p.Next() {
431		if !fn(p.Page().(*ListWorkspacesOutput), !p.HasNextPage()) {
432			break
433		}
434	}
435
436	return p.Err()
437}
438
439const opUpdateWorkspaceAlias = "UpdateWorkspaceAlias"
440
441// UpdateWorkspaceAliasRequest generates a "aws/request.Request" representing the
442// client's request for the UpdateWorkspaceAlias operation. The "output" return
443// value will be populated with the request's response once the request completes
444// successfully.
445//
446// Use "Send" method on the returned Request to send the API call to the service.
447// the "output" return value is not valid until after Send returns without error.
448//
449// See UpdateWorkspaceAlias for more information on using the UpdateWorkspaceAlias
450// API call, and error handling.
451//
452// This method is useful when you want to inject custom logic or configuration
453// into the SDK's request lifecycle. Such as custom headers, or retry logic.
454//
455//
456//    // Example sending a request using the UpdateWorkspaceAliasRequest method.
457//    req, resp := client.UpdateWorkspaceAliasRequest(params)
458//
459//    err := req.Send()
460//    if err == nil { // resp is now filled
461//        fmt.Println(resp)
462//    }
463//
464// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UpdateWorkspaceAlias
465func (c *PrometheusService) UpdateWorkspaceAliasRequest(input *UpdateWorkspaceAliasInput) (req *request.Request, output *UpdateWorkspaceAliasOutput) {
466	op := &request.Operation{
467		Name:       opUpdateWorkspaceAlias,
468		HTTPMethod: "POST",
469		HTTPPath:   "/workspaces/{workspaceId}/alias",
470	}
471
472	if input == nil {
473		input = &UpdateWorkspaceAliasInput{}
474	}
475
476	output = &UpdateWorkspaceAliasOutput{}
477	req = c.newRequest(op, input, output)
478	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
479	return
480}
481
482// UpdateWorkspaceAlias API operation for Amazon Prometheus Service.
483//
484// Updates an AMP workspace alias.
485//
486// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
487// with awserr.Error's Code and Message methods to get detailed information about
488// the error.
489//
490// See the AWS API reference guide for Amazon Prometheus Service's
491// API operation UpdateWorkspaceAlias for usage and error information.
492//
493// Returned Error Types:
494//   * ThrottlingException
495//   Request was denied due to request throttling.
496//
497//   * ConflictException
498//   Updating or deleting a resource can cause an inconsistent state.
499//
500//   * ValidationException
501//   The input fails to satisfy the constraints specified by an AWS service.
502//
503//   * ResourceNotFoundException
504//   Request references a resource which does not exist.
505//
506//   * AccessDeniedException
507//   User does not have sufficient access to perform this action.
508//
509//   * InternalServerException
510//   Unexpected error during processing of request.
511//
512//   * ServiceQuotaExceededException
513//   Request would cause a service quota to be exceeded.
514//
515// See also, https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UpdateWorkspaceAlias
516func (c *PrometheusService) UpdateWorkspaceAlias(input *UpdateWorkspaceAliasInput) (*UpdateWorkspaceAliasOutput, error) {
517	req, out := c.UpdateWorkspaceAliasRequest(input)
518	return out, req.Send()
519}
520
521// UpdateWorkspaceAliasWithContext is the same as UpdateWorkspaceAlias with the addition of
522// the ability to pass a context and additional request options.
523//
524// See UpdateWorkspaceAlias for details on how to use this API operation.
525//
526// The context must be non-nil and will be used for request cancellation. If
527// the context is nil a panic will occur. In the future the SDK may create
528// sub-contexts for http.Requests. See https://golang.org/pkg/context/
529// for more information on using Contexts.
530func (c *PrometheusService) UpdateWorkspaceAliasWithContext(ctx aws.Context, input *UpdateWorkspaceAliasInput, opts ...request.Option) (*UpdateWorkspaceAliasOutput, error) {
531	req, out := c.UpdateWorkspaceAliasRequest(input)
532	req.SetContext(ctx)
533	req.ApplyOptions(opts...)
534	return out, req.Send()
535}
536
537// User does not have sufficient access to perform this action.
538type AccessDeniedException struct {
539	_            struct{}                  `type:"structure"`
540	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
541
542	// Description of the error.
543	Message_ *string `locationName:"message" type:"string"`
544}
545
546// String returns the string representation
547func (s AccessDeniedException) String() string {
548	return awsutil.Prettify(s)
549}
550
551// GoString returns the string representation
552func (s AccessDeniedException) GoString() string {
553	return s.String()
554}
555
556func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
557	return &AccessDeniedException{
558		RespMetadata: v,
559	}
560}
561
562// Code returns the exception type name.
563func (s *AccessDeniedException) Code() string {
564	return "AccessDeniedException"
565}
566
567// Message returns the exception's message.
568func (s *AccessDeniedException) Message() string {
569	if s.Message_ != nil {
570		return *s.Message_
571	}
572	return ""
573}
574
575// OrigErr always returns nil, satisfies awserr.Error interface.
576func (s *AccessDeniedException) OrigErr() error {
577	return nil
578}
579
580func (s *AccessDeniedException) Error() string {
581	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
582}
583
584// Status code returns the HTTP status code for the request's response error.
585func (s *AccessDeniedException) StatusCode() int {
586	return s.RespMetadata.StatusCode
587}
588
589// RequestID returns the service's response RequestID for request.
590func (s *AccessDeniedException) RequestID() string {
591	return s.RespMetadata.RequestID
592}
593
594// Updating or deleting a resource can cause an inconsistent state.
595type ConflictException struct {
596	_            struct{}                  `type:"structure"`
597	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
598
599	// Description of the error.
600	Message_ *string `locationName:"message" type:"string"`
601
602	// Identifier of the resource affected.
603	//
604	// ResourceId is a required field
605	ResourceId *string `locationName:"resourceId" type:"string" required:"true"`
606
607	// Type of the resource affected.
608	//
609	// ResourceType is a required field
610	ResourceType *string `locationName:"resourceType" type:"string" required:"true"`
611}
612
613// String returns the string representation
614func (s ConflictException) String() string {
615	return awsutil.Prettify(s)
616}
617
618// GoString returns the string representation
619func (s ConflictException) GoString() string {
620	return s.String()
621}
622
623func newErrorConflictException(v protocol.ResponseMetadata) error {
624	return &ConflictException{
625		RespMetadata: v,
626	}
627}
628
629// Code returns the exception type name.
630func (s *ConflictException) Code() string {
631	return "ConflictException"
632}
633
634// Message returns the exception's message.
635func (s *ConflictException) Message() string {
636	if s.Message_ != nil {
637		return *s.Message_
638	}
639	return ""
640}
641
642// OrigErr always returns nil, satisfies awserr.Error interface.
643func (s *ConflictException) OrigErr() error {
644	return nil
645}
646
647func (s *ConflictException) Error() string {
648	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
649}
650
651// Status code returns the HTTP status code for the request's response error.
652func (s *ConflictException) StatusCode() int {
653	return s.RespMetadata.StatusCode
654}
655
656// RequestID returns the service's response RequestID for request.
657func (s *ConflictException) RequestID() string {
658	return s.RespMetadata.RequestID
659}
660
661// Represents the input of a CreateWorkspace operation.
662type CreateWorkspaceInput struct {
663	_ struct{} `type:"structure"`
664
665	// An optional user-assigned alias for this workspace. This alias is for user
666	// reference and does not need to be unique.
667	Alias *string `locationName:"alias" min:"1" type:"string"`
668
669	// Optional, unique, case-sensitive, user-provided identifier to ensure the
670	// idempotency of the request.
671	ClientToken *string `locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
672}
673
674// String returns the string representation
675func (s CreateWorkspaceInput) String() string {
676	return awsutil.Prettify(s)
677}
678
679// GoString returns the string representation
680func (s CreateWorkspaceInput) GoString() string {
681	return s.String()
682}
683
684// Validate inspects the fields of the type to determine if they are valid.
685func (s *CreateWorkspaceInput) Validate() error {
686	invalidParams := request.ErrInvalidParams{Context: "CreateWorkspaceInput"}
687	if s.Alias != nil && len(*s.Alias) < 1 {
688		invalidParams.Add(request.NewErrParamMinLen("Alias", 1))
689	}
690	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
691		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
692	}
693
694	if invalidParams.Len() > 0 {
695		return invalidParams
696	}
697	return nil
698}
699
700// SetAlias sets the Alias field's value.
701func (s *CreateWorkspaceInput) SetAlias(v string) *CreateWorkspaceInput {
702	s.Alias = &v
703	return s
704}
705
706// SetClientToken sets the ClientToken field's value.
707func (s *CreateWorkspaceInput) SetClientToken(v string) *CreateWorkspaceInput {
708	s.ClientToken = &v
709	return s
710}
711
712// Represents the output of a CreateWorkspace operation.
713type CreateWorkspaceOutput struct {
714	_ struct{} `type:"structure"`
715
716	// The ARN of the workspace that was just created.
717	//
718	// Arn is a required field
719	Arn *string `locationName:"arn" type:"string" required:"true"`
720
721	// The status of the workspace that was just created (usually CREATING).
722	//
723	// Status is a required field
724	Status *WorkspaceStatus `locationName:"status" type:"structure" required:"true"`
725
726	// The generated ID of the workspace that was just created.
727	//
728	// WorkspaceId is a required field
729	WorkspaceId *string `locationName:"workspaceId" min:"1" type:"string" required:"true"`
730}
731
732// String returns the string representation
733func (s CreateWorkspaceOutput) String() string {
734	return awsutil.Prettify(s)
735}
736
737// GoString returns the string representation
738func (s CreateWorkspaceOutput) GoString() string {
739	return s.String()
740}
741
742// SetArn sets the Arn field's value.
743func (s *CreateWorkspaceOutput) SetArn(v string) *CreateWorkspaceOutput {
744	s.Arn = &v
745	return s
746}
747
748// SetStatus sets the Status field's value.
749func (s *CreateWorkspaceOutput) SetStatus(v *WorkspaceStatus) *CreateWorkspaceOutput {
750	s.Status = v
751	return s
752}
753
754// SetWorkspaceId sets the WorkspaceId field's value.
755func (s *CreateWorkspaceOutput) SetWorkspaceId(v string) *CreateWorkspaceOutput {
756	s.WorkspaceId = &v
757	return s
758}
759
760// Represents the input of a DeleteWorkspace operation.
761type DeleteWorkspaceInput struct {
762	_ struct{} `type:"structure"`
763
764	// Optional, unique, case-sensitive, user-provided identifier to ensure the
765	// idempotency of the request.
766	ClientToken *string `location:"querystring" locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
767
768	// The ID of the workspace to delete.
769	//
770	// WorkspaceId is a required field
771	WorkspaceId *string `location:"uri" locationName:"workspaceId" min:"1" type:"string" required:"true"`
772}
773
774// String returns the string representation
775func (s DeleteWorkspaceInput) String() string {
776	return awsutil.Prettify(s)
777}
778
779// GoString returns the string representation
780func (s DeleteWorkspaceInput) GoString() string {
781	return s.String()
782}
783
784// Validate inspects the fields of the type to determine if they are valid.
785func (s *DeleteWorkspaceInput) Validate() error {
786	invalidParams := request.ErrInvalidParams{Context: "DeleteWorkspaceInput"}
787	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
788		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
789	}
790	if s.WorkspaceId == nil {
791		invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
792	}
793	if s.WorkspaceId != nil && len(*s.WorkspaceId) < 1 {
794		invalidParams.Add(request.NewErrParamMinLen("WorkspaceId", 1))
795	}
796
797	if invalidParams.Len() > 0 {
798		return invalidParams
799	}
800	return nil
801}
802
803// SetClientToken sets the ClientToken field's value.
804func (s *DeleteWorkspaceInput) SetClientToken(v string) *DeleteWorkspaceInput {
805	s.ClientToken = &v
806	return s
807}
808
809// SetWorkspaceId sets the WorkspaceId field's value.
810func (s *DeleteWorkspaceInput) SetWorkspaceId(v string) *DeleteWorkspaceInput {
811	s.WorkspaceId = &v
812	return s
813}
814
815type DeleteWorkspaceOutput struct {
816	_ struct{} `type:"structure"`
817}
818
819// String returns the string representation
820func (s DeleteWorkspaceOutput) String() string {
821	return awsutil.Prettify(s)
822}
823
824// GoString returns the string representation
825func (s DeleteWorkspaceOutput) GoString() string {
826	return s.String()
827}
828
829// Represents the input of a DescribeWorkspace operation.
830type DescribeWorkspaceInput struct {
831	_ struct{} `type:"structure"`
832
833	// The ID of the workspace to describe.
834	//
835	// WorkspaceId is a required field
836	WorkspaceId *string `location:"uri" locationName:"workspaceId" min:"1" type:"string" required:"true"`
837}
838
839// String returns the string representation
840func (s DescribeWorkspaceInput) String() string {
841	return awsutil.Prettify(s)
842}
843
844// GoString returns the string representation
845func (s DescribeWorkspaceInput) GoString() string {
846	return s.String()
847}
848
849// Validate inspects the fields of the type to determine if they are valid.
850func (s *DescribeWorkspaceInput) Validate() error {
851	invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceInput"}
852	if s.WorkspaceId == nil {
853		invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
854	}
855	if s.WorkspaceId != nil && len(*s.WorkspaceId) < 1 {
856		invalidParams.Add(request.NewErrParamMinLen("WorkspaceId", 1))
857	}
858
859	if invalidParams.Len() > 0 {
860		return invalidParams
861	}
862	return nil
863}
864
865// SetWorkspaceId sets the WorkspaceId field's value.
866func (s *DescribeWorkspaceInput) SetWorkspaceId(v string) *DescribeWorkspaceInput {
867	s.WorkspaceId = &v
868	return s
869}
870
871// Represents the output of a DescribeWorkspace operation.
872type DescribeWorkspaceOutput struct {
873	_ struct{} `type:"structure"`
874
875	// The properties of the selected workspace.
876	//
877	// Workspace is a required field
878	Workspace *WorkspaceDescription `locationName:"workspace" type:"structure" required:"true"`
879}
880
881// String returns the string representation
882func (s DescribeWorkspaceOutput) String() string {
883	return awsutil.Prettify(s)
884}
885
886// GoString returns the string representation
887func (s DescribeWorkspaceOutput) GoString() string {
888	return s.String()
889}
890
891// SetWorkspace sets the Workspace field's value.
892func (s *DescribeWorkspaceOutput) SetWorkspace(v *WorkspaceDescription) *DescribeWorkspaceOutput {
893	s.Workspace = v
894	return s
895}
896
897// Unexpected error during processing of request.
898type InternalServerException struct {
899	_            struct{}                  `type:"structure"`
900	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
901
902	// Description of the error.
903	Message_ *string `locationName:"message" type:"string"`
904
905	// Advice to clients on when the call can be safely retried.
906	RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"`
907}
908
909// String returns the string representation
910func (s InternalServerException) String() string {
911	return awsutil.Prettify(s)
912}
913
914// GoString returns the string representation
915func (s InternalServerException) GoString() string {
916	return s.String()
917}
918
919func newErrorInternalServerException(v protocol.ResponseMetadata) error {
920	return &InternalServerException{
921		RespMetadata: v,
922	}
923}
924
925// Code returns the exception type name.
926func (s *InternalServerException) Code() string {
927	return "InternalServerException"
928}
929
930// Message returns the exception's message.
931func (s *InternalServerException) Message() string {
932	if s.Message_ != nil {
933		return *s.Message_
934	}
935	return ""
936}
937
938// OrigErr always returns nil, satisfies awserr.Error interface.
939func (s *InternalServerException) OrigErr() error {
940	return nil
941}
942
943func (s *InternalServerException) Error() string {
944	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
945}
946
947// Status code returns the HTTP status code for the request's response error.
948func (s *InternalServerException) StatusCode() int {
949	return s.RespMetadata.StatusCode
950}
951
952// RequestID returns the service's response RequestID for request.
953func (s *InternalServerException) RequestID() string {
954	return s.RespMetadata.RequestID
955}
956
957// Represents the input of a ListWorkspaces operation.
958type ListWorkspacesInput struct {
959	_ struct{} `type:"structure"`
960
961	// Optional filter for workspace alias. Only the workspaces with aliases that
962	// begin with this value will be returned.
963	Alias *string `location:"querystring" locationName:"alias" min:"1" type:"string"`
964
965	// Maximum results to return in response (default=100, maximum=1000).
966	MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
967
968	// Pagination token to request the next page in a paginated list. This token
969	// is obtained from the output of the previous ListWorkspaces request.
970	NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
971}
972
973// String returns the string representation
974func (s ListWorkspacesInput) String() string {
975	return awsutil.Prettify(s)
976}
977
978// GoString returns the string representation
979func (s ListWorkspacesInput) GoString() string {
980	return s.String()
981}
982
983// Validate inspects the fields of the type to determine if they are valid.
984func (s *ListWorkspacesInput) Validate() error {
985	invalidParams := request.ErrInvalidParams{Context: "ListWorkspacesInput"}
986	if s.Alias != nil && len(*s.Alias) < 1 {
987		invalidParams.Add(request.NewErrParamMinLen("Alias", 1))
988	}
989	if s.MaxResults != nil && *s.MaxResults < 1 {
990		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
991	}
992
993	if invalidParams.Len() > 0 {
994		return invalidParams
995	}
996	return nil
997}
998
999// SetAlias sets the Alias field's value.
1000func (s *ListWorkspacesInput) SetAlias(v string) *ListWorkspacesInput {
1001	s.Alias = &v
1002	return s
1003}
1004
1005// SetMaxResults sets the MaxResults field's value.
1006func (s *ListWorkspacesInput) SetMaxResults(v int64) *ListWorkspacesInput {
1007	s.MaxResults = &v
1008	return s
1009}
1010
1011// SetNextToken sets the NextToken field's value.
1012func (s *ListWorkspacesInput) SetNextToken(v string) *ListWorkspacesInput {
1013	s.NextToken = &v
1014	return s
1015}
1016
1017// Represents the output of a ListWorkspaces operation.
1018type ListWorkspacesOutput struct {
1019	_ struct{} `type:"structure"`
1020
1021	// Pagination token to use when requesting the next page in this list.
1022	NextToken *string `locationName:"nextToken" type:"string"`
1023
1024	// The list of existing workspaces, including those undergoing creation or deletion.
1025	//
1026	// Workspaces is a required field
1027	Workspaces []*WorkspaceSummary `locationName:"workspaces" type:"list" required:"true"`
1028}
1029
1030// String returns the string representation
1031func (s ListWorkspacesOutput) String() string {
1032	return awsutil.Prettify(s)
1033}
1034
1035// GoString returns the string representation
1036func (s ListWorkspacesOutput) GoString() string {
1037	return s.String()
1038}
1039
1040// SetNextToken sets the NextToken field's value.
1041func (s *ListWorkspacesOutput) SetNextToken(v string) *ListWorkspacesOutput {
1042	s.NextToken = &v
1043	return s
1044}
1045
1046// SetWorkspaces sets the Workspaces field's value.
1047func (s *ListWorkspacesOutput) SetWorkspaces(v []*WorkspaceSummary) *ListWorkspacesOutput {
1048	s.Workspaces = v
1049	return s
1050}
1051
1052// Request references a resource which does not exist.
1053type ResourceNotFoundException struct {
1054	_            struct{}                  `type:"structure"`
1055	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1056
1057	// Description of the error.
1058	Message_ *string `locationName:"message" type:"string"`
1059
1060	// Identifier of the resource affected.
1061	//
1062	// ResourceId is a required field
1063	ResourceId *string `locationName:"resourceId" type:"string" required:"true"`
1064
1065	// Type of the resource affected.
1066	//
1067	// ResourceType is a required field
1068	ResourceType *string `locationName:"resourceType" type:"string" required:"true"`
1069}
1070
1071// String returns the string representation
1072func (s ResourceNotFoundException) String() string {
1073	return awsutil.Prettify(s)
1074}
1075
1076// GoString returns the string representation
1077func (s ResourceNotFoundException) GoString() string {
1078	return s.String()
1079}
1080
1081func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
1082	return &ResourceNotFoundException{
1083		RespMetadata: v,
1084	}
1085}
1086
1087// Code returns the exception type name.
1088func (s *ResourceNotFoundException) Code() string {
1089	return "ResourceNotFoundException"
1090}
1091
1092// Message returns the exception's message.
1093func (s *ResourceNotFoundException) Message() string {
1094	if s.Message_ != nil {
1095		return *s.Message_
1096	}
1097	return ""
1098}
1099
1100// OrigErr always returns nil, satisfies awserr.Error interface.
1101func (s *ResourceNotFoundException) OrigErr() error {
1102	return nil
1103}
1104
1105func (s *ResourceNotFoundException) Error() string {
1106	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1107}
1108
1109// Status code returns the HTTP status code for the request's response error.
1110func (s *ResourceNotFoundException) StatusCode() int {
1111	return s.RespMetadata.StatusCode
1112}
1113
1114// RequestID returns the service's response RequestID for request.
1115func (s *ResourceNotFoundException) RequestID() string {
1116	return s.RespMetadata.RequestID
1117}
1118
1119// Request would cause a service quota to be exceeded.
1120type ServiceQuotaExceededException struct {
1121	_            struct{}                  `type:"structure"`
1122	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1123
1124	// Description of the error.
1125	Message_ *string `locationName:"message" type:"string"`
1126
1127	// Service Quotas requirement to identify originating quota.
1128	//
1129	// QuotaCode is a required field
1130	QuotaCode *string `locationName:"quotaCode" type:"string" required:"true"`
1131
1132	// Identifier of the resource affected.
1133	//
1134	// ResourceId is a required field
1135	ResourceId *string `locationName:"resourceId" type:"string" required:"true"`
1136
1137	// Type of the resource affected.
1138	//
1139	// ResourceType is a required field
1140	ResourceType *string `locationName:"resourceType" type:"string" required:"true"`
1141
1142	// Service Quotas requirement to identify originating service.
1143	//
1144	// ServiceCode is a required field
1145	ServiceCode *string `locationName:"serviceCode" type:"string" required:"true"`
1146}
1147
1148// String returns the string representation
1149func (s ServiceQuotaExceededException) String() string {
1150	return awsutil.Prettify(s)
1151}
1152
1153// GoString returns the string representation
1154func (s ServiceQuotaExceededException) GoString() string {
1155	return s.String()
1156}
1157
1158func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error {
1159	return &ServiceQuotaExceededException{
1160		RespMetadata: v,
1161	}
1162}
1163
1164// Code returns the exception type name.
1165func (s *ServiceQuotaExceededException) Code() string {
1166	return "ServiceQuotaExceededException"
1167}
1168
1169// Message returns the exception's message.
1170func (s *ServiceQuotaExceededException) Message() string {
1171	if s.Message_ != nil {
1172		return *s.Message_
1173	}
1174	return ""
1175}
1176
1177// OrigErr always returns nil, satisfies awserr.Error interface.
1178func (s *ServiceQuotaExceededException) OrigErr() error {
1179	return nil
1180}
1181
1182func (s *ServiceQuotaExceededException) Error() string {
1183	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1184}
1185
1186// Status code returns the HTTP status code for the request's response error.
1187func (s *ServiceQuotaExceededException) StatusCode() int {
1188	return s.RespMetadata.StatusCode
1189}
1190
1191// RequestID returns the service's response RequestID for request.
1192func (s *ServiceQuotaExceededException) RequestID() string {
1193	return s.RespMetadata.RequestID
1194}
1195
1196// Request was denied due to request throttling.
1197type ThrottlingException struct {
1198	_            struct{}                  `type:"structure"`
1199	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1200
1201	// Description of the error.
1202	Message_ *string `locationName:"message" type:"string"`
1203
1204	// Service Quotas requirement to identify originating quota.
1205	QuotaCode *string `locationName:"quotaCode" type:"string"`
1206
1207	// Advice to clients on when the call can be safely retried.
1208	RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"`
1209
1210	// Service Quotas requirement to identify originating service.
1211	ServiceCode *string `locationName:"serviceCode" type:"string"`
1212}
1213
1214// String returns the string representation
1215func (s ThrottlingException) String() string {
1216	return awsutil.Prettify(s)
1217}
1218
1219// GoString returns the string representation
1220func (s ThrottlingException) GoString() string {
1221	return s.String()
1222}
1223
1224func newErrorThrottlingException(v protocol.ResponseMetadata) error {
1225	return &ThrottlingException{
1226		RespMetadata: v,
1227	}
1228}
1229
1230// Code returns the exception type name.
1231func (s *ThrottlingException) Code() string {
1232	return "ThrottlingException"
1233}
1234
1235// Message returns the exception's message.
1236func (s *ThrottlingException) Message() string {
1237	if s.Message_ != nil {
1238		return *s.Message_
1239	}
1240	return ""
1241}
1242
1243// OrigErr always returns nil, satisfies awserr.Error interface.
1244func (s *ThrottlingException) OrigErr() error {
1245	return nil
1246}
1247
1248func (s *ThrottlingException) Error() string {
1249	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1250}
1251
1252// Status code returns the HTTP status code for the request's response error.
1253func (s *ThrottlingException) StatusCode() int {
1254	return s.RespMetadata.StatusCode
1255}
1256
1257// RequestID returns the service's response RequestID for request.
1258func (s *ThrottlingException) RequestID() string {
1259	return s.RespMetadata.RequestID
1260}
1261
1262// Represents the input of an UpdateWorkspaceAlias operation.
1263type UpdateWorkspaceAliasInput struct {
1264	_ struct{} `type:"structure"`
1265
1266	// The new alias of the workspace.
1267	Alias *string `locationName:"alias" min:"1" type:"string"`
1268
1269	// Optional, unique, case-sensitive, user-provided identifier to ensure the
1270	// idempotency of the request.
1271	ClientToken *string `locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"`
1272
1273	// The ID of the workspace being updated.
1274	//
1275	// WorkspaceId is a required field
1276	WorkspaceId *string `location:"uri" locationName:"workspaceId" min:"1" type:"string" required:"true"`
1277}
1278
1279// String returns the string representation
1280func (s UpdateWorkspaceAliasInput) String() string {
1281	return awsutil.Prettify(s)
1282}
1283
1284// GoString returns the string representation
1285func (s UpdateWorkspaceAliasInput) GoString() string {
1286	return s.String()
1287}
1288
1289// Validate inspects the fields of the type to determine if they are valid.
1290func (s *UpdateWorkspaceAliasInput) Validate() error {
1291	invalidParams := request.ErrInvalidParams{Context: "UpdateWorkspaceAliasInput"}
1292	if s.Alias != nil && len(*s.Alias) < 1 {
1293		invalidParams.Add(request.NewErrParamMinLen("Alias", 1))
1294	}
1295	if s.ClientToken != nil && len(*s.ClientToken) < 1 {
1296		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
1297	}
1298	if s.WorkspaceId == nil {
1299		invalidParams.Add(request.NewErrParamRequired("WorkspaceId"))
1300	}
1301	if s.WorkspaceId != nil && len(*s.WorkspaceId) < 1 {
1302		invalidParams.Add(request.NewErrParamMinLen("WorkspaceId", 1))
1303	}
1304
1305	if invalidParams.Len() > 0 {
1306		return invalidParams
1307	}
1308	return nil
1309}
1310
1311// SetAlias sets the Alias field's value.
1312func (s *UpdateWorkspaceAliasInput) SetAlias(v string) *UpdateWorkspaceAliasInput {
1313	s.Alias = &v
1314	return s
1315}
1316
1317// SetClientToken sets the ClientToken field's value.
1318func (s *UpdateWorkspaceAliasInput) SetClientToken(v string) *UpdateWorkspaceAliasInput {
1319	s.ClientToken = &v
1320	return s
1321}
1322
1323// SetWorkspaceId sets the WorkspaceId field's value.
1324func (s *UpdateWorkspaceAliasInput) SetWorkspaceId(v string) *UpdateWorkspaceAliasInput {
1325	s.WorkspaceId = &v
1326	return s
1327}
1328
1329type UpdateWorkspaceAliasOutput struct {
1330	_ struct{} `type:"structure"`
1331}
1332
1333// String returns the string representation
1334func (s UpdateWorkspaceAliasOutput) String() string {
1335	return awsutil.Prettify(s)
1336}
1337
1338// GoString returns the string representation
1339func (s UpdateWorkspaceAliasOutput) GoString() string {
1340	return s.String()
1341}
1342
1343// The input fails to satisfy the constraints specified by an AWS service.
1344type ValidationException struct {
1345	_            struct{}                  `type:"structure"`
1346	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1347
1348	// The field that caused the error, if applicable. If more than one field caused
1349	// the error, pick one and elaborate in the message.
1350	FieldList []*ValidationExceptionField `locationName:"fieldList" type:"list"`
1351
1352	// Description of the error.
1353	Message_ *string `locationName:"message" type:"string"`
1354
1355	// Reason the request failed validation.
1356	//
1357	// Reason is a required field
1358	Reason *string `locationName:"reason" type:"string" required:"true" enum:"ValidationExceptionReason"`
1359}
1360
1361// String returns the string representation
1362func (s ValidationException) String() string {
1363	return awsutil.Prettify(s)
1364}
1365
1366// GoString returns the string representation
1367func (s ValidationException) GoString() string {
1368	return s.String()
1369}
1370
1371func newErrorValidationException(v protocol.ResponseMetadata) error {
1372	return &ValidationException{
1373		RespMetadata: v,
1374	}
1375}
1376
1377// Code returns the exception type name.
1378func (s *ValidationException) Code() string {
1379	return "ValidationException"
1380}
1381
1382// Message returns the exception's message.
1383func (s *ValidationException) Message() string {
1384	if s.Message_ != nil {
1385		return *s.Message_
1386	}
1387	return ""
1388}
1389
1390// OrigErr always returns nil, satisfies awserr.Error interface.
1391func (s *ValidationException) OrigErr() error {
1392	return nil
1393}
1394
1395func (s *ValidationException) Error() string {
1396	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1397}
1398
1399// Status code returns the HTTP status code for the request's response error.
1400func (s *ValidationException) StatusCode() int {
1401	return s.RespMetadata.StatusCode
1402}
1403
1404// RequestID returns the service's response RequestID for request.
1405func (s *ValidationException) RequestID() string {
1406	return s.RespMetadata.RequestID
1407}
1408
1409// Stores information about a field passed inside a request that resulted in
1410// an exception.
1411type ValidationExceptionField struct {
1412	_ struct{} `type:"structure"`
1413
1414	// Message describing why the field failed validation.
1415	//
1416	// Message is a required field
1417	Message *string `locationName:"message" type:"string" required:"true"`
1418
1419	// The field name.
1420	//
1421	// Name is a required field
1422	Name *string `locationName:"name" type:"string" required:"true"`
1423}
1424
1425// String returns the string representation
1426func (s ValidationExceptionField) String() string {
1427	return awsutil.Prettify(s)
1428}
1429
1430// GoString returns the string representation
1431func (s ValidationExceptionField) GoString() string {
1432	return s.String()
1433}
1434
1435// SetMessage sets the Message field's value.
1436func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField {
1437	s.Message = &v
1438	return s
1439}
1440
1441// SetName sets the Name field's value.
1442func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField {
1443	s.Name = &v
1444	return s
1445}
1446
1447// Represents the properties of a workspace.
1448type WorkspaceDescription struct {
1449	_ struct{} `type:"structure"`
1450
1451	// Alias of this workspace.
1452	Alias *string `locationName:"alias" min:"1" type:"string"`
1453
1454	// The Amazon Resource Name (ARN) of this workspace.
1455	//
1456	// Arn is a required field
1457	Arn *string `locationName:"arn" type:"string" required:"true"`
1458
1459	// The time when the workspace was created.
1460	//
1461	// CreatedAt is a required field
1462	CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"`
1463
1464	// Prometheus endpoint URI.
1465	PrometheusEndpoint *string `locationName:"prometheusEndpoint" min:"1" type:"string"`
1466
1467	// The status of this workspace.
1468	//
1469	// Status is a required field
1470	Status *WorkspaceStatus `locationName:"status" type:"structure" required:"true"`
1471
1472	// Unique string identifying this workspace.
1473	//
1474	// WorkspaceId is a required field
1475	WorkspaceId *string `locationName:"workspaceId" min:"1" type:"string" required:"true"`
1476}
1477
1478// String returns the string representation
1479func (s WorkspaceDescription) String() string {
1480	return awsutil.Prettify(s)
1481}
1482
1483// GoString returns the string representation
1484func (s WorkspaceDescription) GoString() string {
1485	return s.String()
1486}
1487
1488// SetAlias sets the Alias field's value.
1489func (s *WorkspaceDescription) SetAlias(v string) *WorkspaceDescription {
1490	s.Alias = &v
1491	return s
1492}
1493
1494// SetArn sets the Arn field's value.
1495func (s *WorkspaceDescription) SetArn(v string) *WorkspaceDescription {
1496	s.Arn = &v
1497	return s
1498}
1499
1500// SetCreatedAt sets the CreatedAt field's value.
1501func (s *WorkspaceDescription) SetCreatedAt(v time.Time) *WorkspaceDescription {
1502	s.CreatedAt = &v
1503	return s
1504}
1505
1506// SetPrometheusEndpoint sets the PrometheusEndpoint field's value.
1507func (s *WorkspaceDescription) SetPrometheusEndpoint(v string) *WorkspaceDescription {
1508	s.PrometheusEndpoint = &v
1509	return s
1510}
1511
1512// SetStatus sets the Status field's value.
1513func (s *WorkspaceDescription) SetStatus(v *WorkspaceStatus) *WorkspaceDescription {
1514	s.Status = v
1515	return s
1516}
1517
1518// SetWorkspaceId sets the WorkspaceId field's value.
1519func (s *WorkspaceDescription) SetWorkspaceId(v string) *WorkspaceDescription {
1520	s.WorkspaceId = &v
1521	return s
1522}
1523
1524// Represents the status of a workspace.
1525type WorkspaceStatus struct {
1526	_ struct{} `type:"structure"`
1527
1528	// Status code of this workspace.
1529	//
1530	// StatusCode is a required field
1531	StatusCode *string `locationName:"statusCode" type:"string" required:"true" enum:"WorkspaceStatusCode"`
1532}
1533
1534// String returns the string representation
1535func (s WorkspaceStatus) String() string {
1536	return awsutil.Prettify(s)
1537}
1538
1539// GoString returns the string representation
1540func (s WorkspaceStatus) GoString() string {
1541	return s.String()
1542}
1543
1544// SetStatusCode sets the StatusCode field's value.
1545func (s *WorkspaceStatus) SetStatusCode(v string) *WorkspaceStatus {
1546	s.StatusCode = &v
1547	return s
1548}
1549
1550// Represents a summary of the properties of a workspace.
1551type WorkspaceSummary struct {
1552	_ struct{} `type:"structure"`
1553
1554	// Alias of this workspace.
1555	Alias *string `locationName:"alias" min:"1" type:"string"`
1556
1557	// The AmazonResourceName of this workspace.
1558	//
1559	// Arn is a required field
1560	Arn *string `locationName:"arn" type:"string" required:"true"`
1561
1562	// The time when the workspace was created.
1563	//
1564	// CreatedAt is a required field
1565	CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"`
1566
1567	// The status of this workspace.
1568	//
1569	// Status is a required field
1570	Status *WorkspaceStatus `locationName:"status" type:"structure" required:"true"`
1571
1572	// Unique string identifying this workspace.
1573	//
1574	// WorkspaceId is a required field
1575	WorkspaceId *string `locationName:"workspaceId" min:"1" type:"string" required:"true"`
1576}
1577
1578// String returns the string representation
1579func (s WorkspaceSummary) String() string {
1580	return awsutil.Prettify(s)
1581}
1582
1583// GoString returns the string representation
1584func (s WorkspaceSummary) GoString() string {
1585	return s.String()
1586}
1587
1588// SetAlias sets the Alias field's value.
1589func (s *WorkspaceSummary) SetAlias(v string) *WorkspaceSummary {
1590	s.Alias = &v
1591	return s
1592}
1593
1594// SetArn sets the Arn field's value.
1595func (s *WorkspaceSummary) SetArn(v string) *WorkspaceSummary {
1596	s.Arn = &v
1597	return s
1598}
1599
1600// SetCreatedAt sets the CreatedAt field's value.
1601func (s *WorkspaceSummary) SetCreatedAt(v time.Time) *WorkspaceSummary {
1602	s.CreatedAt = &v
1603	return s
1604}
1605
1606// SetStatus sets the Status field's value.
1607func (s *WorkspaceSummary) SetStatus(v *WorkspaceStatus) *WorkspaceSummary {
1608	s.Status = v
1609	return s
1610}
1611
1612// SetWorkspaceId sets the WorkspaceId field's value.
1613func (s *WorkspaceSummary) SetWorkspaceId(v string) *WorkspaceSummary {
1614	s.WorkspaceId = &v
1615	return s
1616}
1617
1618// Possible reasons a request failed validation.
1619const (
1620	// ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value
1621	ValidationExceptionReasonUnknownOperation = "UNKNOWN_OPERATION"
1622
1623	// ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value
1624	ValidationExceptionReasonCannotParse = "CANNOT_PARSE"
1625
1626	// ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value
1627	ValidationExceptionReasonFieldValidationFailed = "FIELD_VALIDATION_FAILED"
1628
1629	// ValidationExceptionReasonOther is a ValidationExceptionReason enum value
1630	ValidationExceptionReasonOther = "OTHER"
1631)
1632
1633// ValidationExceptionReason_Values returns all elements of the ValidationExceptionReason enum
1634func ValidationExceptionReason_Values() []string {
1635	return []string{
1636		ValidationExceptionReasonUnknownOperation,
1637		ValidationExceptionReasonCannotParse,
1638		ValidationExceptionReasonFieldValidationFailed,
1639		ValidationExceptionReasonOther,
1640	}
1641}
1642
1643// State of a workspace.
1644const (
1645	// WorkspaceStatusCodeCreating is a WorkspaceStatusCode enum value
1646	WorkspaceStatusCodeCreating = "CREATING"
1647
1648	// WorkspaceStatusCodeActive is a WorkspaceStatusCode enum value
1649	WorkspaceStatusCodeActive = "ACTIVE"
1650
1651	// WorkspaceStatusCodeUpdating is a WorkspaceStatusCode enum value
1652	WorkspaceStatusCodeUpdating = "UPDATING"
1653
1654	// WorkspaceStatusCodeDeleting is a WorkspaceStatusCode enum value
1655	WorkspaceStatusCodeDeleting = "DELETING"
1656
1657	// WorkspaceStatusCodeCreationFailed is a WorkspaceStatusCode enum value
1658	WorkspaceStatusCodeCreationFailed = "CREATION_FAILED"
1659)
1660
1661// WorkspaceStatusCode_Values returns all elements of the WorkspaceStatusCode enum
1662func WorkspaceStatusCode_Values() []string {
1663	return []string{
1664		WorkspaceStatusCodeCreating,
1665		WorkspaceStatusCodeActive,
1666		WorkspaceStatusCodeUpdating,
1667		WorkspaceStatusCodeDeleting,
1668		WorkspaceStatusCodeCreationFailed,
1669	}
1670}
1671