1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package kinesis
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
14)
15
16const opAddTagsToStream = "AddTagsToStream"
17
18// AddTagsToStreamRequest generates a "aws/request.Request" representing the
19// client's request for the AddTagsToStream operation. The "output" return
20// value will be populated with the request's response once the request complets
21// successfuly.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See AddTagsToStream for more information on using the AddTagsToStream
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the AddTagsToStreamRequest method.
34//    req, resp := client.AddTagsToStreamRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream
42func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *request.Request, output *AddTagsToStreamOutput) {
43	op := &request.Operation{
44		Name:       opAddTagsToStream,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &AddTagsToStreamInput{}
51	}
52
53	output = &AddTagsToStreamOutput{}
54	req = c.newRequest(op, input, output)
55	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
56	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
57	return
58}
59
60// AddTagsToStream API operation for Amazon Kinesis.
61//
62// Adds or updates tags for the specified Amazon Kinesis stream. Each stream
63// can have up to 10 tags.
64//
65// If tags have already been assigned to the stream, AddTagsToStream overwrites
66// any existing tags that correspond to the specified tag keys.
67//
68// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
69// with awserr.Error's Code and Message methods to get detailed information about
70// the error.
71//
72// See the AWS API reference guide for Amazon Kinesis's
73// API operation AddTagsToStream for usage and error information.
74//
75// Returned Error Codes:
76//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
77//   The requested resource could not be found. The stream might not be specified
78//   correctly.
79//
80//   * ErrCodeResourceInUseException "ResourceInUseException"
81//   The resource is not available for this operation. For successful operation,
82//   the resource needs to be in the ACTIVE state.
83//
84//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
85//   A specified parameter exceeds its restrictions, is not supported, or can't
86//   be used. For more information, see the returned message.
87//
88//   * ErrCodeLimitExceededException "LimitExceededException"
89//   The requested resource exceeds the maximum number allowed, or the number
90//   of concurrent stream requests exceeds the maximum number allowed (5).
91//
92// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream
93func (c *Kinesis) AddTagsToStream(input *AddTagsToStreamInput) (*AddTagsToStreamOutput, error) {
94	req, out := c.AddTagsToStreamRequest(input)
95	return out, req.Send()
96}
97
98// AddTagsToStreamWithContext is the same as AddTagsToStream with the addition of
99// the ability to pass a context and additional request options.
100//
101// See AddTagsToStream for details on how to use this API operation.
102//
103// The context must be non-nil and will be used for request cancellation. If
104// the context is nil a panic will occur. In the future the SDK may create
105// sub-contexts for http.Requests. See https://golang.org/pkg/context/
106// for more information on using Contexts.
107func (c *Kinesis) AddTagsToStreamWithContext(ctx aws.Context, input *AddTagsToStreamInput, opts ...request.Option) (*AddTagsToStreamOutput, error) {
108	req, out := c.AddTagsToStreamRequest(input)
109	req.SetContext(ctx)
110	req.ApplyOptions(opts...)
111	return out, req.Send()
112}
113
114const opCreateStream = "CreateStream"
115
116// CreateStreamRequest generates a "aws/request.Request" representing the
117// client's request for the CreateStream operation. The "output" return
118// value will be populated with the request's response once the request complets
119// successfuly.
120//
121// Use "Send" method on the returned Request to send the API call to the service.
122// the "output" return value is not valid until after Send returns without error.
123//
124// See CreateStream for more information on using the CreateStream
125// API call, and error handling.
126//
127// This method is useful when you want to inject custom logic or configuration
128// into the SDK's request lifecycle. Such as custom headers, or retry logic.
129//
130//
131//    // Example sending a request using the CreateStreamRequest method.
132//    req, resp := client.CreateStreamRequest(params)
133//
134//    err := req.Send()
135//    if err == nil { // resp is now filled
136//        fmt.Println(resp)
137//    }
138//
139// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream
140func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Request, output *CreateStreamOutput) {
141	op := &request.Operation{
142		Name:       opCreateStream,
143		HTTPMethod: "POST",
144		HTTPPath:   "/",
145	}
146
147	if input == nil {
148		input = &CreateStreamInput{}
149	}
150
151	output = &CreateStreamOutput{}
152	req = c.newRequest(op, input, output)
153	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
154	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
155	return
156}
157
158// CreateStream API operation for Amazon Kinesis.
159//
160// Creates an Amazon Kinesis stream. A stream captures and transports data records
161// that are continuously emitted from different data sources or producers. Scale-out
162// within a stream is explicitly supported by means of shards, which are uniquely
163// identified groups of data records in a stream.
164//
165// You specify and control the number of shards that a stream is composed of.
166// Each shard can support reads up to 5 transactions per second, up to a maximum
167// data read total of 2 MB per second. Each shard can support writes up to 1,000
168// records per second, up to a maximum data write total of 1 MB per second.
169// You can add shards to a stream if the amount of data input increases and
170// you can remove shards if the amount of data input decreases.
171//
172// The stream name identifies the stream. The name is scoped to the AWS account
173// used by the application. It is also scoped by region. That is, two streams
174// in two different accounts can have the same name, and two streams in the
175// same account, but in two different regions, can have the same name.
176//
177// CreateStream is an asynchronous operation. Upon receiving a CreateStream
178// request, Amazon Kinesis immediately returns and sets the stream status to
179// CREATING. After the stream is created, Amazon Kinesis sets the stream status
180// to ACTIVE. You should perform read and write operations only on an ACTIVE
181// stream.
182//
183// You receive a LimitExceededException when making a CreateStream request if
184// you try to do one of the following:
185//
186//    * Have more than five streams in the CREATING state at any point in time.
187//
188//    * Create more shards than are authorized for your account.
189//
190// For the default shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
191// in the Amazon Kinesis Streams Developer Guide. If you need to increase this
192// limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
193//
194// You can use DescribeStream to check the stream status, which is returned
195// in StreamStatus.
196//
197// CreateStream has a limit of 5 transactions per second per account.
198//
199// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
200// with awserr.Error's Code and Message methods to get detailed information about
201// the error.
202//
203// See the AWS API reference guide for Amazon Kinesis's
204// API operation CreateStream for usage and error information.
205//
206// Returned Error Codes:
207//   * ErrCodeResourceInUseException "ResourceInUseException"
208//   The resource is not available for this operation. For successful operation,
209//   the resource needs to be in the ACTIVE state.
210//
211//   * ErrCodeLimitExceededException "LimitExceededException"
212//   The requested resource exceeds the maximum number allowed, or the number
213//   of concurrent stream requests exceeds the maximum number allowed (5).
214//
215//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
216//   A specified parameter exceeds its restrictions, is not supported, or can't
217//   be used. For more information, see the returned message.
218//
219// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream
220func (c *Kinesis) CreateStream(input *CreateStreamInput) (*CreateStreamOutput, error) {
221	req, out := c.CreateStreamRequest(input)
222	return out, req.Send()
223}
224
225// CreateStreamWithContext is the same as CreateStream with the addition of
226// the ability to pass a context and additional request options.
227//
228// See CreateStream for details on how to use this API operation.
229//
230// The context must be non-nil and will be used for request cancellation. If
231// the context is nil a panic will occur. In the future the SDK may create
232// sub-contexts for http.Requests. See https://golang.org/pkg/context/
233// for more information on using Contexts.
234func (c *Kinesis) CreateStreamWithContext(ctx aws.Context, input *CreateStreamInput, opts ...request.Option) (*CreateStreamOutput, error) {
235	req, out := c.CreateStreamRequest(input)
236	req.SetContext(ctx)
237	req.ApplyOptions(opts...)
238	return out, req.Send()
239}
240
241const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod"
242
243// DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
244// client's request for the DecreaseStreamRetentionPeriod operation. The "output" return
245// value will be populated with the request's response once the request complets
246// successfuly.
247//
248// Use "Send" method on the returned Request to send the API call to the service.
249// the "output" return value is not valid until after Send returns without error.
250//
251// See DecreaseStreamRetentionPeriod for more information on using the DecreaseStreamRetentionPeriod
252// API call, and error handling.
253//
254// This method is useful when you want to inject custom logic or configuration
255// into the SDK's request lifecycle. Such as custom headers, or retry logic.
256//
257//
258//    // Example sending a request using the DecreaseStreamRetentionPeriodRequest method.
259//    req, resp := client.DecreaseStreamRetentionPeriodRequest(params)
260//
261//    err := req.Send()
262//    if err == nil { // resp is now filled
263//        fmt.Println(resp)
264//    }
265//
266// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod
267func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRetentionPeriodInput) (req *request.Request, output *DecreaseStreamRetentionPeriodOutput) {
268	op := &request.Operation{
269		Name:       opDecreaseStreamRetentionPeriod,
270		HTTPMethod: "POST",
271		HTTPPath:   "/",
272	}
273
274	if input == nil {
275		input = &DecreaseStreamRetentionPeriodInput{}
276	}
277
278	output = &DecreaseStreamRetentionPeriodOutput{}
279	req = c.newRequest(op, input, output)
280	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
281	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
282	return
283}
284
285// DecreaseStreamRetentionPeriod API operation for Amazon Kinesis.
286//
287// Decreases the Amazon Kinesis stream's retention period, which is the length
288// of time data records are accessible after they are added to the stream. The
289// minimum value of a stream's retention period is 24 hours.
290//
291// This operation may result in lost data. For example, if the stream's retention
292// period is 48 hours and is decreased to 24 hours, any data already in the
293// stream that is older than 24 hours is inaccessible.
294//
295// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
296// with awserr.Error's Code and Message methods to get detailed information about
297// the error.
298//
299// See the AWS API reference guide for Amazon Kinesis's
300// API operation DecreaseStreamRetentionPeriod for usage and error information.
301//
302// Returned Error Codes:
303//   * ErrCodeResourceInUseException "ResourceInUseException"
304//   The resource is not available for this operation. For successful operation,
305//   the resource needs to be in the ACTIVE state.
306//
307//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
308//   The requested resource could not be found. The stream might not be specified
309//   correctly.
310//
311//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
312//   A specified parameter exceeds its restrictions, is not supported, or can't
313//   be used. For more information, see the returned message.
314//
315// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod
316func (c *Kinesis) DecreaseStreamRetentionPeriod(input *DecreaseStreamRetentionPeriodInput) (*DecreaseStreamRetentionPeriodOutput, error) {
317	req, out := c.DecreaseStreamRetentionPeriodRequest(input)
318	return out, req.Send()
319}
320
321// DecreaseStreamRetentionPeriodWithContext is the same as DecreaseStreamRetentionPeriod with the addition of
322// the ability to pass a context and additional request options.
323//
324// See DecreaseStreamRetentionPeriod for details on how to use this API operation.
325//
326// The context must be non-nil and will be used for request cancellation. If
327// the context is nil a panic will occur. In the future the SDK may create
328// sub-contexts for http.Requests. See https://golang.org/pkg/context/
329// for more information on using Contexts.
330func (c *Kinesis) DecreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *DecreaseStreamRetentionPeriodInput, opts ...request.Option) (*DecreaseStreamRetentionPeriodOutput, error) {
331	req, out := c.DecreaseStreamRetentionPeriodRequest(input)
332	req.SetContext(ctx)
333	req.ApplyOptions(opts...)
334	return out, req.Send()
335}
336
337const opDeleteStream = "DeleteStream"
338
339// DeleteStreamRequest generates a "aws/request.Request" representing the
340// client's request for the DeleteStream operation. The "output" return
341// value will be populated with the request's response once the request complets
342// successfuly.
343//
344// Use "Send" method on the returned Request to send the API call to the service.
345// the "output" return value is not valid until after Send returns without error.
346//
347// See DeleteStream for more information on using the DeleteStream
348// API call, and error handling.
349//
350// This method is useful when you want to inject custom logic or configuration
351// into the SDK's request lifecycle. Such as custom headers, or retry logic.
352//
353//
354//    // Example sending a request using the DeleteStreamRequest method.
355//    req, resp := client.DeleteStreamRequest(params)
356//
357//    err := req.Send()
358//    if err == nil { // resp is now filled
359//        fmt.Println(resp)
360//    }
361//
362// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream
363func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Request, output *DeleteStreamOutput) {
364	op := &request.Operation{
365		Name:       opDeleteStream,
366		HTTPMethod: "POST",
367		HTTPPath:   "/",
368	}
369
370	if input == nil {
371		input = &DeleteStreamInput{}
372	}
373
374	output = &DeleteStreamOutput{}
375	req = c.newRequest(op, input, output)
376	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
377	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
378	return
379}
380
381// DeleteStream API operation for Amazon Kinesis.
382//
383// Deletes an Amazon Kinesis stream and all its shards and data. You must shut
384// down any applications that are operating on the stream before you delete
385// the stream. If an application attempts to operate on a deleted stream, it
386// will receive the exception ResourceNotFoundException.
387//
388// If the stream is in the ACTIVE state, you can delete it. After a DeleteStream
389// request, the specified stream is in the DELETING state until Amazon Kinesis
390// completes the deletion.
391//
392// Note: Amazon Kinesis might continue to accept data read and write operations,
393// such as PutRecord, PutRecords, and GetRecords, on a stream in the DELETING
394// state until the stream deletion is complete.
395//
396// When you delete a stream, any shards in that stream are also deleted, and
397// any tags are dissociated from the stream.
398//
399// You can use the DescribeStream operation to check the state of the stream,
400// which is returned in StreamStatus.
401//
402// DeleteStream has a limit of 5 transactions per second per account.
403//
404// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
405// with awserr.Error's Code and Message methods to get detailed information about
406// the error.
407//
408// See the AWS API reference guide for Amazon Kinesis's
409// API operation DeleteStream for usage and error information.
410//
411// Returned Error Codes:
412//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
413//   The requested resource could not be found. The stream might not be specified
414//   correctly.
415//
416//   * ErrCodeLimitExceededException "LimitExceededException"
417//   The requested resource exceeds the maximum number allowed, or the number
418//   of concurrent stream requests exceeds the maximum number allowed (5).
419//
420// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream
421func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) {
422	req, out := c.DeleteStreamRequest(input)
423	return out, req.Send()
424}
425
426// DeleteStreamWithContext is the same as DeleteStream with the addition of
427// the ability to pass a context and additional request options.
428//
429// See DeleteStream for details on how to use this API operation.
430//
431// The context must be non-nil and will be used for request cancellation. If
432// the context is nil a panic will occur. In the future the SDK may create
433// sub-contexts for http.Requests. See https://golang.org/pkg/context/
434// for more information on using Contexts.
435func (c *Kinesis) DeleteStreamWithContext(ctx aws.Context, input *DeleteStreamInput, opts ...request.Option) (*DeleteStreamOutput, error) {
436	req, out := c.DeleteStreamRequest(input)
437	req.SetContext(ctx)
438	req.ApplyOptions(opts...)
439	return out, req.Send()
440}
441
442const opDescribeLimits = "DescribeLimits"
443
444// DescribeLimitsRequest generates a "aws/request.Request" representing the
445// client's request for the DescribeLimits operation. The "output" return
446// value will be populated with the request's response once the request complets
447// successfuly.
448//
449// Use "Send" method on the returned Request to send the API call to the service.
450// the "output" return value is not valid until after Send returns without error.
451//
452// See DescribeLimits for more information on using the DescribeLimits
453// API call, and error handling.
454//
455// This method is useful when you want to inject custom logic or configuration
456// into the SDK's request lifecycle. Such as custom headers, or retry logic.
457//
458//
459//    // Example sending a request using the DescribeLimitsRequest method.
460//    req, resp := client.DescribeLimitsRequest(params)
461//
462//    err := req.Send()
463//    if err == nil { // resp is now filled
464//        fmt.Println(resp)
465//    }
466//
467// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits
468func (c *Kinesis) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput) {
469	op := &request.Operation{
470		Name:       opDescribeLimits,
471		HTTPMethod: "POST",
472		HTTPPath:   "/",
473	}
474
475	if input == nil {
476		input = &DescribeLimitsInput{}
477	}
478
479	output = &DescribeLimitsOutput{}
480	req = c.newRequest(op, input, output)
481	return
482}
483
484// DescribeLimits API operation for Amazon Kinesis.
485//
486// Describes the shard limits and usage for the account.
487//
488// If you update your account limits, the old limits might be returned for a
489// few minutes.
490//
491// This operation has a limit of 1 transaction per second per account.
492//
493// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
494// with awserr.Error's Code and Message methods to get detailed information about
495// the error.
496//
497// See the AWS API reference guide for Amazon Kinesis's
498// API operation DescribeLimits for usage and error information.
499//
500// Returned Error Codes:
501//   * ErrCodeLimitExceededException "LimitExceededException"
502//   The requested resource exceeds the maximum number allowed, or the number
503//   of concurrent stream requests exceeds the maximum number allowed (5).
504//
505// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits
506func (c *Kinesis) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error) {
507	req, out := c.DescribeLimitsRequest(input)
508	return out, req.Send()
509}
510
511// DescribeLimitsWithContext is the same as DescribeLimits with the addition of
512// the ability to pass a context and additional request options.
513//
514// See DescribeLimits for details on how to use this API operation.
515//
516// The context must be non-nil and will be used for request cancellation. If
517// the context is nil a panic will occur. In the future the SDK may create
518// sub-contexts for http.Requests. See https://golang.org/pkg/context/
519// for more information on using Contexts.
520func (c *Kinesis) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error) {
521	req, out := c.DescribeLimitsRequest(input)
522	req.SetContext(ctx)
523	req.ApplyOptions(opts...)
524	return out, req.Send()
525}
526
527const opDescribeStream = "DescribeStream"
528
529// DescribeStreamRequest generates a "aws/request.Request" representing the
530// client's request for the DescribeStream operation. The "output" return
531// value will be populated with the request's response once the request complets
532// successfuly.
533//
534// Use "Send" method on the returned Request to send the API call to the service.
535// the "output" return value is not valid until after Send returns without error.
536//
537// See DescribeStream for more information on using the DescribeStream
538// API call, and error handling.
539//
540// This method is useful when you want to inject custom logic or configuration
541// into the SDK's request lifecycle. Such as custom headers, or retry logic.
542//
543//
544//    // Example sending a request using the DescribeStreamRequest method.
545//    req, resp := client.DescribeStreamRequest(params)
546//
547//    err := req.Send()
548//    if err == nil { // resp is now filled
549//        fmt.Println(resp)
550//    }
551//
552// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream
553func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) {
554	op := &request.Operation{
555		Name:       opDescribeStream,
556		HTTPMethod: "POST",
557		HTTPPath:   "/",
558		Paginator: &request.Paginator{
559			InputTokens:     []string{"ExclusiveStartShardId"},
560			OutputTokens:    []string{"StreamDescription.Shards[-1].ShardId"},
561			LimitToken:      "Limit",
562			TruncationToken: "StreamDescription.HasMoreShards",
563		},
564	}
565
566	if input == nil {
567		input = &DescribeStreamInput{}
568	}
569
570	output = &DescribeStreamOutput{}
571	req = c.newRequest(op, input, output)
572	return
573}
574
575// DescribeStream API operation for Amazon Kinesis.
576//
577// Describes the specified Amazon Kinesis stream.
578//
579// The information returned includes the stream name, Amazon Resource Name (ARN),
580// creation time, enhanced metric configuration, and shard map. The shard map
581// is an array of shard objects. For each shard object, there is the hash key
582// and sequence number ranges that the shard spans, and the IDs of any earlier
583// shards that played in a role in creating the shard. Every record ingested
584// in the stream is identified by a sequence number, which is assigned when
585// the record is put into the stream.
586//
587// You can limit the number of shards returned by each call. For more information,
588// see Retrieving Shards from a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html)
589// in the Amazon Kinesis Streams Developer Guide.
590//
591// There are no guarantees about the chronological order shards returned. To
592// process shards in chronological order, use the ID of the parent shard to
593// track the lineage to the oldest shard.
594//
595// This operation has a limit of 10 transactions per second per account.
596//
597// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
598// with awserr.Error's Code and Message methods to get detailed information about
599// the error.
600//
601// See the AWS API reference guide for Amazon Kinesis's
602// API operation DescribeStream for usage and error information.
603//
604// Returned Error Codes:
605//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
606//   The requested resource could not be found. The stream might not be specified
607//   correctly.
608//
609//   * ErrCodeLimitExceededException "LimitExceededException"
610//   The requested resource exceeds the maximum number allowed, or the number
611//   of concurrent stream requests exceeds the maximum number allowed (5).
612//
613// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream
614func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) {
615	req, out := c.DescribeStreamRequest(input)
616	return out, req.Send()
617}
618
619// DescribeStreamWithContext is the same as DescribeStream with the addition of
620// the ability to pass a context and additional request options.
621//
622// See DescribeStream for details on how to use this API operation.
623//
624// The context must be non-nil and will be used for request cancellation. If
625// the context is nil a panic will occur. In the future the SDK may create
626// sub-contexts for http.Requests. See https://golang.org/pkg/context/
627// for more information on using Contexts.
628func (c *Kinesis) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) {
629	req, out := c.DescribeStreamRequest(input)
630	req.SetContext(ctx)
631	req.ApplyOptions(opts...)
632	return out, req.Send()
633}
634
635// DescribeStreamPages iterates over the pages of a DescribeStream operation,
636// calling the "fn" function with the response data for each page. To stop
637// iterating, return false from the fn function.
638//
639// See DescribeStream method for more information on how to use this operation.
640//
641// Note: This operation can generate multiple requests to a service.
642//
643//    // Example iterating over at most 3 pages of a DescribeStream operation.
644//    pageNum := 0
645//    err := client.DescribeStreamPages(params,
646//        func(page *DescribeStreamOutput, lastPage bool) bool {
647//            pageNum++
648//            fmt.Println(page)
649//            return pageNum <= 3
650//        })
651//
652func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool) error {
653	return c.DescribeStreamPagesWithContext(aws.BackgroundContext(), input, fn)
654}
655
656// DescribeStreamPagesWithContext same as DescribeStreamPages except
657// it takes a Context and allows setting request options on the pages.
658//
659// The context must be non-nil and will be used for request cancellation. If
660// the context is nil a panic will occur. In the future the SDK may create
661// sub-contexts for http.Requests. See https://golang.org/pkg/context/
662// for more information on using Contexts.
663func (c *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool, opts ...request.Option) error {
664	p := request.Pagination{
665		NewRequest: func() (*request.Request, error) {
666			var inCpy *DescribeStreamInput
667			if input != nil {
668				tmp := *input
669				inCpy = &tmp
670			}
671			req, _ := c.DescribeStreamRequest(inCpy)
672			req.SetContext(ctx)
673			req.ApplyOptions(opts...)
674			return req, nil
675		},
676	}
677
678	cont := true
679	for p.Next() && cont {
680		cont = fn(p.Page().(*DescribeStreamOutput), !p.HasNextPage())
681	}
682	return p.Err()
683}
684
685const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring"
686
687// DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
688// client's request for the DisableEnhancedMonitoring operation. The "output" return
689// value will be populated with the request's response once the request complets
690// successfuly.
691//
692// Use "Send" method on the returned Request to send the API call to the service.
693// the "output" return value is not valid until after Send returns without error.
694//
695// See DisableEnhancedMonitoring for more information on using the DisableEnhancedMonitoring
696// API call, and error handling.
697//
698// This method is useful when you want to inject custom logic or configuration
699// into the SDK's request lifecycle. Such as custom headers, or retry logic.
700//
701//
702//    // Example sending a request using the DisableEnhancedMonitoringRequest method.
703//    req, resp := client.DisableEnhancedMonitoringRequest(params)
704//
705//    err := req.Send()
706//    if err == nil { // resp is now filled
707//        fmt.Println(resp)
708//    }
709//
710// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring
711func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
712	op := &request.Operation{
713		Name:       opDisableEnhancedMonitoring,
714		HTTPMethod: "POST",
715		HTTPPath:   "/",
716	}
717
718	if input == nil {
719		input = &DisableEnhancedMonitoringInput{}
720	}
721
722	output = &EnhancedMonitoringOutput{}
723	req = c.newRequest(op, input, output)
724	return
725}
726
727// DisableEnhancedMonitoring API operation for Amazon Kinesis.
728//
729// Disables enhanced monitoring.
730//
731// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
732// with awserr.Error's Code and Message methods to get detailed information about
733// the error.
734//
735// See the AWS API reference guide for Amazon Kinesis's
736// API operation DisableEnhancedMonitoring for usage and error information.
737//
738// Returned Error Codes:
739//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
740//   A specified parameter exceeds its restrictions, is not supported, or can't
741//   be used. For more information, see the returned message.
742//
743//   * ErrCodeLimitExceededException "LimitExceededException"
744//   The requested resource exceeds the maximum number allowed, or the number
745//   of concurrent stream requests exceeds the maximum number allowed (5).
746//
747//   * ErrCodeResourceInUseException "ResourceInUseException"
748//   The resource is not available for this operation. For successful operation,
749//   the resource needs to be in the ACTIVE state.
750//
751//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
752//   The requested resource could not be found. The stream might not be specified
753//   correctly.
754//
755// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring
756func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
757	req, out := c.DisableEnhancedMonitoringRequest(input)
758	return out, req.Send()
759}
760
761// DisableEnhancedMonitoringWithContext is the same as DisableEnhancedMonitoring with the addition of
762// the ability to pass a context and additional request options.
763//
764// See DisableEnhancedMonitoring for details on how to use this API operation.
765//
766// The context must be non-nil and will be used for request cancellation. If
767// the context is nil a panic will occur. In the future the SDK may create
768// sub-contexts for http.Requests. See https://golang.org/pkg/context/
769// for more information on using Contexts.
770func (c *Kinesis) DisableEnhancedMonitoringWithContext(ctx aws.Context, input *DisableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) {
771	req, out := c.DisableEnhancedMonitoringRequest(input)
772	req.SetContext(ctx)
773	req.ApplyOptions(opts...)
774	return out, req.Send()
775}
776
777const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring"
778
779// EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
780// client's request for the EnableEnhancedMonitoring operation. The "output" return
781// value will be populated with the request's response once the request complets
782// successfuly.
783//
784// Use "Send" method on the returned Request to send the API call to the service.
785// the "output" return value is not valid until after Send returns without error.
786//
787// See EnableEnhancedMonitoring for more information on using the EnableEnhancedMonitoring
788// API call, and error handling.
789//
790// This method is useful when you want to inject custom logic or configuration
791// into the SDK's request lifecycle. Such as custom headers, or retry logic.
792//
793//
794//    // Example sending a request using the EnableEnhancedMonitoringRequest method.
795//    req, resp := client.EnableEnhancedMonitoringRequest(params)
796//
797//    err := req.Send()
798//    if err == nil { // resp is now filled
799//        fmt.Println(resp)
800//    }
801//
802// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring
803func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
804	op := &request.Operation{
805		Name:       opEnableEnhancedMonitoring,
806		HTTPMethod: "POST",
807		HTTPPath:   "/",
808	}
809
810	if input == nil {
811		input = &EnableEnhancedMonitoringInput{}
812	}
813
814	output = &EnhancedMonitoringOutput{}
815	req = c.newRequest(op, input, output)
816	return
817}
818
819// EnableEnhancedMonitoring API operation for Amazon Kinesis.
820//
821// Enables enhanced Amazon Kinesis stream monitoring for shard-level metrics.
822//
823// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
824// with awserr.Error's Code and Message methods to get detailed information about
825// the error.
826//
827// See the AWS API reference guide for Amazon Kinesis's
828// API operation EnableEnhancedMonitoring for usage and error information.
829//
830// Returned Error Codes:
831//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
832//   A specified parameter exceeds its restrictions, is not supported, or can't
833//   be used. For more information, see the returned message.
834//
835//   * ErrCodeLimitExceededException "LimitExceededException"
836//   The requested resource exceeds the maximum number allowed, or the number
837//   of concurrent stream requests exceeds the maximum number allowed (5).
838//
839//   * ErrCodeResourceInUseException "ResourceInUseException"
840//   The resource is not available for this operation. For successful operation,
841//   the resource needs to be in the ACTIVE state.
842//
843//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
844//   The requested resource could not be found. The stream might not be specified
845//   correctly.
846//
847// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring
848func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
849	req, out := c.EnableEnhancedMonitoringRequest(input)
850	return out, req.Send()
851}
852
853// EnableEnhancedMonitoringWithContext is the same as EnableEnhancedMonitoring with the addition of
854// the ability to pass a context and additional request options.
855//
856// See EnableEnhancedMonitoring for details on how to use this API operation.
857//
858// The context must be non-nil and will be used for request cancellation. If
859// the context is nil a panic will occur. In the future the SDK may create
860// sub-contexts for http.Requests. See https://golang.org/pkg/context/
861// for more information on using Contexts.
862func (c *Kinesis) EnableEnhancedMonitoringWithContext(ctx aws.Context, input *EnableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) {
863	req, out := c.EnableEnhancedMonitoringRequest(input)
864	req.SetContext(ctx)
865	req.ApplyOptions(opts...)
866	return out, req.Send()
867}
868
869const opGetRecords = "GetRecords"
870
871// GetRecordsRequest generates a "aws/request.Request" representing the
872// client's request for the GetRecords operation. The "output" return
873// value will be populated with the request's response once the request complets
874// successfuly.
875//
876// Use "Send" method on the returned Request to send the API call to the service.
877// the "output" return value is not valid until after Send returns without error.
878//
879// See GetRecords for more information on using the GetRecords
880// API call, and error handling.
881//
882// This method is useful when you want to inject custom logic or configuration
883// into the SDK's request lifecycle. Such as custom headers, or retry logic.
884//
885//
886//    // Example sending a request using the GetRecordsRequest method.
887//    req, resp := client.GetRecordsRequest(params)
888//
889//    err := req.Send()
890//    if err == nil { // resp is now filled
891//        fmt.Println(resp)
892//    }
893//
894// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords
895func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) {
896	op := &request.Operation{
897		Name:       opGetRecords,
898		HTTPMethod: "POST",
899		HTTPPath:   "/",
900	}
901
902	if input == nil {
903		input = &GetRecordsInput{}
904	}
905
906	output = &GetRecordsOutput{}
907	req = c.newRequest(op, input, output)
908	return
909}
910
911// GetRecords API operation for Amazon Kinesis.
912//
913// Gets data records from an Amazon Kinesis stream's shard.
914//
915// Specify a shard iterator using the ShardIterator parameter. The shard iterator
916// specifies the position in the shard from which you want to start reading
917// data records sequentially. If there are no records available in the portion
918// of the shard that the iterator points to, GetRecords returns an empty list.
919// Note that it might take multiple calls to get to a portion of the shard that
920// contains records.
921//
922// You can scale by provisioning multiple shards per stream while considering
923// service limits (for more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
924// in the Amazon Kinesis Streams Developer Guide). Your application should have
925// one thread per shard, each reading continuously from its stream. To read
926// from a stream continually, call GetRecords in a loop. Use GetShardIterator
927// to get the shard iterator to specify in the first GetRecords call. GetRecords
928// returns a new shard iterator in NextShardIterator. Specify the shard iterator
929// returned in NextShardIterator in subsequent calls to GetRecords. Note that
930// if the shard has been closed, the shard iterator can't return more data and
931// GetRecords returns null in NextShardIterator. You can terminate the loop
932// when the shard is closed, or when the shard iterator reaches the record with
933// the sequence number or other attribute that marks it as the last record to
934// process.
935//
936// Each data record can be up to 1 MB in size, and each shard can read up to
937// 2 MB per second. You can ensure that your calls don't exceed the maximum
938// supported size or throughput by using the Limit parameter to specify the
939// maximum number of records that GetRecords can return. Consider your average
940// record size when determining this limit.
941//
942// The size of the data returned by GetRecords varies depending on the utilization
943// of the shard. The maximum size of data that GetRecords can return is 10 MB.
944// If a call returns this amount of data, subsequent calls made within the next
945// 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient
946// provisioned throughput on the shard, subsequent calls made within the next
947// 1 second throw ProvisionedThroughputExceededException. Note that GetRecords
948// won't return any data when it throws an exception. For this reason, we recommend
949// that you wait one second between calls to GetRecords; however, it's possible
950// that the application will get exceptions for longer than 1 second.
951//
952// To detect whether the application is falling behind in processing, you can
953// use the MillisBehindLatest response attribute. You can also monitor the stream
954// using CloudWatch metrics and other mechanisms (see Monitoring (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html)
955// in the Amazon Kinesis Streams Developer Guide).
956//
957// Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp,
958// that is set when a stream successfully receives and stores a record. This
959// is commonly referred to as a server-side timestamp, whereas a client-side
960// timestamp is set when a data producer creates or sends the record to a stream
961// (a data producer is any data source putting data records into a stream, for
962// example with PutRecords). The timestamp has millisecond precision. There
963// are no guarantees about the timestamp accuracy, or that the timestamp is
964// always increasing. For example, records in a shard or across a stream might
965// have timestamps that are out of order.
966//
967// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
968// with awserr.Error's Code and Message methods to get detailed information about
969// the error.
970//
971// See the AWS API reference guide for Amazon Kinesis's
972// API operation GetRecords for usage and error information.
973//
974// Returned Error Codes:
975//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
976//   The requested resource could not be found. The stream might not be specified
977//   correctly.
978//
979//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
980//   A specified parameter exceeds its restrictions, is not supported, or can't
981//   be used. For more information, see the returned message.
982//
983//   * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
984//   The request rate for the stream is too high, or the requested data is too
985//   large for the available throughput. Reduce the frequency or size of your
986//   requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
987//   in the Amazon Kinesis Streams Developer Guide, and Error Retries and Exponential
988//   Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html)
989//   in the AWS General Reference.
990//
991//   * ErrCodeExpiredIteratorException "ExpiredIteratorException"
992//   The provided iterator exceeds the maximum age allowed.
993//
994//   * ErrCodeKMSDisabledException "KMSDisabledException"
995//   The request was rejected because the specified CMK isn't enabled.
996//
997//   * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
998//   The request was rejected because the state of the specified resource isn't
999//   valid for this request. For more information, see How Key State Affects Use
1000//   of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
1001//   in the AWS Key Management Service Developer Guide.
1002//
1003//   * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
1004//   The ciphertext references a key that doesn't exist or that you don't have
1005//   access to.
1006//
1007//   * ErrCodeKMSNotFoundException "KMSNotFoundException"
1008//   The request was rejected because the specified entity or resource couldn't
1009//   be found.
1010//
1011//   * ErrCodeKMSOptInRequired "KMSOptInRequired"
1012//   The AWS access key ID needs a subscription for the service.
1013//
1014//   * ErrCodeKMSThrottlingException "KMSThrottlingException"
1015//   The request was denied due to request throttling. For more information about
1016//   throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
1017//   in the AWS Key Management Service Developer Guide.
1018//
1019// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords
1020func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) {
1021	req, out := c.GetRecordsRequest(input)
1022	return out, req.Send()
1023}
1024
1025// GetRecordsWithContext is the same as GetRecords with the addition of
1026// the ability to pass a context and additional request options.
1027//
1028// See GetRecords for details on how to use this API operation.
1029//
1030// The context must be non-nil and will be used for request cancellation. If
1031// the context is nil a panic will occur. In the future the SDK may create
1032// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1033// for more information on using Contexts.
1034func (c *Kinesis) GetRecordsWithContext(ctx aws.Context, input *GetRecordsInput, opts ...request.Option) (*GetRecordsOutput, error) {
1035	req, out := c.GetRecordsRequest(input)
1036	req.SetContext(ctx)
1037	req.ApplyOptions(opts...)
1038	return out, req.Send()
1039}
1040
1041const opGetShardIterator = "GetShardIterator"
1042
1043// GetShardIteratorRequest generates a "aws/request.Request" representing the
1044// client's request for the GetShardIterator operation. The "output" return
1045// value will be populated with the request's response once the request complets
1046// successfuly.
1047//
1048// Use "Send" method on the returned Request to send the API call to the service.
1049// the "output" return value is not valid until after Send returns without error.
1050//
1051// See GetShardIterator for more information on using the GetShardIterator
1052// API call, and error handling.
1053//
1054// This method is useful when you want to inject custom logic or configuration
1055// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1056//
1057//
1058//    // Example sending a request using the GetShardIteratorRequest method.
1059//    req, resp := client.GetShardIteratorRequest(params)
1060//
1061//    err := req.Send()
1062//    if err == nil { // resp is now filled
1063//        fmt.Println(resp)
1064//    }
1065//
1066// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator
1067func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) {
1068	op := &request.Operation{
1069		Name:       opGetShardIterator,
1070		HTTPMethod: "POST",
1071		HTTPPath:   "/",
1072	}
1073
1074	if input == nil {
1075		input = &GetShardIteratorInput{}
1076	}
1077
1078	output = &GetShardIteratorOutput{}
1079	req = c.newRequest(op, input, output)
1080	return
1081}
1082
1083// GetShardIterator API operation for Amazon Kinesis.
1084//
1085// Gets an Amazon Kinesis shard iterator. A shard iterator expires five minutes
1086// after it is returned to the requester.
1087//
1088// A shard iterator specifies the shard position from which to start reading
1089// data records sequentially. The position is specified using the sequence number
1090// of a data record in a shard. A sequence number is the identifier associated
1091// with every record ingested in the stream, and is assigned when a record is
1092// put into the stream. Each stream has one or more shards.
1093//
1094// You must specify the shard iterator type. For example, you can set the ShardIteratorType
1095// parameter to read exactly from the position denoted by a specific sequence
1096// number by using the AT_SEQUENCE_NUMBER shard iterator type, or right after
1097// the sequence number by using the AFTER_SEQUENCE_NUMBER shard iterator type,
1098// using sequence numbers returned by earlier calls to PutRecord, PutRecords,
1099// GetRecords, or DescribeStream. In the request, you can specify the shard
1100// iterator type AT_TIMESTAMP to read records from an arbitrary point in time,
1101// TRIM_HORIZON to cause ShardIterator to point to the last untrimmed record
1102// in the shard in the system (the oldest data record in the shard), or LATEST
1103// so that you always read the most recent data in the shard.
1104//
1105// When you read repeatedly from a stream, use a GetShardIterator request to
1106// get the first shard iterator for use in your first GetRecords request and
1107// for subsequent reads use the shard iterator returned by the GetRecords request
1108// in NextShardIterator. A new shard iterator is returned by every GetRecords
1109// request in NextShardIterator, which you use in the ShardIterator parameter
1110// of the next GetRecords request.
1111//
1112// If a GetShardIterator request is made too often, you receive a ProvisionedThroughputExceededException.
1113// For more information about throughput limits, see GetRecords, and Streams
1114// Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
1115// in the Amazon Kinesis Streams Developer Guide.
1116//
1117// If the shard is closed, GetShardIterator returns a valid iterator for the
1118// last sequence number of the shard. Note that a shard can be closed as a result
1119// of using SplitShard or MergeShards.
1120//
1121// GetShardIterator has a limit of 5 transactions per second per account per
1122// open shard.
1123//
1124// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1125// with awserr.Error's Code and Message methods to get detailed information about
1126// the error.
1127//
1128// See the AWS API reference guide for Amazon Kinesis's
1129// API operation GetShardIterator for usage and error information.
1130//
1131// Returned Error Codes:
1132//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1133//   The requested resource could not be found. The stream might not be specified
1134//   correctly.
1135//
1136//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1137//   A specified parameter exceeds its restrictions, is not supported, or can't
1138//   be used. For more information, see the returned message.
1139//
1140//   * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
1141//   The request rate for the stream is too high, or the requested data is too
1142//   large for the available throughput. Reduce the frequency or size of your
1143//   requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
1144//   in the Amazon Kinesis Streams Developer Guide, and Error Retries and Exponential
1145//   Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html)
1146//   in the AWS General Reference.
1147//
1148// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator
1149func (c *Kinesis) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) {
1150	req, out := c.GetShardIteratorRequest(input)
1151	return out, req.Send()
1152}
1153
1154// GetShardIteratorWithContext is the same as GetShardIterator with the addition of
1155// the ability to pass a context and additional request options.
1156//
1157// See GetShardIterator for details on how to use this API operation.
1158//
1159// The context must be non-nil and will be used for request cancellation. If
1160// the context is nil a panic will occur. In the future the SDK may create
1161// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1162// for more information on using Contexts.
1163func (c *Kinesis) GetShardIteratorWithContext(ctx aws.Context, input *GetShardIteratorInput, opts ...request.Option) (*GetShardIteratorOutput, error) {
1164	req, out := c.GetShardIteratorRequest(input)
1165	req.SetContext(ctx)
1166	req.ApplyOptions(opts...)
1167	return out, req.Send()
1168}
1169
1170const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod"
1171
1172// IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
1173// client's request for the IncreaseStreamRetentionPeriod operation. The "output" return
1174// value will be populated with the request's response once the request complets
1175// successfuly.
1176//
1177// Use "Send" method on the returned Request to send the API call to the service.
1178// the "output" return value is not valid until after Send returns without error.
1179//
1180// See IncreaseStreamRetentionPeriod for more information on using the IncreaseStreamRetentionPeriod
1181// API call, and error handling.
1182//
1183// This method is useful when you want to inject custom logic or configuration
1184// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1185//
1186//
1187//    // Example sending a request using the IncreaseStreamRetentionPeriodRequest method.
1188//    req, resp := client.IncreaseStreamRetentionPeriodRequest(params)
1189//
1190//    err := req.Send()
1191//    if err == nil { // resp is now filled
1192//        fmt.Println(resp)
1193//    }
1194//
1195// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod
1196func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRetentionPeriodInput) (req *request.Request, output *IncreaseStreamRetentionPeriodOutput) {
1197	op := &request.Operation{
1198		Name:       opIncreaseStreamRetentionPeriod,
1199		HTTPMethod: "POST",
1200		HTTPPath:   "/",
1201	}
1202
1203	if input == nil {
1204		input = &IncreaseStreamRetentionPeriodInput{}
1205	}
1206
1207	output = &IncreaseStreamRetentionPeriodOutput{}
1208	req = c.newRequest(op, input, output)
1209	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
1210	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
1211	return
1212}
1213
1214// IncreaseStreamRetentionPeriod API operation for Amazon Kinesis.
1215//
1216// Increases the Amazon Kinesis stream's retention period, which is the length
1217// of time data records are accessible after they are added to the stream. The
1218// maximum value of a stream's retention period is 168 hours (7 days).
1219//
1220// Upon choosing a longer stream retention period, this operation will increase
1221// the time period records are accessible that have not yet expired. However,
1222// it will not make previous data that has expired (older than the stream's
1223// previous retention period) accessible after the operation has been called.
1224// For example, if a stream's retention period is set to 24 hours and is increased
1225// to 168 hours, any data that is older than 24 hours will remain inaccessible
1226// to consumer applications.
1227//
1228// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1229// with awserr.Error's Code and Message methods to get detailed information about
1230// the error.
1231//
1232// See the AWS API reference guide for Amazon Kinesis's
1233// API operation IncreaseStreamRetentionPeriod for usage and error information.
1234//
1235// Returned Error Codes:
1236//   * ErrCodeResourceInUseException "ResourceInUseException"
1237//   The resource is not available for this operation. For successful operation,
1238//   the resource needs to be in the ACTIVE state.
1239//
1240//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1241//   The requested resource could not be found. The stream might not be specified
1242//   correctly.
1243//
1244//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1245//   A specified parameter exceeds its restrictions, is not supported, or can't
1246//   be used. For more information, see the returned message.
1247//
1248// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod
1249func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRetentionPeriodInput) (*IncreaseStreamRetentionPeriodOutput, error) {
1250	req, out := c.IncreaseStreamRetentionPeriodRequest(input)
1251	return out, req.Send()
1252}
1253
1254// IncreaseStreamRetentionPeriodWithContext is the same as IncreaseStreamRetentionPeriod with the addition of
1255// the ability to pass a context and additional request options.
1256//
1257// See IncreaseStreamRetentionPeriod for details on how to use this API operation.
1258//
1259// The context must be non-nil and will be used for request cancellation. If
1260// the context is nil a panic will occur. In the future the SDK may create
1261// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1262// for more information on using Contexts.
1263func (c *Kinesis) IncreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *IncreaseStreamRetentionPeriodInput, opts ...request.Option) (*IncreaseStreamRetentionPeriodOutput, error) {
1264	req, out := c.IncreaseStreamRetentionPeriodRequest(input)
1265	req.SetContext(ctx)
1266	req.ApplyOptions(opts...)
1267	return out, req.Send()
1268}
1269
1270const opListStreams = "ListStreams"
1271
1272// ListStreamsRequest generates a "aws/request.Request" representing the
1273// client's request for the ListStreams operation. The "output" return
1274// value will be populated with the request's response once the request complets
1275// successfuly.
1276//
1277// Use "Send" method on the returned Request to send the API call to the service.
1278// the "output" return value is not valid until after Send returns without error.
1279//
1280// See ListStreams for more information on using the ListStreams
1281// API call, and error handling.
1282//
1283// This method is useful when you want to inject custom logic or configuration
1284// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1285//
1286//
1287//    // Example sending a request using the ListStreamsRequest method.
1288//    req, resp := client.ListStreamsRequest(params)
1289//
1290//    err := req.Send()
1291//    if err == nil { // resp is now filled
1292//        fmt.Println(resp)
1293//    }
1294//
1295// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams
1296func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) {
1297	op := &request.Operation{
1298		Name:       opListStreams,
1299		HTTPMethod: "POST",
1300		HTTPPath:   "/",
1301		Paginator: &request.Paginator{
1302			InputTokens:     []string{"ExclusiveStartStreamName"},
1303			OutputTokens:    []string{"StreamNames[-1]"},
1304			LimitToken:      "Limit",
1305			TruncationToken: "HasMoreStreams",
1306		},
1307	}
1308
1309	if input == nil {
1310		input = &ListStreamsInput{}
1311	}
1312
1313	output = &ListStreamsOutput{}
1314	req = c.newRequest(op, input, output)
1315	return
1316}
1317
1318// ListStreams API operation for Amazon Kinesis.
1319//
1320// Lists your Amazon Kinesis streams.
1321//
1322// The number of streams may be too large to return from a single call to ListStreams.
1323// You can limit the number of returned streams using the Limit parameter. If
1324// you do not specify a value for the Limit parameter, Amazon Kinesis uses the
1325// default limit, which is currently 10.
1326//
1327// You can detect if there are more streams available to list by using the HasMoreStreams
1328// flag from the returned output. If there are more streams available, you can
1329// request more streams by using the name of the last stream returned by the
1330// ListStreams request in the ExclusiveStartStreamName parameter in a subsequent
1331// request to ListStreams. The group of stream names returned by the subsequent
1332// request is then added to the list. You can continue this process until all
1333// the stream names have been collected in the list.
1334//
1335// ListStreams has a limit of 5 transactions per second per account.
1336//
1337// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1338// with awserr.Error's Code and Message methods to get detailed information about
1339// the error.
1340//
1341// See the AWS API reference guide for Amazon Kinesis's
1342// API operation ListStreams for usage and error information.
1343//
1344// Returned Error Codes:
1345//   * ErrCodeLimitExceededException "LimitExceededException"
1346//   The requested resource exceeds the maximum number allowed, or the number
1347//   of concurrent stream requests exceeds the maximum number allowed (5).
1348//
1349// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams
1350func (c *Kinesis) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) {
1351	req, out := c.ListStreamsRequest(input)
1352	return out, req.Send()
1353}
1354
1355// ListStreamsWithContext is the same as ListStreams with the addition of
1356// the ability to pass a context and additional request options.
1357//
1358// See ListStreams for details on how to use this API operation.
1359//
1360// The context must be non-nil and will be used for request cancellation. If
1361// the context is nil a panic will occur. In the future the SDK may create
1362// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1363// for more information on using Contexts.
1364func (c *Kinesis) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) {
1365	req, out := c.ListStreamsRequest(input)
1366	req.SetContext(ctx)
1367	req.ApplyOptions(opts...)
1368	return out, req.Send()
1369}
1370
1371// ListStreamsPages iterates over the pages of a ListStreams operation,
1372// calling the "fn" function with the response data for each page. To stop
1373// iterating, return false from the fn function.
1374//
1375// See ListStreams method for more information on how to use this operation.
1376//
1377// Note: This operation can generate multiple requests to a service.
1378//
1379//    // Example iterating over at most 3 pages of a ListStreams operation.
1380//    pageNum := 0
1381//    err := client.ListStreamsPages(params,
1382//        func(page *ListStreamsOutput, lastPage bool) bool {
1383//            pageNum++
1384//            fmt.Println(page)
1385//            return pageNum <= 3
1386//        })
1387//
1388func (c *Kinesis) ListStreamsPages(input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool) error {
1389	return c.ListStreamsPagesWithContext(aws.BackgroundContext(), input, fn)
1390}
1391
1392// ListStreamsPagesWithContext same as ListStreamsPages except
1393// it takes a Context and allows setting request options on the pages.
1394//
1395// The context must be non-nil and will be used for request cancellation. If
1396// the context is nil a panic will occur. In the future the SDK may create
1397// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1398// for more information on using Contexts.
1399func (c *Kinesis) ListStreamsPagesWithContext(ctx aws.Context, input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool, opts ...request.Option) error {
1400	p := request.Pagination{
1401		NewRequest: func() (*request.Request, error) {
1402			var inCpy *ListStreamsInput
1403			if input != nil {
1404				tmp := *input
1405				inCpy = &tmp
1406			}
1407			req, _ := c.ListStreamsRequest(inCpy)
1408			req.SetContext(ctx)
1409			req.ApplyOptions(opts...)
1410			return req, nil
1411		},
1412	}
1413
1414	cont := true
1415	for p.Next() && cont {
1416		cont = fn(p.Page().(*ListStreamsOutput), !p.HasNextPage())
1417	}
1418	return p.Err()
1419}
1420
1421const opListTagsForStream = "ListTagsForStream"
1422
1423// ListTagsForStreamRequest generates a "aws/request.Request" representing the
1424// client's request for the ListTagsForStream operation. The "output" return
1425// value will be populated with the request's response once the request complets
1426// successfuly.
1427//
1428// Use "Send" method on the returned Request to send the API call to the service.
1429// the "output" return value is not valid until after Send returns without error.
1430//
1431// See ListTagsForStream for more information on using the ListTagsForStream
1432// API call, and error handling.
1433//
1434// This method is useful when you want to inject custom logic or configuration
1435// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1436//
1437//
1438//    // Example sending a request using the ListTagsForStreamRequest method.
1439//    req, resp := client.ListTagsForStreamRequest(params)
1440//
1441//    err := req.Send()
1442//    if err == nil { // resp is now filled
1443//        fmt.Println(resp)
1444//    }
1445//
1446// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream
1447func (c *Kinesis) ListTagsForStreamRequest(input *ListTagsForStreamInput) (req *request.Request, output *ListTagsForStreamOutput) {
1448	op := &request.Operation{
1449		Name:       opListTagsForStream,
1450		HTTPMethod: "POST",
1451		HTTPPath:   "/",
1452	}
1453
1454	if input == nil {
1455		input = &ListTagsForStreamInput{}
1456	}
1457
1458	output = &ListTagsForStreamOutput{}
1459	req = c.newRequest(op, input, output)
1460	return
1461}
1462
1463// ListTagsForStream API operation for Amazon Kinesis.
1464//
1465// Lists the tags for the specified Amazon Kinesis stream.
1466//
1467// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1468// with awserr.Error's Code and Message methods to get detailed information about
1469// the error.
1470//
1471// See the AWS API reference guide for Amazon Kinesis's
1472// API operation ListTagsForStream for usage and error information.
1473//
1474// Returned Error Codes:
1475//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1476//   The requested resource could not be found. The stream might not be specified
1477//   correctly.
1478//
1479//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1480//   A specified parameter exceeds its restrictions, is not supported, or can't
1481//   be used. For more information, see the returned message.
1482//
1483//   * ErrCodeLimitExceededException "LimitExceededException"
1484//   The requested resource exceeds the maximum number allowed, or the number
1485//   of concurrent stream requests exceeds the maximum number allowed (5).
1486//
1487// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream
1488func (c *Kinesis) ListTagsForStream(input *ListTagsForStreamInput) (*ListTagsForStreamOutput, error) {
1489	req, out := c.ListTagsForStreamRequest(input)
1490	return out, req.Send()
1491}
1492
1493// ListTagsForStreamWithContext is the same as ListTagsForStream with the addition of
1494// the ability to pass a context and additional request options.
1495//
1496// See ListTagsForStream for details on how to use this API operation.
1497//
1498// The context must be non-nil and will be used for request cancellation. If
1499// the context is nil a panic will occur. In the future the SDK may create
1500// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1501// for more information on using Contexts.
1502func (c *Kinesis) ListTagsForStreamWithContext(ctx aws.Context, input *ListTagsForStreamInput, opts ...request.Option) (*ListTagsForStreamOutput, error) {
1503	req, out := c.ListTagsForStreamRequest(input)
1504	req.SetContext(ctx)
1505	req.ApplyOptions(opts...)
1506	return out, req.Send()
1507}
1508
1509const opMergeShards = "MergeShards"
1510
1511// MergeShardsRequest generates a "aws/request.Request" representing the
1512// client's request for the MergeShards operation. The "output" return
1513// value will be populated with the request's response once the request complets
1514// successfuly.
1515//
1516// Use "Send" method on the returned Request to send the API call to the service.
1517// the "output" return value is not valid until after Send returns without error.
1518//
1519// See MergeShards for more information on using the MergeShards
1520// API call, and error handling.
1521//
1522// This method is useful when you want to inject custom logic or configuration
1523// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1524//
1525//
1526//    // Example sending a request using the MergeShardsRequest method.
1527//    req, resp := client.MergeShardsRequest(params)
1528//
1529//    err := req.Send()
1530//    if err == nil { // resp is now filled
1531//        fmt.Println(resp)
1532//    }
1533//
1534// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards
1535func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Request, output *MergeShardsOutput) {
1536	op := &request.Operation{
1537		Name:       opMergeShards,
1538		HTTPMethod: "POST",
1539		HTTPPath:   "/",
1540	}
1541
1542	if input == nil {
1543		input = &MergeShardsInput{}
1544	}
1545
1546	output = &MergeShardsOutput{}
1547	req = c.newRequest(op, input, output)
1548	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
1549	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
1550	return
1551}
1552
1553// MergeShards API operation for Amazon Kinesis.
1554//
1555// Merges two adjacent shards in an Amazon Kinesis stream and combines them
1556// into a single shard to reduce the stream's capacity to ingest and transport
1557// data. Two shards are considered adjacent if the union of the hash key ranges
1558// for the two shards form a contiguous set with no gaps. For example, if you
1559// have two shards, one with a hash key range of 276...381 and the other with
1560// a hash key range of 382...454, then you could merge these two shards into
1561// a single shard that would have a hash key range of 276...454. After the merge,
1562// the single child shard receives data for all hash key values covered by the
1563// two parent shards.
1564//
1565// MergeShards is called when there is a need to reduce the overall capacity
1566// of a stream because of excess capacity that is not being used. You must specify
1567// the shard to be merged and the adjacent shard for a stream. For more information
1568// about merging shards, see Merge Two Shards (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html)
1569// in the Amazon Kinesis Streams Developer Guide.
1570//
1571// If the stream is in the ACTIVE state, you can call MergeShards. If a stream
1572// is in the CREATING, UPDATING, or DELETING state, MergeShards returns a ResourceInUseException.
1573// If the specified stream does not exist, MergeShards returns a ResourceNotFoundException.
1574//
1575// You can use DescribeStream to check the state of the stream, which is returned
1576// in StreamStatus.
1577//
1578// MergeShards is an asynchronous operation. Upon receiving a MergeShards request,
1579// Amazon Kinesis immediately returns a response and sets the StreamStatus to
1580// UPDATING. After the operation is completed, Amazon Kinesis sets the StreamStatus
1581// to ACTIVE. Read and write operations continue to work while the stream is
1582// in the UPDATING state.
1583//
1584// You use DescribeStream to determine the shard IDs that are specified in the
1585// MergeShards request.
1586//
1587// If you try to operate on too many streams in parallel using CreateStream,
1588// DeleteStream, MergeShards or SplitShard, you will receive a LimitExceededException.
1589//
1590// MergeShards has limit of 5 transactions per second per account.
1591//
1592// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1593// with awserr.Error's Code and Message methods to get detailed information about
1594// the error.
1595//
1596// See the AWS API reference guide for Amazon Kinesis's
1597// API operation MergeShards for usage and error information.
1598//
1599// Returned Error Codes:
1600//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1601//   The requested resource could not be found. The stream might not be specified
1602//   correctly.
1603//
1604//   * ErrCodeResourceInUseException "ResourceInUseException"
1605//   The resource is not available for this operation. For successful operation,
1606//   the resource needs to be in the ACTIVE state.
1607//
1608//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1609//   A specified parameter exceeds its restrictions, is not supported, or can't
1610//   be used. For more information, see the returned message.
1611//
1612//   * ErrCodeLimitExceededException "LimitExceededException"
1613//   The requested resource exceeds the maximum number allowed, or the number
1614//   of concurrent stream requests exceeds the maximum number allowed (5).
1615//
1616// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards
1617func (c *Kinesis) MergeShards(input *MergeShardsInput) (*MergeShardsOutput, error) {
1618	req, out := c.MergeShardsRequest(input)
1619	return out, req.Send()
1620}
1621
1622// MergeShardsWithContext is the same as MergeShards with the addition of
1623// the ability to pass a context and additional request options.
1624//
1625// See MergeShards for details on how to use this API operation.
1626//
1627// The context must be non-nil and will be used for request cancellation. If
1628// the context is nil a panic will occur. In the future the SDK may create
1629// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1630// for more information on using Contexts.
1631func (c *Kinesis) MergeShardsWithContext(ctx aws.Context, input *MergeShardsInput, opts ...request.Option) (*MergeShardsOutput, error) {
1632	req, out := c.MergeShardsRequest(input)
1633	req.SetContext(ctx)
1634	req.ApplyOptions(opts...)
1635	return out, req.Send()
1636}
1637
1638const opPutRecord = "PutRecord"
1639
1640// PutRecordRequest generates a "aws/request.Request" representing the
1641// client's request for the PutRecord operation. The "output" return
1642// value will be populated with the request's response once the request complets
1643// successfuly.
1644//
1645// Use "Send" method on the returned Request to send the API call to the service.
1646// the "output" return value is not valid until after Send returns without error.
1647//
1648// See PutRecord for more information on using the PutRecord
1649// API call, and error handling.
1650//
1651// This method is useful when you want to inject custom logic or configuration
1652// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1653//
1654//
1655//    // Example sending a request using the PutRecordRequest method.
1656//    req, resp := client.PutRecordRequest(params)
1657//
1658//    err := req.Send()
1659//    if err == nil { // resp is now filled
1660//        fmt.Println(resp)
1661//    }
1662//
1663// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord
1664func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) {
1665	op := &request.Operation{
1666		Name:       opPutRecord,
1667		HTTPMethod: "POST",
1668		HTTPPath:   "/",
1669	}
1670
1671	if input == nil {
1672		input = &PutRecordInput{}
1673	}
1674
1675	output = &PutRecordOutput{}
1676	req = c.newRequest(op, input, output)
1677	return
1678}
1679
1680// PutRecord API operation for Amazon Kinesis.
1681//
1682// Writes a single data record into an Amazon Kinesis stream. Call PutRecord
1683// to send data into the stream for real-time ingestion and subsequent processing,
1684// one record at a time. Each shard can support writes up to 1,000 records per
1685// second, up to a maximum data write total of 1 MB per second.
1686//
1687// You must specify the name of the stream that captures, stores, and transports
1688// the data; a partition key; and the data blob itself.
1689//
1690// The data blob can be any type of data; for example, a segment from a log
1691// file, geographic/location data, website clickstream data, and so on.
1692//
1693// The partition key is used by Amazon Kinesis to distribute data across shards.
1694// Amazon Kinesis segregates the data records that belong to a stream into multiple
1695// shards, using the partition key associated with each data record to determine
1696// which shard a given data record belongs to.
1697//
1698// Partition keys are Unicode strings, with a maximum length limit of 256 characters
1699// for each key. An MD5 hash function is used to map partition keys to 128-bit
1700// integer values and to map associated data records to shards using the hash
1701// key ranges of the shards. You can override hashing the partition key to determine
1702// the shard by explicitly specifying a hash value using the ExplicitHashKey
1703// parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
1704// in the Amazon Kinesis Streams Developer Guide.
1705//
1706// PutRecord returns the shard ID of where the data record was placed and the
1707// sequence number that was assigned to the data record.
1708//
1709// Sequence numbers increase over time and are specific to a shard within a
1710// stream, not across all shards within a stream. To guarantee strictly increasing
1711// ordering, write serially to a shard and use the SequenceNumberForOrdering
1712// parameter. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
1713// in the Amazon Kinesis Streams Developer Guide.
1714//
1715// If a PutRecord request cannot be processed because of insufficient provisioned
1716// throughput on the shard involved in the request, PutRecord throws ProvisionedThroughputExceededException.
1717//
1718// By default, data records are accessible for 24 hours from the time that they
1719// are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod
1720// to modify this retention period.
1721//
1722// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1723// with awserr.Error's Code and Message methods to get detailed information about
1724// the error.
1725//
1726// See the AWS API reference guide for Amazon Kinesis's
1727// API operation PutRecord for usage and error information.
1728//
1729// Returned Error Codes:
1730//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1731//   The requested resource could not be found. The stream might not be specified
1732//   correctly.
1733//
1734//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1735//   A specified parameter exceeds its restrictions, is not supported, or can't
1736//   be used. For more information, see the returned message.
1737//
1738//   * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
1739//   The request rate for the stream is too high, or the requested data is too
1740//   large for the available throughput. Reduce the frequency or size of your
1741//   requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
1742//   in the Amazon Kinesis Streams Developer Guide, and Error Retries and Exponential
1743//   Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html)
1744//   in the AWS General Reference.
1745//
1746//   * ErrCodeKMSDisabledException "KMSDisabledException"
1747//   The request was rejected because the specified CMK isn't enabled.
1748//
1749//   * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
1750//   The request was rejected because the state of the specified resource isn't
1751//   valid for this request. For more information, see How Key State Affects Use
1752//   of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
1753//   in the AWS Key Management Service Developer Guide.
1754//
1755//   * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
1756//   The ciphertext references a key that doesn't exist or that you don't have
1757//   access to.
1758//
1759//   * ErrCodeKMSNotFoundException "KMSNotFoundException"
1760//   The request was rejected because the specified entity or resource couldn't
1761//   be found.
1762//
1763//   * ErrCodeKMSOptInRequired "KMSOptInRequired"
1764//   The AWS access key ID needs a subscription for the service.
1765//
1766//   * ErrCodeKMSThrottlingException "KMSThrottlingException"
1767//   The request was denied due to request throttling. For more information about
1768//   throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
1769//   in the AWS Key Management Service Developer Guide.
1770//
1771// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord
1772func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) {
1773	req, out := c.PutRecordRequest(input)
1774	return out, req.Send()
1775}
1776
1777// PutRecordWithContext is the same as PutRecord with the addition of
1778// the ability to pass a context and additional request options.
1779//
1780// See PutRecord for details on how to use this API operation.
1781//
1782// The context must be non-nil and will be used for request cancellation. If
1783// the context is nil a panic will occur. In the future the SDK may create
1784// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1785// for more information on using Contexts.
1786func (c *Kinesis) PutRecordWithContext(ctx aws.Context, input *PutRecordInput, opts ...request.Option) (*PutRecordOutput, error) {
1787	req, out := c.PutRecordRequest(input)
1788	req.SetContext(ctx)
1789	req.ApplyOptions(opts...)
1790	return out, req.Send()
1791}
1792
1793const opPutRecords = "PutRecords"
1794
1795// PutRecordsRequest generates a "aws/request.Request" representing the
1796// client's request for the PutRecords operation. The "output" return
1797// value will be populated with the request's response once the request complets
1798// successfuly.
1799//
1800// Use "Send" method on the returned Request to send the API call to the service.
1801// the "output" return value is not valid until after Send returns without error.
1802//
1803// See PutRecords for more information on using the PutRecords
1804// API call, and error handling.
1805//
1806// This method is useful when you want to inject custom logic or configuration
1807// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1808//
1809//
1810//    // Example sending a request using the PutRecordsRequest method.
1811//    req, resp := client.PutRecordsRequest(params)
1812//
1813//    err := req.Send()
1814//    if err == nil { // resp is now filled
1815//        fmt.Println(resp)
1816//    }
1817//
1818// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords
1819func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Request, output *PutRecordsOutput) {
1820	op := &request.Operation{
1821		Name:       opPutRecords,
1822		HTTPMethod: "POST",
1823		HTTPPath:   "/",
1824	}
1825
1826	if input == nil {
1827		input = &PutRecordsInput{}
1828	}
1829
1830	output = &PutRecordsOutput{}
1831	req = c.newRequest(op, input, output)
1832	return
1833}
1834
1835// PutRecords API operation for Amazon Kinesis.
1836//
1837// Writes multiple data records into an Amazon Kinesis stream in a single call
1838// (also referred to as a PutRecords request). Use this operation to send data
1839// into the stream for data ingestion and processing.
1840//
1841// Each PutRecords request can support up to 500 records. Each record in the
1842// request can be as large as 1 MB, up to a limit of 5 MB for the entire request,
1843// including partition keys. Each shard can support writes up to 1,000 records
1844// per second, up to a maximum data write total of 1 MB per second.
1845//
1846// You must specify the name of the stream that captures, stores, and transports
1847// the data; and an array of request Records, with each record in the array
1848// requiring a partition key and data blob. The record size limit applies to
1849// the total size of the partition key and data blob.
1850//
1851// The data blob can be any type of data; for example, a segment from a log
1852// file, geographic/location data, website clickstream data, and so on.
1853//
1854// The partition key is used by Amazon Kinesis as input to a hash function that
1855// maps the partition key and associated data to a specific shard. An MD5 hash
1856// function is used to map partition keys to 128-bit integer values and to map
1857// associated data records to shards. As a result of this hashing mechanism,
1858// all data records with the same partition key map to the same shard within
1859// the stream. For more information, see Adding Data to a Stream (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
1860// in the Amazon Kinesis Streams Developer Guide.
1861//
1862// Each record in the Records array may include an optional parameter, ExplicitHashKey,
1863// which overrides the partition key to shard mapping. This parameter allows
1864// a data producer to determine explicitly the shard where the record is stored.
1865// For more information, see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords)
1866// in the Amazon Kinesis Streams Developer Guide.
1867//
1868// The PutRecords response includes an array of response Records. Each record
1869// in the response array directly correlates with a record in the request array
1870// using natural ordering, from the top to the bottom of the request and response.
1871// The response Records array always includes the same number of records as
1872// the request array.
1873//
1874// The response Records array includes both successfully and unsuccessfully
1875// processed records. Amazon Kinesis attempts to process all records in each
1876// PutRecords request. A single record failure does not stop the processing
1877// of subsequent records.
1878//
1879// A successfully-processed record includes ShardId and SequenceNumber values.
1880// The ShardId parameter identifies the shard in the stream where the record
1881// is stored. The SequenceNumber parameter is an identifier assigned to the
1882// put record, unique to all records in the stream.
1883//
1884// An unsuccessfully-processed record includes ErrorCode and ErrorMessage values.
1885// ErrorCode reflects the type of error and can be one of the following values:
1886// ProvisionedThroughputExceededException or InternalFailure. ErrorMessage provides
1887// more detailed information about the ProvisionedThroughputExceededException
1888// exception including the account ID, stream name, and shard ID of the record
1889// that was throttled. For more information about partially successful responses,
1890// see Adding Multiple Records with PutRecords (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords)
1891// in the Amazon Kinesis Streams Developer Guide.
1892//
1893// By default, data records are accessible for 24 hours from the time that they
1894// are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod
1895// to modify this retention period.
1896//
1897// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1898// with awserr.Error's Code and Message methods to get detailed information about
1899// the error.
1900//
1901// See the AWS API reference guide for Amazon Kinesis's
1902// API operation PutRecords for usage and error information.
1903//
1904// Returned Error Codes:
1905//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1906//   The requested resource could not be found. The stream might not be specified
1907//   correctly.
1908//
1909//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
1910//   A specified parameter exceeds its restrictions, is not supported, or can't
1911//   be used. For more information, see the returned message.
1912//
1913//   * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
1914//   The request rate for the stream is too high, or the requested data is too
1915//   large for the available throughput. Reduce the frequency or size of your
1916//   requests. For more information, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
1917//   in the Amazon Kinesis Streams Developer Guide, and Error Retries and Exponential
1918//   Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html)
1919//   in the AWS General Reference.
1920//
1921//   * ErrCodeKMSDisabledException "KMSDisabledException"
1922//   The request was rejected because the specified CMK isn't enabled.
1923//
1924//   * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
1925//   The request was rejected because the state of the specified resource isn't
1926//   valid for this request. For more information, see How Key State Affects Use
1927//   of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
1928//   in the AWS Key Management Service Developer Guide.
1929//
1930//   * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
1931//   The ciphertext references a key that doesn't exist or that you don't have
1932//   access to.
1933//
1934//   * ErrCodeKMSNotFoundException "KMSNotFoundException"
1935//   The request was rejected because the specified entity or resource couldn't
1936//   be found.
1937//
1938//   * ErrCodeKMSOptInRequired "KMSOptInRequired"
1939//   The AWS access key ID needs a subscription for the service.
1940//
1941//   * ErrCodeKMSThrottlingException "KMSThrottlingException"
1942//   The request was denied due to request throttling. For more information about
1943//   throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
1944//   in the AWS Key Management Service Developer Guide.
1945//
1946// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords
1947func (c *Kinesis) PutRecords(input *PutRecordsInput) (*PutRecordsOutput, error) {
1948	req, out := c.PutRecordsRequest(input)
1949	return out, req.Send()
1950}
1951
1952// PutRecordsWithContext is the same as PutRecords with the addition of
1953// the ability to pass a context and additional request options.
1954//
1955// See PutRecords for details on how to use this API operation.
1956//
1957// The context must be non-nil and will be used for request cancellation. If
1958// the context is nil a panic will occur. In the future the SDK may create
1959// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1960// for more information on using Contexts.
1961func (c *Kinesis) PutRecordsWithContext(ctx aws.Context, input *PutRecordsInput, opts ...request.Option) (*PutRecordsOutput, error) {
1962	req, out := c.PutRecordsRequest(input)
1963	req.SetContext(ctx)
1964	req.ApplyOptions(opts...)
1965	return out, req.Send()
1966}
1967
1968const opRemoveTagsFromStream = "RemoveTagsFromStream"
1969
1970// RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the
1971// client's request for the RemoveTagsFromStream operation. The "output" return
1972// value will be populated with the request's response once the request complets
1973// successfuly.
1974//
1975// Use "Send" method on the returned Request to send the API call to the service.
1976// the "output" return value is not valid until after Send returns without error.
1977//
1978// See RemoveTagsFromStream for more information on using the RemoveTagsFromStream
1979// API call, and error handling.
1980//
1981// This method is useful when you want to inject custom logic or configuration
1982// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1983//
1984//
1985//    // Example sending a request using the RemoveTagsFromStreamRequest method.
1986//    req, resp := client.RemoveTagsFromStreamRequest(params)
1987//
1988//    err := req.Send()
1989//    if err == nil { // resp is now filled
1990//        fmt.Println(resp)
1991//    }
1992//
1993// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream
1994func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) (req *request.Request, output *RemoveTagsFromStreamOutput) {
1995	op := &request.Operation{
1996		Name:       opRemoveTagsFromStream,
1997		HTTPMethod: "POST",
1998		HTTPPath:   "/",
1999	}
2000
2001	if input == nil {
2002		input = &RemoveTagsFromStreamInput{}
2003	}
2004
2005	output = &RemoveTagsFromStreamOutput{}
2006	req = c.newRequest(op, input, output)
2007	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
2008	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
2009	return
2010}
2011
2012// RemoveTagsFromStream API operation for Amazon Kinesis.
2013//
2014// Removes tags from the specified Amazon Kinesis stream. Removed tags are deleted
2015// and cannot be recovered after this operation successfully completes.
2016//
2017// If you specify a tag that does not exist, it is ignored.
2018//
2019// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2020// with awserr.Error's Code and Message methods to get detailed information about
2021// the error.
2022//
2023// See the AWS API reference guide for Amazon Kinesis's
2024// API operation RemoveTagsFromStream for usage and error information.
2025//
2026// Returned Error Codes:
2027//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
2028//   The requested resource could not be found. The stream might not be specified
2029//   correctly.
2030//
2031//   * ErrCodeResourceInUseException "ResourceInUseException"
2032//   The resource is not available for this operation. For successful operation,
2033//   the resource needs to be in the ACTIVE state.
2034//
2035//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
2036//   A specified parameter exceeds its restrictions, is not supported, or can't
2037//   be used. For more information, see the returned message.
2038//
2039//   * ErrCodeLimitExceededException "LimitExceededException"
2040//   The requested resource exceeds the maximum number allowed, or the number
2041//   of concurrent stream requests exceeds the maximum number allowed (5).
2042//
2043// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream
2044func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput) (*RemoveTagsFromStreamOutput, error) {
2045	req, out := c.RemoveTagsFromStreamRequest(input)
2046	return out, req.Send()
2047}
2048
2049// RemoveTagsFromStreamWithContext is the same as RemoveTagsFromStream with the addition of
2050// the ability to pass a context and additional request options.
2051//
2052// See RemoveTagsFromStream for details on how to use this API operation.
2053//
2054// The context must be non-nil and will be used for request cancellation. If
2055// the context is nil a panic will occur. In the future the SDK may create
2056// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2057// for more information on using Contexts.
2058func (c *Kinesis) RemoveTagsFromStreamWithContext(ctx aws.Context, input *RemoveTagsFromStreamInput, opts ...request.Option) (*RemoveTagsFromStreamOutput, error) {
2059	req, out := c.RemoveTagsFromStreamRequest(input)
2060	req.SetContext(ctx)
2061	req.ApplyOptions(opts...)
2062	return out, req.Send()
2063}
2064
2065const opSplitShard = "SplitShard"
2066
2067// SplitShardRequest generates a "aws/request.Request" representing the
2068// client's request for the SplitShard operation. The "output" return
2069// value will be populated with the request's response once the request complets
2070// successfuly.
2071//
2072// Use "Send" method on the returned Request to send the API call to the service.
2073// the "output" return value is not valid until after Send returns without error.
2074//
2075// See SplitShard for more information on using the SplitShard
2076// API call, and error handling.
2077//
2078// This method is useful when you want to inject custom logic or configuration
2079// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2080//
2081//
2082//    // Example sending a request using the SplitShardRequest method.
2083//    req, resp := client.SplitShardRequest(params)
2084//
2085//    err := req.Send()
2086//    if err == nil { // resp is now filled
2087//        fmt.Println(resp)
2088//    }
2089//
2090// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard
2091func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Request, output *SplitShardOutput) {
2092	op := &request.Operation{
2093		Name:       opSplitShard,
2094		HTTPMethod: "POST",
2095		HTTPPath:   "/",
2096	}
2097
2098	if input == nil {
2099		input = &SplitShardInput{}
2100	}
2101
2102	output = &SplitShardOutput{}
2103	req = c.newRequest(op, input, output)
2104	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
2105	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
2106	return
2107}
2108
2109// SplitShard API operation for Amazon Kinesis.
2110//
2111// Splits a shard into two new shards in the Amazon Kinesis stream to increase
2112// the stream's capacity to ingest and transport data. SplitShard is called
2113// when there is a need to increase the overall capacity of a stream because
2114// of an expected increase in the volume of data records being ingested.
2115//
2116// You can also use SplitShard when a shard appears to be approaching its maximum
2117// utilization; for example, the producers sending data into the specific shard
2118// are suddenly sending more than previously anticipated. You can also call
2119// SplitShard to increase stream capacity, so that more Amazon Kinesis applications
2120// can simultaneously read data from the stream for real-time processing.
2121//
2122// You must specify the shard to be split and the new hash key, which is the
2123// position in the shard where the shard gets split in two. In many cases, the
2124// new hash key might simply be the average of the beginning and ending hash
2125// key, but it can be any hash key value in the range being mapped into the
2126// shard. For more information about splitting shards, see Split a Shard (http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html)
2127// in the Amazon Kinesis Streams Developer Guide.
2128//
2129// You can use DescribeStream to determine the shard ID and hash key values
2130// for the ShardToSplit and NewStartingHashKey parameters that are specified
2131// in the SplitShard request.
2132//
2133// SplitShard is an asynchronous operation. Upon receiving a SplitShard request,
2134// Amazon Kinesis immediately returns a response and sets the stream status
2135// to UPDATING. After the operation is completed, Amazon Kinesis sets the stream
2136// status to ACTIVE. Read and write operations continue to work while the stream
2137// is in the UPDATING state.
2138//
2139// You can use DescribeStream to check the status of the stream, which is returned
2140// in StreamStatus. If the stream is in the ACTIVE state, you can call SplitShard.
2141// If a stream is in CREATING or UPDATING or DELETING states, DescribeStream
2142// returns a ResourceInUseException.
2143//
2144// If the specified stream does not exist, DescribeStream returns a ResourceNotFoundException.
2145// If you try to create more shards than are authorized for your account, you
2146// receive a LimitExceededException.
2147//
2148// For the default shard limit for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
2149// in the Amazon Kinesis Streams Developer Guide. If you need to increase this
2150// limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
2151//
2152// If you try to operate on too many streams simultaneously using CreateStream,
2153// DeleteStream, MergeShards, and/or SplitShard, you receive a LimitExceededException.
2154//
2155// SplitShard has limit of 5 transactions per second per account.
2156//
2157// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2158// with awserr.Error's Code and Message methods to get detailed information about
2159// the error.
2160//
2161// See the AWS API reference guide for Amazon Kinesis's
2162// API operation SplitShard for usage and error information.
2163//
2164// Returned Error Codes:
2165//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
2166//   The requested resource could not be found. The stream might not be specified
2167//   correctly.
2168//
2169//   * ErrCodeResourceInUseException "ResourceInUseException"
2170//   The resource is not available for this operation. For successful operation,
2171//   the resource needs to be in the ACTIVE state.
2172//
2173//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
2174//   A specified parameter exceeds its restrictions, is not supported, or can't
2175//   be used. For more information, see the returned message.
2176//
2177//   * ErrCodeLimitExceededException "LimitExceededException"
2178//   The requested resource exceeds the maximum number allowed, or the number
2179//   of concurrent stream requests exceeds the maximum number allowed (5).
2180//
2181// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard
2182func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput, error) {
2183	req, out := c.SplitShardRequest(input)
2184	return out, req.Send()
2185}
2186
2187// SplitShardWithContext is the same as SplitShard with the addition of
2188// the ability to pass a context and additional request options.
2189//
2190// See SplitShard for details on how to use this API operation.
2191//
2192// The context must be non-nil and will be used for request cancellation. If
2193// the context is nil a panic will occur. In the future the SDK may create
2194// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2195// for more information on using Contexts.
2196func (c *Kinesis) SplitShardWithContext(ctx aws.Context, input *SplitShardInput, opts ...request.Option) (*SplitShardOutput, error) {
2197	req, out := c.SplitShardRequest(input)
2198	req.SetContext(ctx)
2199	req.ApplyOptions(opts...)
2200	return out, req.Send()
2201}
2202
2203const opStartStreamEncryption = "StartStreamEncryption"
2204
2205// StartStreamEncryptionRequest generates a "aws/request.Request" representing the
2206// client's request for the StartStreamEncryption operation. The "output" return
2207// value will be populated with the request's response once the request complets
2208// successfuly.
2209//
2210// Use "Send" method on the returned Request to send the API call to the service.
2211// the "output" return value is not valid until after Send returns without error.
2212//
2213// See StartStreamEncryption for more information on using the StartStreamEncryption
2214// API call, and error handling.
2215//
2216// This method is useful when you want to inject custom logic or configuration
2217// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2218//
2219//
2220//    // Example sending a request using the StartStreamEncryptionRequest method.
2221//    req, resp := client.StartStreamEncryptionRequest(params)
2222//
2223//    err := req.Send()
2224//    if err == nil { // resp is now filled
2225//        fmt.Println(resp)
2226//    }
2227//
2228// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption
2229func (c *Kinesis) StartStreamEncryptionRequest(input *StartStreamEncryptionInput) (req *request.Request, output *StartStreamEncryptionOutput) {
2230	op := &request.Operation{
2231		Name:       opStartStreamEncryption,
2232		HTTPMethod: "POST",
2233		HTTPPath:   "/",
2234	}
2235
2236	if input == nil {
2237		input = &StartStreamEncryptionInput{}
2238	}
2239
2240	output = &StartStreamEncryptionOutput{}
2241	req = c.newRequest(op, input, output)
2242	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
2243	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
2244	return
2245}
2246
2247// StartStreamEncryption API operation for Amazon Kinesis.
2248//
2249// Enables or updates server-side encryption using an AWS KMS key for a specified
2250// stream.
2251//
2252// Starting encryption is an asynchronous operation. Upon receiving the request,
2253// Amazon Kinesis returns immediately and sets the status of the stream to UPDATING.
2254// After the update is complete, Amazon Kinesis sets the status of the stream
2255// back to ACTIVE. Updating or applying encryption normally takes a few seconds
2256// to complete but it can take minutes. You can continue to read and write data
2257// to your stream while its status is UPDATING. Once the status of the stream
2258// is ACTIVE, records written to the stream will begin to be encrypted.
2259//
2260// API Limits: You can successfully apply a new AWS KMS key for server-side
2261// encryption 25 times in a rolling 24 hour period.
2262//
2263// Note: It can take up to 5 seconds after the stream is in an ACTIVE status
2264// before all records written to the stream are encrypted. After you’ve enabled
2265// encryption, you can verify encryption was applied by inspecting the API response
2266// from PutRecord or PutRecords.
2267//
2268// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2269// with awserr.Error's Code and Message methods to get detailed information about
2270// the error.
2271//
2272// See the AWS API reference guide for Amazon Kinesis's
2273// API operation StartStreamEncryption for usage and error information.
2274//
2275// Returned Error Codes:
2276//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
2277//   A specified parameter exceeds its restrictions, is not supported, or can't
2278//   be used. For more information, see the returned message.
2279//
2280//   * ErrCodeLimitExceededException "LimitExceededException"
2281//   The requested resource exceeds the maximum number allowed, or the number
2282//   of concurrent stream requests exceeds the maximum number allowed (5).
2283//
2284//   * ErrCodeResourceInUseException "ResourceInUseException"
2285//   The resource is not available for this operation. For successful operation,
2286//   the resource needs to be in the ACTIVE state.
2287//
2288//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
2289//   The requested resource could not be found. The stream might not be specified
2290//   correctly.
2291//
2292//   * ErrCodeKMSDisabledException "KMSDisabledException"
2293//   The request was rejected because the specified CMK isn't enabled.
2294//
2295//   * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
2296//   The request was rejected because the state of the specified resource isn't
2297//   valid for this request. For more information, see How Key State Affects Use
2298//   of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
2299//   in the AWS Key Management Service Developer Guide.
2300//
2301//   * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
2302//   The ciphertext references a key that doesn't exist or that you don't have
2303//   access to.
2304//
2305//   * ErrCodeKMSNotFoundException "KMSNotFoundException"
2306//   The request was rejected because the specified entity or resource couldn't
2307//   be found.
2308//
2309//   * ErrCodeKMSOptInRequired "KMSOptInRequired"
2310//   The AWS access key ID needs a subscription for the service.
2311//
2312//   * ErrCodeKMSThrottlingException "KMSThrottlingException"
2313//   The request was denied due to request throttling. For more information about
2314//   throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
2315//   in the AWS Key Management Service Developer Guide.
2316//
2317// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption
2318func (c *Kinesis) StartStreamEncryption(input *StartStreamEncryptionInput) (*StartStreamEncryptionOutput, error) {
2319	req, out := c.StartStreamEncryptionRequest(input)
2320	return out, req.Send()
2321}
2322
2323// StartStreamEncryptionWithContext is the same as StartStreamEncryption with the addition of
2324// the ability to pass a context and additional request options.
2325//
2326// See StartStreamEncryption for details on how to use this API operation.
2327//
2328// The context must be non-nil and will be used for request cancellation. If
2329// the context is nil a panic will occur. In the future the SDK may create
2330// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2331// for more information on using Contexts.
2332func (c *Kinesis) StartStreamEncryptionWithContext(ctx aws.Context, input *StartStreamEncryptionInput, opts ...request.Option) (*StartStreamEncryptionOutput, error) {
2333	req, out := c.StartStreamEncryptionRequest(input)
2334	req.SetContext(ctx)
2335	req.ApplyOptions(opts...)
2336	return out, req.Send()
2337}
2338
2339const opStopStreamEncryption = "StopStreamEncryption"
2340
2341// StopStreamEncryptionRequest generates a "aws/request.Request" representing the
2342// client's request for the StopStreamEncryption operation. The "output" return
2343// value will be populated with the request's response once the request complets
2344// successfuly.
2345//
2346// Use "Send" method on the returned Request to send the API call to the service.
2347// the "output" return value is not valid until after Send returns without error.
2348//
2349// See StopStreamEncryption for more information on using the StopStreamEncryption
2350// API call, and error handling.
2351//
2352// This method is useful when you want to inject custom logic or configuration
2353// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2354//
2355//
2356//    // Example sending a request using the StopStreamEncryptionRequest method.
2357//    req, resp := client.StopStreamEncryptionRequest(params)
2358//
2359//    err := req.Send()
2360//    if err == nil { // resp is now filled
2361//        fmt.Println(resp)
2362//    }
2363//
2364// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption
2365func (c *Kinesis) StopStreamEncryptionRequest(input *StopStreamEncryptionInput) (req *request.Request, output *StopStreamEncryptionOutput) {
2366	op := &request.Operation{
2367		Name:       opStopStreamEncryption,
2368		HTTPMethod: "POST",
2369		HTTPPath:   "/",
2370	}
2371
2372	if input == nil {
2373		input = &StopStreamEncryptionInput{}
2374	}
2375
2376	output = &StopStreamEncryptionOutput{}
2377	req = c.newRequest(op, input, output)
2378	req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
2379	req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
2380	return
2381}
2382
2383// StopStreamEncryption API operation for Amazon Kinesis.
2384//
2385// Disables server-side encryption for a specified stream.
2386//
2387// Stopping encryption is an asynchronous operation. Upon receiving the request,
2388// Amazon Kinesis returns immediately and sets the status of the stream to UPDATING.
2389// After the update is complete, Amazon Kinesis sets the status of the stream
2390// back to ACTIVE. Stopping encryption normally takes a few seconds to complete
2391// but it can take minutes. You can continue to read and write data to your
2392// stream while its status is UPDATING. Once the status of the stream is ACTIVE
2393// records written to the stream will no longer be encrypted by the Amazon Kinesis
2394// Streams service.
2395//
2396// API Limits: You can successfully disable server-side encryption 25 times
2397// in a rolling 24 hour period.
2398//
2399// Note: It can take up to 5 seconds after the stream is in an ACTIVE status
2400// before all records written to the stream are no longer subject to encryption.
2401// After you’ve disabled encryption, you can verify encryption was not applied
2402// by inspecting the API response from PutRecord or PutRecords.
2403//
2404// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2405// with awserr.Error's Code and Message methods to get detailed information about
2406// the error.
2407//
2408// See the AWS API reference guide for Amazon Kinesis's
2409// API operation StopStreamEncryption for usage and error information.
2410//
2411// Returned Error Codes:
2412//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
2413//   A specified parameter exceeds its restrictions, is not supported, or can't
2414//   be used. For more information, see the returned message.
2415//
2416//   * ErrCodeLimitExceededException "LimitExceededException"
2417//   The requested resource exceeds the maximum number allowed, or the number
2418//   of concurrent stream requests exceeds the maximum number allowed (5).
2419//
2420//   * ErrCodeResourceInUseException "ResourceInUseException"
2421//   The resource is not available for this operation. For successful operation,
2422//   the resource needs to be in the ACTIVE state.
2423//
2424//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
2425//   The requested resource could not be found. The stream might not be specified
2426//   correctly.
2427//
2428// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption
2429func (c *Kinesis) StopStreamEncryption(input *StopStreamEncryptionInput) (*StopStreamEncryptionOutput, error) {
2430	req, out := c.StopStreamEncryptionRequest(input)
2431	return out, req.Send()
2432}
2433
2434// StopStreamEncryptionWithContext is the same as StopStreamEncryption with the addition of
2435// the ability to pass a context and additional request options.
2436//
2437// See StopStreamEncryption for details on how to use this API operation.
2438//
2439// The context must be non-nil and will be used for request cancellation. If
2440// the context is nil a panic will occur. In the future the SDK may create
2441// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2442// for more information on using Contexts.
2443func (c *Kinesis) StopStreamEncryptionWithContext(ctx aws.Context, input *StopStreamEncryptionInput, opts ...request.Option) (*StopStreamEncryptionOutput, error) {
2444	req, out := c.StopStreamEncryptionRequest(input)
2445	req.SetContext(ctx)
2446	req.ApplyOptions(opts...)
2447	return out, req.Send()
2448}
2449
2450const opUpdateShardCount = "UpdateShardCount"
2451
2452// UpdateShardCountRequest generates a "aws/request.Request" representing the
2453// client's request for the UpdateShardCount operation. The "output" return
2454// value will be populated with the request's response once the request complets
2455// successfuly.
2456//
2457// Use "Send" method on the returned Request to send the API call to the service.
2458// the "output" return value is not valid until after Send returns without error.
2459//
2460// See UpdateShardCount for more information on using the UpdateShardCount
2461// API call, and error handling.
2462//
2463// This method is useful when you want to inject custom logic or configuration
2464// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2465//
2466//
2467//    // Example sending a request using the UpdateShardCountRequest method.
2468//    req, resp := client.UpdateShardCountRequest(params)
2469//
2470//    err := req.Send()
2471//    if err == nil { // resp is now filled
2472//        fmt.Println(resp)
2473//    }
2474//
2475// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount
2476func (c *Kinesis) UpdateShardCountRequest(input *UpdateShardCountInput) (req *request.Request, output *UpdateShardCountOutput) {
2477	op := &request.Operation{
2478		Name:       opUpdateShardCount,
2479		HTTPMethod: "POST",
2480		HTTPPath:   "/",
2481	}
2482
2483	if input == nil {
2484		input = &UpdateShardCountInput{}
2485	}
2486
2487	output = &UpdateShardCountOutput{}
2488	req = c.newRequest(op, input, output)
2489	return
2490}
2491
2492// UpdateShardCount API operation for Amazon Kinesis.
2493//
2494// Updates the shard count of the specified stream to the specified number of
2495// shards.
2496//
2497// Updating the shard count is an asynchronous operation. Upon receiving the
2498// request, Amazon Kinesis returns immediately and sets the status of the stream
2499// to UPDATING. After the update is complete, Amazon Kinesis sets the status
2500// of the stream back to ACTIVE. Depending on the size of the stream, the scaling
2501// action could take a few minutes to complete. You can continue to read and
2502// write data to your stream while its status is UPDATING.
2503//
2504// To update the shard count, Amazon Kinesis performs splits or merges on individual
2505// shards. This can cause short-lived shards to be created, in addition to the
2506// final shards. We recommend that you double or halve the shard count, as this
2507// results in the fewest number of splits or merges.
2508//
2509// This operation has the following limits, which are per region per account
2510// unless otherwise noted:
2511//
2512//    * scale more than twice per rolling 24 hour period
2513//
2514//    * scale up above double your current shard count
2515//
2516//    * scale down below half your current shard count
2517//
2518//    * scale up above 200 shards in a stream
2519//
2520//    * scale a stream with more than 200 shards down unless the result is less
2521//    than 200 shards
2522//
2523//    * scale up above the shard limits for your account
2524//
2525//    *
2526//
2527// For the default limits for an AWS account, see Streams Limits (http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)in the Amazon Kinesis Streams Developer Guide. If you need to increase a limit, contact AWS Support (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
2528//
2529// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2530// with awserr.Error's Code and Message methods to get detailed information about
2531// the error.
2532//
2533// See the AWS API reference guide for Amazon Kinesis's
2534// API operation UpdateShardCount for usage and error information.
2535//
2536// Returned Error Codes:
2537//   * ErrCodeInvalidArgumentException "InvalidArgumentException"
2538//   A specified parameter exceeds its restrictions, is not supported, or can't
2539//   be used. For more information, see the returned message.
2540//
2541//   * ErrCodeLimitExceededException "LimitExceededException"
2542//   The requested resource exceeds the maximum number allowed, or the number
2543//   of concurrent stream requests exceeds the maximum number allowed (5).
2544//
2545//   * ErrCodeResourceInUseException "ResourceInUseException"
2546//   The resource is not available for this operation. For successful operation,
2547//   the resource needs to be in the ACTIVE state.
2548//
2549//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
2550//   The requested resource could not be found. The stream might not be specified
2551//   correctly.
2552//
2553// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount
2554func (c *Kinesis) UpdateShardCount(input *UpdateShardCountInput) (*UpdateShardCountOutput, error) {
2555	req, out := c.UpdateShardCountRequest(input)
2556	return out, req.Send()
2557}
2558
2559// UpdateShardCountWithContext is the same as UpdateShardCount with the addition of
2560// the ability to pass a context and additional request options.
2561//
2562// See UpdateShardCount for details on how to use this API operation.
2563//
2564// The context must be non-nil and will be used for request cancellation. If
2565// the context is nil a panic will occur. In the future the SDK may create
2566// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2567// for more information on using Contexts.
2568func (c *Kinesis) UpdateShardCountWithContext(ctx aws.Context, input *UpdateShardCountInput, opts ...request.Option) (*UpdateShardCountOutput, error) {
2569	req, out := c.UpdateShardCountRequest(input)
2570	req.SetContext(ctx)
2571	req.ApplyOptions(opts...)
2572	return out, req.Send()
2573}
2574
2575// Represents the input for AddTagsToStream.
2576// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStreamInput
2577type AddTagsToStreamInput struct {
2578	_ struct{} `type:"structure"`
2579
2580	// The name of the stream.
2581	//
2582	// StreamName is a required field
2583	StreamName *string `min:"1" type:"string" required:"true"`
2584
2585	// The set of key-value pairs to use to create the tags.
2586	//
2587	// Tags is a required field
2588	Tags map[string]*string `min:"1" type:"map" required:"true"`
2589}
2590
2591// String returns the string representation
2592func (s AddTagsToStreamInput) String() string {
2593	return awsutil.Prettify(s)
2594}
2595
2596// GoString returns the string representation
2597func (s AddTagsToStreamInput) GoString() string {
2598	return s.String()
2599}
2600
2601// Validate inspects the fields of the type to determine if they are valid.
2602func (s *AddTagsToStreamInput) Validate() error {
2603	invalidParams := request.ErrInvalidParams{Context: "AddTagsToStreamInput"}
2604	if s.StreamName == nil {
2605		invalidParams.Add(request.NewErrParamRequired("StreamName"))
2606	}
2607	if s.StreamName != nil && len(*s.StreamName) < 1 {
2608		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
2609	}
2610	if s.Tags == nil {
2611		invalidParams.Add(request.NewErrParamRequired("Tags"))
2612	}
2613	if s.Tags != nil && len(s.Tags) < 1 {
2614		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
2615	}
2616
2617	if invalidParams.Len() > 0 {
2618		return invalidParams
2619	}
2620	return nil
2621}
2622
2623// SetStreamName sets the StreamName field's value.
2624func (s *AddTagsToStreamInput) SetStreamName(v string) *AddTagsToStreamInput {
2625	s.StreamName = &v
2626	return s
2627}
2628
2629// SetTags sets the Tags field's value.
2630func (s *AddTagsToStreamInput) SetTags(v map[string]*string) *AddTagsToStreamInput {
2631	s.Tags = v
2632	return s
2633}
2634
2635// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStreamOutput
2636type AddTagsToStreamOutput struct {
2637	_ struct{} `type:"structure"`
2638}
2639
2640// String returns the string representation
2641func (s AddTagsToStreamOutput) String() string {
2642	return awsutil.Prettify(s)
2643}
2644
2645// GoString returns the string representation
2646func (s AddTagsToStreamOutput) GoString() string {
2647	return s.String()
2648}
2649
2650// Represents the input for CreateStream.
2651// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStreamInput
2652type CreateStreamInput struct {
2653	_ struct{} `type:"structure"`
2654
2655	// The number of shards that the stream will use. The throughput of the stream
2656	// is a function of the number of shards; more shards are required for greater
2657	// provisioned throughput.
2658	//
2659	// DefaultShardLimit;
2660	//
2661	// ShardCount is a required field
2662	ShardCount *int64 `min:"1" type:"integer" required:"true"`
2663
2664	// A name to identify the stream. The stream name is scoped to the AWS account
2665	// used by the application that creates the stream. It is also scoped by region.
2666	// That is, two streams in two different AWS accounts can have the same name,
2667	// and two streams in the same AWS account but in two different regions can
2668	// have the same name.
2669	//
2670	// StreamName is a required field
2671	StreamName *string `min:"1" type:"string" required:"true"`
2672}
2673
2674// String returns the string representation
2675func (s CreateStreamInput) String() string {
2676	return awsutil.Prettify(s)
2677}
2678
2679// GoString returns the string representation
2680func (s CreateStreamInput) GoString() string {
2681	return s.String()
2682}
2683
2684// Validate inspects the fields of the type to determine if they are valid.
2685func (s *CreateStreamInput) Validate() error {
2686	invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"}
2687	if s.ShardCount == nil {
2688		invalidParams.Add(request.NewErrParamRequired("ShardCount"))
2689	}
2690	if s.ShardCount != nil && *s.ShardCount < 1 {
2691		invalidParams.Add(request.NewErrParamMinValue("ShardCount", 1))
2692	}
2693	if s.StreamName == nil {
2694		invalidParams.Add(request.NewErrParamRequired("StreamName"))
2695	}
2696	if s.StreamName != nil && len(*s.StreamName) < 1 {
2697		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
2698	}
2699
2700	if invalidParams.Len() > 0 {
2701		return invalidParams
2702	}
2703	return nil
2704}
2705
2706// SetShardCount sets the ShardCount field's value.
2707func (s *CreateStreamInput) SetShardCount(v int64) *CreateStreamInput {
2708	s.ShardCount = &v
2709	return s
2710}
2711
2712// SetStreamName sets the StreamName field's value.
2713func (s *CreateStreamInput) SetStreamName(v string) *CreateStreamInput {
2714	s.StreamName = &v
2715	return s
2716}
2717
2718// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStreamOutput
2719type CreateStreamOutput struct {
2720	_ struct{} `type:"structure"`
2721}
2722
2723// String returns the string representation
2724func (s CreateStreamOutput) String() string {
2725	return awsutil.Prettify(s)
2726}
2727
2728// GoString returns the string representation
2729func (s CreateStreamOutput) GoString() string {
2730	return s.String()
2731}
2732
2733// Represents the input for DecreaseStreamRetentionPeriod.
2734// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriodInput
2735type DecreaseStreamRetentionPeriodInput struct {
2736	_ struct{} `type:"structure"`
2737
2738	// The new retention period of the stream, in hours. Must be less than the current
2739	// retention period.
2740	//
2741	// RetentionPeriodHours is a required field
2742	RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"`
2743
2744	// The name of the stream to modify.
2745	//
2746	// StreamName is a required field
2747	StreamName *string `min:"1" type:"string" required:"true"`
2748}
2749
2750// String returns the string representation
2751func (s DecreaseStreamRetentionPeriodInput) String() string {
2752	return awsutil.Prettify(s)
2753}
2754
2755// GoString returns the string representation
2756func (s DecreaseStreamRetentionPeriodInput) GoString() string {
2757	return s.String()
2758}
2759
2760// Validate inspects the fields of the type to determine if they are valid.
2761func (s *DecreaseStreamRetentionPeriodInput) Validate() error {
2762	invalidParams := request.ErrInvalidParams{Context: "DecreaseStreamRetentionPeriodInput"}
2763	if s.RetentionPeriodHours == nil {
2764		invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
2765	}
2766	if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 1 {
2767		invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 1))
2768	}
2769	if s.StreamName == nil {
2770		invalidParams.Add(request.NewErrParamRequired("StreamName"))
2771	}
2772	if s.StreamName != nil && len(*s.StreamName) < 1 {
2773		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
2774	}
2775
2776	if invalidParams.Len() > 0 {
2777		return invalidParams
2778	}
2779	return nil
2780}
2781
2782// SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
2783func (s *DecreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *DecreaseStreamRetentionPeriodInput {
2784	s.RetentionPeriodHours = &v
2785	return s
2786}
2787
2788// SetStreamName sets the StreamName field's value.
2789func (s *DecreaseStreamRetentionPeriodInput) SetStreamName(v string) *DecreaseStreamRetentionPeriodInput {
2790	s.StreamName = &v
2791	return s
2792}
2793
2794// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriodOutput
2795type DecreaseStreamRetentionPeriodOutput struct {
2796	_ struct{} `type:"structure"`
2797}
2798
2799// String returns the string representation
2800func (s DecreaseStreamRetentionPeriodOutput) String() string {
2801	return awsutil.Prettify(s)
2802}
2803
2804// GoString returns the string representation
2805func (s DecreaseStreamRetentionPeriodOutput) GoString() string {
2806	return s.String()
2807}
2808
2809// Represents the input for DeleteStream.
2810// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStreamInput
2811type DeleteStreamInput struct {
2812	_ struct{} `type:"structure"`
2813
2814	// The name of the stream to delete.
2815	//
2816	// StreamName is a required field
2817	StreamName *string `min:"1" type:"string" required:"true"`
2818}
2819
2820// String returns the string representation
2821func (s DeleteStreamInput) String() string {
2822	return awsutil.Prettify(s)
2823}
2824
2825// GoString returns the string representation
2826func (s DeleteStreamInput) GoString() string {
2827	return s.String()
2828}
2829
2830// Validate inspects the fields of the type to determine if they are valid.
2831func (s *DeleteStreamInput) Validate() error {
2832	invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"}
2833	if s.StreamName == nil {
2834		invalidParams.Add(request.NewErrParamRequired("StreamName"))
2835	}
2836	if s.StreamName != nil && len(*s.StreamName) < 1 {
2837		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
2838	}
2839
2840	if invalidParams.Len() > 0 {
2841		return invalidParams
2842	}
2843	return nil
2844}
2845
2846// SetStreamName sets the StreamName field's value.
2847func (s *DeleteStreamInput) SetStreamName(v string) *DeleteStreamInput {
2848	s.StreamName = &v
2849	return s
2850}
2851
2852// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStreamOutput
2853type DeleteStreamOutput struct {
2854	_ struct{} `type:"structure"`
2855}
2856
2857// String returns the string representation
2858func (s DeleteStreamOutput) String() string {
2859	return awsutil.Prettify(s)
2860}
2861
2862// GoString returns the string representation
2863func (s DeleteStreamOutput) GoString() string {
2864	return s.String()
2865}
2866
2867// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimitsInput
2868type DescribeLimitsInput struct {
2869	_ struct{} `type:"structure"`
2870}
2871
2872// String returns the string representation
2873func (s DescribeLimitsInput) String() string {
2874	return awsutil.Prettify(s)
2875}
2876
2877// GoString returns the string representation
2878func (s DescribeLimitsInput) GoString() string {
2879	return s.String()
2880}
2881
2882// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimitsOutput
2883type DescribeLimitsOutput struct {
2884	_ struct{} `type:"structure"`
2885
2886	// The number of open shards.
2887	//
2888	// OpenShardCount is a required field
2889	OpenShardCount *int64 `type:"integer" required:"true"`
2890
2891	// The maximum number of shards.
2892	//
2893	// ShardLimit is a required field
2894	ShardLimit *int64 `type:"integer" required:"true"`
2895}
2896
2897// String returns the string representation
2898func (s DescribeLimitsOutput) String() string {
2899	return awsutil.Prettify(s)
2900}
2901
2902// GoString returns the string representation
2903func (s DescribeLimitsOutput) GoString() string {
2904	return s.String()
2905}
2906
2907// SetOpenShardCount sets the OpenShardCount field's value.
2908func (s *DescribeLimitsOutput) SetOpenShardCount(v int64) *DescribeLimitsOutput {
2909	s.OpenShardCount = &v
2910	return s
2911}
2912
2913// SetShardLimit sets the ShardLimit field's value.
2914func (s *DescribeLimitsOutput) SetShardLimit(v int64) *DescribeLimitsOutput {
2915	s.ShardLimit = &v
2916	return s
2917}
2918
2919// Represents the input for DescribeStream.
2920// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamInput
2921type DescribeStreamInput struct {
2922	_ struct{} `type:"structure"`
2923
2924	// The shard ID of the shard to start with.
2925	ExclusiveStartShardId *string `min:"1" type:"string"`
2926
2927	// The maximum number of shards to return in a single call. The default value
2928	// is 100. If you specify a value greater than 100, at most 100 shards are returned.
2929	Limit *int64 `min:"1" type:"integer"`
2930
2931	// The name of the stream to describe.
2932	//
2933	// StreamName is a required field
2934	StreamName *string `min:"1" type:"string" required:"true"`
2935}
2936
2937// String returns the string representation
2938func (s DescribeStreamInput) String() string {
2939	return awsutil.Prettify(s)
2940}
2941
2942// GoString returns the string representation
2943func (s DescribeStreamInput) GoString() string {
2944	return s.String()
2945}
2946
2947// Validate inspects the fields of the type to determine if they are valid.
2948func (s *DescribeStreamInput) Validate() error {
2949	invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"}
2950	if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 {
2951		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1))
2952	}
2953	if s.Limit != nil && *s.Limit < 1 {
2954		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
2955	}
2956	if s.StreamName == nil {
2957		invalidParams.Add(request.NewErrParamRequired("StreamName"))
2958	}
2959	if s.StreamName != nil && len(*s.StreamName) < 1 {
2960		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
2961	}
2962
2963	if invalidParams.Len() > 0 {
2964		return invalidParams
2965	}
2966	return nil
2967}
2968
2969// SetExclusiveStartShardId sets the ExclusiveStartShardId field's value.
2970func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *DescribeStreamInput {
2971	s.ExclusiveStartShardId = &v
2972	return s
2973}
2974
2975// SetLimit sets the Limit field's value.
2976func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput {
2977	s.Limit = &v
2978	return s
2979}
2980
2981// SetStreamName sets the StreamName field's value.
2982func (s *DescribeStreamInput) SetStreamName(v string) *DescribeStreamInput {
2983	s.StreamName = &v
2984	return s
2985}
2986
2987// Represents the output for DescribeStream.
2988// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamOutput
2989type DescribeStreamOutput struct {
2990	_ struct{} `type:"structure"`
2991
2992	// The current status of the stream, the stream ARN, an array of shard objects
2993	// that comprise the stream, and whether there are more shards available.
2994	//
2995	// StreamDescription is a required field
2996	StreamDescription *StreamDescription `type:"structure" required:"true"`
2997}
2998
2999// String returns the string representation
3000func (s DescribeStreamOutput) String() string {
3001	return awsutil.Prettify(s)
3002}
3003
3004// GoString returns the string representation
3005func (s DescribeStreamOutput) GoString() string {
3006	return s.String()
3007}
3008
3009// SetStreamDescription sets the StreamDescription field's value.
3010func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescription) *DescribeStreamOutput {
3011	s.StreamDescription = v
3012	return s
3013}
3014
3015// Represents the input for DisableEnhancedMonitoring.
3016// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoringInput
3017type DisableEnhancedMonitoringInput struct {
3018	_ struct{} `type:"structure"`
3019
3020	// List of shard-level metrics to disable.
3021	//
3022	// The following are the valid shard-level metrics. The value "ALL" disables
3023	// every metric.
3024	//
3025	//    * IncomingBytes
3026	//
3027	//    * IncomingRecords
3028	//
3029	//    * OutgoingBytes
3030	//
3031	//    * OutgoingRecords
3032	//
3033	//    * WriteProvisionedThroughputExceeded
3034	//
3035	//    * ReadProvisionedThroughputExceeded
3036	//
3037	//    * IteratorAgeMilliseconds
3038	//
3039	//    * ALL
3040	//
3041	// For more information, see Monitoring the Amazon Kinesis Streams Service with
3042	// Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
3043	// in the Amazon Kinesis Streams Developer Guide.
3044	//
3045	// ShardLevelMetrics is a required field
3046	ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
3047
3048	// The name of the Amazon Kinesis stream for which to disable enhanced monitoring.
3049	//
3050	// StreamName is a required field
3051	StreamName *string `min:"1" type:"string" required:"true"`
3052}
3053
3054// String returns the string representation
3055func (s DisableEnhancedMonitoringInput) String() string {
3056	return awsutil.Prettify(s)
3057}
3058
3059// GoString returns the string representation
3060func (s DisableEnhancedMonitoringInput) GoString() string {
3061	return s.String()
3062}
3063
3064// Validate inspects the fields of the type to determine if they are valid.
3065func (s *DisableEnhancedMonitoringInput) Validate() error {
3066	invalidParams := request.ErrInvalidParams{Context: "DisableEnhancedMonitoringInput"}
3067	if s.ShardLevelMetrics == nil {
3068		invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
3069	}
3070	if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
3071		invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
3072	}
3073	if s.StreamName == nil {
3074		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3075	}
3076	if s.StreamName != nil && len(*s.StreamName) < 1 {
3077		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3078	}
3079
3080	if invalidParams.Len() > 0 {
3081		return invalidParams
3082	}
3083	return nil
3084}
3085
3086// SetShardLevelMetrics sets the ShardLevelMetrics field's value.
3087func (s *DisableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *DisableEnhancedMonitoringInput {
3088	s.ShardLevelMetrics = v
3089	return s
3090}
3091
3092// SetStreamName sets the StreamName field's value.
3093func (s *DisableEnhancedMonitoringInput) SetStreamName(v string) *DisableEnhancedMonitoringInput {
3094	s.StreamName = &v
3095	return s
3096}
3097
3098// Represents the input for EnableEnhancedMonitoring.
3099// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoringInput
3100type EnableEnhancedMonitoringInput struct {
3101	_ struct{} `type:"structure"`
3102
3103	// List of shard-level metrics to enable.
3104	//
3105	// The following are the valid shard-level metrics. The value "ALL" enables
3106	// every metric.
3107	//
3108	//    * IncomingBytes
3109	//
3110	//    * IncomingRecords
3111	//
3112	//    * OutgoingBytes
3113	//
3114	//    * OutgoingRecords
3115	//
3116	//    * WriteProvisionedThroughputExceeded
3117	//
3118	//    * ReadProvisionedThroughputExceeded
3119	//
3120	//    * IteratorAgeMilliseconds
3121	//
3122	//    * ALL
3123	//
3124	// For more information, see Monitoring the Amazon Kinesis Streams Service with
3125	// Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
3126	// in the Amazon Kinesis Streams Developer Guide.
3127	//
3128	// ShardLevelMetrics is a required field
3129	ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
3130
3131	// The name of the stream for which to enable enhanced monitoring.
3132	//
3133	// StreamName is a required field
3134	StreamName *string `min:"1" type:"string" required:"true"`
3135}
3136
3137// String returns the string representation
3138func (s EnableEnhancedMonitoringInput) String() string {
3139	return awsutil.Prettify(s)
3140}
3141
3142// GoString returns the string representation
3143func (s EnableEnhancedMonitoringInput) GoString() string {
3144	return s.String()
3145}
3146
3147// Validate inspects the fields of the type to determine if they are valid.
3148func (s *EnableEnhancedMonitoringInput) Validate() error {
3149	invalidParams := request.ErrInvalidParams{Context: "EnableEnhancedMonitoringInput"}
3150	if s.ShardLevelMetrics == nil {
3151		invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
3152	}
3153	if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
3154		invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
3155	}
3156	if s.StreamName == nil {
3157		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3158	}
3159	if s.StreamName != nil && len(*s.StreamName) < 1 {
3160		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3161	}
3162
3163	if invalidParams.Len() > 0 {
3164		return invalidParams
3165	}
3166	return nil
3167}
3168
3169// SetShardLevelMetrics sets the ShardLevelMetrics field's value.
3170func (s *EnableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *EnableEnhancedMonitoringInput {
3171	s.ShardLevelMetrics = v
3172	return s
3173}
3174
3175// SetStreamName sets the StreamName field's value.
3176func (s *EnableEnhancedMonitoringInput) SetStreamName(v string) *EnableEnhancedMonitoringInput {
3177	s.StreamName = &v
3178	return s
3179}
3180
3181// Represents enhanced metrics types.
3182// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnhancedMetrics
3183type EnhancedMetrics struct {
3184	_ struct{} `type:"structure"`
3185
3186	// List of shard-level metrics.
3187	//
3188	// The following are the valid shard-level metrics. The value "ALL" enhances
3189	// every metric.
3190	//
3191	//    * IncomingBytes
3192	//
3193	//    * IncomingRecords
3194	//
3195	//    * OutgoingBytes
3196	//
3197	//    * OutgoingRecords
3198	//
3199	//    * WriteProvisionedThroughputExceeded
3200	//
3201	//    * ReadProvisionedThroughputExceeded
3202	//
3203	//    * IteratorAgeMilliseconds
3204	//
3205	//    * ALL
3206	//
3207	// For more information, see Monitoring the Amazon Kinesis Streams Service with
3208	// Amazon CloudWatch (http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
3209	// in the Amazon Kinesis Streams Developer Guide.
3210	ShardLevelMetrics []*string `min:"1" type:"list"`
3211}
3212
3213// String returns the string representation
3214func (s EnhancedMetrics) String() string {
3215	return awsutil.Prettify(s)
3216}
3217
3218// GoString returns the string representation
3219func (s EnhancedMetrics) GoString() string {
3220	return s.String()
3221}
3222
3223// SetShardLevelMetrics sets the ShardLevelMetrics field's value.
3224func (s *EnhancedMetrics) SetShardLevelMetrics(v []*string) *EnhancedMetrics {
3225	s.ShardLevelMetrics = v
3226	return s
3227}
3228
3229// Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.
3230// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnhancedMonitoringOutput
3231type EnhancedMonitoringOutput struct {
3232	_ struct{} `type:"structure"`
3233
3234	// Represents the current state of the metrics that are in the enhanced state
3235	// before the operation.
3236	CurrentShardLevelMetrics []*string `min:"1" type:"list"`
3237
3238	// Represents the list of all the metrics that would be in the enhanced state
3239	// after the operation.
3240	DesiredShardLevelMetrics []*string `min:"1" type:"list"`
3241
3242	// The name of the Amazon Kinesis stream.
3243	StreamName *string `min:"1" type:"string"`
3244}
3245
3246// String returns the string representation
3247func (s EnhancedMonitoringOutput) String() string {
3248	return awsutil.Prettify(s)
3249}
3250
3251// GoString returns the string representation
3252func (s EnhancedMonitoringOutput) GoString() string {
3253	return s.String()
3254}
3255
3256// SetCurrentShardLevelMetrics sets the CurrentShardLevelMetrics field's value.
3257func (s *EnhancedMonitoringOutput) SetCurrentShardLevelMetrics(v []*string) *EnhancedMonitoringOutput {
3258	s.CurrentShardLevelMetrics = v
3259	return s
3260}
3261
3262// SetDesiredShardLevelMetrics sets the DesiredShardLevelMetrics field's value.
3263func (s *EnhancedMonitoringOutput) SetDesiredShardLevelMetrics(v []*string) *EnhancedMonitoringOutput {
3264	s.DesiredShardLevelMetrics = v
3265	return s
3266}
3267
3268// SetStreamName sets the StreamName field's value.
3269func (s *EnhancedMonitoringOutput) SetStreamName(v string) *EnhancedMonitoringOutput {
3270	s.StreamName = &v
3271	return s
3272}
3273
3274// Represents the input for GetRecords.
3275// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecordsInput
3276type GetRecordsInput struct {
3277	_ struct{} `type:"structure"`
3278
3279	// The maximum number of records to return. Specify a value of up to 10,000.
3280	// If you specify a value that is greater than 10,000, GetRecords throws InvalidArgumentException.
3281	Limit *int64 `min:"1" type:"integer"`
3282
3283	// The position in the shard from which you want to start sequentially reading
3284	// data records. A shard iterator specifies this position using the sequence
3285	// number of a data record in the shard.
3286	//
3287	// ShardIterator is a required field
3288	ShardIterator *string `min:"1" type:"string" required:"true"`
3289}
3290
3291// String returns the string representation
3292func (s GetRecordsInput) String() string {
3293	return awsutil.Prettify(s)
3294}
3295
3296// GoString returns the string representation
3297func (s GetRecordsInput) GoString() string {
3298	return s.String()
3299}
3300
3301// Validate inspects the fields of the type to determine if they are valid.
3302func (s *GetRecordsInput) Validate() error {
3303	invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"}
3304	if s.Limit != nil && *s.Limit < 1 {
3305		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
3306	}
3307	if s.ShardIterator == nil {
3308		invalidParams.Add(request.NewErrParamRequired("ShardIterator"))
3309	}
3310	if s.ShardIterator != nil && len(*s.ShardIterator) < 1 {
3311		invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1))
3312	}
3313
3314	if invalidParams.Len() > 0 {
3315		return invalidParams
3316	}
3317	return nil
3318}
3319
3320// SetLimit sets the Limit field's value.
3321func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput {
3322	s.Limit = &v
3323	return s
3324}
3325
3326// SetShardIterator sets the ShardIterator field's value.
3327func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput {
3328	s.ShardIterator = &v
3329	return s
3330}
3331
3332// Represents the output for GetRecords.
3333// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecordsOutput
3334type GetRecordsOutput struct {
3335	_ struct{} `type:"structure"`
3336
3337	// The number of milliseconds the GetRecords response is from the tip of the
3338	// stream, indicating how far behind current time the consumer is. A value of
3339	// zero indicates record processing is caught up, and there are no new records
3340	// to process at this moment.
3341	MillisBehindLatest *int64 `type:"long"`
3342
3343	// The next position in the shard from which to start sequentially reading data
3344	// records. If set to null, the shard has been closed and the requested iterator
3345	// will not return any more data.
3346	NextShardIterator *string `min:"1" type:"string"`
3347
3348	// The data records retrieved from the shard.
3349	//
3350	// Records is a required field
3351	Records []*Record `type:"list" required:"true"`
3352}
3353
3354// String returns the string representation
3355func (s GetRecordsOutput) String() string {
3356	return awsutil.Prettify(s)
3357}
3358
3359// GoString returns the string representation
3360func (s GetRecordsOutput) GoString() string {
3361	return s.String()
3362}
3363
3364// SetMillisBehindLatest sets the MillisBehindLatest field's value.
3365func (s *GetRecordsOutput) SetMillisBehindLatest(v int64) *GetRecordsOutput {
3366	s.MillisBehindLatest = &v
3367	return s
3368}
3369
3370// SetNextShardIterator sets the NextShardIterator field's value.
3371func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsOutput {
3372	s.NextShardIterator = &v
3373	return s
3374}
3375
3376// SetRecords sets the Records field's value.
3377func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput {
3378	s.Records = v
3379	return s
3380}
3381
3382// Represents the input for GetShardIterator.
3383// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIteratorInput
3384type GetShardIteratorInput struct {
3385	_ struct{} `type:"structure"`
3386
3387	// The shard ID of the Amazon Kinesis shard to get the iterator for.
3388	//
3389	// ShardId is a required field
3390	ShardId *string `min:"1" type:"string" required:"true"`
3391
3392	// Determines how the shard iterator is used to start reading data records from
3393	// the shard.
3394	//
3395	// The following are the valid Amazon Kinesis shard iterator types:
3396	//
3397	//    * AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific
3398	//    sequence number, provided in the value StartingSequenceNumber.
3399	//
3400	//    * AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted
3401	//    by a specific sequence number, provided in the value StartingSequenceNumber.
3402	//
3403	//    * AT_TIMESTAMP - Start reading from the position denoted by a specific
3404	//    timestamp, provided in the value Timestamp.
3405	//
3406	//    * TRIM_HORIZON - Start reading at the last untrimmed record in the shard
3407	//    in the system, which is the oldest data record in the shard.
3408	//
3409	//    * LATEST - Start reading just after the most recent record in the shard,
3410	//    so that you always read the most recent data in the shard.
3411	//
3412	// ShardIteratorType is a required field
3413	ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"`
3414
3415	// The sequence number of the data record in the shard from which to start reading.
3416	// Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.
3417	StartingSequenceNumber *string `type:"string"`
3418
3419	// The name of the Amazon Kinesis stream.
3420	//
3421	// StreamName is a required field
3422	StreamName *string `min:"1" type:"string" required:"true"`
3423
3424	// The timestamp of the data record from which to start reading. Used with shard
3425	// iterator type AT_TIMESTAMP. A timestamp is the Unix epoch date with precision
3426	// in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or 1459799926.480.
3427	// If a record with this exact timestamp does not exist, the iterator returned
3428	// is for the next (later) record. If the timestamp is older than the current
3429	// trim horizon, the iterator returned is for the oldest untrimmed data record
3430	// (TRIM_HORIZON).
3431	Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
3432}
3433
3434// String returns the string representation
3435func (s GetShardIteratorInput) String() string {
3436	return awsutil.Prettify(s)
3437}
3438
3439// GoString returns the string representation
3440func (s GetShardIteratorInput) GoString() string {
3441	return s.String()
3442}
3443
3444// Validate inspects the fields of the type to determine if they are valid.
3445func (s *GetShardIteratorInput) Validate() error {
3446	invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"}
3447	if s.ShardId == nil {
3448		invalidParams.Add(request.NewErrParamRequired("ShardId"))
3449	}
3450	if s.ShardId != nil && len(*s.ShardId) < 1 {
3451		invalidParams.Add(request.NewErrParamMinLen("ShardId", 1))
3452	}
3453	if s.ShardIteratorType == nil {
3454		invalidParams.Add(request.NewErrParamRequired("ShardIteratorType"))
3455	}
3456	if s.StreamName == nil {
3457		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3458	}
3459	if s.StreamName != nil && len(*s.StreamName) < 1 {
3460		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3461	}
3462
3463	if invalidParams.Len() > 0 {
3464		return invalidParams
3465	}
3466	return nil
3467}
3468
3469// SetShardId sets the ShardId field's value.
3470func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIteratorInput {
3471	s.ShardId = &v
3472	return s
3473}
3474
3475// SetShardIteratorType sets the ShardIteratorType field's value.
3476func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetShardIteratorInput {
3477	s.ShardIteratorType = &v
3478	return s
3479}
3480
3481// SetStartingSequenceNumber sets the StartingSequenceNumber field's value.
3482func (s *GetShardIteratorInput) SetStartingSequenceNumber(v string) *GetShardIteratorInput {
3483	s.StartingSequenceNumber = &v
3484	return s
3485}
3486
3487// SetStreamName sets the StreamName field's value.
3488func (s *GetShardIteratorInput) SetStreamName(v string) *GetShardIteratorInput {
3489	s.StreamName = &v
3490	return s
3491}
3492
3493// SetTimestamp sets the Timestamp field's value.
3494func (s *GetShardIteratorInput) SetTimestamp(v time.Time) *GetShardIteratorInput {
3495	s.Timestamp = &v
3496	return s
3497}
3498
3499// Represents the output for GetShardIterator.
3500// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIteratorOutput
3501type GetShardIteratorOutput struct {
3502	_ struct{} `type:"structure"`
3503
3504	// The position in the shard from which to start reading data records sequentially.
3505	// A shard iterator specifies this position using the sequence number of a data
3506	// record in a shard.
3507	ShardIterator *string `min:"1" type:"string"`
3508}
3509
3510// String returns the string representation
3511func (s GetShardIteratorOutput) String() string {
3512	return awsutil.Prettify(s)
3513}
3514
3515// GoString returns the string representation
3516func (s GetShardIteratorOutput) GoString() string {
3517	return s.String()
3518}
3519
3520// SetShardIterator sets the ShardIterator field's value.
3521func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardIteratorOutput {
3522	s.ShardIterator = &v
3523	return s
3524}
3525
3526// The range of possible hash key values for the shard, which is a set of ordered
3527// contiguous positive integers.
3528// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/HashKeyRange
3529type HashKeyRange struct {
3530	_ struct{} `type:"structure"`
3531
3532	// The ending hash key of the hash key range.
3533	//
3534	// EndingHashKey is a required field
3535	EndingHashKey *string `type:"string" required:"true"`
3536
3537	// The starting hash key of the hash key range.
3538	//
3539	// StartingHashKey is a required field
3540	StartingHashKey *string `type:"string" required:"true"`
3541}
3542
3543// String returns the string representation
3544func (s HashKeyRange) String() string {
3545	return awsutil.Prettify(s)
3546}
3547
3548// GoString returns the string representation
3549func (s HashKeyRange) GoString() string {
3550	return s.String()
3551}
3552
3553// SetEndingHashKey sets the EndingHashKey field's value.
3554func (s *HashKeyRange) SetEndingHashKey(v string) *HashKeyRange {
3555	s.EndingHashKey = &v
3556	return s
3557}
3558
3559// SetStartingHashKey sets the StartingHashKey field's value.
3560func (s *HashKeyRange) SetStartingHashKey(v string) *HashKeyRange {
3561	s.StartingHashKey = &v
3562	return s
3563}
3564
3565// Represents the input for IncreaseStreamRetentionPeriod.
3566// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriodInput
3567type IncreaseStreamRetentionPeriodInput struct {
3568	_ struct{} `type:"structure"`
3569
3570	// The new retention period of the stream, in hours. Must be more than the current
3571	// retention period.
3572	//
3573	// RetentionPeriodHours is a required field
3574	RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"`
3575
3576	// The name of the stream to modify.
3577	//
3578	// StreamName is a required field
3579	StreamName *string `min:"1" type:"string" required:"true"`
3580}
3581
3582// String returns the string representation
3583func (s IncreaseStreamRetentionPeriodInput) String() string {
3584	return awsutil.Prettify(s)
3585}
3586
3587// GoString returns the string representation
3588func (s IncreaseStreamRetentionPeriodInput) GoString() string {
3589	return s.String()
3590}
3591
3592// Validate inspects the fields of the type to determine if they are valid.
3593func (s *IncreaseStreamRetentionPeriodInput) Validate() error {
3594	invalidParams := request.ErrInvalidParams{Context: "IncreaseStreamRetentionPeriodInput"}
3595	if s.RetentionPeriodHours == nil {
3596		invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
3597	}
3598	if s.RetentionPeriodHours != nil && *s.RetentionPeriodHours < 1 {
3599		invalidParams.Add(request.NewErrParamMinValue("RetentionPeriodHours", 1))
3600	}
3601	if s.StreamName == nil {
3602		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3603	}
3604	if s.StreamName != nil && len(*s.StreamName) < 1 {
3605		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3606	}
3607
3608	if invalidParams.Len() > 0 {
3609		return invalidParams
3610	}
3611	return nil
3612}
3613
3614// SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
3615func (s *IncreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *IncreaseStreamRetentionPeriodInput {
3616	s.RetentionPeriodHours = &v
3617	return s
3618}
3619
3620// SetStreamName sets the StreamName field's value.
3621func (s *IncreaseStreamRetentionPeriodInput) SetStreamName(v string) *IncreaseStreamRetentionPeriodInput {
3622	s.StreamName = &v
3623	return s
3624}
3625
3626// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriodOutput
3627type IncreaseStreamRetentionPeriodOutput struct {
3628	_ struct{} `type:"structure"`
3629}
3630
3631// String returns the string representation
3632func (s IncreaseStreamRetentionPeriodOutput) String() string {
3633	return awsutil.Prettify(s)
3634}
3635
3636// GoString returns the string representation
3637func (s IncreaseStreamRetentionPeriodOutput) GoString() string {
3638	return s.String()
3639}
3640
3641// Represents the input for ListStreams.
3642// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamsInput
3643type ListStreamsInput struct {
3644	_ struct{} `type:"structure"`
3645
3646	// The name of the stream to start the list with.
3647	ExclusiveStartStreamName *string `min:"1" type:"string"`
3648
3649	// The maximum number of streams to list.
3650	Limit *int64 `min:"1" type:"integer"`
3651}
3652
3653// String returns the string representation
3654func (s ListStreamsInput) String() string {
3655	return awsutil.Prettify(s)
3656}
3657
3658// GoString returns the string representation
3659func (s ListStreamsInput) GoString() string {
3660	return s.String()
3661}
3662
3663// Validate inspects the fields of the type to determine if they are valid.
3664func (s *ListStreamsInput) Validate() error {
3665	invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"}
3666	if s.ExclusiveStartStreamName != nil && len(*s.ExclusiveStartStreamName) < 1 {
3667		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamName", 1))
3668	}
3669	if s.Limit != nil && *s.Limit < 1 {
3670		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
3671	}
3672
3673	if invalidParams.Len() > 0 {
3674		return invalidParams
3675	}
3676	return nil
3677}
3678
3679// SetExclusiveStartStreamName sets the ExclusiveStartStreamName field's value.
3680func (s *ListStreamsInput) SetExclusiveStartStreamName(v string) *ListStreamsInput {
3681	s.ExclusiveStartStreamName = &v
3682	return s
3683}
3684
3685// SetLimit sets the Limit field's value.
3686func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput {
3687	s.Limit = &v
3688	return s
3689}
3690
3691// Represents the output for ListStreams.
3692// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamsOutput
3693type ListStreamsOutput struct {
3694	_ struct{} `type:"structure"`
3695
3696	// If set to true, there are more streams available to list.
3697	//
3698	// HasMoreStreams is a required field
3699	HasMoreStreams *bool `type:"boolean" required:"true"`
3700
3701	// The names of the streams that are associated with the AWS account making
3702	// the ListStreams request.
3703	//
3704	// StreamNames is a required field
3705	StreamNames []*string `type:"list" required:"true"`
3706}
3707
3708// String returns the string representation
3709func (s ListStreamsOutput) String() string {
3710	return awsutil.Prettify(s)
3711}
3712
3713// GoString returns the string representation
3714func (s ListStreamsOutput) GoString() string {
3715	return s.String()
3716}
3717
3718// SetHasMoreStreams sets the HasMoreStreams field's value.
3719func (s *ListStreamsOutput) SetHasMoreStreams(v bool) *ListStreamsOutput {
3720	s.HasMoreStreams = &v
3721	return s
3722}
3723
3724// SetStreamNames sets the StreamNames field's value.
3725func (s *ListStreamsOutput) SetStreamNames(v []*string) *ListStreamsOutput {
3726	s.StreamNames = v
3727	return s
3728}
3729
3730// Represents the input for ListTagsForStream.
3731// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStreamInput
3732type ListTagsForStreamInput struct {
3733	_ struct{} `type:"structure"`
3734
3735	// The key to use as the starting point for the list of tags. If this parameter
3736	// is set, ListTagsForStream gets all tags that occur after ExclusiveStartTagKey.
3737	ExclusiveStartTagKey *string `min:"1" type:"string"`
3738
3739	// The number of tags to return. If this number is less than the total number
3740	// of tags associated with the stream, HasMoreTags is set to true. To list additional
3741	// tags, set ExclusiveStartTagKey to the last key in the response.
3742	Limit *int64 `min:"1" type:"integer"`
3743
3744	// The name of the stream.
3745	//
3746	// StreamName is a required field
3747	StreamName *string `min:"1" type:"string" required:"true"`
3748}
3749
3750// String returns the string representation
3751func (s ListTagsForStreamInput) String() string {
3752	return awsutil.Prettify(s)
3753}
3754
3755// GoString returns the string representation
3756func (s ListTagsForStreamInput) GoString() string {
3757	return s.String()
3758}
3759
3760// Validate inspects the fields of the type to determine if they are valid.
3761func (s *ListTagsForStreamInput) Validate() error {
3762	invalidParams := request.ErrInvalidParams{Context: "ListTagsForStreamInput"}
3763	if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 {
3764		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1))
3765	}
3766	if s.Limit != nil && *s.Limit < 1 {
3767		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
3768	}
3769	if s.StreamName == nil {
3770		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3771	}
3772	if s.StreamName != nil && len(*s.StreamName) < 1 {
3773		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3774	}
3775
3776	if invalidParams.Len() > 0 {
3777		return invalidParams
3778	}
3779	return nil
3780}
3781
3782// SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value.
3783func (s *ListTagsForStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForStreamInput {
3784	s.ExclusiveStartTagKey = &v
3785	return s
3786}
3787
3788// SetLimit sets the Limit field's value.
3789func (s *ListTagsForStreamInput) SetLimit(v int64) *ListTagsForStreamInput {
3790	s.Limit = &v
3791	return s
3792}
3793
3794// SetStreamName sets the StreamName field's value.
3795func (s *ListTagsForStreamInput) SetStreamName(v string) *ListTagsForStreamInput {
3796	s.StreamName = &v
3797	return s
3798}
3799
3800// Represents the output for ListTagsForStream.
3801// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStreamOutput
3802type ListTagsForStreamOutput struct {
3803	_ struct{} `type:"structure"`
3804
3805	// If set to true, more tags are available. To request additional tags, set
3806	// ExclusiveStartTagKey to the key of the last tag returned.
3807	//
3808	// HasMoreTags is a required field
3809	HasMoreTags *bool `type:"boolean" required:"true"`
3810
3811	// A list of tags associated with StreamName, starting with the first tag after
3812	// ExclusiveStartTagKey and up to the specified Limit.
3813	//
3814	// Tags is a required field
3815	Tags []*Tag `type:"list" required:"true"`
3816}
3817
3818// String returns the string representation
3819func (s ListTagsForStreamOutput) String() string {
3820	return awsutil.Prettify(s)
3821}
3822
3823// GoString returns the string representation
3824func (s ListTagsForStreamOutput) GoString() string {
3825	return s.String()
3826}
3827
3828// SetHasMoreTags sets the HasMoreTags field's value.
3829func (s *ListTagsForStreamOutput) SetHasMoreTags(v bool) *ListTagsForStreamOutput {
3830	s.HasMoreTags = &v
3831	return s
3832}
3833
3834// SetTags sets the Tags field's value.
3835func (s *ListTagsForStreamOutput) SetTags(v []*Tag) *ListTagsForStreamOutput {
3836	s.Tags = v
3837	return s
3838}
3839
3840// Represents the input for MergeShards.
3841// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShardsInput
3842type MergeShardsInput struct {
3843	_ struct{} `type:"structure"`
3844
3845	// The shard ID of the adjacent shard for the merge.
3846	//
3847	// AdjacentShardToMerge is a required field
3848	AdjacentShardToMerge *string `min:"1" type:"string" required:"true"`
3849
3850	// The shard ID of the shard to combine with the adjacent shard for the merge.
3851	//
3852	// ShardToMerge is a required field
3853	ShardToMerge *string `min:"1" type:"string" required:"true"`
3854
3855	// The name of the stream for the merge.
3856	//
3857	// StreamName is a required field
3858	StreamName *string `min:"1" type:"string" required:"true"`
3859}
3860
3861// String returns the string representation
3862func (s MergeShardsInput) String() string {
3863	return awsutil.Prettify(s)
3864}
3865
3866// GoString returns the string representation
3867func (s MergeShardsInput) GoString() string {
3868	return s.String()
3869}
3870
3871// Validate inspects the fields of the type to determine if they are valid.
3872func (s *MergeShardsInput) Validate() error {
3873	invalidParams := request.ErrInvalidParams{Context: "MergeShardsInput"}
3874	if s.AdjacentShardToMerge == nil {
3875		invalidParams.Add(request.NewErrParamRequired("AdjacentShardToMerge"))
3876	}
3877	if s.AdjacentShardToMerge != nil && len(*s.AdjacentShardToMerge) < 1 {
3878		invalidParams.Add(request.NewErrParamMinLen("AdjacentShardToMerge", 1))
3879	}
3880	if s.ShardToMerge == nil {
3881		invalidParams.Add(request.NewErrParamRequired("ShardToMerge"))
3882	}
3883	if s.ShardToMerge != nil && len(*s.ShardToMerge) < 1 {
3884		invalidParams.Add(request.NewErrParamMinLen("ShardToMerge", 1))
3885	}
3886	if s.StreamName == nil {
3887		invalidParams.Add(request.NewErrParamRequired("StreamName"))
3888	}
3889	if s.StreamName != nil && len(*s.StreamName) < 1 {
3890		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
3891	}
3892
3893	if invalidParams.Len() > 0 {
3894		return invalidParams
3895	}
3896	return nil
3897}
3898
3899// SetAdjacentShardToMerge sets the AdjacentShardToMerge field's value.
3900func (s *MergeShardsInput) SetAdjacentShardToMerge(v string) *MergeShardsInput {
3901	s.AdjacentShardToMerge = &v
3902	return s
3903}
3904
3905// SetShardToMerge sets the ShardToMerge field's value.
3906func (s *MergeShardsInput) SetShardToMerge(v string) *MergeShardsInput {
3907	s.ShardToMerge = &v
3908	return s
3909}
3910
3911// SetStreamName sets the StreamName field's value.
3912func (s *MergeShardsInput) SetStreamName(v string) *MergeShardsInput {
3913	s.StreamName = &v
3914	return s
3915}
3916
3917// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShardsOutput
3918type MergeShardsOutput struct {
3919	_ struct{} `type:"structure"`
3920}
3921
3922// String returns the string representation
3923func (s MergeShardsOutput) String() string {
3924	return awsutil.Prettify(s)
3925}
3926
3927// GoString returns the string representation
3928func (s MergeShardsOutput) GoString() string {
3929	return s.String()
3930}
3931
3932// Represents the input for PutRecord.
3933// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordInput
3934type PutRecordInput struct {
3935	_ struct{} `type:"structure"`
3936
3937	// The data blob to put into the record, which is base64-encoded when the blob
3938	// is serialized. When the data blob (the payload before base64-encoding) is
3939	// added to the partition key size, the total size must not exceed the maximum
3940	// record size (1 MB).
3941	//
3942	// Data is automatically base64 encoded/decoded by the SDK.
3943	//
3944	// Data is a required field
3945	Data []byte `type:"blob" required:"true"`
3946
3947	// The hash value used to explicitly determine the shard the data record is
3948	// assigned to by overriding the partition key hash.
3949	ExplicitHashKey *string `type:"string"`
3950
3951	// Determines which shard in the stream the data record is assigned to. Partition
3952	// keys are Unicode strings with a maximum length limit of 256 characters for
3953	// each key. Amazon Kinesis uses the partition key as input to a hash function
3954	// that maps the partition key and associated data to a specific shard. Specifically,
3955	// an MD5 hash function is used to map partition keys to 128-bit integer values
3956	// and to map associated data records to shards. As a result of this hashing
3957	// mechanism, all data records with the same partition key map to the same shard
3958	// within the stream.
3959	//
3960	// PartitionKey is a required field
3961	PartitionKey *string `min:"1" type:"string" required:"true"`
3962
3963	// Guarantees strictly increasing sequence numbers, for puts from the same client
3964	// and to the same partition key. Usage: set the SequenceNumberForOrdering of
3965	// record n to the sequence number of record n-1 (as returned in the result
3966	// when putting record n-1). If this parameter is not set, records will be coarsely
3967	// ordered based on arrival time.
3968	SequenceNumberForOrdering *string `type:"string"`
3969
3970	// The name of the stream to put the data record into.
3971	//
3972	// StreamName is a required field
3973	StreamName *string `min:"1" type:"string" required:"true"`
3974}
3975
3976// String returns the string representation
3977func (s PutRecordInput) String() string {
3978	return awsutil.Prettify(s)
3979}
3980
3981// GoString returns the string representation
3982func (s PutRecordInput) GoString() string {
3983	return s.String()
3984}
3985
3986// Validate inspects the fields of the type to determine if they are valid.
3987func (s *PutRecordInput) Validate() error {
3988	invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"}
3989	if s.Data == nil {
3990		invalidParams.Add(request.NewErrParamRequired("Data"))
3991	}
3992	if s.PartitionKey == nil {
3993		invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
3994	}
3995	if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
3996		invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
3997	}
3998	if s.StreamName == nil {
3999		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4000	}
4001	if s.StreamName != nil && len(*s.StreamName) < 1 {
4002		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4003	}
4004
4005	if invalidParams.Len() > 0 {
4006		return invalidParams
4007	}
4008	return nil
4009}
4010
4011// SetData sets the Data field's value.
4012func (s *PutRecordInput) SetData(v []byte) *PutRecordInput {
4013	s.Data = v
4014	return s
4015}
4016
4017// SetExplicitHashKey sets the ExplicitHashKey field's value.
4018func (s *PutRecordInput) SetExplicitHashKey(v string) *PutRecordInput {
4019	s.ExplicitHashKey = &v
4020	return s
4021}
4022
4023// SetPartitionKey sets the PartitionKey field's value.
4024func (s *PutRecordInput) SetPartitionKey(v string) *PutRecordInput {
4025	s.PartitionKey = &v
4026	return s
4027}
4028
4029// SetSequenceNumberForOrdering sets the SequenceNumberForOrdering field's value.
4030func (s *PutRecordInput) SetSequenceNumberForOrdering(v string) *PutRecordInput {
4031	s.SequenceNumberForOrdering = &v
4032	return s
4033}
4034
4035// SetStreamName sets the StreamName field's value.
4036func (s *PutRecordInput) SetStreamName(v string) *PutRecordInput {
4037	s.StreamName = &v
4038	return s
4039}
4040
4041// Represents the output for PutRecord.
4042// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordOutput
4043type PutRecordOutput struct {
4044	_ struct{} `type:"structure"`
4045
4046	// The encryption type to use on the record. This parameter can be one of the
4047	// following values:
4048	//
4049	//    * NONE: Do not encrypt the records in the stream.
4050	//
4051	//    * KMS: Use server-side encryption on the records in the stream using a
4052	//    customer-managed KMS key.
4053	EncryptionType *string `type:"string" enum:"EncryptionType"`
4054
4055	// The sequence number identifier that was assigned to the put data record.
4056	// The sequence number for the record is unique across all records in the stream.
4057	// A sequence number is the identifier associated with every record put into
4058	// the stream.
4059	//
4060	// SequenceNumber is a required field
4061	SequenceNumber *string `type:"string" required:"true"`
4062
4063	// The shard ID of the shard where the data record was placed.
4064	//
4065	// ShardId is a required field
4066	ShardId *string `min:"1" type:"string" required:"true"`
4067}
4068
4069// String returns the string representation
4070func (s PutRecordOutput) String() string {
4071	return awsutil.Prettify(s)
4072}
4073
4074// GoString returns the string representation
4075func (s PutRecordOutput) GoString() string {
4076	return s.String()
4077}
4078
4079// SetEncryptionType sets the EncryptionType field's value.
4080func (s *PutRecordOutput) SetEncryptionType(v string) *PutRecordOutput {
4081	s.EncryptionType = &v
4082	return s
4083}
4084
4085// SetSequenceNumber sets the SequenceNumber field's value.
4086func (s *PutRecordOutput) SetSequenceNumber(v string) *PutRecordOutput {
4087	s.SequenceNumber = &v
4088	return s
4089}
4090
4091// SetShardId sets the ShardId field's value.
4092func (s *PutRecordOutput) SetShardId(v string) *PutRecordOutput {
4093	s.ShardId = &v
4094	return s
4095}
4096
4097// A PutRecords request.
4098// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordsInput
4099type PutRecordsInput struct {
4100	_ struct{} `type:"structure"`
4101
4102	// The records associated with the request.
4103	//
4104	// Records is a required field
4105	Records []*PutRecordsRequestEntry `min:"1" type:"list" required:"true"`
4106
4107	// The stream name associated with the request.
4108	//
4109	// StreamName is a required field
4110	StreamName *string `min:"1" type:"string" required:"true"`
4111}
4112
4113// String returns the string representation
4114func (s PutRecordsInput) String() string {
4115	return awsutil.Prettify(s)
4116}
4117
4118// GoString returns the string representation
4119func (s PutRecordsInput) GoString() string {
4120	return s.String()
4121}
4122
4123// Validate inspects the fields of the type to determine if they are valid.
4124func (s *PutRecordsInput) Validate() error {
4125	invalidParams := request.ErrInvalidParams{Context: "PutRecordsInput"}
4126	if s.Records == nil {
4127		invalidParams.Add(request.NewErrParamRequired("Records"))
4128	}
4129	if s.Records != nil && len(s.Records) < 1 {
4130		invalidParams.Add(request.NewErrParamMinLen("Records", 1))
4131	}
4132	if s.StreamName == nil {
4133		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4134	}
4135	if s.StreamName != nil && len(*s.StreamName) < 1 {
4136		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4137	}
4138	if s.Records != nil {
4139		for i, v := range s.Records {
4140			if v == nil {
4141				continue
4142			}
4143			if err := v.Validate(); err != nil {
4144				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams))
4145			}
4146		}
4147	}
4148
4149	if invalidParams.Len() > 0 {
4150		return invalidParams
4151	}
4152	return nil
4153}
4154
4155// SetRecords sets the Records field's value.
4156func (s *PutRecordsInput) SetRecords(v []*PutRecordsRequestEntry) *PutRecordsInput {
4157	s.Records = v
4158	return s
4159}
4160
4161// SetStreamName sets the StreamName field's value.
4162func (s *PutRecordsInput) SetStreamName(v string) *PutRecordsInput {
4163	s.StreamName = &v
4164	return s
4165}
4166
4167// PutRecords results.
4168// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordsOutput
4169type PutRecordsOutput struct {
4170	_ struct{} `type:"structure"`
4171
4172	// The encryption type used on the records. This parameter can be one of the
4173	// following values:
4174	//
4175	//    * NONE: Do not encrypt the records.
4176	//
4177	//    * KMS: Use server-side encryption on the records using a customer-managed
4178	//    KMS key.
4179	EncryptionType *string `type:"string" enum:"EncryptionType"`
4180
4181	// The number of unsuccessfully processed records in a PutRecords request.
4182	FailedRecordCount *int64 `min:"1" type:"integer"`
4183
4184	// An array of successfully and unsuccessfully processed record results, correlated
4185	// with the request by natural ordering. A record that is successfully added
4186	// to a stream includes SequenceNumber and ShardId in the result. A record that
4187	// fails to be added to a stream includes ErrorCode and ErrorMessage in the
4188	// result.
4189	//
4190	// Records is a required field
4191	Records []*PutRecordsResultEntry `min:"1" type:"list" required:"true"`
4192}
4193
4194// String returns the string representation
4195func (s PutRecordsOutput) String() string {
4196	return awsutil.Prettify(s)
4197}
4198
4199// GoString returns the string representation
4200func (s PutRecordsOutput) GoString() string {
4201	return s.String()
4202}
4203
4204// SetEncryptionType sets the EncryptionType field's value.
4205func (s *PutRecordsOutput) SetEncryptionType(v string) *PutRecordsOutput {
4206	s.EncryptionType = &v
4207	return s
4208}
4209
4210// SetFailedRecordCount sets the FailedRecordCount field's value.
4211func (s *PutRecordsOutput) SetFailedRecordCount(v int64) *PutRecordsOutput {
4212	s.FailedRecordCount = &v
4213	return s
4214}
4215
4216// SetRecords sets the Records field's value.
4217func (s *PutRecordsOutput) SetRecords(v []*PutRecordsResultEntry) *PutRecordsOutput {
4218	s.Records = v
4219	return s
4220}
4221
4222// Represents the output for PutRecords.
4223// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordsRequestEntry
4224type PutRecordsRequestEntry struct {
4225	_ struct{} `type:"structure"`
4226
4227	// The data blob to put into the record, which is base64-encoded when the blob
4228	// is serialized. When the data blob (the payload before base64-encoding) is
4229	// added to the partition key size, the total size must not exceed the maximum
4230	// record size (1 MB).
4231	//
4232	// Data is automatically base64 encoded/decoded by the SDK.
4233	//
4234	// Data is a required field
4235	Data []byte `type:"blob" required:"true"`
4236
4237	// The hash value used to determine explicitly the shard that the data record
4238	// is assigned to by overriding the partition key hash.
4239	ExplicitHashKey *string `type:"string"`
4240
4241	// Determines which shard in the stream the data record is assigned to. Partition
4242	// keys are Unicode strings with a maximum length limit of 256 characters for
4243	// each key. Amazon Kinesis uses the partition key as input to a hash function
4244	// that maps the partition key and associated data to a specific shard. Specifically,
4245	// an MD5 hash function is used to map partition keys to 128-bit integer values
4246	// and to map associated data records to shards. As a result of this hashing
4247	// mechanism, all data records with the same partition key map to the same shard
4248	// within the stream.
4249	//
4250	// PartitionKey is a required field
4251	PartitionKey *string `min:"1" type:"string" required:"true"`
4252}
4253
4254// String returns the string representation
4255func (s PutRecordsRequestEntry) String() string {
4256	return awsutil.Prettify(s)
4257}
4258
4259// GoString returns the string representation
4260func (s PutRecordsRequestEntry) GoString() string {
4261	return s.String()
4262}
4263
4264// Validate inspects the fields of the type to determine if they are valid.
4265func (s *PutRecordsRequestEntry) Validate() error {
4266	invalidParams := request.ErrInvalidParams{Context: "PutRecordsRequestEntry"}
4267	if s.Data == nil {
4268		invalidParams.Add(request.NewErrParamRequired("Data"))
4269	}
4270	if s.PartitionKey == nil {
4271		invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
4272	}
4273	if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
4274		invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
4275	}
4276
4277	if invalidParams.Len() > 0 {
4278		return invalidParams
4279	}
4280	return nil
4281}
4282
4283// SetData sets the Data field's value.
4284func (s *PutRecordsRequestEntry) SetData(v []byte) *PutRecordsRequestEntry {
4285	s.Data = v
4286	return s
4287}
4288
4289// SetExplicitHashKey sets the ExplicitHashKey field's value.
4290func (s *PutRecordsRequestEntry) SetExplicitHashKey(v string) *PutRecordsRequestEntry {
4291	s.ExplicitHashKey = &v
4292	return s
4293}
4294
4295// SetPartitionKey sets the PartitionKey field's value.
4296func (s *PutRecordsRequestEntry) SetPartitionKey(v string) *PutRecordsRequestEntry {
4297	s.PartitionKey = &v
4298	return s
4299}
4300
4301// Represents the result of an individual record from a PutRecords request.
4302// A record that is successfully added to a stream includes SequenceNumber and
4303// ShardId in the result. A record that fails to be added to the stream includes
4304// ErrorCode and ErrorMessage in the result.
4305// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecordsResultEntry
4306type PutRecordsResultEntry struct {
4307	_ struct{} `type:"structure"`
4308
4309	// The error code for an individual record result. ErrorCodes can be either
4310	// ProvisionedThroughputExceededException or InternalFailure.
4311	ErrorCode *string `type:"string"`
4312
4313	// The error message for an individual record result. An ErrorCode value of
4314	// ProvisionedThroughputExceededException has an error message that includes
4315	// the account ID, stream name, and shard ID. An ErrorCode value of InternalFailure
4316	// has the error message "Internal Service Failure".
4317	ErrorMessage *string `type:"string"`
4318
4319	// The sequence number for an individual record result.
4320	SequenceNumber *string `type:"string"`
4321
4322	// The shard ID for an individual record result.
4323	ShardId *string `min:"1" type:"string"`
4324}
4325
4326// String returns the string representation
4327func (s PutRecordsResultEntry) String() string {
4328	return awsutil.Prettify(s)
4329}
4330
4331// GoString returns the string representation
4332func (s PutRecordsResultEntry) GoString() string {
4333	return s.String()
4334}
4335
4336// SetErrorCode sets the ErrorCode field's value.
4337func (s *PutRecordsResultEntry) SetErrorCode(v string) *PutRecordsResultEntry {
4338	s.ErrorCode = &v
4339	return s
4340}
4341
4342// SetErrorMessage sets the ErrorMessage field's value.
4343func (s *PutRecordsResultEntry) SetErrorMessage(v string) *PutRecordsResultEntry {
4344	s.ErrorMessage = &v
4345	return s
4346}
4347
4348// SetSequenceNumber sets the SequenceNumber field's value.
4349func (s *PutRecordsResultEntry) SetSequenceNumber(v string) *PutRecordsResultEntry {
4350	s.SequenceNumber = &v
4351	return s
4352}
4353
4354// SetShardId sets the ShardId field's value.
4355func (s *PutRecordsResultEntry) SetShardId(v string) *PutRecordsResultEntry {
4356	s.ShardId = &v
4357	return s
4358}
4359
4360// The unit of data of the Amazon Kinesis stream, which is composed of a sequence
4361// number, a partition key, and a data blob.
4362// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/Record
4363type Record struct {
4364	_ struct{} `type:"structure"`
4365
4366	// The approximate time that the record was inserted into the stream.
4367	ApproximateArrivalTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
4368
4369	// The data blob. The data in the blob is both opaque and immutable to the Amazon
4370	// Kinesis service, which does not inspect, interpret, or change the data in
4371	// the blob in any way. When the data blob (the payload before base64-encoding)
4372	// is added to the partition key size, the total size must not exceed the maximum
4373	// record size (1 MB).
4374	//
4375	// Data is automatically base64 encoded/decoded by the SDK.
4376	//
4377	// Data is a required field
4378	Data []byte `type:"blob" required:"true"`
4379
4380	// The encryption type used on the record. This parameter can be one of the
4381	// following values:
4382	//
4383	//    * NONE: Do not encrypt the records in the stream.
4384	//
4385	//    * KMS: Use server-side encryption on the records in the stream using a
4386	//    customer-managed KMS key.
4387	EncryptionType *string `type:"string" enum:"EncryptionType"`
4388
4389	// Identifies which shard in the stream the data record is assigned to.
4390	//
4391	// PartitionKey is a required field
4392	PartitionKey *string `min:"1" type:"string" required:"true"`
4393
4394	// The unique identifier of the record within its shard.
4395	//
4396	// SequenceNumber is a required field
4397	SequenceNumber *string `type:"string" required:"true"`
4398}
4399
4400// String returns the string representation
4401func (s Record) String() string {
4402	return awsutil.Prettify(s)
4403}
4404
4405// GoString returns the string representation
4406func (s Record) GoString() string {
4407	return s.String()
4408}
4409
4410// SetApproximateArrivalTimestamp sets the ApproximateArrivalTimestamp field's value.
4411func (s *Record) SetApproximateArrivalTimestamp(v time.Time) *Record {
4412	s.ApproximateArrivalTimestamp = &v
4413	return s
4414}
4415
4416// SetData sets the Data field's value.
4417func (s *Record) SetData(v []byte) *Record {
4418	s.Data = v
4419	return s
4420}
4421
4422// SetEncryptionType sets the EncryptionType field's value.
4423func (s *Record) SetEncryptionType(v string) *Record {
4424	s.EncryptionType = &v
4425	return s
4426}
4427
4428// SetPartitionKey sets the PartitionKey field's value.
4429func (s *Record) SetPartitionKey(v string) *Record {
4430	s.PartitionKey = &v
4431	return s
4432}
4433
4434// SetSequenceNumber sets the SequenceNumber field's value.
4435func (s *Record) SetSequenceNumber(v string) *Record {
4436	s.SequenceNumber = &v
4437	return s
4438}
4439
4440// Represents the input for RemoveTagsFromStream.
4441// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStreamInput
4442type RemoveTagsFromStreamInput struct {
4443	_ struct{} `type:"structure"`
4444
4445	// The name of the stream.
4446	//
4447	// StreamName is a required field
4448	StreamName *string `min:"1" type:"string" required:"true"`
4449
4450	// A list of tag keys. Each corresponding tag is removed from the stream.
4451	//
4452	// TagKeys is a required field
4453	TagKeys []*string `min:"1" type:"list" required:"true"`
4454}
4455
4456// String returns the string representation
4457func (s RemoveTagsFromStreamInput) String() string {
4458	return awsutil.Prettify(s)
4459}
4460
4461// GoString returns the string representation
4462func (s RemoveTagsFromStreamInput) GoString() string {
4463	return s.String()
4464}
4465
4466// Validate inspects the fields of the type to determine if they are valid.
4467func (s *RemoveTagsFromStreamInput) Validate() error {
4468	invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromStreamInput"}
4469	if s.StreamName == nil {
4470		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4471	}
4472	if s.StreamName != nil && len(*s.StreamName) < 1 {
4473		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4474	}
4475	if s.TagKeys == nil {
4476		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
4477	}
4478	if s.TagKeys != nil && len(s.TagKeys) < 1 {
4479		invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
4480	}
4481
4482	if invalidParams.Len() > 0 {
4483		return invalidParams
4484	}
4485	return nil
4486}
4487
4488// SetStreamName sets the StreamName field's value.
4489func (s *RemoveTagsFromStreamInput) SetStreamName(v string) *RemoveTagsFromStreamInput {
4490	s.StreamName = &v
4491	return s
4492}
4493
4494// SetTagKeys sets the TagKeys field's value.
4495func (s *RemoveTagsFromStreamInput) SetTagKeys(v []*string) *RemoveTagsFromStreamInput {
4496	s.TagKeys = v
4497	return s
4498}
4499
4500// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStreamOutput
4501type RemoveTagsFromStreamOutput struct {
4502	_ struct{} `type:"structure"`
4503}
4504
4505// String returns the string representation
4506func (s RemoveTagsFromStreamOutput) String() string {
4507	return awsutil.Prettify(s)
4508}
4509
4510// GoString returns the string representation
4511func (s RemoveTagsFromStreamOutput) GoString() string {
4512	return s.String()
4513}
4514
4515// The range of possible sequence numbers for the shard.
4516// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SequenceNumberRange
4517type SequenceNumberRange struct {
4518	_ struct{} `type:"structure"`
4519
4520	// The ending sequence number for the range. Shards that are in the OPEN state
4521	// have an ending sequence number of null.
4522	EndingSequenceNumber *string `type:"string"`
4523
4524	// The starting sequence number for the range.
4525	//
4526	// StartingSequenceNumber is a required field
4527	StartingSequenceNumber *string `type:"string" required:"true"`
4528}
4529
4530// String returns the string representation
4531func (s SequenceNumberRange) String() string {
4532	return awsutil.Prettify(s)
4533}
4534
4535// GoString returns the string representation
4536func (s SequenceNumberRange) GoString() string {
4537	return s.String()
4538}
4539
4540// SetEndingSequenceNumber sets the EndingSequenceNumber field's value.
4541func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *SequenceNumberRange {
4542	s.EndingSequenceNumber = &v
4543	return s
4544}
4545
4546// SetStartingSequenceNumber sets the StartingSequenceNumber field's value.
4547func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *SequenceNumberRange {
4548	s.StartingSequenceNumber = &v
4549	return s
4550}
4551
4552// A uniquely identified group of data records in an Amazon Kinesis stream.
4553// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/Shard
4554type Shard struct {
4555	_ struct{} `type:"structure"`
4556
4557	// The shard ID of the shard adjacent to the shard's parent.
4558	AdjacentParentShardId *string `min:"1" type:"string"`
4559
4560	// The range of possible hash key values for the shard, which is a set of ordered
4561	// contiguous positive integers.
4562	//
4563	// HashKeyRange is a required field
4564	HashKeyRange *HashKeyRange `type:"structure" required:"true"`
4565
4566	// The shard ID of the shard's parent.
4567	ParentShardId *string `min:"1" type:"string"`
4568
4569	// The range of possible sequence numbers for the shard.
4570	//
4571	// SequenceNumberRange is a required field
4572	SequenceNumberRange *SequenceNumberRange `type:"structure" required:"true"`
4573
4574	// The unique identifier of the shard within the stream.
4575	//
4576	// ShardId is a required field
4577	ShardId *string `min:"1" type:"string" required:"true"`
4578}
4579
4580// String returns the string representation
4581func (s Shard) String() string {
4582	return awsutil.Prettify(s)
4583}
4584
4585// GoString returns the string representation
4586func (s Shard) GoString() string {
4587	return s.String()
4588}
4589
4590// SetAdjacentParentShardId sets the AdjacentParentShardId field's value.
4591func (s *Shard) SetAdjacentParentShardId(v string) *Shard {
4592	s.AdjacentParentShardId = &v
4593	return s
4594}
4595
4596// SetHashKeyRange sets the HashKeyRange field's value.
4597func (s *Shard) SetHashKeyRange(v *HashKeyRange) *Shard {
4598	s.HashKeyRange = v
4599	return s
4600}
4601
4602// SetParentShardId sets the ParentShardId field's value.
4603func (s *Shard) SetParentShardId(v string) *Shard {
4604	s.ParentShardId = &v
4605	return s
4606}
4607
4608// SetSequenceNumberRange sets the SequenceNumberRange field's value.
4609func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard {
4610	s.SequenceNumberRange = v
4611	return s
4612}
4613
4614// SetShardId sets the ShardId field's value.
4615func (s *Shard) SetShardId(v string) *Shard {
4616	s.ShardId = &v
4617	return s
4618}
4619
4620// Represents the input for SplitShard.
4621// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShardInput
4622type SplitShardInput struct {
4623	_ struct{} `type:"structure"`
4624
4625	// A hash key value for the starting hash key of one of the child shards created
4626	// by the split. The hash key range for a given shard constitutes a set of ordered
4627	// contiguous positive integers. The value for NewStartingHashKey must be in
4628	// the range of hash keys being mapped into the shard. The NewStartingHashKey
4629	// hash key value and all higher hash key values in hash key range are distributed
4630	// to one of the child shards. All the lower hash key values in the range are
4631	// distributed to the other child shard.
4632	//
4633	// NewStartingHashKey is a required field
4634	NewStartingHashKey *string `type:"string" required:"true"`
4635
4636	// The shard ID of the shard to split.
4637	//
4638	// ShardToSplit is a required field
4639	ShardToSplit *string `min:"1" type:"string" required:"true"`
4640
4641	// The name of the stream for the shard split.
4642	//
4643	// StreamName is a required field
4644	StreamName *string `min:"1" type:"string" required:"true"`
4645}
4646
4647// String returns the string representation
4648func (s SplitShardInput) String() string {
4649	return awsutil.Prettify(s)
4650}
4651
4652// GoString returns the string representation
4653func (s SplitShardInput) GoString() string {
4654	return s.String()
4655}
4656
4657// Validate inspects the fields of the type to determine if they are valid.
4658func (s *SplitShardInput) Validate() error {
4659	invalidParams := request.ErrInvalidParams{Context: "SplitShardInput"}
4660	if s.NewStartingHashKey == nil {
4661		invalidParams.Add(request.NewErrParamRequired("NewStartingHashKey"))
4662	}
4663	if s.ShardToSplit == nil {
4664		invalidParams.Add(request.NewErrParamRequired("ShardToSplit"))
4665	}
4666	if s.ShardToSplit != nil && len(*s.ShardToSplit) < 1 {
4667		invalidParams.Add(request.NewErrParamMinLen("ShardToSplit", 1))
4668	}
4669	if s.StreamName == nil {
4670		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4671	}
4672	if s.StreamName != nil && len(*s.StreamName) < 1 {
4673		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4674	}
4675
4676	if invalidParams.Len() > 0 {
4677		return invalidParams
4678	}
4679	return nil
4680}
4681
4682// SetNewStartingHashKey sets the NewStartingHashKey field's value.
4683func (s *SplitShardInput) SetNewStartingHashKey(v string) *SplitShardInput {
4684	s.NewStartingHashKey = &v
4685	return s
4686}
4687
4688// SetShardToSplit sets the ShardToSplit field's value.
4689func (s *SplitShardInput) SetShardToSplit(v string) *SplitShardInput {
4690	s.ShardToSplit = &v
4691	return s
4692}
4693
4694// SetStreamName sets the StreamName field's value.
4695func (s *SplitShardInput) SetStreamName(v string) *SplitShardInput {
4696	s.StreamName = &v
4697	return s
4698}
4699
4700// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShardOutput
4701type SplitShardOutput struct {
4702	_ struct{} `type:"structure"`
4703}
4704
4705// String returns the string representation
4706func (s SplitShardOutput) String() string {
4707	return awsutil.Prettify(s)
4708}
4709
4710// GoString returns the string representation
4711func (s SplitShardOutput) GoString() string {
4712	return s.String()
4713}
4714
4715// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryptionInput
4716type StartStreamEncryptionInput struct {
4717	_ struct{} `type:"structure"`
4718
4719	// The encryption type to use. This parameter can be one of the following values:
4720	//
4721	//    * NONE: Not valid for this operation. An InvalidOperationException will
4722	//    be thrown.
4723	//
4724	//    * KMS: Use server-side encryption on the records in the stream using a
4725	//    customer-managed KMS key.
4726	//
4727	// EncryptionType is a required field
4728	EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"`
4729
4730	// The GUID for the customer-managed KMS key to use for encryption. You can
4731	// also use a Kinesis-owned master key by specifying the alias aws/kinesis.
4732	//
4733	// KeyId is a required field
4734	KeyId *string `min:"1" type:"string" required:"true"`
4735
4736	// The name of the stream for which to start encrypting records.
4737	//
4738	// StreamName is a required field
4739	StreamName *string `min:"1" type:"string" required:"true"`
4740}
4741
4742// String returns the string representation
4743func (s StartStreamEncryptionInput) String() string {
4744	return awsutil.Prettify(s)
4745}
4746
4747// GoString returns the string representation
4748func (s StartStreamEncryptionInput) GoString() string {
4749	return s.String()
4750}
4751
4752// Validate inspects the fields of the type to determine if they are valid.
4753func (s *StartStreamEncryptionInput) Validate() error {
4754	invalidParams := request.ErrInvalidParams{Context: "StartStreamEncryptionInput"}
4755	if s.EncryptionType == nil {
4756		invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
4757	}
4758	if s.KeyId == nil {
4759		invalidParams.Add(request.NewErrParamRequired("KeyId"))
4760	}
4761	if s.KeyId != nil && len(*s.KeyId) < 1 {
4762		invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
4763	}
4764	if s.StreamName == nil {
4765		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4766	}
4767	if s.StreamName != nil && len(*s.StreamName) < 1 {
4768		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4769	}
4770
4771	if invalidParams.Len() > 0 {
4772		return invalidParams
4773	}
4774	return nil
4775}
4776
4777// SetEncryptionType sets the EncryptionType field's value.
4778func (s *StartStreamEncryptionInput) SetEncryptionType(v string) *StartStreamEncryptionInput {
4779	s.EncryptionType = &v
4780	return s
4781}
4782
4783// SetKeyId sets the KeyId field's value.
4784func (s *StartStreamEncryptionInput) SetKeyId(v string) *StartStreamEncryptionInput {
4785	s.KeyId = &v
4786	return s
4787}
4788
4789// SetStreamName sets the StreamName field's value.
4790func (s *StartStreamEncryptionInput) SetStreamName(v string) *StartStreamEncryptionInput {
4791	s.StreamName = &v
4792	return s
4793}
4794
4795// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryptionOutput
4796type StartStreamEncryptionOutput struct {
4797	_ struct{} `type:"structure"`
4798}
4799
4800// String returns the string representation
4801func (s StartStreamEncryptionOutput) String() string {
4802	return awsutil.Prettify(s)
4803}
4804
4805// GoString returns the string representation
4806func (s StartStreamEncryptionOutput) GoString() string {
4807	return s.String()
4808}
4809
4810// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryptionInput
4811type StopStreamEncryptionInput struct {
4812	_ struct{} `type:"structure"`
4813
4814	// The encryption type. This parameter can be one of the following values:
4815	//
4816	//    * NONE: Not valid for this operation. An InvalidOperationException will
4817	//    be thrown.
4818	//
4819	//    * KMS: Use server-side encryption on the records in the stream using a
4820	//    customer-managed KMS key.
4821	//
4822	// EncryptionType is a required field
4823	EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"`
4824
4825	// The GUID for the customer-managed key that was used for encryption.
4826	//
4827	// KeyId is a required field
4828	KeyId *string `min:"1" type:"string" required:"true"`
4829
4830	// The name of the stream on which to stop encrypting records.
4831	//
4832	// StreamName is a required field
4833	StreamName *string `min:"1" type:"string" required:"true"`
4834}
4835
4836// String returns the string representation
4837func (s StopStreamEncryptionInput) String() string {
4838	return awsutil.Prettify(s)
4839}
4840
4841// GoString returns the string representation
4842func (s StopStreamEncryptionInput) GoString() string {
4843	return s.String()
4844}
4845
4846// Validate inspects the fields of the type to determine if they are valid.
4847func (s *StopStreamEncryptionInput) Validate() error {
4848	invalidParams := request.ErrInvalidParams{Context: "StopStreamEncryptionInput"}
4849	if s.EncryptionType == nil {
4850		invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
4851	}
4852	if s.KeyId == nil {
4853		invalidParams.Add(request.NewErrParamRequired("KeyId"))
4854	}
4855	if s.KeyId != nil && len(*s.KeyId) < 1 {
4856		invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
4857	}
4858	if s.StreamName == nil {
4859		invalidParams.Add(request.NewErrParamRequired("StreamName"))
4860	}
4861	if s.StreamName != nil && len(*s.StreamName) < 1 {
4862		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
4863	}
4864
4865	if invalidParams.Len() > 0 {
4866		return invalidParams
4867	}
4868	return nil
4869}
4870
4871// SetEncryptionType sets the EncryptionType field's value.
4872func (s *StopStreamEncryptionInput) SetEncryptionType(v string) *StopStreamEncryptionInput {
4873	s.EncryptionType = &v
4874	return s
4875}
4876
4877// SetKeyId sets the KeyId field's value.
4878func (s *StopStreamEncryptionInput) SetKeyId(v string) *StopStreamEncryptionInput {
4879	s.KeyId = &v
4880	return s
4881}
4882
4883// SetStreamName sets the StreamName field's value.
4884func (s *StopStreamEncryptionInput) SetStreamName(v string) *StopStreamEncryptionInput {
4885	s.StreamName = &v
4886	return s
4887}
4888
4889// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryptionOutput
4890type StopStreamEncryptionOutput struct {
4891	_ struct{} `type:"structure"`
4892}
4893
4894// String returns the string representation
4895func (s StopStreamEncryptionOutput) String() string {
4896	return awsutil.Prettify(s)
4897}
4898
4899// GoString returns the string representation
4900func (s StopStreamEncryptionOutput) GoString() string {
4901	return s.String()
4902}
4903
4904// Represents the output for DescribeStream.
4905// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StreamDescription
4906type StreamDescription struct {
4907	_ struct{} `type:"structure"`
4908
4909	// The server-side encryption type used on the stream. This parameter can be
4910	// one of the following values:
4911	//
4912	//    * NONE: Do not encrypt the records in the stream.
4913	//
4914	//    * KMS: Use server-side encryption on the records in the stream using a
4915	//    customer-managed KMS key.
4916	EncryptionType *string `type:"string" enum:"EncryptionType"`
4917
4918	// Represents the current enhanced monitoring settings of the stream.
4919	//
4920	// EnhancedMonitoring is a required field
4921	EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"`
4922
4923	// If set to true, more shards in the stream are available to describe.
4924	//
4925	// HasMoreShards is a required field
4926	HasMoreShards *bool `type:"boolean" required:"true"`
4927
4928	// The GUID for the customer-managed KMS key used for encryption on the stream.
4929	KeyId *string `min:"1" type:"string"`
4930
4931	// The current retention period, in hours.
4932	//
4933	// RetentionPeriodHours is a required field
4934	RetentionPeriodHours *int64 `min:"1" type:"integer" required:"true"`
4935
4936	// The shards that comprise the stream.
4937	//
4938	// Shards is a required field
4939	Shards []*Shard `type:"list" required:"true"`
4940
4941	// The Amazon Resource Name (ARN) for the stream being described.
4942	//
4943	// StreamARN is a required field
4944	StreamARN *string `type:"string" required:"true"`
4945
4946	// The approximate time that the stream was created.
4947	//
4948	// StreamCreationTimestamp is a required field
4949	StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
4950
4951	// The name of the stream being described.
4952	//
4953	// StreamName is a required field
4954	StreamName *string `min:"1" type:"string" required:"true"`
4955
4956	// The current status of the stream being described. The stream status is one
4957	// of the following states:
4958	//
4959	//    * CREATING - The stream is being created. Amazon Kinesis immediately returns
4960	//    and sets StreamStatus to CREATING.
4961	//
4962	//    * DELETING - The stream is being deleted. The specified stream is in the
4963	//    DELETING state until Amazon Kinesis completes the deletion.
4964	//
4965	//    * ACTIVE - The stream exists and is ready for read and write operations
4966	//    or deletion. You should perform read and write operations only on an ACTIVE
4967	//    stream.
4968	//
4969	//    * UPDATING - Shards in the stream are being merged or split. Read and
4970	//    write operations continue to work while the stream is in the UPDATING
4971	//    state.
4972	//
4973	// StreamStatus is a required field
4974	StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"`
4975}
4976
4977// String returns the string representation
4978func (s StreamDescription) String() string {
4979	return awsutil.Prettify(s)
4980}
4981
4982// GoString returns the string representation
4983func (s StreamDescription) GoString() string {
4984	return s.String()
4985}
4986
4987// SetEncryptionType sets the EncryptionType field's value.
4988func (s *StreamDescription) SetEncryptionType(v string) *StreamDescription {
4989	s.EncryptionType = &v
4990	return s
4991}
4992
4993// SetEnhancedMonitoring sets the EnhancedMonitoring field's value.
4994func (s *StreamDescription) SetEnhancedMonitoring(v []*EnhancedMetrics) *StreamDescription {
4995	s.EnhancedMonitoring = v
4996	return s
4997}
4998
4999// SetHasMoreShards sets the HasMoreShards field's value.
5000func (s *StreamDescription) SetHasMoreShards(v bool) *StreamDescription {
5001	s.HasMoreShards = &v
5002	return s
5003}
5004
5005// SetKeyId sets the KeyId field's value.
5006func (s *StreamDescription) SetKeyId(v string) *StreamDescription {
5007	s.KeyId = &v
5008	return s
5009}
5010
5011// SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
5012func (s *StreamDescription) SetRetentionPeriodHours(v int64) *StreamDescription {
5013	s.RetentionPeriodHours = &v
5014	return s
5015}
5016
5017// SetShards sets the Shards field's value.
5018func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription {
5019	s.Shards = v
5020	return s
5021}
5022
5023// SetStreamARN sets the StreamARN field's value.
5024func (s *StreamDescription) SetStreamARN(v string) *StreamDescription {
5025	s.StreamARN = &v
5026	return s
5027}
5028
5029// SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value.
5030func (s *StreamDescription) SetStreamCreationTimestamp(v time.Time) *StreamDescription {
5031	s.StreamCreationTimestamp = &v
5032	return s
5033}
5034
5035// SetStreamName sets the StreamName field's value.
5036func (s *StreamDescription) SetStreamName(v string) *StreamDescription {
5037	s.StreamName = &v
5038	return s
5039}
5040
5041// SetStreamStatus sets the StreamStatus field's value.
5042func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription {
5043	s.StreamStatus = &v
5044	return s
5045}
5046
5047// Metadata assigned to the stream, consisting of a key-value pair.
5048// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/Tag
5049type Tag struct {
5050	_ struct{} `type:"structure"`
5051
5052	// A unique identifier for the tag. Maximum length: 128 characters. Valid characters:
5053	// Unicode letters, digits, white space, _ . / = + - % @
5054	//
5055	// Key is a required field
5056	Key *string `min:"1" type:"string" required:"true"`
5057
5058	// An optional string, typically used to describe or define the tag. Maximum
5059	// length: 256 characters. Valid characters: Unicode letters, digits, white
5060	// space, _ . / = + - % @
5061	Value *string `type:"string"`
5062}
5063
5064// String returns the string representation
5065func (s Tag) String() string {
5066	return awsutil.Prettify(s)
5067}
5068
5069// GoString returns the string representation
5070func (s Tag) GoString() string {
5071	return s.String()
5072}
5073
5074// SetKey sets the Key field's value.
5075func (s *Tag) SetKey(v string) *Tag {
5076	s.Key = &v
5077	return s
5078}
5079
5080// SetValue sets the Value field's value.
5081func (s *Tag) SetValue(v string) *Tag {
5082	s.Value = &v
5083	return s
5084}
5085
5086// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCountInput
5087type UpdateShardCountInput struct {
5088	_ struct{} `type:"structure"`
5089
5090	// The scaling type. Uniform scaling creates shards of equal size.
5091	//
5092	// ScalingType is a required field
5093	ScalingType *string `type:"string" required:"true" enum:"ScalingType"`
5094
5095	// The name of the stream.
5096	//
5097	// StreamName is a required field
5098	StreamName *string `min:"1" type:"string" required:"true"`
5099
5100	// The new number of shards.
5101	//
5102	// TargetShardCount is a required field
5103	TargetShardCount *int64 `min:"1" type:"integer" required:"true"`
5104}
5105
5106// String returns the string representation
5107func (s UpdateShardCountInput) String() string {
5108	return awsutil.Prettify(s)
5109}
5110
5111// GoString returns the string representation
5112func (s UpdateShardCountInput) GoString() string {
5113	return s.String()
5114}
5115
5116// Validate inspects the fields of the type to determine if they are valid.
5117func (s *UpdateShardCountInput) Validate() error {
5118	invalidParams := request.ErrInvalidParams{Context: "UpdateShardCountInput"}
5119	if s.ScalingType == nil {
5120		invalidParams.Add(request.NewErrParamRequired("ScalingType"))
5121	}
5122	if s.StreamName == nil {
5123		invalidParams.Add(request.NewErrParamRequired("StreamName"))
5124	}
5125	if s.StreamName != nil && len(*s.StreamName) < 1 {
5126		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
5127	}
5128	if s.TargetShardCount == nil {
5129		invalidParams.Add(request.NewErrParamRequired("TargetShardCount"))
5130	}
5131	if s.TargetShardCount != nil && *s.TargetShardCount < 1 {
5132		invalidParams.Add(request.NewErrParamMinValue("TargetShardCount", 1))
5133	}
5134
5135	if invalidParams.Len() > 0 {
5136		return invalidParams
5137	}
5138	return nil
5139}
5140
5141// SetScalingType sets the ScalingType field's value.
5142func (s *UpdateShardCountInput) SetScalingType(v string) *UpdateShardCountInput {
5143	s.ScalingType = &v
5144	return s
5145}
5146
5147// SetStreamName sets the StreamName field's value.
5148func (s *UpdateShardCountInput) SetStreamName(v string) *UpdateShardCountInput {
5149	s.StreamName = &v
5150	return s
5151}
5152
5153// SetTargetShardCount sets the TargetShardCount field's value.
5154func (s *UpdateShardCountInput) SetTargetShardCount(v int64) *UpdateShardCountInput {
5155	s.TargetShardCount = &v
5156	return s
5157}
5158
5159// Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCountOutput
5160type UpdateShardCountOutput struct {
5161	_ struct{} `type:"structure"`
5162
5163	// The current number of shards.
5164	CurrentShardCount *int64 `min:"1" type:"integer"`
5165
5166	// The name of the stream.
5167	StreamName *string `min:"1" type:"string"`
5168
5169	// The updated number of shards.
5170	TargetShardCount *int64 `min:"1" type:"integer"`
5171}
5172
5173// String returns the string representation
5174func (s UpdateShardCountOutput) String() string {
5175	return awsutil.Prettify(s)
5176}
5177
5178// GoString returns the string representation
5179func (s UpdateShardCountOutput) GoString() string {
5180	return s.String()
5181}
5182
5183// SetCurrentShardCount sets the CurrentShardCount field's value.
5184func (s *UpdateShardCountOutput) SetCurrentShardCount(v int64) *UpdateShardCountOutput {
5185	s.CurrentShardCount = &v
5186	return s
5187}
5188
5189// SetStreamName sets the StreamName field's value.
5190func (s *UpdateShardCountOutput) SetStreamName(v string) *UpdateShardCountOutput {
5191	s.StreamName = &v
5192	return s
5193}
5194
5195// SetTargetShardCount sets the TargetShardCount field's value.
5196func (s *UpdateShardCountOutput) SetTargetShardCount(v int64) *UpdateShardCountOutput {
5197	s.TargetShardCount = &v
5198	return s
5199}
5200
5201const (
5202	// EncryptionTypeNone is a EncryptionType enum value
5203	EncryptionTypeNone = "NONE"
5204
5205	// EncryptionTypeKms is a EncryptionType enum value
5206	EncryptionTypeKms = "KMS"
5207)
5208
5209const (
5210	// MetricsNameIncomingBytes is a MetricsName enum value
5211	MetricsNameIncomingBytes = "IncomingBytes"
5212
5213	// MetricsNameIncomingRecords is a MetricsName enum value
5214	MetricsNameIncomingRecords = "IncomingRecords"
5215
5216	// MetricsNameOutgoingBytes is a MetricsName enum value
5217	MetricsNameOutgoingBytes = "OutgoingBytes"
5218
5219	// MetricsNameOutgoingRecords is a MetricsName enum value
5220	MetricsNameOutgoingRecords = "OutgoingRecords"
5221
5222	// MetricsNameWriteProvisionedThroughputExceeded is a MetricsName enum value
5223	MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThroughputExceeded"
5224
5225	// MetricsNameReadProvisionedThroughputExceeded is a MetricsName enum value
5226	MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughputExceeded"
5227
5228	// MetricsNameIteratorAgeMilliseconds is a MetricsName enum value
5229	MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds"
5230
5231	// MetricsNameAll is a MetricsName enum value
5232	MetricsNameAll = "ALL"
5233)
5234
5235const (
5236	// ScalingTypeUniformScaling is a ScalingType enum value
5237	ScalingTypeUniformScaling = "UNIFORM_SCALING"
5238)
5239
5240const (
5241	// ShardIteratorTypeAtSequenceNumber is a ShardIteratorType enum value
5242	ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
5243
5244	// ShardIteratorTypeAfterSequenceNumber is a ShardIteratorType enum value
5245	ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
5246
5247	// ShardIteratorTypeTrimHorizon is a ShardIteratorType enum value
5248	ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
5249
5250	// ShardIteratorTypeLatest is a ShardIteratorType enum value
5251	ShardIteratorTypeLatest = "LATEST"
5252
5253	// ShardIteratorTypeAtTimestamp is a ShardIteratorType enum value
5254	ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP"
5255)
5256
5257const (
5258	// StreamStatusCreating is a StreamStatus enum value
5259	StreamStatusCreating = "CREATING"
5260
5261	// StreamStatusDeleting is a StreamStatus enum value
5262	StreamStatusDeleting = "DELETING"
5263
5264	// StreamStatusActive is a StreamStatus enum value
5265	StreamStatusActive = "ACTIVE"
5266
5267	// StreamStatusUpdating is a StreamStatus enum value
5268	StreamStatusUpdating = "UPDATING"
5269)
5270