1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package cloudsearchdomain
4
5import (
6	"io"
7
8	"github.com/aws/aws-sdk-go/aws"
9	"github.com/aws/aws-sdk-go/aws/awsutil"
10	"github.com/aws/aws-sdk-go/aws/request"
11)
12
13const opSearch = "Search"
14
15// SearchRequest generates a "aws/request.Request" representing the
16// client's request for the Search operation. The "output" return
17// value will be populated with the request's response once the request completes
18// successfully.
19//
20// Use "Send" method on the returned Request to send the API call to the service.
21// the "output" return value is not valid until after Send returns without error.
22//
23// See Search for more information on using the Search
24// API call, and error handling.
25//
26// This method is useful when you want to inject custom logic or configuration
27// into the SDK's request lifecycle. Such as custom headers, or retry logic.
28//
29//
30//    // Example sending a request using the SearchRequest method.
31//    req, resp := client.SearchRequest(params)
32//
33//    err := req.Send()
34//    if err == nil { // resp is now filled
35//        fmt.Println(resp)
36//    }
37func (c *CloudSearchDomain) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput) {
38	op := &request.Operation{
39		Name:       opSearch,
40		HTTPMethod: "GET",
41		HTTPPath:   "/2013-01-01/search?format=sdk&pretty=true",
42	}
43
44	if input == nil {
45		input = &SearchInput{}
46	}
47
48	output = &SearchOutput{}
49	req = c.newRequest(op, input, output)
50	return
51}
52
53// Search API operation for Amazon CloudSearch Domain.
54//
55// Retrieves a list of documents that match the specified search criteria. How
56// you specify the search criteria depends on which query parser you use. Amazon
57// CloudSearch supports four query parsers:
58//
59//    * simple: search all text and text-array fields for the specified string.
60//    Search for phrases, individual terms, and prefixes.
61//
62//    * structured: search specific fields, construct compound queries using
63//    Boolean operators, and use advanced features such as term boosting and
64//    proximity searching.
65//
66//    * lucene: specify search criteria using the Apache Lucene query parser
67//    syntax.
68//
69//    * dismax: specify search criteria using the simplified subset of the Apache
70//    Lucene query parser syntax defined by the DisMax query parser.
71//
72// For more information, see Searching Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
73// in the Amazon CloudSearch Developer Guide.
74//
75// The endpoint for submitting Search requests is domain-specific. You submit
76// search requests to a domain's search endpoint. To get the search endpoint
77// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
78// action. A domain's endpoints are also displayed on the domain dashboard in
79// the Amazon CloudSearch console.
80//
81// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
82// with awserr.Error's Code and Message methods to get detailed information about
83// the error.
84//
85// See the AWS API reference guide for Amazon CloudSearch Domain's
86// API operation Search for usage and error information.
87//
88// Returned Error Codes:
89//   * ErrCodeSearchException "SearchException"
90//   Information about any problems encountered while processing a search request.
91//
92func (c *CloudSearchDomain) Search(input *SearchInput) (*SearchOutput, error) {
93	req, out := c.SearchRequest(input)
94	return out, req.Send()
95}
96
97// SearchWithContext is the same as Search with the addition of
98// the ability to pass a context and additional request options.
99//
100// See Search for details on how to use this API operation.
101//
102// The context must be non-nil and will be used for request cancellation. If
103// the context is nil a panic will occur. In the future the SDK may create
104// sub-contexts for http.Requests. See https://golang.org/pkg/context/
105// for more information on using Contexts.
106func (c *CloudSearchDomain) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error) {
107	req, out := c.SearchRequest(input)
108	req.SetContext(ctx)
109	req.ApplyOptions(opts...)
110	return out, req.Send()
111}
112
113const opSuggest = "Suggest"
114
115// SuggestRequest generates a "aws/request.Request" representing the
116// client's request for the Suggest operation. The "output" return
117// value will be populated with the request's response once the request completes
118// successfully.
119//
120// Use "Send" method on the returned Request to send the API call to the service.
121// the "output" return value is not valid until after Send returns without error.
122//
123// See Suggest for more information on using the Suggest
124// API call, and error handling.
125//
126// This method is useful when you want to inject custom logic or configuration
127// into the SDK's request lifecycle. Such as custom headers, or retry logic.
128//
129//
130//    // Example sending a request using the SuggestRequest method.
131//    req, resp := client.SuggestRequest(params)
132//
133//    err := req.Send()
134//    if err == nil { // resp is now filled
135//        fmt.Println(resp)
136//    }
137func (c *CloudSearchDomain) SuggestRequest(input *SuggestInput) (req *request.Request, output *SuggestOutput) {
138	op := &request.Operation{
139		Name:       opSuggest,
140		HTTPMethod: "GET",
141		HTTPPath:   "/2013-01-01/suggest?format=sdk&pretty=true",
142	}
143
144	if input == nil {
145		input = &SuggestInput{}
146	}
147
148	output = &SuggestOutput{}
149	req = c.newRequest(op, input, output)
150	return
151}
152
153// Suggest API operation for Amazon CloudSearch Domain.
154//
155// Retrieves autocomplete suggestions for a partial query string. You can use
156// suggestions enable you to display likely matches before users finish typing.
157// In Amazon CloudSearch, suggestions are based on the contents of a particular
158// text field. When you request suggestions, Amazon CloudSearch finds all of
159// the documents whose values in the suggester field start with the specified
160// query string. The beginning of the field must match the query string to be
161// considered a match.
162//
163// For more information about configuring suggesters and retrieving suggestions,
164// see Getting Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
165// in the Amazon CloudSearch Developer Guide.
166//
167// The endpoint for submitting Suggest requests is domain-specific. You submit
168// suggest requests to a domain's search endpoint. To get the search endpoint
169// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
170// action. A domain's endpoints are also displayed on the domain dashboard in
171// the Amazon CloudSearch console.
172//
173// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
174// with awserr.Error's Code and Message methods to get detailed information about
175// the error.
176//
177// See the AWS API reference guide for Amazon CloudSearch Domain's
178// API operation Suggest for usage and error information.
179//
180// Returned Error Codes:
181//   * ErrCodeSearchException "SearchException"
182//   Information about any problems encountered while processing a search request.
183//
184func (c *CloudSearchDomain) Suggest(input *SuggestInput) (*SuggestOutput, error) {
185	req, out := c.SuggestRequest(input)
186	return out, req.Send()
187}
188
189// SuggestWithContext is the same as Suggest with the addition of
190// the ability to pass a context and additional request options.
191//
192// See Suggest for details on how to use this API operation.
193//
194// The context must be non-nil and will be used for request cancellation. If
195// the context is nil a panic will occur. In the future the SDK may create
196// sub-contexts for http.Requests. See https://golang.org/pkg/context/
197// for more information on using Contexts.
198func (c *CloudSearchDomain) SuggestWithContext(ctx aws.Context, input *SuggestInput, opts ...request.Option) (*SuggestOutput, error) {
199	req, out := c.SuggestRequest(input)
200	req.SetContext(ctx)
201	req.ApplyOptions(opts...)
202	return out, req.Send()
203}
204
205const opUploadDocuments = "UploadDocuments"
206
207// UploadDocumentsRequest generates a "aws/request.Request" representing the
208// client's request for the UploadDocuments operation. The "output" return
209// value will be populated with the request's response once the request completes
210// successfully.
211//
212// Use "Send" method on the returned Request to send the API call to the service.
213// the "output" return value is not valid until after Send returns without error.
214//
215// See UploadDocuments for more information on using the UploadDocuments
216// API call, and error handling.
217//
218// This method is useful when you want to inject custom logic or configuration
219// into the SDK's request lifecycle. Such as custom headers, or retry logic.
220//
221//
222//    // Example sending a request using the UploadDocumentsRequest method.
223//    req, resp := client.UploadDocumentsRequest(params)
224//
225//    err := req.Send()
226//    if err == nil { // resp is now filled
227//        fmt.Println(resp)
228//    }
229func (c *CloudSearchDomain) UploadDocumentsRequest(input *UploadDocumentsInput) (req *request.Request, output *UploadDocumentsOutput) {
230	op := &request.Operation{
231		Name:       opUploadDocuments,
232		HTTPMethod: "POST",
233		HTTPPath:   "/2013-01-01/documents/batch?format=sdk",
234	}
235
236	if input == nil {
237		input = &UploadDocumentsInput{}
238	}
239
240	output = &UploadDocumentsOutput{}
241	req = c.newRequest(op, input, output)
242	return
243}
244
245// UploadDocuments API operation for Amazon CloudSearch Domain.
246//
247// Posts a batch of documents to a search domain for indexing. A document batch
248// is a collection of add and delete operations that represent the documents
249// you want to add, update, or delete from your domain. Batches can be described
250// in either JSON or XML. Each item that you want Amazon CloudSearch to return
251// as a search result (such as a product) is represented as a document. Every
252// document has a unique ID and one or more fields that contain the data that
253// you want to search and return in results. Individual documents cannot contain
254// more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best
255// possible upload performance, group add and delete operations in batches that
256// are close the 5 MB limit. Submitting a large volume of single-document batches
257// can overload a domain's document service.
258//
259// The endpoint for submitting UploadDocuments requests is domain-specific.
260// To get the document endpoint for your domain, use the Amazon CloudSearch
261// configuration service DescribeDomains action. A domain's endpoints are also
262// displayed on the domain dashboard in the Amazon CloudSearch console.
263//
264// For more information about formatting your data for Amazon CloudSearch, see
265// Preparing Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html)
266// in the Amazon CloudSearch Developer Guide. For more information about uploading
267// data for indexing, see Uploading Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html)
268// in the Amazon CloudSearch Developer Guide.
269//
270// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
271// with awserr.Error's Code and Message methods to get detailed information about
272// the error.
273//
274// See the AWS API reference guide for Amazon CloudSearch Domain's
275// API operation UploadDocuments for usage and error information.
276//
277// Returned Error Codes:
278//   * ErrCodeDocumentServiceException "DocumentServiceException"
279//   Information about any problems encountered while processing an upload request.
280//
281func (c *CloudSearchDomain) UploadDocuments(input *UploadDocumentsInput) (*UploadDocumentsOutput, error) {
282	req, out := c.UploadDocumentsRequest(input)
283	return out, req.Send()
284}
285
286// UploadDocumentsWithContext is the same as UploadDocuments with the addition of
287// the ability to pass a context and additional request options.
288//
289// See UploadDocuments for details on how to use this API operation.
290//
291// The context must be non-nil and will be used for request cancellation. If
292// the context is nil a panic will occur. In the future the SDK may create
293// sub-contexts for http.Requests. See https://golang.org/pkg/context/
294// for more information on using Contexts.
295func (c *CloudSearchDomain) UploadDocumentsWithContext(ctx aws.Context, input *UploadDocumentsInput, opts ...request.Option) (*UploadDocumentsOutput, error) {
296	req, out := c.UploadDocumentsRequest(input)
297	req.SetContext(ctx)
298	req.ApplyOptions(opts...)
299	return out, req.Send()
300}
301
302// A container for facet information.
303type Bucket struct {
304	_ struct{} `type:"structure"`
305
306	// The number of hits that contain the facet value in the specified facet field.
307	Count *int64 `locationName:"count" type:"long"`
308
309	// The facet value being counted.
310	Value *string `locationName:"value" type:"string"`
311}
312
313// String returns the string representation
314func (s Bucket) String() string {
315	return awsutil.Prettify(s)
316}
317
318// GoString returns the string representation
319func (s Bucket) GoString() string {
320	return s.String()
321}
322
323// SetCount sets the Count field's value.
324func (s *Bucket) SetCount(v int64) *Bucket {
325	s.Count = &v
326	return s
327}
328
329// SetValue sets the Value field's value.
330func (s *Bucket) SetValue(v string) *Bucket {
331	s.Value = &v
332	return s
333}
334
335// A container for the calculated facet values and counts.
336type BucketInfo struct {
337	_ struct{} `type:"structure"`
338
339	// A list of the calculated facet values and counts.
340	Buckets []*Bucket `locationName:"buckets" type:"list"`
341}
342
343// String returns the string representation
344func (s BucketInfo) String() string {
345	return awsutil.Prettify(s)
346}
347
348// GoString returns the string representation
349func (s BucketInfo) GoString() string {
350	return s.String()
351}
352
353// SetBuckets sets the Buckets field's value.
354func (s *BucketInfo) SetBuckets(v []*Bucket) *BucketInfo {
355	s.Buckets = v
356	return s
357}
358
359// A warning returned by the document service when an issue is discovered while
360// processing an upload request.
361type DocumentServiceWarning struct {
362	_ struct{} `type:"structure"`
363
364	// The description for a warning returned by the document service.
365	Message *string `locationName:"message" type:"string"`
366}
367
368// String returns the string representation
369func (s DocumentServiceWarning) String() string {
370	return awsutil.Prettify(s)
371}
372
373// GoString returns the string representation
374func (s DocumentServiceWarning) GoString() string {
375	return s.String()
376}
377
378// SetMessage sets the Message field's value.
379func (s *DocumentServiceWarning) SetMessage(v string) *DocumentServiceWarning {
380	s.Message = &v
381	return s
382}
383
384// The statistics for a field calculated in the request.
385type FieldStats struct {
386	_ struct{} `type:"structure"`
387
388	// The number of documents that contain a value in the specified field in the
389	// result set.
390	Count *int64 `locationName:"count" type:"long"`
391
392	// The maximum value found in the specified field in the result set.
393	//
394	// If the field is numeric (int, int-array, double, or double-array), max is
395	// the string representation of a double-precision 64-bit floating point value.
396	// If the field is date or date-array, max is the string representation of a
397	// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
398	// yyyy-mm-ddTHH:mm:ss.SSSZ.
399	Max *string `locationName:"max" type:"string"`
400
401	// The average of the values found in the specified field in the result set.
402	//
403	// If the field is numeric (int, int-array, double, or double-array), mean is
404	// the string representation of a double-precision 64-bit floating point value.
405	// If the field is date or date-array, mean is the string representation of
406	// a date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
407	// yyyy-mm-ddTHH:mm:ss.SSSZ.
408	Mean *string `locationName:"mean" type:"string"`
409
410	// The minimum value found in the specified field in the result set.
411	//
412	// If the field is numeric (int, int-array, double, or double-array), min is
413	// the string representation of a double-precision 64-bit floating point value.
414	// If the field is date or date-array, min is the string representation of a
415	// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
416	// yyyy-mm-ddTHH:mm:ss.SSSZ.
417	Min *string `locationName:"min" type:"string"`
418
419	// The number of documents that do not contain a value in the specified field
420	// in the result set.
421	Missing *int64 `locationName:"missing" type:"long"`
422
423	// The standard deviation of the values in the specified field in the result
424	// set.
425	Stddev *float64 `locationName:"stddev" type:"double"`
426
427	// The sum of the field values across the documents in the result set. null
428	// for date fields.
429	Sum *float64 `locationName:"sum" type:"double"`
430
431	// The sum of all field values in the result set squared.
432	SumOfSquares *float64 `locationName:"sumOfSquares" type:"double"`
433}
434
435// String returns the string representation
436func (s FieldStats) String() string {
437	return awsutil.Prettify(s)
438}
439
440// GoString returns the string representation
441func (s FieldStats) GoString() string {
442	return s.String()
443}
444
445// SetCount sets the Count field's value.
446func (s *FieldStats) SetCount(v int64) *FieldStats {
447	s.Count = &v
448	return s
449}
450
451// SetMax sets the Max field's value.
452func (s *FieldStats) SetMax(v string) *FieldStats {
453	s.Max = &v
454	return s
455}
456
457// SetMean sets the Mean field's value.
458func (s *FieldStats) SetMean(v string) *FieldStats {
459	s.Mean = &v
460	return s
461}
462
463// SetMin sets the Min field's value.
464func (s *FieldStats) SetMin(v string) *FieldStats {
465	s.Min = &v
466	return s
467}
468
469// SetMissing sets the Missing field's value.
470func (s *FieldStats) SetMissing(v int64) *FieldStats {
471	s.Missing = &v
472	return s
473}
474
475// SetStddev sets the Stddev field's value.
476func (s *FieldStats) SetStddev(v float64) *FieldStats {
477	s.Stddev = &v
478	return s
479}
480
481// SetSum sets the Sum field's value.
482func (s *FieldStats) SetSum(v float64) *FieldStats {
483	s.Sum = &v
484	return s
485}
486
487// SetSumOfSquares sets the SumOfSquares field's value.
488func (s *FieldStats) SetSumOfSquares(v float64) *FieldStats {
489	s.SumOfSquares = &v
490	return s
491}
492
493// Information about a document that matches the search request.
494type Hit struct {
495	_ struct{} `type:"structure"`
496
497	// The expressions returned from a document that matches the search request.
498	Exprs map[string]*string `locationName:"exprs" type:"map"`
499
500	// The fields returned from a document that matches the search request.
501	Fields map[string][]*string `locationName:"fields" type:"map"`
502
503	// The highlights returned from a document that matches the search request.
504	Highlights map[string]*string `locationName:"highlights" type:"map"`
505
506	// The document ID of a document that matches the search request.
507	Id *string `locationName:"id" type:"string"`
508}
509
510// String returns the string representation
511func (s Hit) String() string {
512	return awsutil.Prettify(s)
513}
514
515// GoString returns the string representation
516func (s Hit) GoString() string {
517	return s.String()
518}
519
520// SetExprs sets the Exprs field's value.
521func (s *Hit) SetExprs(v map[string]*string) *Hit {
522	s.Exprs = v
523	return s
524}
525
526// SetFields sets the Fields field's value.
527func (s *Hit) SetFields(v map[string][]*string) *Hit {
528	s.Fields = v
529	return s
530}
531
532// SetHighlights sets the Highlights field's value.
533func (s *Hit) SetHighlights(v map[string]*string) *Hit {
534	s.Highlights = v
535	return s
536}
537
538// SetId sets the Id field's value.
539func (s *Hit) SetId(v string) *Hit {
540	s.Id = &v
541	return s
542}
543
544// The collection of documents that match the search request.
545type Hits struct {
546	_ struct{} `type:"structure"`
547
548	// A cursor that can be used to retrieve the next set of matching documents
549	// when you want to page through a large result set.
550	Cursor *string `locationName:"cursor" type:"string"`
551
552	// The total number of documents that match the search request.
553	Found *int64 `locationName:"found" type:"long"`
554
555	// A document that matches the search request.
556	Hit []*Hit `locationName:"hit" type:"list"`
557
558	// The index of the first matching document.
559	Start *int64 `locationName:"start" type:"long"`
560}
561
562// String returns the string representation
563func (s Hits) String() string {
564	return awsutil.Prettify(s)
565}
566
567// GoString returns the string representation
568func (s Hits) GoString() string {
569	return s.String()
570}
571
572// SetCursor sets the Cursor field's value.
573func (s *Hits) SetCursor(v string) *Hits {
574	s.Cursor = &v
575	return s
576}
577
578// SetFound sets the Found field's value.
579func (s *Hits) SetFound(v int64) *Hits {
580	s.Found = &v
581	return s
582}
583
584// SetHit sets the Hit field's value.
585func (s *Hits) SetHit(v []*Hit) *Hits {
586	s.Hit = v
587	return s
588}
589
590// SetStart sets the Start field's value.
591func (s *Hits) SetStart(v int64) *Hits {
592	s.Start = &v
593	return s
594}
595
596// Container for the parameters to the Search request.
597type SearchInput struct {
598	_ struct{} `type:"structure"`
599
600	// Retrieves a cursor value you can use to page through large result sets. Use
601	// the size parameter to control the number of hits to include in each response.
602	// You can specify either the cursor or start parameter in a request; they are
603	// mutually exclusive. To get the first cursor, set the cursor value to initial.
604	// In subsequent requests, specify the cursor value returned in the hits section
605	// of the response.
606	//
607	// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
608	// in the Amazon CloudSearch Developer Guide.
609	Cursor *string `location:"querystring" locationName:"cursor" type:"string"`
610
611	// Defines one or more numeric expressions that can be used to sort results
612	// or specify search or filter criteria. You can also specify expressions as
613	// return fields.
614	//
615	// You specify the expressions in JSON using the form {"EXPRESSIONNAME":"EXPRESSION"}.
616	// You can define and use multiple expressions in a search request. For example:
617	//
618	// {"expression1":"_score*rating", "expression2":"(1/rank)*year"}
619	//
620	// For information about the variables, operators, and functions you can use
621	// in expressions, see Writing Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions)
622	// in the Amazon CloudSearch Developer Guide.
623	Expr *string `location:"querystring" locationName:"expr" type:"string"`
624
625	// Specifies one or more fields for which to get facet information, and options
626	// that control how the facet information is returned. Each specified field
627	// must be facet-enabled in the domain configuration. The fields and options
628	// are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
629	//
630	// You can specify the following faceting options:
631	//
632	//    * buckets specifies an array of the facet values or ranges to count. Ranges
633	//    are specified using the same syntax that you use to search for a range
634	//    of values. For more information, see Searching for a Range of Values (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html)
635	//    in the Amazon CloudSearch Developer Guide. Buckets are returned in the
636	//    order they are specified in the request. The sort and size options are
637	//    not valid if you specify buckets.
638	//
639	//    * size specifies the maximum number of facets to include in the results.
640	//    By default, Amazon CloudSearch returns counts for the top 10. The size
641	//    parameter is only valid when you specify the sort option; it cannot be
642	//    used in conjunction with buckets.
643	//
644	//    * sort specifies how you want to sort the facets in the results: bucket
645	//    or count. Specify bucket to sort alphabetically or numerically by facet
646	//    value (in ascending order). Specify count to sort by the facet counts
647	//    computed for each facet value (in descending order). To retrieve facet
648	//    counts for particular values or ranges of values, use the buckets option
649	//    instead of sort.
650	//
651	// If no facet options are specified, facet counts are computed for all field
652	// values, the facets are sorted by facet count, and the top 10 facets are returned
653	// in the results.
654	//
655	// To count particular buckets of values, use the buckets option. For example,
656	// the following request uses the buckets option to calculate and return facet
657	// counts by decade.
658	//
659	// {"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}}
660	//
661	// To sort facets by facet count, use the count option. For example, the following
662	// request sets the sort option to count to sort the facet values by facet count,
663	// with the facet values that have the most matching documents listed first.
664	// Setting the size option to 3 returns only the top three facet values.
665	//
666	// {"year":{"sort":"count","size":3}}
667	//
668	// To sort the facets by value, use the bucket option. For example, the following
669	// request sets the sort option to bucket to sort the facet values numerically
670	// by year, with earliest year listed first.
671	//
672	// {"year":{"sort":"bucket"}}
673	//
674	// For more information, see Getting and Using Facet Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html)
675	// in the Amazon CloudSearch Developer Guide.
676	Facet *string `location:"querystring" locationName:"facet" type:"string"`
677
678	// Specifies a structured query that filters the results of a search without
679	// affecting how the results are scored and sorted. You use filterQuery in conjunction
680	// with the query parameter to filter the documents that match the constraints
681	// specified in the query parameter. Specifying a filter controls only which
682	// matching documents are included in the results, it has no effect on how they
683	// are scored and sorted. The filterQuery parameter supports the full structured
684	// query syntax.
685	//
686	// For more information about using filters, see Filtering Matching Documents
687	// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html)
688	// in the Amazon CloudSearch Developer Guide.
689	FilterQuery *string `location:"querystring" locationName:"fq" type:"string"`
690
691	// Retrieves highlights for matches in the specified text or text-array fields.
692	// Each specified field must be highlight enabled in the domain configuration.
693	// The fields and options are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
694	//
695	// You can specify the following highlight options:
696	//
697	//    * format: specifies the format of the data in the text field: text or
698	//    html. When data is returned as HTML, all non-alphanumeric characters are
699	//    encoded. The default is html.
700	//
701	//    * max_phrases: specifies the maximum number of occurrences of the search
702	//    term(s) you want to highlight. By default, the first occurrence is highlighted.
703	//
704	//    * pre_tag: specifies the string to prepend to an occurrence of a search
705	//    term. The default for HTML highlights is <em>. The default for text
706	//    highlights is *.
707	//
708	//    * post_tag: specifies the string to append to an occurrence of a search
709	//    term. The default for HTML highlights is </em>. The default for
710	//    text highlights is *.
711	//
712	// If no highlight options are specified for a field, the returned field text
713	// is treated as HTML and the first match is highlighted with emphasis tags:
714	// <em>search-term</em>.
715	//
716	// For example, the following request retrieves highlights for the actors and
717	// title fields.
718	//
719	// { "actors": {}, "title": {"format": "text","max_phrases": 2,"pre_tag": "","post_tag":
720	// ""} }
721	Highlight *string `location:"querystring" locationName:"highlight" type:"string"`
722
723	// Enables partial results to be returned if one or more index partitions are
724	// unavailable. When your search index is partitioned across multiple search
725	// instances, by default Amazon CloudSearch only returns results if every partition
726	// can be queried. This means that the failure of a single search instance can
727	// result in 5xx (internal server) errors. When you enable partial results,
728	// Amazon CloudSearch returns whatever results are available and includes the
729	// percentage of documents searched in the search results (percent-searched).
730	// This enables you to more gracefully degrade your users' search experience.
731	// For example, rather than displaying no results, you could display the partial
732	// results and a message indicating that the results might be incomplete due
733	// to a temporary system outage.
734	Partial *bool `location:"querystring" locationName:"partial" type:"boolean"`
735
736	// Specifies the search criteria for the request. How you specify the search
737	// criteria depends on the query parser used for the request and the parser
738	// options specified in the queryOptions parameter. By default, the simple query
739	// parser is used to process requests. To use the structured, lucene, or dismax
740	// query parser, you must also specify the queryParser parameter.
741	//
742	// For more information about specifying search criteria, see Searching Your
743	// Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
744	// in the Amazon CloudSearch Developer Guide.
745	//
746	// Query is a required field
747	Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
748
749	// Configures options for the query parser specified in the queryParser parameter.
750	// You specify the options in JSON using the following form {"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"}.
751	//
752	// The options you can configure vary according to which parser you use:
753	//
754	//    * defaultOperator: The default operator used to combine individual terms
755	//    in the search string. For example: defaultOperator: 'or'. For the dismax
756	//    parser, you specify a percentage that represents the percentage of terms
757	//    in the search string (rounded down) that must match, rather than a default
758	//    operator. A value of 0% is the equivalent to OR, and a value of 100% is
759	//    equivalent to AND. The percentage must be specified as a value in the
760	//    range 0-100 followed by the percent (%) symbol. For example, defaultOperator:
761	//    50%. Valid values: and, or, a percentage in the range 0%-100% (dismax).
762	//    Default: and (simple, structured, lucene) or 100 (dismax). Valid for:
763	//    simple, structured, lucene, and dismax.
764	//
765	//    * fields: An array of the fields to search when no fields are specified
766	//    in a search. If no fields are specified in a search and this option is
767	//    not specified, all text and text-array fields are searched. You can specify
768	//    a weight for each field to control the relative importance of each field
769	//    when Amazon CloudSearch calculates relevance scores. To specify a field
770	//    weight, append a caret (^) symbol and the weight to the field name. For
771	//    example, to boost the importance of the title field over the description
772	//    field you could specify: "fields":["title^5","description"]. Valid values:
773	//    The name of any configured field and an optional numeric value greater
774	//    than zero. Default: All text and text-array fields. Valid for: simple,
775	//    structured, lucene, and dismax.
776	//
777	//    * operators: An array of the operators or special characters you want
778	//    to disable for the simple query parser. If you disable the and, or, or
779	//    not operators, the corresponding operators (+, |, -) have no special meaning
780	//    and are dropped from the search string. Similarly, disabling prefix disables
781	//    the wildcard operator (*) and disabling phrase disables the ability to
782	//    search for phrases by enclosing phrases in double quotes. Disabling precedence
783	//    disables the ability to control order of precedence using parentheses.
784	//    Disabling near disables the ability to use the ~ operator to perform a
785	//    sloppy phrase search. Disabling the fuzzy operator disables the ability
786	//    to use the ~ operator to perform a fuzzy search. escape disables the ability
787	//    to use a backslash (\) to escape special characters within the search
788	//    string. Disabling whitespace is an advanced option that prevents the parser
789	//    from tokenizing on whitespace, which can be useful for Vietnamese. (It
790	//    prevents Vietnamese words from being split incorrectly.) For example,
791	//    you could disable all operators other than the phrase operator to support
792	//    just simple term and phrase queries: "operators":["and","not","or", "prefix"].
793	//    Valid values: and, escape, fuzzy, near, not, or, phrase, precedence, prefix,
794	//    whitespace. Default: All operators and special characters are enabled.
795	//    Valid for: simple.
796	//
797	//    * phraseFields: An array of the text or text-array fields you want to
798	//    use for phrase searches. When the terms in the search string appear in
799	//    close proximity within a field, the field scores higher. You can specify
800	//    a weight for each field to boost that score. The phraseSlop option controls
801	//    how much the matches can deviate from the search string and still be boosted.
802	//    To specify a field weight, append a caret (^) symbol and the weight to
803	//    the field name. For example, to boost phrase matches in the title field
804	//    over the abstract field, you could specify: "phraseFields":["title^3",
805	//    "plot"] Valid values: The name of any text or text-array field and an
806	//    optional numeric value greater than zero. Default: No fields. If you don't
807	//    specify any fields with phraseFields, proximity scoring is disabled even
808	//    if phraseSlop is specified. Valid for: dismax.
809	//
810	//    * phraseSlop: An integer value that specifies how much matches can deviate
811	//    from the search phrase and still be boosted according to the weights specified
812	//    in the phraseFields option; for example, phraseSlop: 2. You must also
813	//    specify phraseFields to enable proximity scoring. Valid values: positive
814	//    integers. Default: 0. Valid for: dismax.
815	//
816	//    * explicitPhraseSlop: An integer value that specifies how much a match
817	//    can deviate from the search phrase when the phrase is enclosed in double
818	//    quotes in the search string. (Phrases that exceed this proximity distance
819	//    are not considered a match.) For example, to specify a slop of three for
820	//    dismax phrase queries, you would specify "explicitPhraseSlop":3. Valid
821	//    values: positive integers. Default: 0. Valid for: dismax.
822	//
823	//    * tieBreaker: When a term in the search string is found in a document's
824	//    field, a score is calculated for that field based on how common the word
825	//    is in that field compared to other documents. If the term occurs in multiple
826	//    fields within a document, by default only the highest scoring field contributes
827	//    to the document's overall score. You can specify a tieBreaker value to
828	//    enable the matches in lower-scoring fields to contribute to the document's
829	//    score. That way, if two documents have the same max field score for a
830	//    particular term, the score for the document that has matches in more fields
831	//    will be higher. The formula for calculating the score with a tieBreaker
832	//    is (max field score) + (tieBreaker) * (sum of the scores for the rest
833	//    of the matching fields). Set tieBreaker to 0 to disregard all but the
834	//    highest scoring field (pure max): "tieBreaker":0. Set to 1 to sum the
835	//    scores from all fields (pure sum): "tieBreaker":1. Valid values: 0.0 to
836	//    1.0. Default: 0.0. Valid for: dismax.
837	QueryOptions *string `location:"querystring" locationName:"q.options" type:"string"`
838
839	// Specifies which query parser to use to process the request. If queryParser
840	// is not specified, Amazon CloudSearch uses the simple query parser.
841	//
842	// Amazon CloudSearch supports four query parsers:
843	//
844	//    * simple: perform simple searches of text and text-array fields. By default,
845	//    the simple query parser searches all text and text-array fields. You can
846	//    specify which fields to search by with the queryOptions parameter. If
847	//    you prefix a search term with a plus sign (+) documents must contain the
848	//    term to be considered a match. (This is the default, unless you configure
849	//    the default operator with the queryOptions parameter.) You can use the
850	//    - (NOT), | (OR), and * (wildcard) operators to exclude particular terms,
851	//    find results that match any of the specified terms, or search for a prefix.
852	//    To search for a phrase rather than individual terms, enclose the phrase
853	//    in double quotes. For more information, see Searching for Text in the
854	//    Amazon CloudSearch Developer Guide.
855	//
856	//    * structured: perform advanced searches by combining multiple expressions
857	//    to define the search criteria. You can also search within particular fields,
858	//    search for values and ranges of values, and use advanced options such
859	//    as term boosting, matchall, and near. For more information, see Constructing
860	//    Compound Queries in the Amazon CloudSearch Developer Guide.
861	//
862	//    * lucene: search using the Apache Lucene query parser syntax. For more
863	//    information, see Apache Lucene Query Parser Syntax.
864	//
865	//    * dismax: search using the simplified subset of the Apache Lucene query
866	//    parser syntax defined by the DisMax query parser. For more information,
867	//    see DisMax Query Parser Syntax.
868	QueryParser *string `location:"querystring" locationName:"q.parser" type:"string" enum:"QueryParser"`
869
870	// Specifies the field and expression values to include in the response. Multiple
871	// fields or expressions are specified as a comma-separated list. By default,
872	// a search response includes all return enabled fields (_all_fields). To return
873	// only the document IDs for the matching documents, specify _no_fields. To
874	// retrieve the relevance score calculated for each document, specify _score.
875	Return *string `location:"querystring" locationName:"return" type:"string"`
876
877	// Specifies the maximum number of search hits to include in the response.
878	Size *int64 `location:"querystring" locationName:"size" type:"long"`
879
880	// Specifies the fields or custom expressions to use to sort the search results.
881	// Multiple fields or expressions are specified as a comma-separated list. You
882	// must specify the sort direction (asc or desc) for each field; for example,
883	// year desc,title asc. To use a field to sort results, the field must be sort-enabled
884	// in the domain configuration. Array type fields cannot be used for sorting.
885	// If no sort parameter is specified, results are sorted by their default relevance
886	// scores in descending order: _score desc. You can also sort by document ID
887	// (_id asc) and version (_version desc).
888	//
889	// For more information, see Sorting Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html)
890	// in the Amazon CloudSearch Developer Guide.
891	Sort *string `location:"querystring" locationName:"sort" type:"string"`
892
893	// Specifies the offset of the first search hit you want to return. Note that
894	// the result set is zero-based; the first result is at index 0. You can specify
895	// either the start or cursor parameter in a request, they are mutually exclusive.
896	//
897	// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
898	// in the Amazon CloudSearch Developer Guide.
899	Start *int64 `location:"querystring" locationName:"start" type:"long"`
900
901	// Specifies one or more fields for which to get statistics information. Each
902	// specified field must be facet-enabled in the domain configuration. The fields
903	// are specified in JSON using the form:
904	//
905	//    {"FIELD-A":{},"FIELD-B":{}}
906	//
907	// There are currently no options supported for statistics.
908	Stats *string `location:"querystring" locationName:"stats" type:"string"`
909}
910
911// String returns the string representation
912func (s SearchInput) String() string {
913	return awsutil.Prettify(s)
914}
915
916// GoString returns the string representation
917func (s SearchInput) GoString() string {
918	return s.String()
919}
920
921// Validate inspects the fields of the type to determine if they are valid.
922func (s *SearchInput) Validate() error {
923	invalidParams := request.ErrInvalidParams{Context: "SearchInput"}
924	if s.Query == nil {
925		invalidParams.Add(request.NewErrParamRequired("Query"))
926	}
927
928	if invalidParams.Len() > 0 {
929		return invalidParams
930	}
931	return nil
932}
933
934// SetCursor sets the Cursor field's value.
935func (s *SearchInput) SetCursor(v string) *SearchInput {
936	s.Cursor = &v
937	return s
938}
939
940// SetExpr sets the Expr field's value.
941func (s *SearchInput) SetExpr(v string) *SearchInput {
942	s.Expr = &v
943	return s
944}
945
946// SetFacet sets the Facet field's value.
947func (s *SearchInput) SetFacet(v string) *SearchInput {
948	s.Facet = &v
949	return s
950}
951
952// SetFilterQuery sets the FilterQuery field's value.
953func (s *SearchInput) SetFilterQuery(v string) *SearchInput {
954	s.FilterQuery = &v
955	return s
956}
957
958// SetHighlight sets the Highlight field's value.
959func (s *SearchInput) SetHighlight(v string) *SearchInput {
960	s.Highlight = &v
961	return s
962}
963
964// SetPartial sets the Partial field's value.
965func (s *SearchInput) SetPartial(v bool) *SearchInput {
966	s.Partial = &v
967	return s
968}
969
970// SetQuery sets the Query field's value.
971func (s *SearchInput) SetQuery(v string) *SearchInput {
972	s.Query = &v
973	return s
974}
975
976// SetQueryOptions sets the QueryOptions field's value.
977func (s *SearchInput) SetQueryOptions(v string) *SearchInput {
978	s.QueryOptions = &v
979	return s
980}
981
982// SetQueryParser sets the QueryParser field's value.
983func (s *SearchInput) SetQueryParser(v string) *SearchInput {
984	s.QueryParser = &v
985	return s
986}
987
988// SetReturn sets the Return field's value.
989func (s *SearchInput) SetReturn(v string) *SearchInput {
990	s.Return = &v
991	return s
992}
993
994// SetSize sets the Size field's value.
995func (s *SearchInput) SetSize(v int64) *SearchInput {
996	s.Size = &v
997	return s
998}
999
1000// SetSort sets the Sort field's value.
1001func (s *SearchInput) SetSort(v string) *SearchInput {
1002	s.Sort = &v
1003	return s
1004}
1005
1006// SetStart sets the Start field's value.
1007func (s *SearchInput) SetStart(v int64) *SearchInput {
1008	s.Start = &v
1009	return s
1010}
1011
1012// SetStats sets the Stats field's value.
1013func (s *SearchInput) SetStats(v string) *SearchInput {
1014	s.Stats = &v
1015	return s
1016}
1017
1018// The result of a Search request. Contains the documents that match the specified
1019// search criteria and any requested fields, highlights, and facet information.
1020type SearchOutput struct {
1021	_ struct{} `type:"structure"`
1022
1023	// The requested facet information.
1024	Facets map[string]*BucketInfo `locationName:"facets" type:"map"`
1025
1026	// The documents that match the search criteria.
1027	Hits *Hits `locationName:"hits" type:"structure"`
1028
1029	// The requested field statistics information.
1030	Stats map[string]*FieldStats `locationName:"stats" type:"map"`
1031
1032	// The status information returned for the search request.
1033	Status *SearchStatus `locationName:"status" type:"structure"`
1034}
1035
1036// String returns the string representation
1037func (s SearchOutput) String() string {
1038	return awsutil.Prettify(s)
1039}
1040
1041// GoString returns the string representation
1042func (s SearchOutput) GoString() string {
1043	return s.String()
1044}
1045
1046// SetFacets sets the Facets field's value.
1047func (s *SearchOutput) SetFacets(v map[string]*BucketInfo) *SearchOutput {
1048	s.Facets = v
1049	return s
1050}
1051
1052// SetHits sets the Hits field's value.
1053func (s *SearchOutput) SetHits(v *Hits) *SearchOutput {
1054	s.Hits = v
1055	return s
1056}
1057
1058// SetStats sets the Stats field's value.
1059func (s *SearchOutput) SetStats(v map[string]*FieldStats) *SearchOutput {
1060	s.Stats = v
1061	return s
1062}
1063
1064// SetStatus sets the Status field's value.
1065func (s *SearchOutput) SetStatus(v *SearchStatus) *SearchOutput {
1066	s.Status = v
1067	return s
1068}
1069
1070// Contains the resource id (rid) and the time it took to process the request
1071// (timems).
1072type SearchStatus struct {
1073	_ struct{} `type:"structure"`
1074
1075	// The encrypted resource ID for the request.
1076	Rid *string `locationName:"rid" type:"string"`
1077
1078	// How long it took to process the request, in milliseconds.
1079	Timems *int64 `locationName:"timems" type:"long"`
1080}
1081
1082// String returns the string representation
1083func (s SearchStatus) String() string {
1084	return awsutil.Prettify(s)
1085}
1086
1087// GoString returns the string representation
1088func (s SearchStatus) GoString() string {
1089	return s.String()
1090}
1091
1092// SetRid sets the Rid field's value.
1093func (s *SearchStatus) SetRid(v string) *SearchStatus {
1094	s.Rid = &v
1095	return s
1096}
1097
1098// SetTimems sets the Timems field's value.
1099func (s *SearchStatus) SetTimems(v int64) *SearchStatus {
1100	s.Timems = &v
1101	return s
1102}
1103
1104// Container for the parameters to the Suggest request.
1105type SuggestInput struct {
1106	_ struct{} `type:"structure"`
1107
1108	// Specifies the string for which you want to get suggestions.
1109	//
1110	// Query is a required field
1111	Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
1112
1113	// Specifies the maximum number of suggestions to return.
1114	Size *int64 `location:"querystring" locationName:"size" type:"long"`
1115
1116	// Specifies the name of the suggester to use to find suggested matches.
1117	//
1118	// Suggester is a required field
1119	Suggester *string `location:"querystring" locationName:"suggester" type:"string" required:"true"`
1120}
1121
1122// String returns the string representation
1123func (s SuggestInput) String() string {
1124	return awsutil.Prettify(s)
1125}
1126
1127// GoString returns the string representation
1128func (s SuggestInput) GoString() string {
1129	return s.String()
1130}
1131
1132// Validate inspects the fields of the type to determine if they are valid.
1133func (s *SuggestInput) Validate() error {
1134	invalidParams := request.ErrInvalidParams{Context: "SuggestInput"}
1135	if s.Query == nil {
1136		invalidParams.Add(request.NewErrParamRequired("Query"))
1137	}
1138	if s.Suggester == nil {
1139		invalidParams.Add(request.NewErrParamRequired("Suggester"))
1140	}
1141
1142	if invalidParams.Len() > 0 {
1143		return invalidParams
1144	}
1145	return nil
1146}
1147
1148// SetQuery sets the Query field's value.
1149func (s *SuggestInput) SetQuery(v string) *SuggestInput {
1150	s.Query = &v
1151	return s
1152}
1153
1154// SetSize sets the Size field's value.
1155func (s *SuggestInput) SetSize(v int64) *SuggestInput {
1156	s.Size = &v
1157	return s
1158}
1159
1160// SetSuggester sets the Suggester field's value.
1161func (s *SuggestInput) SetSuggester(v string) *SuggestInput {
1162	s.Suggester = &v
1163	return s
1164}
1165
1166// Container for the suggestion information returned in a SuggestResponse.
1167type SuggestModel struct {
1168	_ struct{} `type:"structure"`
1169
1170	// The number of documents that were found to match the query string.
1171	Found *int64 `locationName:"found" type:"long"`
1172
1173	// The query string specified in the suggest request.
1174	Query *string `locationName:"query" type:"string"`
1175
1176	// The documents that match the query string.
1177	Suggestions []*SuggestionMatch `locationName:"suggestions" type:"list"`
1178}
1179
1180// String returns the string representation
1181func (s SuggestModel) String() string {
1182	return awsutil.Prettify(s)
1183}
1184
1185// GoString returns the string representation
1186func (s SuggestModel) GoString() string {
1187	return s.String()
1188}
1189
1190// SetFound sets the Found field's value.
1191func (s *SuggestModel) SetFound(v int64) *SuggestModel {
1192	s.Found = &v
1193	return s
1194}
1195
1196// SetQuery sets the Query field's value.
1197func (s *SuggestModel) SetQuery(v string) *SuggestModel {
1198	s.Query = &v
1199	return s
1200}
1201
1202// SetSuggestions sets the Suggestions field's value.
1203func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel {
1204	s.Suggestions = v
1205	return s
1206}
1207
1208// Contains the response to a Suggest request.
1209type SuggestOutput struct {
1210	_ struct{} `type:"structure"`
1211
1212	// The status of a SuggestRequest. Contains the resource ID (rid) and how long
1213	// it took to process the request (timems).
1214	Status *SuggestStatus `locationName:"status" type:"structure"`
1215
1216	// Container for the matching search suggestion information.
1217	Suggest *SuggestModel `locationName:"suggest" type:"structure"`
1218}
1219
1220// String returns the string representation
1221func (s SuggestOutput) String() string {
1222	return awsutil.Prettify(s)
1223}
1224
1225// GoString returns the string representation
1226func (s SuggestOutput) GoString() string {
1227	return s.String()
1228}
1229
1230// SetStatus sets the Status field's value.
1231func (s *SuggestOutput) SetStatus(v *SuggestStatus) *SuggestOutput {
1232	s.Status = v
1233	return s
1234}
1235
1236// SetSuggest sets the Suggest field's value.
1237func (s *SuggestOutput) SetSuggest(v *SuggestModel) *SuggestOutput {
1238	s.Suggest = v
1239	return s
1240}
1241
1242// Contains the resource id (rid) and the time it took to process the request
1243// (timems).
1244type SuggestStatus struct {
1245	_ struct{} `type:"structure"`
1246
1247	// The encrypted resource ID for the request.
1248	Rid *string `locationName:"rid" type:"string"`
1249
1250	// How long it took to process the request, in milliseconds.
1251	Timems *int64 `locationName:"timems" type:"long"`
1252}
1253
1254// String returns the string representation
1255func (s SuggestStatus) String() string {
1256	return awsutil.Prettify(s)
1257}
1258
1259// GoString returns the string representation
1260func (s SuggestStatus) GoString() string {
1261	return s.String()
1262}
1263
1264// SetRid sets the Rid field's value.
1265func (s *SuggestStatus) SetRid(v string) *SuggestStatus {
1266	s.Rid = &v
1267	return s
1268}
1269
1270// SetTimems sets the Timems field's value.
1271func (s *SuggestStatus) SetTimems(v int64) *SuggestStatus {
1272	s.Timems = &v
1273	return s
1274}
1275
1276// An autocomplete suggestion that matches the query string specified in a SuggestRequest.
1277type SuggestionMatch struct {
1278	_ struct{} `type:"structure"`
1279
1280	// The document ID of the suggested document.
1281	Id *string `locationName:"id" type:"string"`
1282
1283	// The relevance score of a suggested match.
1284	Score *int64 `locationName:"score" type:"long"`
1285
1286	// The string that matches the query string specified in the SuggestRequest.
1287	Suggestion *string `locationName:"suggestion" type:"string"`
1288}
1289
1290// String returns the string representation
1291func (s SuggestionMatch) String() string {
1292	return awsutil.Prettify(s)
1293}
1294
1295// GoString returns the string representation
1296func (s SuggestionMatch) GoString() string {
1297	return s.String()
1298}
1299
1300// SetId sets the Id field's value.
1301func (s *SuggestionMatch) SetId(v string) *SuggestionMatch {
1302	s.Id = &v
1303	return s
1304}
1305
1306// SetScore sets the Score field's value.
1307func (s *SuggestionMatch) SetScore(v int64) *SuggestionMatch {
1308	s.Score = &v
1309	return s
1310}
1311
1312// SetSuggestion sets the Suggestion field's value.
1313func (s *SuggestionMatch) SetSuggestion(v string) *SuggestionMatch {
1314	s.Suggestion = &v
1315	return s
1316}
1317
1318// Container for the parameters to the UploadDocuments request.
1319type UploadDocumentsInput struct {
1320	_ struct{} `type:"structure" payload:"Documents"`
1321
1322	// The format of the batch you are uploading. Amazon CloudSearch supports two
1323	// document batch formats:
1324	//
1325	//    * application/json
1326	//
1327	//    * application/xml
1328	//
1329	// ContentType is a required field
1330	ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true" enum:"ContentType"`
1331
1332	// A batch of documents formatted in JSON or HTML.
1333	//
1334	// Documents is a required field
1335	Documents io.ReadSeeker `locationName:"documents" type:"blob" required:"true"`
1336}
1337
1338// String returns the string representation
1339func (s UploadDocumentsInput) String() string {
1340	return awsutil.Prettify(s)
1341}
1342
1343// GoString returns the string representation
1344func (s UploadDocumentsInput) GoString() string {
1345	return s.String()
1346}
1347
1348// Validate inspects the fields of the type to determine if they are valid.
1349func (s *UploadDocumentsInput) Validate() error {
1350	invalidParams := request.ErrInvalidParams{Context: "UploadDocumentsInput"}
1351	if s.ContentType == nil {
1352		invalidParams.Add(request.NewErrParamRequired("ContentType"))
1353	}
1354	if s.Documents == nil {
1355		invalidParams.Add(request.NewErrParamRequired("Documents"))
1356	}
1357
1358	if invalidParams.Len() > 0 {
1359		return invalidParams
1360	}
1361	return nil
1362}
1363
1364// SetContentType sets the ContentType field's value.
1365func (s *UploadDocumentsInput) SetContentType(v string) *UploadDocumentsInput {
1366	s.ContentType = &v
1367	return s
1368}
1369
1370// SetDocuments sets the Documents field's value.
1371func (s *UploadDocumentsInput) SetDocuments(v io.ReadSeeker) *UploadDocumentsInput {
1372	s.Documents = v
1373	return s
1374}
1375
1376// Contains the response to an UploadDocuments request.
1377type UploadDocumentsOutput struct {
1378	_ struct{} `type:"structure"`
1379
1380	// The number of documents that were added to the search domain.
1381	Adds *int64 `locationName:"adds" type:"long"`
1382
1383	// The number of documents that were deleted from the search domain.
1384	Deletes *int64 `locationName:"deletes" type:"long"`
1385
1386	// The status of an UploadDocumentsRequest.
1387	Status *string `locationName:"status" type:"string"`
1388
1389	// Any warnings returned by the document service about the documents being uploaded.
1390	Warnings []*DocumentServiceWarning `locationName:"warnings" type:"list"`
1391}
1392
1393// String returns the string representation
1394func (s UploadDocumentsOutput) String() string {
1395	return awsutil.Prettify(s)
1396}
1397
1398// GoString returns the string representation
1399func (s UploadDocumentsOutput) GoString() string {
1400	return s.String()
1401}
1402
1403// SetAdds sets the Adds field's value.
1404func (s *UploadDocumentsOutput) SetAdds(v int64) *UploadDocumentsOutput {
1405	s.Adds = &v
1406	return s
1407}
1408
1409// SetDeletes sets the Deletes field's value.
1410func (s *UploadDocumentsOutput) SetDeletes(v int64) *UploadDocumentsOutput {
1411	s.Deletes = &v
1412	return s
1413}
1414
1415// SetStatus sets the Status field's value.
1416func (s *UploadDocumentsOutput) SetStatus(v string) *UploadDocumentsOutput {
1417	s.Status = &v
1418	return s
1419}
1420
1421// SetWarnings sets the Warnings field's value.
1422func (s *UploadDocumentsOutput) SetWarnings(v []*DocumentServiceWarning) *UploadDocumentsOutput {
1423	s.Warnings = v
1424	return s
1425}
1426
1427const (
1428	// ContentTypeApplicationJson is a ContentType enum value
1429	ContentTypeApplicationJson = "application/json"
1430
1431	// ContentTypeApplicationXml is a ContentType enum value
1432	ContentTypeApplicationXml = "application/xml"
1433)
1434
1435const (
1436	// QueryParserSimple is a QueryParser enum value
1437	QueryParserSimple = "simple"
1438
1439	// QueryParserStructured is a QueryParser enum value
1440	QueryParserStructured = "structured"
1441
1442	// QueryParserLucene is a QueryParser enum value
1443	QueryParserLucene = "lucene"
1444
1445	// QueryParserDismax is a QueryParser enum value
1446	QueryParserDismax = "dismax"
1447)
1448