1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package timestreamquery
4
5import (
6	"fmt"
7	"net/url"
8	"strings"
9	"time"
10
11	"github.com/aws/aws-sdk-go/aws"
12	"github.com/aws/aws-sdk-go/aws/awsutil"
13	"github.com/aws/aws-sdk-go/aws/crr"
14	"github.com/aws/aws-sdk-go/aws/request"
15	"github.com/aws/aws-sdk-go/private/protocol"
16)
17
18const opCancelQuery = "CancelQuery"
19
20// CancelQueryRequest generates a "aws/request.Request" representing the
21// client's request for the CancelQuery operation. The "output" return
22// value will be populated with the request's response once the request completes
23// successfully.
24//
25// Use "Send" method on the returned Request to send the API call to the service.
26// the "output" return value is not valid until after Send returns without error.
27//
28// See CancelQuery for more information on using the CancelQuery
29// API call, and error handling.
30//
31// This method is useful when you want to inject custom logic or configuration
32// into the SDK's request lifecycle. Such as custom headers, or retry logic.
33//
34//
35//    // Example sending a request using the CancelQueryRequest method.
36//    req, resp := client.CancelQueryRequest(params)
37//
38//    err := req.Send()
39//    if err == nil { // resp is now filled
40//        fmt.Println(resp)
41//    }
42//
43// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery
44func (c *TimestreamQuery) CancelQueryRequest(input *CancelQueryInput) (req *request.Request, output *CancelQueryOutput) {
45	op := &request.Operation{
46		Name:       opCancelQuery,
47		HTTPMethod: "POST",
48		HTTPPath:   "/",
49	}
50
51	if input == nil {
52		input = &CancelQueryInput{}
53	}
54
55	output = &CancelQueryOutput{}
56	req = c.newRequest(op, input, output)
57	// if custom endpoint for the request is set to a non empty string,
58	// we skip the endpoint discovery workflow.
59	if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
60		de := discovererDescribeEndpoints{
61			Required:      true,
62			EndpointCache: c.endpointCache,
63			Params: map[string]*string{
64				"op": aws.String(req.Operation.Name),
65			},
66			Client: c,
67		}
68
69		for k, v := range de.Params {
70			if v == nil {
71				delete(de.Params, k)
72			}
73		}
74
75		req.Handlers.Build.PushFrontNamed(request.NamedHandler{
76			Name: "crr.endpointdiscovery",
77			Fn:   de.Handler,
78		})
79	}
80	return
81}
82
83// CancelQuery API operation for Amazon Timestream Query.
84//
85// Cancels a query that has been issued. Cancellation is guaranteed only if
86// the query has not completed execution before the cancellation request was
87// issued. Because cancellation is an idempotent operation, subsequent cancellation
88// requests will return a CancellationMessage, indicating that the query has
89// already been canceled.
90//
91// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
92// with awserr.Error's Code and Message methods to get detailed information about
93// the error.
94//
95// See the AWS API reference guide for Amazon Timestream Query's
96// API operation CancelQuery for usage and error information.
97//
98// Returned Error Types:
99//   * AccessDeniedException
100//   You are not authorized to perform this action.
101//
102//   * InternalServerException
103//   Timestream was unable to fully process this request because of an internal
104//   server error.
105//
106//   * ThrottlingException
107//   The request was denied due to request throttling.
108//
109//   * ValidationException
110//   Invalid or malformed request.
111//
112//   * InvalidEndpointException
113//   The requested endpoint was invalid.
114//
115// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery
116func (c *TimestreamQuery) CancelQuery(input *CancelQueryInput) (*CancelQueryOutput, error) {
117	req, out := c.CancelQueryRequest(input)
118	return out, req.Send()
119}
120
121// CancelQueryWithContext is the same as CancelQuery with the addition of
122// the ability to pass a context and additional request options.
123//
124// See CancelQuery for details on how to use this API operation.
125//
126// The context must be non-nil and will be used for request cancellation. If
127// the context is nil a panic will occur. In the future the SDK may create
128// sub-contexts for http.Requests. See https://golang.org/pkg/context/
129// for more information on using Contexts.
130func (c *TimestreamQuery) CancelQueryWithContext(ctx aws.Context, input *CancelQueryInput, opts ...request.Option) (*CancelQueryOutput, error) {
131	req, out := c.CancelQueryRequest(input)
132	req.SetContext(ctx)
133	req.ApplyOptions(opts...)
134	return out, req.Send()
135}
136
137const opDescribeEndpoints = "DescribeEndpoints"
138
139// DescribeEndpointsRequest generates a "aws/request.Request" representing the
140// client's request for the DescribeEndpoints operation. The "output" return
141// value will be populated with the request's response once the request completes
142// successfully.
143//
144// Use "Send" method on the returned Request to send the API call to the service.
145// the "output" return value is not valid until after Send returns without error.
146//
147// See DescribeEndpoints for more information on using the DescribeEndpoints
148// API call, and error handling.
149//
150// This method is useful when you want to inject custom logic or configuration
151// into the SDK's request lifecycle. Such as custom headers, or retry logic.
152//
153//
154//    // Example sending a request using the DescribeEndpointsRequest method.
155//    req, resp := client.DescribeEndpointsRequest(params)
156//
157//    err := req.Send()
158//    if err == nil { // resp is now filled
159//        fmt.Println(resp)
160//    }
161//
162// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints
163func (c *TimestreamQuery) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) {
164	op := &request.Operation{
165		Name:       opDescribeEndpoints,
166		HTTPMethod: "POST",
167		HTTPPath:   "/",
168	}
169
170	if input == nil {
171		input = &DescribeEndpointsInput{}
172	}
173
174	output = &DescribeEndpointsOutput{}
175	req = c.newRequest(op, input, output)
176	return
177}
178
179// DescribeEndpoints API operation for Amazon Timestream Query.
180//
181// DescribeEndpoints returns a list of available endpoints to make Timestream
182// API calls against. This API is available through both Write and Query.
183//
184// Because Timestream’s SDKs are designed to transparently work with the service’s
185// architecture, including the management and mapping of the service endpoints,
186// it is not recommended that you use this API unless:
187//
188//    * Your application uses a programming language that does not yet have
189//    SDK support
190//
191//    * You require better control over the client-side implementation
192//
193// For detailed information on how to use DescribeEndpoints, see The Endpoint
194// Discovery Pattern and REST APIs (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html).
195//
196// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
197// with awserr.Error's Code and Message methods to get detailed information about
198// the error.
199//
200// See the AWS API reference guide for Amazon Timestream Query's
201// API operation DescribeEndpoints for usage and error information.
202//
203// Returned Error Types:
204//   * InternalServerException
205//   Timestream was unable to fully process this request because of an internal
206//   server error.
207//
208//   * ValidationException
209//   Invalid or malformed request.
210//
211//   * ThrottlingException
212//   The request was denied due to request throttling.
213//
214// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints
215func (c *TimestreamQuery) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) {
216	req, out := c.DescribeEndpointsRequest(input)
217	return out, req.Send()
218}
219
220// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of
221// the ability to pass a context and additional request options.
222//
223// See DescribeEndpoints for details on how to use this API operation.
224//
225// The context must be non-nil and will be used for request cancellation. If
226// the context is nil a panic will occur. In the future the SDK may create
227// sub-contexts for http.Requests. See https://golang.org/pkg/context/
228// for more information on using Contexts.
229func (c *TimestreamQuery) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) {
230	req, out := c.DescribeEndpointsRequest(input)
231	req.SetContext(ctx)
232	req.ApplyOptions(opts...)
233	return out, req.Send()
234}
235
236type discovererDescribeEndpoints struct {
237	Client        *TimestreamQuery
238	Required      bool
239	EndpointCache *crr.EndpointCache
240	Params        map[string]*string
241	Key           string
242	req           *request.Request
243}
244
245func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) {
246	input := &DescribeEndpointsInput{}
247
248	resp, err := d.Client.DescribeEndpoints(input)
249	if err != nil {
250		return crr.Endpoint{}, err
251	}
252
253	endpoint := crr.Endpoint{
254		Key: d.Key,
255	}
256
257	for _, e := range resp.Endpoints {
258		if e.Address == nil {
259			continue
260		}
261
262		address := *e.Address
263
264		var scheme string
265		if idx := strings.Index(address, "://"); idx != -1 {
266			scheme = address[:idx]
267		}
268
269		if len(scheme) == 0 {
270			address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address)
271		}
272
273		cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes)
274		u, err := url.Parse(address)
275		if err != nil {
276			continue
277		}
278
279		addr := crr.WeightedAddress{
280			URL:     u,
281			Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute),
282		}
283
284		endpoint.Add(addr)
285	}
286
287	d.EndpointCache.Add(endpoint)
288
289	return endpoint, nil
290}
291
292func (d *discovererDescribeEndpoints) Handler(r *request.Request) {
293	endpointKey := crr.BuildEndpointKey(d.Params)
294	d.Key = endpointKey
295	d.req = r
296
297	endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required)
298	if err != nil {
299		r.Error = err
300		return
301	}
302
303	if endpoint.URL != nil && len(endpoint.URL.String()) > 0 {
304		r.HTTPRequest.URL = endpoint.URL
305	}
306}
307
308const opQuery = "Query"
309
310// QueryRequest generates a "aws/request.Request" representing the
311// client's request for the Query operation. The "output" return
312// value will be populated with the request's response once the request completes
313// successfully.
314//
315// Use "Send" method on the returned Request to send the API call to the service.
316// the "output" return value is not valid until after Send returns without error.
317//
318// See Query for more information on using the Query
319// API call, and error handling.
320//
321// This method is useful when you want to inject custom logic or configuration
322// into the SDK's request lifecycle. Such as custom headers, or retry logic.
323//
324//
325//    // Example sending a request using the QueryRequest method.
326//    req, resp := client.QueryRequest(params)
327//
328//    err := req.Send()
329//    if err == nil { // resp is now filled
330//        fmt.Println(resp)
331//    }
332//
333// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query
334func (c *TimestreamQuery) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput) {
335	op := &request.Operation{
336		Name:       opQuery,
337		HTTPMethod: "POST",
338		HTTPPath:   "/",
339		Paginator: &request.Paginator{
340			InputTokens:     []string{"NextToken"},
341			OutputTokens:    []string{"NextToken"},
342			LimitToken:      "MaxRows",
343			TruncationToken: "",
344		},
345	}
346
347	if input == nil {
348		input = &QueryInput{}
349	}
350
351	output = &QueryOutput{}
352	req = c.newRequest(op, input, output)
353	// if custom endpoint for the request is set to a non empty string,
354	// we skip the endpoint discovery workflow.
355	if req.Config.Endpoint == nil || *req.Config.Endpoint == "" {
356		de := discovererDescribeEndpoints{
357			Required:      true,
358			EndpointCache: c.endpointCache,
359			Params: map[string]*string{
360				"op": aws.String(req.Operation.Name),
361			},
362			Client: c,
363		}
364
365		for k, v := range de.Params {
366			if v == nil {
367				delete(de.Params, k)
368			}
369		}
370
371		req.Handlers.Build.PushFrontNamed(request.NamedHandler{
372			Name: "crr.endpointdiscovery",
373			Fn:   de.Handler,
374		})
375	}
376	return
377}
378
379// Query API operation for Amazon Timestream Query.
380//
381// Query is a synchronous operation that enables you to execute a query. Query
382// will timeout after 60 seconds. You must update the default timeout in the
383// SDK to support a timeout of 60 seconds. The result set will be truncated
384// to 1MB. Service quotas apply. For more information, see Quotas in the Timestream
385// Developer Guide.
386//
387// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
388// with awserr.Error's Code and Message methods to get detailed information about
389// the error.
390//
391// See the AWS API reference guide for Amazon Timestream Query's
392// API operation Query for usage and error information.
393//
394// Returned Error Types:
395//   * AccessDeniedException
396//   You are not authorized to perform this action.
397//
398//   * ConflictException
399//   Unable to poll results for a cancelled query.
400//
401//   * InternalServerException
402//   Timestream was unable to fully process this request because of an internal
403//   server error.
404//
405//   * QueryExecutionException
406//   Timestream was unable to run the query successfully.
407//
408//   * ThrottlingException
409//   The request was denied due to request throttling.
410//
411//   * ValidationException
412//   Invalid or malformed request.
413//
414//   * InvalidEndpointException
415//   The requested endpoint was invalid.
416//
417// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query
418func (c *TimestreamQuery) Query(input *QueryInput) (*QueryOutput, error) {
419	req, out := c.QueryRequest(input)
420	return out, req.Send()
421}
422
423// QueryWithContext is the same as Query with the addition of
424// the ability to pass a context and additional request options.
425//
426// See Query for details on how to use this API operation.
427//
428// The context must be non-nil and will be used for request cancellation. If
429// the context is nil a panic will occur. In the future the SDK may create
430// sub-contexts for http.Requests. See https://golang.org/pkg/context/
431// for more information on using Contexts.
432func (c *TimestreamQuery) QueryWithContext(ctx aws.Context, input *QueryInput, opts ...request.Option) (*QueryOutput, error) {
433	req, out := c.QueryRequest(input)
434	req.SetContext(ctx)
435	req.ApplyOptions(opts...)
436	return out, req.Send()
437}
438
439// QueryPages iterates over the pages of a Query operation,
440// calling the "fn" function with the response data for each page. To stop
441// iterating, return false from the fn function.
442//
443// See Query method for more information on how to use this operation.
444//
445// Note: This operation can generate multiple requests to a service.
446//
447//    // Example iterating over at most 3 pages of a Query operation.
448//    pageNum := 0
449//    err := client.QueryPages(params,
450//        func(page *timestreamquery.QueryOutput, lastPage bool) bool {
451//            pageNum++
452//            fmt.Println(page)
453//            return pageNum <= 3
454//        })
455//
456func (c *TimestreamQuery) QueryPages(input *QueryInput, fn func(*QueryOutput, bool) bool) error {
457	return c.QueryPagesWithContext(aws.BackgroundContext(), input, fn)
458}
459
460// QueryPagesWithContext same as QueryPages except
461// it takes a Context and allows setting request options on the pages.
462//
463// The context must be non-nil and will be used for request cancellation. If
464// the context is nil a panic will occur. In the future the SDK may create
465// sub-contexts for http.Requests. See https://golang.org/pkg/context/
466// for more information on using Contexts.
467func (c *TimestreamQuery) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn func(*QueryOutput, bool) bool, opts ...request.Option) error {
468	p := request.Pagination{
469		NewRequest: func() (*request.Request, error) {
470			var inCpy *QueryInput
471			if input != nil {
472				tmp := *input
473				inCpy = &tmp
474			}
475			req, _ := c.QueryRequest(inCpy)
476			req.SetContext(ctx)
477			req.ApplyOptions(opts...)
478			return req, nil
479		},
480	}
481
482	for p.Next() {
483		if !fn(p.Page().(*QueryOutput), !p.HasNextPage()) {
484			break
485		}
486	}
487
488	return p.Err()
489}
490
491// You are not authorized to perform this action.
492type AccessDeniedException struct {
493	_            struct{}                  `type:"structure"`
494	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
495
496	Message_ *string `locationName:"Message" type:"string"`
497}
498
499// String returns the string representation.
500//
501// API parameter values that are decorated as "sensitive" in the API will not
502// be included in the string output. The member name will be present, but the
503// value will be replaced with "sensitive".
504func (s AccessDeniedException) String() string {
505	return awsutil.Prettify(s)
506}
507
508// GoString returns the string representation.
509//
510// API parameter values that are decorated as "sensitive" in the API will not
511// be included in the string output. The member name will be present, but the
512// value will be replaced with "sensitive".
513func (s AccessDeniedException) GoString() string {
514	return s.String()
515}
516
517func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
518	return &AccessDeniedException{
519		RespMetadata: v,
520	}
521}
522
523// Code returns the exception type name.
524func (s *AccessDeniedException) Code() string {
525	return "AccessDeniedException"
526}
527
528// Message returns the exception's message.
529func (s *AccessDeniedException) Message() string {
530	if s.Message_ != nil {
531		return *s.Message_
532	}
533	return ""
534}
535
536// OrigErr always returns nil, satisfies awserr.Error interface.
537func (s *AccessDeniedException) OrigErr() error {
538	return nil
539}
540
541func (s *AccessDeniedException) Error() string {
542	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
543}
544
545// Status code returns the HTTP status code for the request's response error.
546func (s *AccessDeniedException) StatusCode() int {
547	return s.RespMetadata.StatusCode
548}
549
550// RequestID returns the service's response RequestID for request.
551func (s *AccessDeniedException) RequestID() string {
552	return s.RespMetadata.RequestID
553}
554
555type CancelQueryInput struct {
556	_ struct{} `type:"structure"`
557
558	// The id of the query that needs to be cancelled. QueryID is returned as part
559	// of QueryResult.
560	//
561	// QueryId is a required field
562	QueryId *string `min:"1" type:"string" required:"true"`
563}
564
565// String returns the string representation.
566//
567// API parameter values that are decorated as "sensitive" in the API will not
568// be included in the string output. The member name will be present, but the
569// value will be replaced with "sensitive".
570func (s CancelQueryInput) String() string {
571	return awsutil.Prettify(s)
572}
573
574// GoString returns the string representation.
575//
576// API parameter values that are decorated as "sensitive" in the API will not
577// be included in the string output. The member name will be present, but the
578// value will be replaced with "sensitive".
579func (s CancelQueryInput) GoString() string {
580	return s.String()
581}
582
583// Validate inspects the fields of the type to determine if they are valid.
584func (s *CancelQueryInput) Validate() error {
585	invalidParams := request.ErrInvalidParams{Context: "CancelQueryInput"}
586	if s.QueryId == nil {
587		invalidParams.Add(request.NewErrParamRequired("QueryId"))
588	}
589	if s.QueryId != nil && len(*s.QueryId) < 1 {
590		invalidParams.Add(request.NewErrParamMinLen("QueryId", 1))
591	}
592
593	if invalidParams.Len() > 0 {
594		return invalidParams
595	}
596	return nil
597}
598
599// SetQueryId sets the QueryId field's value.
600func (s *CancelQueryInput) SetQueryId(v string) *CancelQueryInput {
601	s.QueryId = &v
602	return s
603}
604
605type CancelQueryOutput struct {
606	_ struct{} `type:"structure"`
607
608	// A CancellationMessage is returned when a CancelQuery request for the query
609	// specified by QueryId has already been issued.
610	CancellationMessage *string `type:"string"`
611}
612
613// String returns the string representation.
614//
615// API parameter values that are decorated as "sensitive" in the API will not
616// be included in the string output. The member name will be present, but the
617// value will be replaced with "sensitive".
618func (s CancelQueryOutput) String() string {
619	return awsutil.Prettify(s)
620}
621
622// GoString returns the string representation.
623//
624// API parameter values that are decorated as "sensitive" in the API will not
625// be included in the string output. The member name will be present, but the
626// value will be replaced with "sensitive".
627func (s CancelQueryOutput) GoString() string {
628	return s.String()
629}
630
631// SetCancellationMessage sets the CancellationMessage field's value.
632func (s *CancelQueryOutput) SetCancellationMessage(v string) *CancelQueryOutput {
633	s.CancellationMessage = &v
634	return s
635}
636
637// Contains the meta data for query results such as the column names, data types,
638// and other attributes.
639type ColumnInfo struct {
640	_ struct{} `type:"structure"`
641
642	// The name of the result set column. The name of the result set is available
643	// for columns of all data types except for arrays.
644	Name *string `type:"string"`
645
646	// The data type of the result set column. The data type can be a scalar or
647	// complex. Scalar data types are integers, strings, doubles, booleans, and
648	// others. Complex data types are types such as arrays, rows, and others.
649	//
650	// Type is a required field
651	Type *Type `type:"structure" required:"true"`
652}
653
654// String returns the string representation.
655//
656// API parameter values that are decorated as "sensitive" in the API will not
657// be included in the string output. The member name will be present, but the
658// value will be replaced with "sensitive".
659func (s ColumnInfo) String() string {
660	return awsutil.Prettify(s)
661}
662
663// GoString returns the string representation.
664//
665// API parameter values that are decorated as "sensitive" in the API will not
666// be included in the string output. The member name will be present, but the
667// value will be replaced with "sensitive".
668func (s ColumnInfo) GoString() string {
669	return s.String()
670}
671
672// SetName sets the Name field's value.
673func (s *ColumnInfo) SetName(v string) *ColumnInfo {
674	s.Name = &v
675	return s
676}
677
678// SetType sets the Type field's value.
679func (s *ColumnInfo) SetType(v *Type) *ColumnInfo {
680	s.Type = v
681	return s
682}
683
684// Unable to poll results for a cancelled query.
685type ConflictException struct {
686	_            struct{}                  `type:"structure"`
687	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
688
689	Message_ *string `locationName:"Message" type:"string"`
690}
691
692// String returns the string representation.
693//
694// API parameter values that are decorated as "sensitive" in the API will not
695// be included in the string output. The member name will be present, but the
696// value will be replaced with "sensitive".
697func (s ConflictException) String() string {
698	return awsutil.Prettify(s)
699}
700
701// GoString returns the string representation.
702//
703// API parameter values that are decorated as "sensitive" in the API will not
704// be included in the string output. The member name will be present, but the
705// value will be replaced with "sensitive".
706func (s ConflictException) GoString() string {
707	return s.String()
708}
709
710func newErrorConflictException(v protocol.ResponseMetadata) error {
711	return &ConflictException{
712		RespMetadata: v,
713	}
714}
715
716// Code returns the exception type name.
717func (s *ConflictException) Code() string {
718	return "ConflictException"
719}
720
721// Message returns the exception's message.
722func (s *ConflictException) Message() string {
723	if s.Message_ != nil {
724		return *s.Message_
725	}
726	return ""
727}
728
729// OrigErr always returns nil, satisfies awserr.Error interface.
730func (s *ConflictException) OrigErr() error {
731	return nil
732}
733
734func (s *ConflictException) Error() string {
735	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
736}
737
738// Status code returns the HTTP status code for the request's response error.
739func (s *ConflictException) StatusCode() int {
740	return s.RespMetadata.StatusCode
741}
742
743// RequestID returns the service's response RequestID for request.
744func (s *ConflictException) RequestID() string {
745	return s.RespMetadata.RequestID
746}
747
748// Datum represents a single data point in a query result.
749type Datum struct {
750	_ struct{} `type:"structure"`
751
752	// Indicates if the data point is an array.
753	ArrayValue []*Datum `type:"list"`
754
755	// Indicates if the data point is null.
756	NullValue *bool `type:"boolean"`
757
758	// Indicates if the data point is a row.
759	RowValue *Row `type:"structure"`
760
761	// Indicates if the data point is a scalar value such as integer, string, double,
762	// or boolean.
763	ScalarValue *string `type:"string"`
764
765	// Indicates if the data point is of timeseries data type.
766	TimeSeriesValue []*TimeSeriesDataPoint `type:"list"`
767}
768
769// String returns the string representation.
770//
771// API parameter values that are decorated as "sensitive" in the API will not
772// be included in the string output. The member name will be present, but the
773// value will be replaced with "sensitive".
774func (s Datum) String() string {
775	return awsutil.Prettify(s)
776}
777
778// GoString returns the string representation.
779//
780// API parameter values that are decorated as "sensitive" in the API will not
781// be included in the string output. The member name will be present, but the
782// value will be replaced with "sensitive".
783func (s Datum) GoString() string {
784	return s.String()
785}
786
787// SetArrayValue sets the ArrayValue field's value.
788func (s *Datum) SetArrayValue(v []*Datum) *Datum {
789	s.ArrayValue = v
790	return s
791}
792
793// SetNullValue sets the NullValue field's value.
794func (s *Datum) SetNullValue(v bool) *Datum {
795	s.NullValue = &v
796	return s
797}
798
799// SetRowValue sets the RowValue field's value.
800func (s *Datum) SetRowValue(v *Row) *Datum {
801	s.RowValue = v
802	return s
803}
804
805// SetScalarValue sets the ScalarValue field's value.
806func (s *Datum) SetScalarValue(v string) *Datum {
807	s.ScalarValue = &v
808	return s
809}
810
811// SetTimeSeriesValue sets the TimeSeriesValue field's value.
812func (s *Datum) SetTimeSeriesValue(v []*TimeSeriesDataPoint) *Datum {
813	s.TimeSeriesValue = v
814	return s
815}
816
817type DescribeEndpointsInput struct {
818	_ struct{} `type:"structure"`
819}
820
821// String returns the string representation.
822//
823// API parameter values that are decorated as "sensitive" in the API will not
824// be included in the string output. The member name will be present, but the
825// value will be replaced with "sensitive".
826func (s DescribeEndpointsInput) String() string {
827	return awsutil.Prettify(s)
828}
829
830// GoString returns the string representation.
831//
832// API parameter values that are decorated as "sensitive" in the API will not
833// be included in the string output. The member name will be present, but the
834// value will be replaced with "sensitive".
835func (s DescribeEndpointsInput) GoString() string {
836	return s.String()
837}
838
839type DescribeEndpointsOutput struct {
840	_ struct{} `type:"structure"`
841
842	// An Endpoints object is returned when a DescribeEndpoints request is made.
843	//
844	// Endpoints is a required field
845	Endpoints []*Endpoint `type:"list" required:"true"`
846}
847
848// String returns the string representation.
849//
850// API parameter values that are decorated as "sensitive" in the API will not
851// be included in the string output. The member name will be present, but the
852// value will be replaced with "sensitive".
853func (s DescribeEndpointsOutput) String() string {
854	return awsutil.Prettify(s)
855}
856
857// GoString returns the string representation.
858//
859// API parameter values that are decorated as "sensitive" in the API will not
860// be included in the string output. The member name will be present, but the
861// value will be replaced with "sensitive".
862func (s DescribeEndpointsOutput) GoString() string {
863	return s.String()
864}
865
866// SetEndpoints sets the Endpoints field's value.
867func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput {
868	s.Endpoints = v
869	return s
870}
871
872// Represents an available endpoint against which to make API calls agaisnt,
873// as well as the TTL for that endpoint.
874type Endpoint struct {
875	_ struct{} `type:"structure"`
876
877	// An endpoint address.
878	//
879	// Address is a required field
880	Address *string `type:"string" required:"true"`
881
882	// The TTL for the endpoint, in minutes.
883	//
884	// CachePeriodInMinutes is a required field
885	CachePeriodInMinutes *int64 `type:"long" required:"true"`
886}
887
888// String returns the string representation.
889//
890// API parameter values that are decorated as "sensitive" in the API will not
891// be included in the string output. The member name will be present, but the
892// value will be replaced with "sensitive".
893func (s Endpoint) String() string {
894	return awsutil.Prettify(s)
895}
896
897// GoString returns the string representation.
898//
899// API parameter values that are decorated as "sensitive" in the API will not
900// be included in the string output. The member name will be present, but the
901// value will be replaced with "sensitive".
902func (s Endpoint) GoString() string {
903	return s.String()
904}
905
906// SetAddress sets the Address field's value.
907func (s *Endpoint) SetAddress(v string) *Endpoint {
908	s.Address = &v
909	return s
910}
911
912// SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value.
913func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint {
914	s.CachePeriodInMinutes = &v
915	return s
916}
917
918// Timestream was unable to fully process this request because of an internal
919// server error.
920type InternalServerException struct {
921	_            struct{}                  `type:"structure"`
922	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
923
924	Message_ *string `locationName:"Message" type:"string"`
925}
926
927// String returns the string representation.
928//
929// API parameter values that are decorated as "sensitive" in the API will not
930// be included in the string output. The member name will be present, but the
931// value will be replaced with "sensitive".
932func (s InternalServerException) String() string {
933	return awsutil.Prettify(s)
934}
935
936// GoString returns the string representation.
937//
938// API parameter values that are decorated as "sensitive" in the API will not
939// be included in the string output. The member name will be present, but the
940// value will be replaced with "sensitive".
941func (s InternalServerException) GoString() string {
942	return s.String()
943}
944
945func newErrorInternalServerException(v protocol.ResponseMetadata) error {
946	return &InternalServerException{
947		RespMetadata: v,
948	}
949}
950
951// Code returns the exception type name.
952func (s *InternalServerException) Code() string {
953	return "InternalServerException"
954}
955
956// Message returns the exception's message.
957func (s *InternalServerException) Message() string {
958	if s.Message_ != nil {
959		return *s.Message_
960	}
961	return ""
962}
963
964// OrigErr always returns nil, satisfies awserr.Error interface.
965func (s *InternalServerException) OrigErr() error {
966	return nil
967}
968
969func (s *InternalServerException) Error() string {
970	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
971}
972
973// Status code returns the HTTP status code for the request's response error.
974func (s *InternalServerException) StatusCode() int {
975	return s.RespMetadata.StatusCode
976}
977
978// RequestID returns the service's response RequestID for request.
979func (s *InternalServerException) RequestID() string {
980	return s.RespMetadata.RequestID
981}
982
983// The requested endpoint was invalid.
984type InvalidEndpointException struct {
985	_            struct{}                  `type:"structure"`
986	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
987
988	Message_ *string `locationName:"Message" type:"string"`
989}
990
991// String returns the string representation.
992//
993// API parameter values that are decorated as "sensitive" in the API will not
994// be included in the string output. The member name will be present, but the
995// value will be replaced with "sensitive".
996func (s InvalidEndpointException) String() string {
997	return awsutil.Prettify(s)
998}
999
1000// GoString returns the string representation.
1001//
1002// API parameter values that are decorated as "sensitive" in the API will not
1003// be included in the string output. The member name will be present, but the
1004// value will be replaced with "sensitive".
1005func (s InvalidEndpointException) GoString() string {
1006	return s.String()
1007}
1008
1009func newErrorInvalidEndpointException(v protocol.ResponseMetadata) error {
1010	return &InvalidEndpointException{
1011		RespMetadata: v,
1012	}
1013}
1014
1015// Code returns the exception type name.
1016func (s *InvalidEndpointException) Code() string {
1017	return "InvalidEndpointException"
1018}
1019
1020// Message returns the exception's message.
1021func (s *InvalidEndpointException) Message() string {
1022	if s.Message_ != nil {
1023		return *s.Message_
1024	}
1025	return ""
1026}
1027
1028// OrigErr always returns nil, satisfies awserr.Error interface.
1029func (s *InvalidEndpointException) OrigErr() error {
1030	return nil
1031}
1032
1033func (s *InvalidEndpointException) Error() string {
1034	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1035}
1036
1037// Status code returns the HTTP status code for the request's response error.
1038func (s *InvalidEndpointException) StatusCode() int {
1039	return s.RespMetadata.StatusCode
1040}
1041
1042// RequestID returns the service's response RequestID for request.
1043func (s *InvalidEndpointException) RequestID() string {
1044	return s.RespMetadata.RequestID
1045}
1046
1047// Timestream was unable to run the query successfully.
1048type QueryExecutionException struct {
1049	_            struct{}                  `type:"structure"`
1050	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1051
1052	Message_ *string `locationName:"Message" type:"string"`
1053}
1054
1055// String returns the string representation.
1056//
1057// API parameter values that are decorated as "sensitive" in the API will not
1058// be included in the string output. The member name will be present, but the
1059// value will be replaced with "sensitive".
1060func (s QueryExecutionException) String() string {
1061	return awsutil.Prettify(s)
1062}
1063
1064// GoString returns the string representation.
1065//
1066// API parameter values that are decorated as "sensitive" in the API will not
1067// be included in the string output. The member name will be present, but the
1068// value will be replaced with "sensitive".
1069func (s QueryExecutionException) GoString() string {
1070	return s.String()
1071}
1072
1073func newErrorQueryExecutionException(v protocol.ResponseMetadata) error {
1074	return &QueryExecutionException{
1075		RespMetadata: v,
1076	}
1077}
1078
1079// Code returns the exception type name.
1080func (s *QueryExecutionException) Code() string {
1081	return "QueryExecutionException"
1082}
1083
1084// Message returns the exception's message.
1085func (s *QueryExecutionException) Message() string {
1086	if s.Message_ != nil {
1087		return *s.Message_
1088	}
1089	return ""
1090}
1091
1092// OrigErr always returns nil, satisfies awserr.Error interface.
1093func (s *QueryExecutionException) OrigErr() error {
1094	return nil
1095}
1096
1097func (s *QueryExecutionException) Error() string {
1098	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1099}
1100
1101// Status code returns the HTTP status code for the request's response error.
1102func (s *QueryExecutionException) StatusCode() int {
1103	return s.RespMetadata.StatusCode
1104}
1105
1106// RequestID returns the service's response RequestID for request.
1107func (s *QueryExecutionException) RequestID() string {
1108	return s.RespMetadata.RequestID
1109}
1110
1111type QueryInput struct {
1112	_ struct{} `type:"structure"`
1113
1114	// Unique, case-sensitive string of up to 64 ASCII characters that you specify
1115	// when you make a Query request. Providing a ClientToken makes the call to
1116	// Query idempotent, meaning that multiple identical calls have the same effect
1117	// as one single call.
1118	//
1119	// Your query request will fail in the following cases:
1120	//
1121	//    * If you submit a request with the same client token outside the 5-minute
1122	//    idepotency window.
1123	//
1124	//    * If you submit a request with the same client token but a change in other
1125	//    parameters within the 5-minute idempotency window.
1126	//
1127	// After 4 hours, any request with the same client token is treated as a new
1128	// request.
1129	//
1130	// ClientToken is a sensitive parameter and its value will be
1131	// replaced with "sensitive" in string returned by QueryInput's
1132	// String and GoString methods.
1133	ClientToken *string `min:"32" type:"string" idempotencyToken:"true" sensitive:"true"`
1134
1135	// The total number of rows to return in the output. If the total number of
1136	// rows available is more than the value specified, a NextToken is provided
1137	// in the command's output. To resume pagination, provide the NextToken value
1138	// in the starting-token argument of a subsequent command.
1139	MaxRows *int64 `min:"1" type:"integer"`
1140
1141	// A pagination token passed to get a set of results.
1142	NextToken *string `type:"string"`
1143
1144	// The query to be executed by Timestream.
1145	//
1146	// QueryString is a sensitive parameter and its value will be
1147	// replaced with "sensitive" in string returned by QueryInput's
1148	// String and GoString methods.
1149	//
1150	// QueryString is a required field
1151	QueryString *string `type:"string" required:"true" sensitive:"true"`
1152}
1153
1154// String returns the string representation.
1155//
1156// API parameter values that are decorated as "sensitive" in the API will not
1157// be included in the string output. The member name will be present, but the
1158// value will be replaced with "sensitive".
1159func (s QueryInput) String() string {
1160	return awsutil.Prettify(s)
1161}
1162
1163// GoString returns the string representation.
1164//
1165// API parameter values that are decorated as "sensitive" in the API will not
1166// be included in the string output. The member name will be present, but the
1167// value will be replaced with "sensitive".
1168func (s QueryInput) GoString() string {
1169	return s.String()
1170}
1171
1172// Validate inspects the fields of the type to determine if they are valid.
1173func (s *QueryInput) Validate() error {
1174	invalidParams := request.ErrInvalidParams{Context: "QueryInput"}
1175	if s.ClientToken != nil && len(*s.ClientToken) < 32 {
1176		invalidParams.Add(request.NewErrParamMinLen("ClientToken", 32))
1177	}
1178	if s.MaxRows != nil && *s.MaxRows < 1 {
1179		invalidParams.Add(request.NewErrParamMinValue("MaxRows", 1))
1180	}
1181	if s.QueryString == nil {
1182		invalidParams.Add(request.NewErrParamRequired("QueryString"))
1183	}
1184
1185	if invalidParams.Len() > 0 {
1186		return invalidParams
1187	}
1188	return nil
1189}
1190
1191// SetClientToken sets the ClientToken field's value.
1192func (s *QueryInput) SetClientToken(v string) *QueryInput {
1193	s.ClientToken = &v
1194	return s
1195}
1196
1197// SetMaxRows sets the MaxRows field's value.
1198func (s *QueryInput) SetMaxRows(v int64) *QueryInput {
1199	s.MaxRows = &v
1200	return s
1201}
1202
1203// SetNextToken sets the NextToken field's value.
1204func (s *QueryInput) SetNextToken(v string) *QueryInput {
1205	s.NextToken = &v
1206	return s
1207}
1208
1209// SetQueryString sets the QueryString field's value.
1210func (s *QueryInput) SetQueryString(v string) *QueryInput {
1211	s.QueryString = &v
1212	return s
1213}
1214
1215type QueryOutput struct {
1216	_ struct{} `type:"structure"`
1217
1218	// The column data types of the returned result set.
1219	//
1220	// ColumnInfo is a required field
1221	ColumnInfo []*ColumnInfo `type:"list" required:"true"`
1222
1223	// A pagination token that can be used again on a Query call to get the next
1224	// set of results.
1225	NextToken *string `type:"string"`
1226
1227	// A unique ID for the given query.
1228	//
1229	// QueryId is a required field
1230	QueryId *string `min:"1" type:"string" required:"true"`
1231
1232	// Information about the status of the query, including progress and bytes scannned.
1233	QueryStatus *QueryStatus `type:"structure"`
1234
1235	// The result set rows returned by the query.
1236	//
1237	// Rows is a required field
1238	Rows []*Row `type:"list" required:"true"`
1239}
1240
1241// String returns the string representation.
1242//
1243// API parameter values that are decorated as "sensitive" in the API will not
1244// be included in the string output. The member name will be present, but the
1245// value will be replaced with "sensitive".
1246func (s QueryOutput) String() string {
1247	return awsutil.Prettify(s)
1248}
1249
1250// GoString returns the string representation.
1251//
1252// API parameter values that are decorated as "sensitive" in the API will not
1253// be included in the string output. The member name will be present, but the
1254// value will be replaced with "sensitive".
1255func (s QueryOutput) GoString() string {
1256	return s.String()
1257}
1258
1259// SetColumnInfo sets the ColumnInfo field's value.
1260func (s *QueryOutput) SetColumnInfo(v []*ColumnInfo) *QueryOutput {
1261	s.ColumnInfo = v
1262	return s
1263}
1264
1265// SetNextToken sets the NextToken field's value.
1266func (s *QueryOutput) SetNextToken(v string) *QueryOutput {
1267	s.NextToken = &v
1268	return s
1269}
1270
1271// SetQueryId sets the QueryId field's value.
1272func (s *QueryOutput) SetQueryId(v string) *QueryOutput {
1273	s.QueryId = &v
1274	return s
1275}
1276
1277// SetQueryStatus sets the QueryStatus field's value.
1278func (s *QueryOutput) SetQueryStatus(v *QueryStatus) *QueryOutput {
1279	s.QueryStatus = v
1280	return s
1281}
1282
1283// SetRows sets the Rows field's value.
1284func (s *QueryOutput) SetRows(v []*Row) *QueryOutput {
1285	s.Rows = v
1286	return s
1287}
1288
1289// Information about the status of the query, including progress and bytes scannned.
1290type QueryStatus struct {
1291	_ struct{} `type:"structure"`
1292
1293	// The amount of data scanned by the query in bytes that you will be charged
1294	// for. This is a cumulative sum and represents the total amount of data that
1295	// you will be charged for since the query was started. The charge is applied
1296	// only once and is either applied when the query completes execution or when
1297	// the query is cancelled.
1298	CumulativeBytesMetered *int64 `type:"long"`
1299
1300	// The amount of data scanned by the query in bytes. This is a cumulative sum
1301	// and represents the total amount of bytes scanned since the query was started.
1302	CumulativeBytesScanned *int64 `type:"long"`
1303
1304	// The progress of the query, expressed as a percentage.
1305	ProgressPercentage *float64 `type:"double"`
1306}
1307
1308// String returns the string representation.
1309//
1310// API parameter values that are decorated as "sensitive" in the API will not
1311// be included in the string output. The member name will be present, but the
1312// value will be replaced with "sensitive".
1313func (s QueryStatus) String() string {
1314	return awsutil.Prettify(s)
1315}
1316
1317// GoString returns the string representation.
1318//
1319// API parameter values that are decorated as "sensitive" in the API will not
1320// be included in the string output. The member name will be present, but the
1321// value will be replaced with "sensitive".
1322func (s QueryStatus) GoString() string {
1323	return s.String()
1324}
1325
1326// SetCumulativeBytesMetered sets the CumulativeBytesMetered field's value.
1327func (s *QueryStatus) SetCumulativeBytesMetered(v int64) *QueryStatus {
1328	s.CumulativeBytesMetered = &v
1329	return s
1330}
1331
1332// SetCumulativeBytesScanned sets the CumulativeBytesScanned field's value.
1333func (s *QueryStatus) SetCumulativeBytesScanned(v int64) *QueryStatus {
1334	s.CumulativeBytesScanned = &v
1335	return s
1336}
1337
1338// SetProgressPercentage sets the ProgressPercentage field's value.
1339func (s *QueryStatus) SetProgressPercentage(v float64) *QueryStatus {
1340	s.ProgressPercentage = &v
1341	return s
1342}
1343
1344// Represents a single row in the query results.
1345type Row struct {
1346	_ struct{} `type:"structure"`
1347
1348	// List of data points in a single row of the result set.
1349	//
1350	// Data is a required field
1351	Data []*Datum `type:"list" required:"true"`
1352}
1353
1354// String returns the string representation.
1355//
1356// API parameter values that are decorated as "sensitive" in the API will not
1357// be included in the string output. The member name will be present, but the
1358// value will be replaced with "sensitive".
1359func (s Row) String() string {
1360	return awsutil.Prettify(s)
1361}
1362
1363// GoString returns the string representation.
1364//
1365// API parameter values that are decorated as "sensitive" in the API will not
1366// be included in the string output. The member name will be present, but the
1367// value will be replaced with "sensitive".
1368func (s Row) GoString() string {
1369	return s.String()
1370}
1371
1372// SetData sets the Data field's value.
1373func (s *Row) SetData(v []*Datum) *Row {
1374	s.Data = v
1375	return s
1376}
1377
1378// The request was denied due to request throttling.
1379type ThrottlingException struct {
1380	_            struct{}                  `type:"structure"`
1381	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1382
1383	Message_ *string `locationName:"Message" type:"string"`
1384}
1385
1386// String returns the string representation.
1387//
1388// API parameter values that are decorated as "sensitive" in the API will not
1389// be included in the string output. The member name will be present, but the
1390// value will be replaced with "sensitive".
1391func (s ThrottlingException) String() string {
1392	return awsutil.Prettify(s)
1393}
1394
1395// GoString returns the string representation.
1396//
1397// API parameter values that are decorated as "sensitive" in the API will not
1398// be included in the string output. The member name will be present, but the
1399// value will be replaced with "sensitive".
1400func (s ThrottlingException) GoString() string {
1401	return s.String()
1402}
1403
1404func newErrorThrottlingException(v protocol.ResponseMetadata) error {
1405	return &ThrottlingException{
1406		RespMetadata: v,
1407	}
1408}
1409
1410// Code returns the exception type name.
1411func (s *ThrottlingException) Code() string {
1412	return "ThrottlingException"
1413}
1414
1415// Message returns the exception's message.
1416func (s *ThrottlingException) Message() string {
1417	if s.Message_ != nil {
1418		return *s.Message_
1419	}
1420	return ""
1421}
1422
1423// OrigErr always returns nil, satisfies awserr.Error interface.
1424func (s *ThrottlingException) OrigErr() error {
1425	return nil
1426}
1427
1428func (s *ThrottlingException) Error() string {
1429	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1430}
1431
1432// Status code returns the HTTP status code for the request's response error.
1433func (s *ThrottlingException) StatusCode() int {
1434	return s.RespMetadata.StatusCode
1435}
1436
1437// RequestID returns the service's response RequestID for request.
1438func (s *ThrottlingException) RequestID() string {
1439	return s.RespMetadata.RequestID
1440}
1441
1442// The timeseries datatype represents the values of a measure over time. A time
1443// series is an array of rows of timestamps and measure values, with rows sorted
1444// in ascending order of time. A TimeSeriesDataPoint is a single data point
1445// in the timeseries. It represents a tuple of (time, measure value) in a timeseries.
1446type TimeSeriesDataPoint struct {
1447	_ struct{} `type:"structure"`
1448
1449	// The timestamp when the measure value was collected.
1450	//
1451	// Time is a required field
1452	Time *string `type:"string" required:"true"`
1453
1454	// The measure value for the data point.
1455	//
1456	// Value is a required field
1457	Value *Datum `type:"structure" required:"true"`
1458}
1459
1460// String returns the string representation.
1461//
1462// API parameter values that are decorated as "sensitive" in the API will not
1463// be included in the string output. The member name will be present, but the
1464// value will be replaced with "sensitive".
1465func (s TimeSeriesDataPoint) String() string {
1466	return awsutil.Prettify(s)
1467}
1468
1469// GoString returns the string representation.
1470//
1471// API parameter values that are decorated as "sensitive" in the API will not
1472// be included in the string output. The member name will be present, but the
1473// value will be replaced with "sensitive".
1474func (s TimeSeriesDataPoint) GoString() string {
1475	return s.String()
1476}
1477
1478// SetTime sets the Time field's value.
1479func (s *TimeSeriesDataPoint) SetTime(v string) *TimeSeriesDataPoint {
1480	s.Time = &v
1481	return s
1482}
1483
1484// SetValue sets the Value field's value.
1485func (s *TimeSeriesDataPoint) SetValue(v *Datum) *TimeSeriesDataPoint {
1486	s.Value = v
1487	return s
1488}
1489
1490// Contains the data type of a column in a query result set. The data type can
1491// be scalar or complex. The supported scalar data types are integers, boolean,
1492// string, double, timestamp, date, time, and intervals. The supported complex
1493// data types are arrays, rows, and timeseries.
1494type Type struct {
1495	_ struct{} `type:"structure"`
1496
1497	// Indicates if the column is an array.
1498	ArrayColumnInfo *ColumnInfo `type:"structure"`
1499
1500	// Indicates if the column is a row.
1501	RowColumnInfo []*ColumnInfo `type:"list"`
1502
1503	// Indicates if the column is of type string, integer, boolean, double, timestamp,
1504	// date, time.
1505	ScalarType *string `type:"string" enum:"ScalarType"`
1506
1507	// Indicates if the column is a timeseries data type.
1508	TimeSeriesMeasureValueColumnInfo *ColumnInfo `type:"structure"`
1509}
1510
1511// String returns the string representation.
1512//
1513// API parameter values that are decorated as "sensitive" in the API will not
1514// be included in the string output. The member name will be present, but the
1515// value will be replaced with "sensitive".
1516func (s Type) String() string {
1517	return awsutil.Prettify(s)
1518}
1519
1520// GoString returns the string representation.
1521//
1522// API parameter values that are decorated as "sensitive" in the API will not
1523// be included in the string output. The member name will be present, but the
1524// value will be replaced with "sensitive".
1525func (s Type) GoString() string {
1526	return s.String()
1527}
1528
1529// SetArrayColumnInfo sets the ArrayColumnInfo field's value.
1530func (s *Type) SetArrayColumnInfo(v *ColumnInfo) *Type {
1531	s.ArrayColumnInfo = v
1532	return s
1533}
1534
1535// SetRowColumnInfo sets the RowColumnInfo field's value.
1536func (s *Type) SetRowColumnInfo(v []*ColumnInfo) *Type {
1537	s.RowColumnInfo = v
1538	return s
1539}
1540
1541// SetScalarType sets the ScalarType field's value.
1542func (s *Type) SetScalarType(v string) *Type {
1543	s.ScalarType = &v
1544	return s
1545}
1546
1547// SetTimeSeriesMeasureValueColumnInfo sets the TimeSeriesMeasureValueColumnInfo field's value.
1548func (s *Type) SetTimeSeriesMeasureValueColumnInfo(v *ColumnInfo) *Type {
1549	s.TimeSeriesMeasureValueColumnInfo = v
1550	return s
1551}
1552
1553// Invalid or malformed request.
1554type ValidationException struct {
1555	_            struct{}                  `type:"structure"`
1556	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1557
1558	Message_ *string `locationName:"Message" type:"string"`
1559}
1560
1561// String returns the string representation.
1562//
1563// API parameter values that are decorated as "sensitive" in the API will not
1564// be included in the string output. The member name will be present, but the
1565// value will be replaced with "sensitive".
1566func (s ValidationException) String() string {
1567	return awsutil.Prettify(s)
1568}
1569
1570// GoString returns the string representation.
1571//
1572// API parameter values that are decorated as "sensitive" in the API will not
1573// be included in the string output. The member name will be present, but the
1574// value will be replaced with "sensitive".
1575func (s ValidationException) GoString() string {
1576	return s.String()
1577}
1578
1579func newErrorValidationException(v protocol.ResponseMetadata) error {
1580	return &ValidationException{
1581		RespMetadata: v,
1582	}
1583}
1584
1585// Code returns the exception type name.
1586func (s *ValidationException) Code() string {
1587	return "ValidationException"
1588}
1589
1590// Message returns the exception's message.
1591func (s *ValidationException) Message() string {
1592	if s.Message_ != nil {
1593		return *s.Message_
1594	}
1595	return ""
1596}
1597
1598// OrigErr always returns nil, satisfies awserr.Error interface.
1599func (s *ValidationException) OrigErr() error {
1600	return nil
1601}
1602
1603func (s *ValidationException) Error() string {
1604	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1605}
1606
1607// Status code returns the HTTP status code for the request's response error.
1608func (s *ValidationException) StatusCode() int {
1609	return s.RespMetadata.StatusCode
1610}
1611
1612// RequestID returns the service's response RequestID for request.
1613func (s *ValidationException) RequestID() string {
1614	return s.RespMetadata.RequestID
1615}
1616
1617const (
1618	// ScalarTypeVarchar is a ScalarType enum value
1619	ScalarTypeVarchar = "VARCHAR"
1620
1621	// ScalarTypeBoolean is a ScalarType enum value
1622	ScalarTypeBoolean = "BOOLEAN"
1623
1624	// ScalarTypeBigint is a ScalarType enum value
1625	ScalarTypeBigint = "BIGINT"
1626
1627	// ScalarTypeDouble is a ScalarType enum value
1628	ScalarTypeDouble = "DOUBLE"
1629
1630	// ScalarTypeTimestamp is a ScalarType enum value
1631	ScalarTypeTimestamp = "TIMESTAMP"
1632
1633	// ScalarTypeDate is a ScalarType enum value
1634	ScalarTypeDate = "DATE"
1635
1636	// ScalarTypeTime is a ScalarType enum value
1637	ScalarTypeTime = "TIME"
1638
1639	// ScalarTypeIntervalDayToSecond is a ScalarType enum value
1640	ScalarTypeIntervalDayToSecond = "INTERVAL_DAY_TO_SECOND"
1641
1642	// ScalarTypeIntervalYearToMonth is a ScalarType enum value
1643	ScalarTypeIntervalYearToMonth = "INTERVAL_YEAR_TO_MONTH"
1644
1645	// ScalarTypeUnknown is a ScalarType enum value
1646	ScalarTypeUnknown = "UNKNOWN"
1647
1648	// ScalarTypeInteger is a ScalarType enum value
1649	ScalarTypeInteger = "INTEGER"
1650)
1651
1652// ScalarType_Values returns all elements of the ScalarType enum
1653func ScalarType_Values() []string {
1654	return []string{
1655		ScalarTypeVarchar,
1656		ScalarTypeBoolean,
1657		ScalarTypeBigint,
1658		ScalarTypeDouble,
1659		ScalarTypeTimestamp,
1660		ScalarTypeDate,
1661		ScalarTypeTime,
1662		ScalarTypeIntervalDayToSecond,
1663		ScalarTypeIntervalYearToMonth,
1664		ScalarTypeUnknown,
1665		ScalarTypeInteger,
1666	}
1667}
1668