github.com/aavshr/aws-sdk-go@v1.41.3/service/kinesis/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package kinesis
     4  
     5  import (
     6  	"bytes"
     7  	"fmt"
     8  	"io"
     9  	"sync"
    10  	"time"
    11  
    12  	"github.com/aavshr/aws-sdk-go/aws"
    13  	"github.com/aavshr/aws-sdk-go/aws/awserr"
    14  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    15  	"github.com/aavshr/aws-sdk-go/aws/client"
    16  	"github.com/aavshr/aws-sdk-go/aws/request"
    17  	"github.com/aavshr/aws-sdk-go/private/protocol"
    18  	"github.com/aavshr/aws-sdk-go/private/protocol/eventstream"
    19  	"github.com/aavshr/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
    20  	"github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc"
    21  	"github.com/aavshr/aws-sdk-go/private/protocol/rest"
    22  )
    23  
    24  const opAddTagsToStream = "AddTagsToStream"
    25  
    26  // AddTagsToStreamRequest generates a "aws/request.Request" representing the
    27  // client's request for the AddTagsToStream operation. The "output" return
    28  // value will be populated with the request's response once the request completes
    29  // successfully.
    30  //
    31  // Use "Send" method on the returned Request to send the API call to the service.
    32  // the "output" return value is not valid until after Send returns without error.
    33  //
    34  // See AddTagsToStream for more information on using the AddTagsToStream
    35  // API call, and error handling.
    36  //
    37  // This method is useful when you want to inject custom logic or configuration
    38  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    39  //
    40  //
    41  //    // Example sending a request using the AddTagsToStreamRequest method.
    42  //    req, resp := client.AddTagsToStreamRequest(params)
    43  //
    44  //    err := req.Send()
    45  //    if err == nil { // resp is now filled
    46  //        fmt.Println(resp)
    47  //    }
    48  //
    49  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream
    50  func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *request.Request, output *AddTagsToStreamOutput) {
    51  	op := &request.Operation{
    52  		Name:       opAddTagsToStream,
    53  		HTTPMethod: "POST",
    54  		HTTPPath:   "/",
    55  	}
    56  
    57  	if input == nil {
    58  		input = &AddTagsToStreamInput{}
    59  	}
    60  
    61  	output = &AddTagsToStreamOutput{}
    62  	req = c.newRequest(op, input, output)
    63  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
    64  	return
    65  }
    66  
    67  // AddTagsToStream API operation for Amazon Kinesis.
    68  //
    69  // Adds or updates tags for the specified Kinesis data stream. Each time you
    70  // invoke this operation, you can specify up to 10 tags. If you want to add
    71  // more than 10 tags to your stream, you can invoke this operation multiple
    72  // times. In total, each stream can have up to 50 tags.
    73  //
    74  // If tags have already been assigned to the stream, AddTagsToStream overwrites
    75  // any existing tags that correspond to the specified tag keys.
    76  //
    77  // AddTagsToStream has a limit of five transactions per second per account.
    78  //
    79  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    80  // with awserr.Error's Code and Message methods to get detailed information about
    81  // the error.
    82  //
    83  // See the AWS API reference guide for Amazon Kinesis's
    84  // API operation AddTagsToStream for usage and error information.
    85  //
    86  // Returned Error Types:
    87  //   * ResourceNotFoundException
    88  //   The requested resource could not be found. The stream might not be specified
    89  //   correctly.
    90  //
    91  //   * ResourceInUseException
    92  //   The resource is not available for this operation. For successful operation,
    93  //   the resource must be in the ACTIVE state.
    94  //
    95  //   * InvalidArgumentException
    96  //   A specified parameter exceeds its restrictions, is not supported, or can't
    97  //   be used. For more information, see the returned message.
    98  //
    99  //   * LimitExceededException
   100  //   The requested resource exceeds the maximum number allowed, or the number
   101  //   of concurrent stream requests exceeds the maximum number allowed.
   102  //
   103  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/AddTagsToStream
   104  func (c *Kinesis) AddTagsToStream(input *AddTagsToStreamInput) (*AddTagsToStreamOutput, error) {
   105  	req, out := c.AddTagsToStreamRequest(input)
   106  	return out, req.Send()
   107  }
   108  
   109  // AddTagsToStreamWithContext is the same as AddTagsToStream with the addition of
   110  // the ability to pass a context and additional request options.
   111  //
   112  // See AddTagsToStream for details on how to use this API operation.
   113  //
   114  // The context must be non-nil and will be used for request cancellation. If
   115  // the context is nil a panic will occur. In the future the SDK may create
   116  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   117  // for more information on using Contexts.
   118  func (c *Kinesis) AddTagsToStreamWithContext(ctx aws.Context, input *AddTagsToStreamInput, opts ...request.Option) (*AddTagsToStreamOutput, error) {
   119  	req, out := c.AddTagsToStreamRequest(input)
   120  	req.SetContext(ctx)
   121  	req.ApplyOptions(opts...)
   122  	return out, req.Send()
   123  }
   124  
   125  const opCreateStream = "CreateStream"
   126  
   127  // CreateStreamRequest generates a "aws/request.Request" representing the
   128  // client's request for the CreateStream operation. The "output" return
   129  // value will be populated with the request's response once the request completes
   130  // successfully.
   131  //
   132  // Use "Send" method on the returned Request to send the API call to the service.
   133  // the "output" return value is not valid until after Send returns without error.
   134  //
   135  // See CreateStream for more information on using the CreateStream
   136  // API call, and error handling.
   137  //
   138  // This method is useful when you want to inject custom logic or configuration
   139  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   140  //
   141  //
   142  //    // Example sending a request using the CreateStreamRequest method.
   143  //    req, resp := client.CreateStreamRequest(params)
   144  //
   145  //    err := req.Send()
   146  //    if err == nil { // resp is now filled
   147  //        fmt.Println(resp)
   148  //    }
   149  //
   150  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream
   151  func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Request, output *CreateStreamOutput) {
   152  	op := &request.Operation{
   153  		Name:       opCreateStream,
   154  		HTTPMethod: "POST",
   155  		HTTPPath:   "/",
   156  	}
   157  
   158  	if input == nil {
   159  		input = &CreateStreamInput{}
   160  	}
   161  
   162  	output = &CreateStreamOutput{}
   163  	req = c.newRequest(op, input, output)
   164  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   165  	return
   166  }
   167  
   168  // CreateStream API operation for Amazon Kinesis.
   169  //
   170  // Creates a Kinesis data stream. A stream captures and transports data records
   171  // that are continuously emitted from different data sources or producers. Scale-out
   172  // within a stream is explicitly supported by means of shards, which are uniquely
   173  // identified groups of data records in a stream.
   174  //
   175  // You specify and control the number of shards that a stream is composed of.
   176  // Each shard can support reads up to five transactions per second, up to a
   177  // maximum data read total of 2 MiB per second. Each shard can support writes
   178  // up to 1,000 records per second, up to a maximum data write total of 1 MiB
   179  // per second. If the amount of data input increases or decreases, you can add
   180  // or remove shards.
   181  //
   182  // The stream name identifies the stream. The name is scoped to the AWS account
   183  // used by the application. It is also scoped by AWS Region. That is, two streams
   184  // in two different accounts can have the same name, and two streams in the
   185  // same account, but in two different Regions, can have the same name.
   186  //
   187  // CreateStream is an asynchronous operation. Upon receiving a CreateStream
   188  // request, Kinesis Data Streams immediately returns and sets the stream status
   189  // to CREATING. After the stream is created, Kinesis Data Streams sets the stream
   190  // status to ACTIVE. You should perform read and write operations only on an
   191  // ACTIVE stream.
   192  //
   193  // You receive a LimitExceededException when making a CreateStream request when
   194  // you try to do one of the following:
   195  //
   196  //    * Have more than five streams in the CREATING state at any point in time.
   197  //
   198  //    * Create more shards than are authorized for your account.
   199  //
   200  // For the default shard limit for an AWS account, see Amazon Kinesis Data Streams
   201  // Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
   202  // in the Amazon Kinesis Data Streams Developer Guide. To increase this limit,
   203  // contact AWS Support (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
   204  //
   205  // You can use DescribeStream to check the stream status, which is returned
   206  // in StreamStatus.
   207  //
   208  // CreateStream has a limit of five transactions per second per account.
   209  //
   210  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   211  // with awserr.Error's Code and Message methods to get detailed information about
   212  // the error.
   213  //
   214  // See the AWS API reference guide for Amazon Kinesis's
   215  // API operation CreateStream for usage and error information.
   216  //
   217  // Returned Error Types:
   218  //   * ResourceInUseException
   219  //   The resource is not available for this operation. For successful operation,
   220  //   the resource must be in the ACTIVE state.
   221  //
   222  //   * LimitExceededException
   223  //   The requested resource exceeds the maximum number allowed, or the number
   224  //   of concurrent stream requests exceeds the maximum number allowed.
   225  //
   226  //   * InvalidArgumentException
   227  //   A specified parameter exceeds its restrictions, is not supported, or can't
   228  //   be used. For more information, see the returned message.
   229  //
   230  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/CreateStream
   231  func (c *Kinesis) CreateStream(input *CreateStreamInput) (*CreateStreamOutput, error) {
   232  	req, out := c.CreateStreamRequest(input)
   233  	return out, req.Send()
   234  }
   235  
   236  // CreateStreamWithContext is the same as CreateStream with the addition of
   237  // the ability to pass a context and additional request options.
   238  //
   239  // See CreateStream for details on how to use this API operation.
   240  //
   241  // The context must be non-nil and will be used for request cancellation. If
   242  // the context is nil a panic will occur. In the future the SDK may create
   243  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   244  // for more information on using Contexts.
   245  func (c *Kinesis) CreateStreamWithContext(ctx aws.Context, input *CreateStreamInput, opts ...request.Option) (*CreateStreamOutput, error) {
   246  	req, out := c.CreateStreamRequest(input)
   247  	req.SetContext(ctx)
   248  	req.ApplyOptions(opts...)
   249  	return out, req.Send()
   250  }
   251  
   252  const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod"
   253  
   254  // DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
   255  // client's request for the DecreaseStreamRetentionPeriod operation. The "output" return
   256  // value will be populated with the request's response once the request completes
   257  // successfully.
   258  //
   259  // Use "Send" method on the returned Request to send the API call to the service.
   260  // the "output" return value is not valid until after Send returns without error.
   261  //
   262  // See DecreaseStreamRetentionPeriod for more information on using the DecreaseStreamRetentionPeriod
   263  // API call, and error handling.
   264  //
   265  // This method is useful when you want to inject custom logic or configuration
   266  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   267  //
   268  //
   269  //    // Example sending a request using the DecreaseStreamRetentionPeriodRequest method.
   270  //    req, resp := client.DecreaseStreamRetentionPeriodRequest(params)
   271  //
   272  //    err := req.Send()
   273  //    if err == nil { // resp is now filled
   274  //        fmt.Println(resp)
   275  //    }
   276  //
   277  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod
   278  func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRetentionPeriodInput) (req *request.Request, output *DecreaseStreamRetentionPeriodOutput) {
   279  	op := &request.Operation{
   280  		Name:       opDecreaseStreamRetentionPeriod,
   281  		HTTPMethod: "POST",
   282  		HTTPPath:   "/",
   283  	}
   284  
   285  	if input == nil {
   286  		input = &DecreaseStreamRetentionPeriodInput{}
   287  	}
   288  
   289  	output = &DecreaseStreamRetentionPeriodOutput{}
   290  	req = c.newRequest(op, input, output)
   291  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   292  	return
   293  }
   294  
   295  // DecreaseStreamRetentionPeriod API operation for Amazon Kinesis.
   296  //
   297  // Decreases the Kinesis data stream's retention period, which is the length
   298  // of time data records are accessible after they are added to the stream. The
   299  // minimum value of a stream's retention period is 24 hours.
   300  //
   301  // This operation may result in lost data. For example, if the stream's retention
   302  // period is 48 hours and is decreased to 24 hours, any data already in the
   303  // stream that is older than 24 hours is inaccessible.
   304  //
   305  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   306  // with awserr.Error's Code and Message methods to get detailed information about
   307  // the error.
   308  //
   309  // See the AWS API reference guide for Amazon Kinesis's
   310  // API operation DecreaseStreamRetentionPeriod for usage and error information.
   311  //
   312  // Returned Error Types:
   313  //   * ResourceInUseException
   314  //   The resource is not available for this operation. For successful operation,
   315  //   the resource must be in the ACTIVE state.
   316  //
   317  //   * ResourceNotFoundException
   318  //   The requested resource could not be found. The stream might not be specified
   319  //   correctly.
   320  //
   321  //   * LimitExceededException
   322  //   The requested resource exceeds the maximum number allowed, or the number
   323  //   of concurrent stream requests exceeds the maximum number allowed.
   324  //
   325  //   * InvalidArgumentException
   326  //   A specified parameter exceeds its restrictions, is not supported, or can't
   327  //   be used. For more information, see the returned message.
   328  //
   329  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DecreaseStreamRetentionPeriod
   330  func (c *Kinesis) DecreaseStreamRetentionPeriod(input *DecreaseStreamRetentionPeriodInput) (*DecreaseStreamRetentionPeriodOutput, error) {
   331  	req, out := c.DecreaseStreamRetentionPeriodRequest(input)
   332  	return out, req.Send()
   333  }
   334  
   335  // DecreaseStreamRetentionPeriodWithContext is the same as DecreaseStreamRetentionPeriod with the addition of
   336  // the ability to pass a context and additional request options.
   337  //
   338  // See DecreaseStreamRetentionPeriod for details on how to use this API operation.
   339  //
   340  // The context must be non-nil and will be used for request cancellation. If
   341  // the context is nil a panic will occur. In the future the SDK may create
   342  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   343  // for more information on using Contexts.
   344  func (c *Kinesis) DecreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *DecreaseStreamRetentionPeriodInput, opts ...request.Option) (*DecreaseStreamRetentionPeriodOutput, error) {
   345  	req, out := c.DecreaseStreamRetentionPeriodRequest(input)
   346  	req.SetContext(ctx)
   347  	req.ApplyOptions(opts...)
   348  	return out, req.Send()
   349  }
   350  
   351  const opDeleteStream = "DeleteStream"
   352  
   353  // DeleteStreamRequest generates a "aws/request.Request" representing the
   354  // client's request for the DeleteStream operation. The "output" return
   355  // value will be populated with the request's response once the request completes
   356  // successfully.
   357  //
   358  // Use "Send" method on the returned Request to send the API call to the service.
   359  // the "output" return value is not valid until after Send returns without error.
   360  //
   361  // See DeleteStream for more information on using the DeleteStream
   362  // API call, and error handling.
   363  //
   364  // This method is useful when you want to inject custom logic or configuration
   365  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   366  //
   367  //
   368  //    // Example sending a request using the DeleteStreamRequest method.
   369  //    req, resp := client.DeleteStreamRequest(params)
   370  //
   371  //    err := req.Send()
   372  //    if err == nil { // resp is now filled
   373  //        fmt.Println(resp)
   374  //    }
   375  //
   376  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream
   377  func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Request, output *DeleteStreamOutput) {
   378  	op := &request.Operation{
   379  		Name:       opDeleteStream,
   380  		HTTPMethod: "POST",
   381  		HTTPPath:   "/",
   382  	}
   383  
   384  	if input == nil {
   385  		input = &DeleteStreamInput{}
   386  	}
   387  
   388  	output = &DeleteStreamOutput{}
   389  	req = c.newRequest(op, input, output)
   390  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   391  	return
   392  }
   393  
   394  // DeleteStream API operation for Amazon Kinesis.
   395  //
   396  // Deletes a Kinesis data stream and all its shards and data. You must shut
   397  // down any applications that are operating on the stream before you delete
   398  // the stream. If an application attempts to operate on a deleted stream, it
   399  // receives the exception ResourceNotFoundException.
   400  //
   401  // If the stream is in the ACTIVE state, you can delete it. After a DeleteStream
   402  // request, the specified stream is in the DELETING state until Kinesis Data
   403  // Streams completes the deletion.
   404  //
   405  // Note: Kinesis Data Streams might continue to accept data read and write operations,
   406  // such as PutRecord, PutRecords, and GetRecords, on a stream in the DELETING
   407  // state until the stream deletion is complete.
   408  //
   409  // When you delete a stream, any shards in that stream are also deleted, and
   410  // any tags are dissociated from the stream.
   411  //
   412  // You can use the DescribeStream operation to check the state of the stream,
   413  // which is returned in StreamStatus.
   414  //
   415  // DeleteStream has a limit of five transactions per second per account.
   416  //
   417  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   418  // with awserr.Error's Code and Message methods to get detailed information about
   419  // the error.
   420  //
   421  // See the AWS API reference guide for Amazon Kinesis's
   422  // API operation DeleteStream for usage and error information.
   423  //
   424  // Returned Error Types:
   425  //   * ResourceNotFoundException
   426  //   The requested resource could not be found. The stream might not be specified
   427  //   correctly.
   428  //
   429  //   * LimitExceededException
   430  //   The requested resource exceeds the maximum number allowed, or the number
   431  //   of concurrent stream requests exceeds the maximum number allowed.
   432  //
   433  //   * ResourceInUseException
   434  //   The resource is not available for this operation. For successful operation,
   435  //   the resource must be in the ACTIVE state.
   436  //
   437  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeleteStream
   438  func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) {
   439  	req, out := c.DeleteStreamRequest(input)
   440  	return out, req.Send()
   441  }
   442  
   443  // DeleteStreamWithContext is the same as DeleteStream with the addition of
   444  // the ability to pass a context and additional request options.
   445  //
   446  // See DeleteStream for details on how to use this API operation.
   447  //
   448  // The context must be non-nil and will be used for request cancellation. If
   449  // the context is nil a panic will occur. In the future the SDK may create
   450  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   451  // for more information on using Contexts.
   452  func (c *Kinesis) DeleteStreamWithContext(ctx aws.Context, input *DeleteStreamInput, opts ...request.Option) (*DeleteStreamOutput, error) {
   453  	req, out := c.DeleteStreamRequest(input)
   454  	req.SetContext(ctx)
   455  	req.ApplyOptions(opts...)
   456  	return out, req.Send()
   457  }
   458  
   459  const opDeregisterStreamConsumer = "DeregisterStreamConsumer"
   460  
   461  // DeregisterStreamConsumerRequest generates a "aws/request.Request" representing the
   462  // client's request for the DeregisterStreamConsumer operation. The "output" return
   463  // value will be populated with the request's response once the request completes
   464  // successfully.
   465  //
   466  // Use "Send" method on the returned Request to send the API call to the service.
   467  // the "output" return value is not valid until after Send returns without error.
   468  //
   469  // See DeregisterStreamConsumer for more information on using the DeregisterStreamConsumer
   470  // API call, and error handling.
   471  //
   472  // This method is useful when you want to inject custom logic or configuration
   473  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   474  //
   475  //
   476  //    // Example sending a request using the DeregisterStreamConsumerRequest method.
   477  //    req, resp := client.DeregisterStreamConsumerRequest(params)
   478  //
   479  //    err := req.Send()
   480  //    if err == nil { // resp is now filled
   481  //        fmt.Println(resp)
   482  //    }
   483  //
   484  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer
   485  func (c *Kinesis) DeregisterStreamConsumerRequest(input *DeregisterStreamConsumerInput) (req *request.Request, output *DeregisterStreamConsumerOutput) {
   486  	op := &request.Operation{
   487  		Name:       opDeregisterStreamConsumer,
   488  		HTTPMethod: "POST",
   489  		HTTPPath:   "/",
   490  	}
   491  
   492  	if input == nil {
   493  		input = &DeregisterStreamConsumerInput{}
   494  	}
   495  
   496  	output = &DeregisterStreamConsumerOutput{}
   497  	req = c.newRequest(op, input, output)
   498  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   499  	return
   500  }
   501  
   502  // DeregisterStreamConsumer API operation for Amazon Kinesis.
   503  //
   504  // To deregister a consumer, provide its ARN. Alternatively, you can provide
   505  // the ARN of the data stream and the name you gave the consumer when you registered
   506  // it. You may also provide all three parameters, as long as they don't conflict
   507  // with each other. If you don't know the name or ARN of the consumer that you
   508  // want to deregister, you can use the ListStreamConsumers operation to get
   509  // a list of the descriptions of all the consumers that are currently registered
   510  // with a given data stream. The description of a consumer contains its name
   511  // and ARN.
   512  //
   513  // This operation has a limit of five transactions per second per stream.
   514  //
   515  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   516  // with awserr.Error's Code and Message methods to get detailed information about
   517  // the error.
   518  //
   519  // See the AWS API reference guide for Amazon Kinesis's
   520  // API operation DeregisterStreamConsumer for usage and error information.
   521  //
   522  // Returned Error Types:
   523  //   * LimitExceededException
   524  //   The requested resource exceeds the maximum number allowed, or the number
   525  //   of concurrent stream requests exceeds the maximum number allowed.
   526  //
   527  //   * ResourceNotFoundException
   528  //   The requested resource could not be found. The stream might not be specified
   529  //   correctly.
   530  //
   531  //   * InvalidArgumentException
   532  //   A specified parameter exceeds its restrictions, is not supported, or can't
   533  //   be used. For more information, see the returned message.
   534  //
   535  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DeregisterStreamConsumer
   536  func (c *Kinesis) DeregisterStreamConsumer(input *DeregisterStreamConsumerInput) (*DeregisterStreamConsumerOutput, error) {
   537  	req, out := c.DeregisterStreamConsumerRequest(input)
   538  	return out, req.Send()
   539  }
   540  
   541  // DeregisterStreamConsumerWithContext is the same as DeregisterStreamConsumer with the addition of
   542  // the ability to pass a context and additional request options.
   543  //
   544  // See DeregisterStreamConsumer for details on how to use this API operation.
   545  //
   546  // The context must be non-nil and will be used for request cancellation. If
   547  // the context is nil a panic will occur. In the future the SDK may create
   548  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   549  // for more information on using Contexts.
   550  func (c *Kinesis) DeregisterStreamConsumerWithContext(ctx aws.Context, input *DeregisterStreamConsumerInput, opts ...request.Option) (*DeregisterStreamConsumerOutput, error) {
   551  	req, out := c.DeregisterStreamConsumerRequest(input)
   552  	req.SetContext(ctx)
   553  	req.ApplyOptions(opts...)
   554  	return out, req.Send()
   555  }
   556  
   557  const opDescribeLimits = "DescribeLimits"
   558  
   559  // DescribeLimitsRequest generates a "aws/request.Request" representing the
   560  // client's request for the DescribeLimits operation. The "output" return
   561  // value will be populated with the request's response once the request completes
   562  // successfully.
   563  //
   564  // Use "Send" method on the returned Request to send the API call to the service.
   565  // the "output" return value is not valid until after Send returns without error.
   566  //
   567  // See DescribeLimits for more information on using the DescribeLimits
   568  // API call, and error handling.
   569  //
   570  // This method is useful when you want to inject custom logic or configuration
   571  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   572  //
   573  //
   574  //    // Example sending a request using the DescribeLimitsRequest method.
   575  //    req, resp := client.DescribeLimitsRequest(params)
   576  //
   577  //    err := req.Send()
   578  //    if err == nil { // resp is now filled
   579  //        fmt.Println(resp)
   580  //    }
   581  //
   582  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits
   583  func (c *Kinesis) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput) {
   584  	op := &request.Operation{
   585  		Name:       opDescribeLimits,
   586  		HTTPMethod: "POST",
   587  		HTTPPath:   "/",
   588  	}
   589  
   590  	if input == nil {
   591  		input = &DescribeLimitsInput{}
   592  	}
   593  
   594  	output = &DescribeLimitsOutput{}
   595  	req = c.newRequest(op, input, output)
   596  	return
   597  }
   598  
   599  // DescribeLimits API operation for Amazon Kinesis.
   600  //
   601  // Describes the shard limits and usage for the account.
   602  //
   603  // If you update your account limits, the old limits might be returned for a
   604  // few minutes.
   605  //
   606  // This operation has a limit of one transaction per second per account.
   607  //
   608  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   609  // with awserr.Error's Code and Message methods to get detailed information about
   610  // the error.
   611  //
   612  // See the AWS API reference guide for Amazon Kinesis's
   613  // API operation DescribeLimits for usage and error information.
   614  //
   615  // Returned Error Types:
   616  //   * LimitExceededException
   617  //   The requested resource exceeds the maximum number allowed, or the number
   618  //   of concurrent stream requests exceeds the maximum number allowed.
   619  //
   620  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeLimits
   621  func (c *Kinesis) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error) {
   622  	req, out := c.DescribeLimitsRequest(input)
   623  	return out, req.Send()
   624  }
   625  
   626  // DescribeLimitsWithContext is the same as DescribeLimits with the addition of
   627  // the ability to pass a context and additional request options.
   628  //
   629  // See DescribeLimits for details on how to use this API operation.
   630  //
   631  // The context must be non-nil and will be used for request cancellation. If
   632  // the context is nil a panic will occur. In the future the SDK may create
   633  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   634  // for more information on using Contexts.
   635  func (c *Kinesis) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error) {
   636  	req, out := c.DescribeLimitsRequest(input)
   637  	req.SetContext(ctx)
   638  	req.ApplyOptions(opts...)
   639  	return out, req.Send()
   640  }
   641  
   642  const opDescribeStream = "DescribeStream"
   643  
   644  // DescribeStreamRequest generates a "aws/request.Request" representing the
   645  // client's request for the DescribeStream operation. The "output" return
   646  // value will be populated with the request's response once the request completes
   647  // successfully.
   648  //
   649  // Use "Send" method on the returned Request to send the API call to the service.
   650  // the "output" return value is not valid until after Send returns without error.
   651  //
   652  // See DescribeStream for more information on using the DescribeStream
   653  // API call, and error handling.
   654  //
   655  // This method is useful when you want to inject custom logic or configuration
   656  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   657  //
   658  //
   659  //    // Example sending a request using the DescribeStreamRequest method.
   660  //    req, resp := client.DescribeStreamRequest(params)
   661  //
   662  //    err := req.Send()
   663  //    if err == nil { // resp is now filled
   664  //        fmt.Println(resp)
   665  //    }
   666  //
   667  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream
   668  func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) {
   669  	op := &request.Operation{
   670  		Name:       opDescribeStream,
   671  		HTTPMethod: "POST",
   672  		HTTPPath:   "/",
   673  		Paginator: &request.Paginator{
   674  			InputTokens:     []string{"ExclusiveStartShardId"},
   675  			OutputTokens:    []string{"StreamDescription.Shards[-1].ShardId"},
   676  			LimitToken:      "Limit",
   677  			TruncationToken: "StreamDescription.HasMoreShards",
   678  		},
   679  	}
   680  
   681  	if input == nil {
   682  		input = &DescribeStreamInput{}
   683  	}
   684  
   685  	output = &DescribeStreamOutput{}
   686  	req = c.newRequest(op, input, output)
   687  	return
   688  }
   689  
   690  // DescribeStream API operation for Amazon Kinesis.
   691  //
   692  // Describes the specified Kinesis data stream.
   693  //
   694  // The information returned includes the stream name, Amazon Resource Name (ARN),
   695  // creation time, enhanced metric configuration, and shard map. The shard map
   696  // is an array of shard objects. For each shard object, there is the hash key
   697  // and sequence number ranges that the shard spans, and the IDs of any earlier
   698  // shards that played in a role in creating the shard. Every record ingested
   699  // in the stream is identified by a sequence number, which is assigned when
   700  // the record is put into the stream.
   701  //
   702  // You can limit the number of shards returned by each call. For more information,
   703  // see Retrieving Shards from a Stream (https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html)
   704  // in the Amazon Kinesis Data Streams Developer Guide.
   705  //
   706  // There are no guarantees about the chronological order shards returned. To
   707  // process shards in chronological order, use the ID of the parent shard to
   708  // track the lineage to the oldest shard.
   709  //
   710  // This operation has a limit of 10 transactions per second per account.
   711  //
   712  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   713  // with awserr.Error's Code and Message methods to get detailed information about
   714  // the error.
   715  //
   716  // See the AWS API reference guide for Amazon Kinesis's
   717  // API operation DescribeStream for usage and error information.
   718  //
   719  // Returned Error Types:
   720  //   * ResourceNotFoundException
   721  //   The requested resource could not be found. The stream might not be specified
   722  //   correctly.
   723  //
   724  //   * LimitExceededException
   725  //   The requested resource exceeds the maximum number allowed, or the number
   726  //   of concurrent stream requests exceeds the maximum number allowed.
   727  //
   728  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStream
   729  func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) {
   730  	req, out := c.DescribeStreamRequest(input)
   731  	return out, req.Send()
   732  }
   733  
   734  // DescribeStreamWithContext is the same as DescribeStream with the addition of
   735  // the ability to pass a context and additional request options.
   736  //
   737  // See DescribeStream for details on how to use this API operation.
   738  //
   739  // The context must be non-nil and will be used for request cancellation. If
   740  // the context is nil a panic will occur. In the future the SDK may create
   741  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   742  // for more information on using Contexts.
   743  func (c *Kinesis) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) {
   744  	req, out := c.DescribeStreamRequest(input)
   745  	req.SetContext(ctx)
   746  	req.ApplyOptions(opts...)
   747  	return out, req.Send()
   748  }
   749  
   750  // DescribeStreamPages iterates over the pages of a DescribeStream operation,
   751  // calling the "fn" function with the response data for each page. To stop
   752  // iterating, return false from the fn function.
   753  //
   754  // See DescribeStream method for more information on how to use this operation.
   755  //
   756  // Note: This operation can generate multiple requests to a service.
   757  //
   758  //    // Example iterating over at most 3 pages of a DescribeStream operation.
   759  //    pageNum := 0
   760  //    err := client.DescribeStreamPages(params,
   761  //        func(page *kinesis.DescribeStreamOutput, lastPage bool) bool {
   762  //            pageNum++
   763  //            fmt.Println(page)
   764  //            return pageNum <= 3
   765  //        })
   766  //
   767  func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool) error {
   768  	return c.DescribeStreamPagesWithContext(aws.BackgroundContext(), input, fn)
   769  }
   770  
   771  // DescribeStreamPagesWithContext same as DescribeStreamPages except
   772  // it takes a Context and allows setting request options on the pages.
   773  //
   774  // The context must be non-nil and will be used for request cancellation. If
   775  // the context is nil a panic will occur. In the future the SDK may create
   776  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   777  // for more information on using Contexts.
   778  func (c *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input *DescribeStreamInput, fn func(*DescribeStreamOutput, bool) bool, opts ...request.Option) error {
   779  	p := request.Pagination{
   780  		NewRequest: func() (*request.Request, error) {
   781  			var inCpy *DescribeStreamInput
   782  			if input != nil {
   783  				tmp := *input
   784  				inCpy = &tmp
   785  			}
   786  			req, _ := c.DescribeStreamRequest(inCpy)
   787  			req.SetContext(ctx)
   788  			req.ApplyOptions(opts...)
   789  			return req, nil
   790  		},
   791  	}
   792  
   793  	for p.Next() {
   794  		if !fn(p.Page().(*DescribeStreamOutput), !p.HasNextPage()) {
   795  			break
   796  		}
   797  	}
   798  
   799  	return p.Err()
   800  }
   801  
   802  const opDescribeStreamConsumer = "DescribeStreamConsumer"
   803  
   804  // DescribeStreamConsumerRequest generates a "aws/request.Request" representing the
   805  // client's request for the DescribeStreamConsumer operation. The "output" return
   806  // value will be populated with the request's response once the request completes
   807  // successfully.
   808  //
   809  // Use "Send" method on the returned Request to send the API call to the service.
   810  // the "output" return value is not valid until after Send returns without error.
   811  //
   812  // See DescribeStreamConsumer for more information on using the DescribeStreamConsumer
   813  // API call, and error handling.
   814  //
   815  // This method is useful when you want to inject custom logic or configuration
   816  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   817  //
   818  //
   819  //    // Example sending a request using the DescribeStreamConsumerRequest method.
   820  //    req, resp := client.DescribeStreamConsumerRequest(params)
   821  //
   822  //    err := req.Send()
   823  //    if err == nil { // resp is now filled
   824  //        fmt.Println(resp)
   825  //    }
   826  //
   827  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer
   828  func (c *Kinesis) DescribeStreamConsumerRequest(input *DescribeStreamConsumerInput) (req *request.Request, output *DescribeStreamConsumerOutput) {
   829  	op := &request.Operation{
   830  		Name:       opDescribeStreamConsumer,
   831  		HTTPMethod: "POST",
   832  		HTTPPath:   "/",
   833  	}
   834  
   835  	if input == nil {
   836  		input = &DescribeStreamConsumerInput{}
   837  	}
   838  
   839  	output = &DescribeStreamConsumerOutput{}
   840  	req = c.newRequest(op, input, output)
   841  	return
   842  }
   843  
   844  // DescribeStreamConsumer API operation for Amazon Kinesis.
   845  //
   846  // To get the description of a registered consumer, provide the ARN of the consumer.
   847  // Alternatively, you can provide the ARN of the data stream and the name you
   848  // gave the consumer when you registered it. You may also provide all three
   849  // parameters, as long as they don't conflict with each other. If you don't
   850  // know the name or ARN of the consumer that you want to describe, you can use
   851  // the ListStreamConsumers operation to get a list of the descriptions of all
   852  // the consumers that are currently registered with a given data stream.
   853  //
   854  // This operation has a limit of 20 transactions per second per stream.
   855  //
   856  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   857  // with awserr.Error's Code and Message methods to get detailed information about
   858  // the error.
   859  //
   860  // See the AWS API reference guide for Amazon Kinesis's
   861  // API operation DescribeStreamConsumer for usage and error information.
   862  //
   863  // Returned Error Types:
   864  //   * LimitExceededException
   865  //   The requested resource exceeds the maximum number allowed, or the number
   866  //   of concurrent stream requests exceeds the maximum number allowed.
   867  //
   868  //   * ResourceNotFoundException
   869  //   The requested resource could not be found. The stream might not be specified
   870  //   correctly.
   871  //
   872  //   * InvalidArgumentException
   873  //   A specified parameter exceeds its restrictions, is not supported, or can't
   874  //   be used. For more information, see the returned message.
   875  //
   876  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamConsumer
   877  func (c *Kinesis) DescribeStreamConsumer(input *DescribeStreamConsumerInput) (*DescribeStreamConsumerOutput, error) {
   878  	req, out := c.DescribeStreamConsumerRequest(input)
   879  	return out, req.Send()
   880  }
   881  
   882  // DescribeStreamConsumerWithContext is the same as DescribeStreamConsumer with the addition of
   883  // the ability to pass a context and additional request options.
   884  //
   885  // See DescribeStreamConsumer for details on how to use this API operation.
   886  //
   887  // The context must be non-nil and will be used for request cancellation. If
   888  // the context is nil a panic will occur. In the future the SDK may create
   889  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   890  // for more information on using Contexts.
   891  func (c *Kinesis) DescribeStreamConsumerWithContext(ctx aws.Context, input *DescribeStreamConsumerInput, opts ...request.Option) (*DescribeStreamConsumerOutput, error) {
   892  	req, out := c.DescribeStreamConsumerRequest(input)
   893  	req.SetContext(ctx)
   894  	req.ApplyOptions(opts...)
   895  	return out, req.Send()
   896  }
   897  
   898  const opDescribeStreamSummary = "DescribeStreamSummary"
   899  
   900  // DescribeStreamSummaryRequest generates a "aws/request.Request" representing the
   901  // client's request for the DescribeStreamSummary operation. The "output" return
   902  // value will be populated with the request's response once the request completes
   903  // successfully.
   904  //
   905  // Use "Send" method on the returned Request to send the API call to the service.
   906  // the "output" return value is not valid until after Send returns without error.
   907  //
   908  // See DescribeStreamSummary for more information on using the DescribeStreamSummary
   909  // API call, and error handling.
   910  //
   911  // This method is useful when you want to inject custom logic or configuration
   912  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   913  //
   914  //
   915  //    // Example sending a request using the DescribeStreamSummaryRequest method.
   916  //    req, resp := client.DescribeStreamSummaryRequest(params)
   917  //
   918  //    err := req.Send()
   919  //    if err == nil { // resp is now filled
   920  //        fmt.Println(resp)
   921  //    }
   922  //
   923  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamSummary
   924  func (c *Kinesis) DescribeStreamSummaryRequest(input *DescribeStreamSummaryInput) (req *request.Request, output *DescribeStreamSummaryOutput) {
   925  	op := &request.Operation{
   926  		Name:       opDescribeStreamSummary,
   927  		HTTPMethod: "POST",
   928  		HTTPPath:   "/",
   929  	}
   930  
   931  	if input == nil {
   932  		input = &DescribeStreamSummaryInput{}
   933  	}
   934  
   935  	output = &DescribeStreamSummaryOutput{}
   936  	req = c.newRequest(op, input, output)
   937  	return
   938  }
   939  
   940  // DescribeStreamSummary API operation for Amazon Kinesis.
   941  //
   942  // Provides a summarized description of the specified Kinesis data stream without
   943  // the shard list.
   944  //
   945  // The information returned includes the stream name, Amazon Resource Name (ARN),
   946  // status, record retention period, approximate creation time, monitoring, encryption
   947  // details, and open shard count.
   948  //
   949  // DescribeStreamSummary has a limit of 20 transactions per second per account.
   950  //
   951  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   952  // with awserr.Error's Code and Message methods to get detailed information about
   953  // the error.
   954  //
   955  // See the AWS API reference guide for Amazon Kinesis's
   956  // API operation DescribeStreamSummary for usage and error information.
   957  //
   958  // Returned Error Types:
   959  //   * ResourceNotFoundException
   960  //   The requested resource could not be found. The stream might not be specified
   961  //   correctly.
   962  //
   963  //   * LimitExceededException
   964  //   The requested resource exceeds the maximum number allowed, or the number
   965  //   of concurrent stream requests exceeds the maximum number allowed.
   966  //
   967  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DescribeStreamSummary
   968  func (c *Kinesis) DescribeStreamSummary(input *DescribeStreamSummaryInput) (*DescribeStreamSummaryOutput, error) {
   969  	req, out := c.DescribeStreamSummaryRequest(input)
   970  	return out, req.Send()
   971  }
   972  
   973  // DescribeStreamSummaryWithContext is the same as DescribeStreamSummary with the addition of
   974  // the ability to pass a context and additional request options.
   975  //
   976  // See DescribeStreamSummary for details on how to use this API operation.
   977  //
   978  // The context must be non-nil and will be used for request cancellation. If
   979  // the context is nil a panic will occur. In the future the SDK may create
   980  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   981  // for more information on using Contexts.
   982  func (c *Kinesis) DescribeStreamSummaryWithContext(ctx aws.Context, input *DescribeStreamSummaryInput, opts ...request.Option) (*DescribeStreamSummaryOutput, error) {
   983  	req, out := c.DescribeStreamSummaryRequest(input)
   984  	req.SetContext(ctx)
   985  	req.ApplyOptions(opts...)
   986  	return out, req.Send()
   987  }
   988  
   989  const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring"
   990  
   991  // DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
   992  // client's request for the DisableEnhancedMonitoring operation. The "output" return
   993  // value will be populated with the request's response once the request completes
   994  // successfully.
   995  //
   996  // Use "Send" method on the returned Request to send the API call to the service.
   997  // the "output" return value is not valid until after Send returns without error.
   998  //
   999  // See DisableEnhancedMonitoring for more information on using the DisableEnhancedMonitoring
  1000  // API call, and error handling.
  1001  //
  1002  // This method is useful when you want to inject custom logic or configuration
  1003  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1004  //
  1005  //
  1006  //    // Example sending a request using the DisableEnhancedMonitoringRequest method.
  1007  //    req, resp := client.DisableEnhancedMonitoringRequest(params)
  1008  //
  1009  //    err := req.Send()
  1010  //    if err == nil { // resp is now filled
  1011  //        fmt.Println(resp)
  1012  //    }
  1013  //
  1014  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring
  1015  func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
  1016  	op := &request.Operation{
  1017  		Name:       opDisableEnhancedMonitoring,
  1018  		HTTPMethod: "POST",
  1019  		HTTPPath:   "/",
  1020  	}
  1021  
  1022  	if input == nil {
  1023  		input = &DisableEnhancedMonitoringInput{}
  1024  	}
  1025  
  1026  	output = &EnhancedMonitoringOutput{}
  1027  	req = c.newRequest(op, input, output)
  1028  	return
  1029  }
  1030  
  1031  // DisableEnhancedMonitoring API operation for Amazon Kinesis.
  1032  //
  1033  // Disables enhanced monitoring.
  1034  //
  1035  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1036  // with awserr.Error's Code and Message methods to get detailed information about
  1037  // the error.
  1038  //
  1039  // See the AWS API reference guide for Amazon Kinesis's
  1040  // API operation DisableEnhancedMonitoring for usage and error information.
  1041  //
  1042  // Returned Error Types:
  1043  //   * InvalidArgumentException
  1044  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1045  //   be used. For more information, see the returned message.
  1046  //
  1047  //   * LimitExceededException
  1048  //   The requested resource exceeds the maximum number allowed, or the number
  1049  //   of concurrent stream requests exceeds the maximum number allowed.
  1050  //
  1051  //   * ResourceInUseException
  1052  //   The resource is not available for this operation. For successful operation,
  1053  //   the resource must be in the ACTIVE state.
  1054  //
  1055  //   * ResourceNotFoundException
  1056  //   The requested resource could not be found. The stream might not be specified
  1057  //   correctly.
  1058  //
  1059  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/DisableEnhancedMonitoring
  1060  func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
  1061  	req, out := c.DisableEnhancedMonitoringRequest(input)
  1062  	return out, req.Send()
  1063  }
  1064  
  1065  // DisableEnhancedMonitoringWithContext is the same as DisableEnhancedMonitoring with the addition of
  1066  // the ability to pass a context and additional request options.
  1067  //
  1068  // See DisableEnhancedMonitoring for details on how to use this API operation.
  1069  //
  1070  // The context must be non-nil and will be used for request cancellation. If
  1071  // the context is nil a panic will occur. In the future the SDK may create
  1072  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1073  // for more information on using Contexts.
  1074  func (c *Kinesis) DisableEnhancedMonitoringWithContext(ctx aws.Context, input *DisableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) {
  1075  	req, out := c.DisableEnhancedMonitoringRequest(input)
  1076  	req.SetContext(ctx)
  1077  	req.ApplyOptions(opts...)
  1078  	return out, req.Send()
  1079  }
  1080  
  1081  const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring"
  1082  
  1083  // EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the
  1084  // client's request for the EnableEnhancedMonitoring operation. The "output" return
  1085  // value will be populated with the request's response once the request completes
  1086  // successfully.
  1087  //
  1088  // Use "Send" method on the returned Request to send the API call to the service.
  1089  // the "output" return value is not valid until after Send returns without error.
  1090  //
  1091  // See EnableEnhancedMonitoring for more information on using the EnableEnhancedMonitoring
  1092  // API call, and error handling.
  1093  //
  1094  // This method is useful when you want to inject custom logic or configuration
  1095  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1096  //
  1097  //
  1098  //    // Example sending a request using the EnableEnhancedMonitoringRequest method.
  1099  //    req, resp := client.EnableEnhancedMonitoringRequest(params)
  1100  //
  1101  //    err := req.Send()
  1102  //    if err == nil { // resp is now filled
  1103  //        fmt.Println(resp)
  1104  //    }
  1105  //
  1106  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring
  1107  func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedMonitoringInput) (req *request.Request, output *EnhancedMonitoringOutput) {
  1108  	op := &request.Operation{
  1109  		Name:       opEnableEnhancedMonitoring,
  1110  		HTTPMethod: "POST",
  1111  		HTTPPath:   "/",
  1112  	}
  1113  
  1114  	if input == nil {
  1115  		input = &EnableEnhancedMonitoringInput{}
  1116  	}
  1117  
  1118  	output = &EnhancedMonitoringOutput{}
  1119  	req = c.newRequest(op, input, output)
  1120  	return
  1121  }
  1122  
  1123  // EnableEnhancedMonitoring API operation for Amazon Kinesis.
  1124  //
  1125  // Enables enhanced Kinesis data stream monitoring for shard-level metrics.
  1126  //
  1127  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1128  // with awserr.Error's Code and Message methods to get detailed information about
  1129  // the error.
  1130  //
  1131  // See the AWS API reference guide for Amazon Kinesis's
  1132  // API operation EnableEnhancedMonitoring for usage and error information.
  1133  //
  1134  // Returned Error Types:
  1135  //   * InvalidArgumentException
  1136  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1137  //   be used. For more information, see the returned message.
  1138  //
  1139  //   * LimitExceededException
  1140  //   The requested resource exceeds the maximum number allowed, or the number
  1141  //   of concurrent stream requests exceeds the maximum number allowed.
  1142  //
  1143  //   * ResourceInUseException
  1144  //   The resource is not available for this operation. For successful operation,
  1145  //   the resource must be in the ACTIVE state.
  1146  //
  1147  //   * ResourceNotFoundException
  1148  //   The requested resource could not be found. The stream might not be specified
  1149  //   correctly.
  1150  //
  1151  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/EnableEnhancedMonitoring
  1152  func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitoringInput) (*EnhancedMonitoringOutput, error) {
  1153  	req, out := c.EnableEnhancedMonitoringRequest(input)
  1154  	return out, req.Send()
  1155  }
  1156  
  1157  // EnableEnhancedMonitoringWithContext is the same as EnableEnhancedMonitoring with the addition of
  1158  // the ability to pass a context and additional request options.
  1159  //
  1160  // See EnableEnhancedMonitoring for details on how to use this API operation.
  1161  //
  1162  // The context must be non-nil and will be used for request cancellation. If
  1163  // the context is nil a panic will occur. In the future the SDK may create
  1164  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1165  // for more information on using Contexts.
  1166  func (c *Kinesis) EnableEnhancedMonitoringWithContext(ctx aws.Context, input *EnableEnhancedMonitoringInput, opts ...request.Option) (*EnhancedMonitoringOutput, error) {
  1167  	req, out := c.EnableEnhancedMonitoringRequest(input)
  1168  	req.SetContext(ctx)
  1169  	req.ApplyOptions(opts...)
  1170  	return out, req.Send()
  1171  }
  1172  
  1173  const opGetRecords = "GetRecords"
  1174  
  1175  // GetRecordsRequest generates a "aws/request.Request" representing the
  1176  // client's request for the GetRecords operation. The "output" return
  1177  // value will be populated with the request's response once the request completes
  1178  // successfully.
  1179  //
  1180  // Use "Send" method on the returned Request to send the API call to the service.
  1181  // the "output" return value is not valid until after Send returns without error.
  1182  //
  1183  // See GetRecords for more information on using the GetRecords
  1184  // API call, and error handling.
  1185  //
  1186  // This method is useful when you want to inject custom logic or configuration
  1187  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1188  //
  1189  //
  1190  //    // Example sending a request using the GetRecordsRequest method.
  1191  //    req, resp := client.GetRecordsRequest(params)
  1192  //
  1193  //    err := req.Send()
  1194  //    if err == nil { // resp is now filled
  1195  //        fmt.Println(resp)
  1196  //    }
  1197  //
  1198  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords
  1199  func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) {
  1200  	op := &request.Operation{
  1201  		Name:       opGetRecords,
  1202  		HTTPMethod: "POST",
  1203  		HTTPPath:   "/",
  1204  	}
  1205  
  1206  	if input == nil {
  1207  		input = &GetRecordsInput{}
  1208  	}
  1209  
  1210  	output = &GetRecordsOutput{}
  1211  	req = c.newRequest(op, input, output)
  1212  	return
  1213  }
  1214  
  1215  // GetRecords API operation for Amazon Kinesis.
  1216  //
  1217  // Gets data records from a Kinesis data stream's shard.
  1218  //
  1219  // Specify a shard iterator using the ShardIterator parameter. The shard iterator
  1220  // specifies the position in the shard from which you want to start reading
  1221  // data records sequentially. If there are no records available in the portion
  1222  // of the shard that the iterator points to, GetRecords returns an empty list.
  1223  // It might take multiple calls to get to a portion of the shard that contains
  1224  // records.
  1225  //
  1226  // You can scale by provisioning multiple shards per stream while considering
  1227  // service limits (for more information, see Amazon Kinesis Data Streams Limits
  1228  // (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  1229  // in the Amazon Kinesis Data Streams Developer Guide). Your application should
  1230  // have one thread per shard, each reading continuously from its stream. To
  1231  // read from a stream continually, call GetRecords in a loop. Use GetShardIterator
  1232  // to get the shard iterator to specify in the first GetRecords call. GetRecords
  1233  // returns a new shard iterator in NextShardIterator. Specify the shard iterator
  1234  // returned in NextShardIterator in subsequent calls to GetRecords. If the shard
  1235  // has been closed, the shard iterator can't return more data and GetRecords
  1236  // returns null in NextShardIterator. You can terminate the loop when the shard
  1237  // is closed, or when the shard iterator reaches the record with the sequence
  1238  // number or other attribute that marks it as the last record to process.
  1239  //
  1240  // Each data record can be up to 1 MiB in size, and each shard can read up to
  1241  // 2 MiB per second. You can ensure that your calls don't exceed the maximum
  1242  // supported size or throughput by using the Limit parameter to specify the
  1243  // maximum number of records that GetRecords can return. Consider your average
  1244  // record size when determining this limit. The maximum number of records that
  1245  // can be returned per call is 10,000.
  1246  //
  1247  // The size of the data returned by GetRecords varies depending on the utilization
  1248  // of the shard. The maximum size of data that GetRecords can return is 10 MiB.
  1249  // If a call returns this amount of data, subsequent calls made within the next
  1250  // 5 seconds throw ProvisionedThroughputExceededException. If there is insufficient
  1251  // provisioned throughput on the stream, subsequent calls made within the next
  1252  // 1 second throw ProvisionedThroughputExceededException. GetRecords doesn't
  1253  // return any data when it throws an exception. For this reason, we recommend
  1254  // that you wait 1 second between calls to GetRecords. However, it's possible
  1255  // that the application will get exceptions for longer than 1 second.
  1256  //
  1257  // To detect whether the application is falling behind in processing, you can
  1258  // use the MillisBehindLatest response attribute. You can also monitor the stream
  1259  // using CloudWatch metrics and other mechanisms (see Monitoring (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html)
  1260  // in the Amazon Kinesis Data Streams Developer Guide).
  1261  //
  1262  // Each Amazon Kinesis record includes a value, ApproximateArrivalTimestamp,
  1263  // that is set when a stream successfully receives and stores a record. This
  1264  // is commonly referred to as a server-side time stamp, whereas a client-side
  1265  // time stamp is set when a data producer creates or sends the record to a stream
  1266  // (a data producer is any data source putting data records into a stream, for
  1267  // example with PutRecords). The time stamp has millisecond precision. There
  1268  // are no guarantees about the time stamp accuracy, or that the time stamp is
  1269  // always increasing. For example, records in a shard or across a stream might
  1270  // have time stamps that are out of order.
  1271  //
  1272  // This operation has a limit of five transactions per second per shard.
  1273  //
  1274  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1275  // with awserr.Error's Code and Message methods to get detailed information about
  1276  // the error.
  1277  //
  1278  // See the AWS API reference guide for Amazon Kinesis's
  1279  // API operation GetRecords for usage and error information.
  1280  //
  1281  // Returned Error Types:
  1282  //   * ResourceNotFoundException
  1283  //   The requested resource could not be found. The stream might not be specified
  1284  //   correctly.
  1285  //
  1286  //   * InvalidArgumentException
  1287  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1288  //   be used. For more information, see the returned message.
  1289  //
  1290  //   * ProvisionedThroughputExceededException
  1291  //   The request rate for the stream is too high, or the requested data is too
  1292  //   large for the available throughput. Reduce the frequency or size of your
  1293  //   requests. For more information, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  1294  //   in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and
  1295  //   Exponential Backoff in AWS (https://docs.aws.amazon.com/general/latest/gr/api-retries.html)
  1296  //   in the AWS General Reference.
  1297  //
  1298  //   * ExpiredIteratorException
  1299  //   The provided iterator exceeds the maximum age allowed.
  1300  //
  1301  //   * KMSDisabledException
  1302  //   The request was rejected because the specified customer master key (CMK)
  1303  //   isn't enabled.
  1304  //
  1305  //   * KMSInvalidStateException
  1306  //   The request was rejected because the state of the specified resource isn't
  1307  //   valid for this request. For more information, see How Key State Affects Use
  1308  //   of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
  1309  //   in the AWS Key Management Service Developer Guide.
  1310  //
  1311  //   * KMSAccessDeniedException
  1312  //   The ciphertext references a key that doesn't exist or that you don't have
  1313  //   access to.
  1314  //
  1315  //   * KMSNotFoundException
  1316  //   The request was rejected because the specified entity or resource can't be
  1317  //   found.
  1318  //
  1319  //   * KMSOptInRequired
  1320  //   The AWS access key ID needs a subscription for the service.
  1321  //
  1322  //   * KMSThrottlingException
  1323  //   The request was denied due to request throttling. For more information about
  1324  //   throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
  1325  //   in the AWS Key Management Service Developer Guide.
  1326  //
  1327  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetRecords
  1328  func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) {
  1329  	req, out := c.GetRecordsRequest(input)
  1330  	return out, req.Send()
  1331  }
  1332  
  1333  // GetRecordsWithContext is the same as GetRecords with the addition of
  1334  // the ability to pass a context and additional request options.
  1335  //
  1336  // See GetRecords for details on how to use this API operation.
  1337  //
  1338  // The context must be non-nil and will be used for request cancellation. If
  1339  // the context is nil a panic will occur. In the future the SDK may create
  1340  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1341  // for more information on using Contexts.
  1342  func (c *Kinesis) GetRecordsWithContext(ctx aws.Context, input *GetRecordsInput, opts ...request.Option) (*GetRecordsOutput, error) {
  1343  	req, out := c.GetRecordsRequest(input)
  1344  	req.SetContext(ctx)
  1345  	req.ApplyOptions(opts...)
  1346  	return out, req.Send()
  1347  }
  1348  
  1349  const opGetShardIterator = "GetShardIterator"
  1350  
  1351  // GetShardIteratorRequest generates a "aws/request.Request" representing the
  1352  // client's request for the GetShardIterator operation. The "output" return
  1353  // value will be populated with the request's response once the request completes
  1354  // successfully.
  1355  //
  1356  // Use "Send" method on the returned Request to send the API call to the service.
  1357  // the "output" return value is not valid until after Send returns without error.
  1358  //
  1359  // See GetShardIterator for more information on using the GetShardIterator
  1360  // API call, and error handling.
  1361  //
  1362  // This method is useful when you want to inject custom logic or configuration
  1363  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1364  //
  1365  //
  1366  //    // Example sending a request using the GetShardIteratorRequest method.
  1367  //    req, resp := client.GetShardIteratorRequest(params)
  1368  //
  1369  //    err := req.Send()
  1370  //    if err == nil { // resp is now filled
  1371  //        fmt.Println(resp)
  1372  //    }
  1373  //
  1374  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator
  1375  func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) {
  1376  	op := &request.Operation{
  1377  		Name:       opGetShardIterator,
  1378  		HTTPMethod: "POST",
  1379  		HTTPPath:   "/",
  1380  	}
  1381  
  1382  	if input == nil {
  1383  		input = &GetShardIteratorInput{}
  1384  	}
  1385  
  1386  	output = &GetShardIteratorOutput{}
  1387  	req = c.newRequest(op, input, output)
  1388  	return
  1389  }
  1390  
  1391  // GetShardIterator API operation for Amazon Kinesis.
  1392  //
  1393  // Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes
  1394  // after it is returned to the requester.
  1395  //
  1396  // A shard iterator specifies the shard position from which to start reading
  1397  // data records sequentially. The position is specified using the sequence number
  1398  // of a data record in a shard. A sequence number is the identifier associated
  1399  // with every record ingested in the stream, and is assigned when a record is
  1400  // put into the stream. Each stream has one or more shards.
  1401  //
  1402  // You must specify the shard iterator type. For example, you can set the ShardIteratorType
  1403  // parameter to read exactly from the position denoted by a specific sequence
  1404  // number by using the AT_SEQUENCE_NUMBER shard iterator type. Alternatively,
  1405  // the parameter can read right after the sequence number by using the AFTER_SEQUENCE_NUMBER
  1406  // shard iterator type, using sequence numbers returned by earlier calls to
  1407  // PutRecord, PutRecords, GetRecords, or DescribeStream. In the request, you
  1408  // can specify the shard iterator type AT_TIMESTAMP to read records from an
  1409  // arbitrary point in time, TRIM_HORIZON to cause ShardIterator to point to
  1410  // the last untrimmed record in the shard in the system (the oldest data record
  1411  // in the shard), or LATEST so that you always read the most recent data in
  1412  // the shard.
  1413  //
  1414  // When you read repeatedly from a stream, use a GetShardIterator request to
  1415  // get the first shard iterator for use in your first GetRecords request and
  1416  // for subsequent reads use the shard iterator returned by the GetRecords request
  1417  // in NextShardIterator. A new shard iterator is returned by every GetRecords
  1418  // request in NextShardIterator, which you use in the ShardIterator parameter
  1419  // of the next GetRecords request.
  1420  //
  1421  // If a GetShardIterator request is made too often, you receive a ProvisionedThroughputExceededException.
  1422  // For more information about throughput limits, see GetRecords, and Streams
  1423  // Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  1424  // in the Amazon Kinesis Data Streams Developer Guide.
  1425  //
  1426  // If the shard is closed, GetShardIterator returns a valid iterator for the
  1427  // last sequence number of the shard. A shard can be closed as a result of using
  1428  // SplitShard or MergeShards.
  1429  //
  1430  // GetShardIterator has a limit of five transactions per second per account
  1431  // per open shard.
  1432  //
  1433  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1434  // with awserr.Error's Code and Message methods to get detailed information about
  1435  // the error.
  1436  //
  1437  // See the AWS API reference guide for Amazon Kinesis's
  1438  // API operation GetShardIterator for usage and error information.
  1439  //
  1440  // Returned Error Types:
  1441  //   * ResourceNotFoundException
  1442  //   The requested resource could not be found. The stream might not be specified
  1443  //   correctly.
  1444  //
  1445  //   * InvalidArgumentException
  1446  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1447  //   be used. For more information, see the returned message.
  1448  //
  1449  //   * ProvisionedThroughputExceededException
  1450  //   The request rate for the stream is too high, or the requested data is too
  1451  //   large for the available throughput. Reduce the frequency or size of your
  1452  //   requests. For more information, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  1453  //   in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and
  1454  //   Exponential Backoff in AWS (https://docs.aws.amazon.com/general/latest/gr/api-retries.html)
  1455  //   in the AWS General Reference.
  1456  //
  1457  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/GetShardIterator
  1458  func (c *Kinesis) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) {
  1459  	req, out := c.GetShardIteratorRequest(input)
  1460  	return out, req.Send()
  1461  }
  1462  
  1463  // GetShardIteratorWithContext is the same as GetShardIterator with the addition of
  1464  // the ability to pass a context and additional request options.
  1465  //
  1466  // See GetShardIterator for details on how to use this API operation.
  1467  //
  1468  // The context must be non-nil and will be used for request cancellation. If
  1469  // the context is nil a panic will occur. In the future the SDK may create
  1470  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1471  // for more information on using Contexts.
  1472  func (c *Kinesis) GetShardIteratorWithContext(ctx aws.Context, input *GetShardIteratorInput, opts ...request.Option) (*GetShardIteratorOutput, error) {
  1473  	req, out := c.GetShardIteratorRequest(input)
  1474  	req.SetContext(ctx)
  1475  	req.ApplyOptions(opts...)
  1476  	return out, req.Send()
  1477  }
  1478  
  1479  const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod"
  1480  
  1481  // IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the
  1482  // client's request for the IncreaseStreamRetentionPeriod operation. The "output" return
  1483  // value will be populated with the request's response once the request completes
  1484  // successfully.
  1485  //
  1486  // Use "Send" method on the returned Request to send the API call to the service.
  1487  // the "output" return value is not valid until after Send returns without error.
  1488  //
  1489  // See IncreaseStreamRetentionPeriod for more information on using the IncreaseStreamRetentionPeriod
  1490  // API call, and error handling.
  1491  //
  1492  // This method is useful when you want to inject custom logic or configuration
  1493  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1494  //
  1495  //
  1496  //    // Example sending a request using the IncreaseStreamRetentionPeriodRequest method.
  1497  //    req, resp := client.IncreaseStreamRetentionPeriodRequest(params)
  1498  //
  1499  //    err := req.Send()
  1500  //    if err == nil { // resp is now filled
  1501  //        fmt.Println(resp)
  1502  //    }
  1503  //
  1504  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod
  1505  func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRetentionPeriodInput) (req *request.Request, output *IncreaseStreamRetentionPeriodOutput) {
  1506  	op := &request.Operation{
  1507  		Name:       opIncreaseStreamRetentionPeriod,
  1508  		HTTPMethod: "POST",
  1509  		HTTPPath:   "/",
  1510  	}
  1511  
  1512  	if input == nil {
  1513  		input = &IncreaseStreamRetentionPeriodInput{}
  1514  	}
  1515  
  1516  	output = &IncreaseStreamRetentionPeriodOutput{}
  1517  	req = c.newRequest(op, input, output)
  1518  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1519  	return
  1520  }
  1521  
  1522  // IncreaseStreamRetentionPeriod API operation for Amazon Kinesis.
  1523  //
  1524  // Increases the Kinesis data stream's retention period, which is the length
  1525  // of time data records are accessible after they are added to the stream. The
  1526  // maximum value of a stream's retention period is 168 hours (7 days).
  1527  //
  1528  // If you choose a longer stream retention period, this operation increases
  1529  // the time period during which records that have not yet expired are accessible.
  1530  // However, it does not make previous, expired data (older than the stream's
  1531  // previous retention period) accessible after the operation has been called.
  1532  // For example, if a stream's retention period is set to 24 hours and is increased
  1533  // to 168 hours, any data that is older than 24 hours remains inaccessible to
  1534  // consumer applications.
  1535  //
  1536  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1537  // with awserr.Error's Code and Message methods to get detailed information about
  1538  // the error.
  1539  //
  1540  // See the AWS API reference guide for Amazon Kinesis's
  1541  // API operation IncreaseStreamRetentionPeriod for usage and error information.
  1542  //
  1543  // Returned Error Types:
  1544  //   * ResourceInUseException
  1545  //   The resource is not available for this operation. For successful operation,
  1546  //   the resource must be in the ACTIVE state.
  1547  //
  1548  //   * ResourceNotFoundException
  1549  //   The requested resource could not be found. The stream might not be specified
  1550  //   correctly.
  1551  //
  1552  //   * LimitExceededException
  1553  //   The requested resource exceeds the maximum number allowed, or the number
  1554  //   of concurrent stream requests exceeds the maximum number allowed.
  1555  //
  1556  //   * InvalidArgumentException
  1557  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1558  //   be used. For more information, see the returned message.
  1559  //
  1560  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/IncreaseStreamRetentionPeriod
  1561  func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRetentionPeriodInput) (*IncreaseStreamRetentionPeriodOutput, error) {
  1562  	req, out := c.IncreaseStreamRetentionPeriodRequest(input)
  1563  	return out, req.Send()
  1564  }
  1565  
  1566  // IncreaseStreamRetentionPeriodWithContext is the same as IncreaseStreamRetentionPeriod with the addition of
  1567  // the ability to pass a context and additional request options.
  1568  //
  1569  // See IncreaseStreamRetentionPeriod for details on how to use this API operation.
  1570  //
  1571  // The context must be non-nil and will be used for request cancellation. If
  1572  // the context is nil a panic will occur. In the future the SDK may create
  1573  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1574  // for more information on using Contexts.
  1575  func (c *Kinesis) IncreaseStreamRetentionPeriodWithContext(ctx aws.Context, input *IncreaseStreamRetentionPeriodInput, opts ...request.Option) (*IncreaseStreamRetentionPeriodOutput, error) {
  1576  	req, out := c.IncreaseStreamRetentionPeriodRequest(input)
  1577  	req.SetContext(ctx)
  1578  	req.ApplyOptions(opts...)
  1579  	return out, req.Send()
  1580  }
  1581  
  1582  const opListShards = "ListShards"
  1583  
  1584  // ListShardsRequest generates a "aws/request.Request" representing the
  1585  // client's request for the ListShards operation. The "output" return
  1586  // value will be populated with the request's response once the request completes
  1587  // successfully.
  1588  //
  1589  // Use "Send" method on the returned Request to send the API call to the service.
  1590  // the "output" return value is not valid until after Send returns without error.
  1591  //
  1592  // See ListShards for more information on using the ListShards
  1593  // API call, and error handling.
  1594  //
  1595  // This method is useful when you want to inject custom logic or configuration
  1596  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1597  //
  1598  //
  1599  //    // Example sending a request using the ListShardsRequest method.
  1600  //    req, resp := client.ListShardsRequest(params)
  1601  //
  1602  //    err := req.Send()
  1603  //    if err == nil { // resp is now filled
  1604  //        fmt.Println(resp)
  1605  //    }
  1606  //
  1607  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListShards
  1608  func (c *Kinesis) ListShardsRequest(input *ListShardsInput) (req *request.Request, output *ListShardsOutput) {
  1609  	op := &request.Operation{
  1610  		Name:       opListShards,
  1611  		HTTPMethod: "POST",
  1612  		HTTPPath:   "/",
  1613  	}
  1614  
  1615  	if input == nil {
  1616  		input = &ListShardsInput{}
  1617  	}
  1618  
  1619  	output = &ListShardsOutput{}
  1620  	req = c.newRequest(op, input, output)
  1621  	return
  1622  }
  1623  
  1624  // ListShards API operation for Amazon Kinesis.
  1625  //
  1626  // Lists the shards in a stream and provides information about each shard. This
  1627  // operation has a limit of 100 transactions per second per data stream.
  1628  //
  1629  // This API is a new operation that is used by the Amazon Kinesis Client Library
  1630  // (KCL). If you have a fine-grained IAM policy that only allows specific operations,
  1631  // you must update your policy to allow calls to this API. For more information,
  1632  // see Controlling Access to Amazon Kinesis Data Streams Resources Using IAM
  1633  // (https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html).
  1634  //
  1635  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1636  // with awserr.Error's Code and Message methods to get detailed information about
  1637  // the error.
  1638  //
  1639  // See the AWS API reference guide for Amazon Kinesis's
  1640  // API operation ListShards for usage and error information.
  1641  //
  1642  // Returned Error Types:
  1643  //   * ResourceNotFoundException
  1644  //   The requested resource could not be found. The stream might not be specified
  1645  //   correctly.
  1646  //
  1647  //   * InvalidArgumentException
  1648  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1649  //   be used. For more information, see the returned message.
  1650  //
  1651  //   * LimitExceededException
  1652  //   The requested resource exceeds the maximum number allowed, or the number
  1653  //   of concurrent stream requests exceeds the maximum number allowed.
  1654  //
  1655  //   * ExpiredNextTokenException
  1656  //   The pagination token passed to the operation is expired.
  1657  //
  1658  //   * ResourceInUseException
  1659  //   The resource is not available for this operation. For successful operation,
  1660  //   the resource must be in the ACTIVE state.
  1661  //
  1662  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListShards
  1663  func (c *Kinesis) ListShards(input *ListShardsInput) (*ListShardsOutput, error) {
  1664  	req, out := c.ListShardsRequest(input)
  1665  	return out, req.Send()
  1666  }
  1667  
  1668  // ListShardsWithContext is the same as ListShards with the addition of
  1669  // the ability to pass a context and additional request options.
  1670  //
  1671  // See ListShards for details on how to use this API operation.
  1672  //
  1673  // The context must be non-nil and will be used for request cancellation. If
  1674  // the context is nil a panic will occur. In the future the SDK may create
  1675  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1676  // for more information on using Contexts.
  1677  func (c *Kinesis) ListShardsWithContext(ctx aws.Context, input *ListShardsInput, opts ...request.Option) (*ListShardsOutput, error) {
  1678  	req, out := c.ListShardsRequest(input)
  1679  	req.SetContext(ctx)
  1680  	req.ApplyOptions(opts...)
  1681  	return out, req.Send()
  1682  }
  1683  
  1684  const opListStreamConsumers = "ListStreamConsumers"
  1685  
  1686  // ListStreamConsumersRequest generates a "aws/request.Request" representing the
  1687  // client's request for the ListStreamConsumers operation. The "output" return
  1688  // value will be populated with the request's response once the request completes
  1689  // successfully.
  1690  //
  1691  // Use "Send" method on the returned Request to send the API call to the service.
  1692  // the "output" return value is not valid until after Send returns without error.
  1693  //
  1694  // See ListStreamConsumers for more information on using the ListStreamConsumers
  1695  // API call, and error handling.
  1696  //
  1697  // This method is useful when you want to inject custom logic or configuration
  1698  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1699  //
  1700  //
  1701  //    // Example sending a request using the ListStreamConsumersRequest method.
  1702  //    req, resp := client.ListStreamConsumersRequest(params)
  1703  //
  1704  //    err := req.Send()
  1705  //    if err == nil { // resp is now filled
  1706  //        fmt.Println(resp)
  1707  //    }
  1708  //
  1709  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers
  1710  func (c *Kinesis) ListStreamConsumersRequest(input *ListStreamConsumersInput) (req *request.Request, output *ListStreamConsumersOutput) {
  1711  	op := &request.Operation{
  1712  		Name:       opListStreamConsumers,
  1713  		HTTPMethod: "POST",
  1714  		HTTPPath:   "/",
  1715  		Paginator: &request.Paginator{
  1716  			InputTokens:     []string{"NextToken"},
  1717  			OutputTokens:    []string{"NextToken"},
  1718  			LimitToken:      "MaxResults",
  1719  			TruncationToken: "",
  1720  		},
  1721  	}
  1722  
  1723  	if input == nil {
  1724  		input = &ListStreamConsumersInput{}
  1725  	}
  1726  
  1727  	output = &ListStreamConsumersOutput{}
  1728  	req = c.newRequest(op, input, output)
  1729  	return
  1730  }
  1731  
  1732  // ListStreamConsumers API operation for Amazon Kinesis.
  1733  //
  1734  // Lists the consumers registered to receive data from a stream using enhanced
  1735  // fan-out, and provides information about each consumer.
  1736  //
  1737  // This operation has a limit of 5 transactions per second per stream.
  1738  //
  1739  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1740  // with awserr.Error's Code and Message methods to get detailed information about
  1741  // the error.
  1742  //
  1743  // See the AWS API reference guide for Amazon Kinesis's
  1744  // API operation ListStreamConsumers for usage and error information.
  1745  //
  1746  // Returned Error Types:
  1747  //   * ResourceNotFoundException
  1748  //   The requested resource could not be found. The stream might not be specified
  1749  //   correctly.
  1750  //
  1751  //   * InvalidArgumentException
  1752  //   A specified parameter exceeds its restrictions, is not supported, or can't
  1753  //   be used. For more information, see the returned message.
  1754  //
  1755  //   * LimitExceededException
  1756  //   The requested resource exceeds the maximum number allowed, or the number
  1757  //   of concurrent stream requests exceeds the maximum number allowed.
  1758  //
  1759  //   * ExpiredNextTokenException
  1760  //   The pagination token passed to the operation is expired.
  1761  //
  1762  //   * ResourceInUseException
  1763  //   The resource is not available for this operation. For successful operation,
  1764  //   the resource must be in the ACTIVE state.
  1765  //
  1766  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreamConsumers
  1767  func (c *Kinesis) ListStreamConsumers(input *ListStreamConsumersInput) (*ListStreamConsumersOutput, error) {
  1768  	req, out := c.ListStreamConsumersRequest(input)
  1769  	return out, req.Send()
  1770  }
  1771  
  1772  // ListStreamConsumersWithContext is the same as ListStreamConsumers with the addition of
  1773  // the ability to pass a context and additional request options.
  1774  //
  1775  // See ListStreamConsumers for details on how to use this API operation.
  1776  //
  1777  // The context must be non-nil and will be used for request cancellation. If
  1778  // the context is nil a panic will occur. In the future the SDK may create
  1779  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1780  // for more information on using Contexts.
  1781  func (c *Kinesis) ListStreamConsumersWithContext(ctx aws.Context, input *ListStreamConsumersInput, opts ...request.Option) (*ListStreamConsumersOutput, error) {
  1782  	req, out := c.ListStreamConsumersRequest(input)
  1783  	req.SetContext(ctx)
  1784  	req.ApplyOptions(opts...)
  1785  	return out, req.Send()
  1786  }
  1787  
  1788  // ListStreamConsumersPages iterates over the pages of a ListStreamConsumers operation,
  1789  // calling the "fn" function with the response data for each page. To stop
  1790  // iterating, return false from the fn function.
  1791  //
  1792  // See ListStreamConsumers method for more information on how to use this operation.
  1793  //
  1794  // Note: This operation can generate multiple requests to a service.
  1795  //
  1796  //    // Example iterating over at most 3 pages of a ListStreamConsumers operation.
  1797  //    pageNum := 0
  1798  //    err := client.ListStreamConsumersPages(params,
  1799  //        func(page *kinesis.ListStreamConsumersOutput, lastPage bool) bool {
  1800  //            pageNum++
  1801  //            fmt.Println(page)
  1802  //            return pageNum <= 3
  1803  //        })
  1804  //
  1805  func (c *Kinesis) ListStreamConsumersPages(input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool) error {
  1806  	return c.ListStreamConsumersPagesWithContext(aws.BackgroundContext(), input, fn)
  1807  }
  1808  
  1809  // ListStreamConsumersPagesWithContext same as ListStreamConsumersPages except
  1810  // it takes a Context and allows setting request options on the pages.
  1811  //
  1812  // The context must be non-nil and will be used for request cancellation. If
  1813  // the context is nil a panic will occur. In the future the SDK may create
  1814  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1815  // for more information on using Contexts.
  1816  func (c *Kinesis) ListStreamConsumersPagesWithContext(ctx aws.Context, input *ListStreamConsumersInput, fn func(*ListStreamConsumersOutput, bool) bool, opts ...request.Option) error {
  1817  	p := request.Pagination{
  1818  		NewRequest: func() (*request.Request, error) {
  1819  			var inCpy *ListStreamConsumersInput
  1820  			if input != nil {
  1821  				tmp := *input
  1822  				inCpy = &tmp
  1823  			}
  1824  			req, _ := c.ListStreamConsumersRequest(inCpy)
  1825  			req.SetContext(ctx)
  1826  			req.ApplyOptions(opts...)
  1827  			return req, nil
  1828  		},
  1829  	}
  1830  
  1831  	for p.Next() {
  1832  		if !fn(p.Page().(*ListStreamConsumersOutput), !p.HasNextPage()) {
  1833  			break
  1834  		}
  1835  	}
  1836  
  1837  	return p.Err()
  1838  }
  1839  
  1840  const opListStreams = "ListStreams"
  1841  
  1842  // ListStreamsRequest generates a "aws/request.Request" representing the
  1843  // client's request for the ListStreams operation. The "output" return
  1844  // value will be populated with the request's response once the request completes
  1845  // successfully.
  1846  //
  1847  // Use "Send" method on the returned Request to send the API call to the service.
  1848  // the "output" return value is not valid until after Send returns without error.
  1849  //
  1850  // See ListStreams for more information on using the ListStreams
  1851  // API call, and error handling.
  1852  //
  1853  // This method is useful when you want to inject custom logic or configuration
  1854  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1855  //
  1856  //
  1857  //    // Example sending a request using the ListStreamsRequest method.
  1858  //    req, resp := client.ListStreamsRequest(params)
  1859  //
  1860  //    err := req.Send()
  1861  //    if err == nil { // resp is now filled
  1862  //        fmt.Println(resp)
  1863  //    }
  1864  //
  1865  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams
  1866  func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) {
  1867  	op := &request.Operation{
  1868  		Name:       opListStreams,
  1869  		HTTPMethod: "POST",
  1870  		HTTPPath:   "/",
  1871  		Paginator: &request.Paginator{
  1872  			InputTokens:     []string{"ExclusiveStartStreamName"},
  1873  			OutputTokens:    []string{"StreamNames[-1]"},
  1874  			LimitToken:      "Limit",
  1875  			TruncationToken: "HasMoreStreams",
  1876  		},
  1877  	}
  1878  
  1879  	if input == nil {
  1880  		input = &ListStreamsInput{}
  1881  	}
  1882  
  1883  	output = &ListStreamsOutput{}
  1884  	req = c.newRequest(op, input, output)
  1885  	return
  1886  }
  1887  
  1888  // ListStreams API operation for Amazon Kinesis.
  1889  //
  1890  // Lists your Kinesis data streams.
  1891  //
  1892  // The number of streams may be too large to return from a single call to ListStreams.
  1893  // You can limit the number of returned streams using the Limit parameter. If
  1894  // you do not specify a value for the Limit parameter, Kinesis Data Streams
  1895  // uses the default limit, which is currently 10.
  1896  //
  1897  // You can detect if there are more streams available to list by using the HasMoreStreams
  1898  // flag from the returned output. If there are more streams available, you can
  1899  // request more streams by using the name of the last stream returned by the
  1900  // ListStreams request in the ExclusiveStartStreamName parameter in a subsequent
  1901  // request to ListStreams. The group of stream names returned by the subsequent
  1902  // request is then added to the list. You can continue this process until all
  1903  // the stream names have been collected in the list.
  1904  //
  1905  // ListStreams has a limit of five transactions per second per account.
  1906  //
  1907  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1908  // with awserr.Error's Code and Message methods to get detailed information about
  1909  // the error.
  1910  //
  1911  // See the AWS API reference guide for Amazon Kinesis's
  1912  // API operation ListStreams for usage and error information.
  1913  //
  1914  // Returned Error Types:
  1915  //   * LimitExceededException
  1916  //   The requested resource exceeds the maximum number allowed, or the number
  1917  //   of concurrent stream requests exceeds the maximum number allowed.
  1918  //
  1919  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListStreams
  1920  func (c *Kinesis) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) {
  1921  	req, out := c.ListStreamsRequest(input)
  1922  	return out, req.Send()
  1923  }
  1924  
  1925  // ListStreamsWithContext is the same as ListStreams with the addition of
  1926  // the ability to pass a context and additional request options.
  1927  //
  1928  // See ListStreams for details on how to use this API operation.
  1929  //
  1930  // The context must be non-nil and will be used for request cancellation. If
  1931  // the context is nil a panic will occur. In the future the SDK may create
  1932  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1933  // for more information on using Contexts.
  1934  func (c *Kinesis) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) {
  1935  	req, out := c.ListStreamsRequest(input)
  1936  	req.SetContext(ctx)
  1937  	req.ApplyOptions(opts...)
  1938  	return out, req.Send()
  1939  }
  1940  
  1941  // ListStreamsPages iterates over the pages of a ListStreams operation,
  1942  // calling the "fn" function with the response data for each page. To stop
  1943  // iterating, return false from the fn function.
  1944  //
  1945  // See ListStreams method for more information on how to use this operation.
  1946  //
  1947  // Note: This operation can generate multiple requests to a service.
  1948  //
  1949  //    // Example iterating over at most 3 pages of a ListStreams operation.
  1950  //    pageNum := 0
  1951  //    err := client.ListStreamsPages(params,
  1952  //        func(page *kinesis.ListStreamsOutput, lastPage bool) bool {
  1953  //            pageNum++
  1954  //            fmt.Println(page)
  1955  //            return pageNum <= 3
  1956  //        })
  1957  //
  1958  func (c *Kinesis) ListStreamsPages(input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool) error {
  1959  	return c.ListStreamsPagesWithContext(aws.BackgroundContext(), input, fn)
  1960  }
  1961  
  1962  // ListStreamsPagesWithContext same as ListStreamsPages except
  1963  // it takes a Context and allows setting request options on the pages.
  1964  //
  1965  // The context must be non-nil and will be used for request cancellation. If
  1966  // the context is nil a panic will occur. In the future the SDK may create
  1967  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1968  // for more information on using Contexts.
  1969  func (c *Kinesis) ListStreamsPagesWithContext(ctx aws.Context, input *ListStreamsInput, fn func(*ListStreamsOutput, bool) bool, opts ...request.Option) error {
  1970  	p := request.Pagination{
  1971  		NewRequest: func() (*request.Request, error) {
  1972  			var inCpy *ListStreamsInput
  1973  			if input != nil {
  1974  				tmp := *input
  1975  				inCpy = &tmp
  1976  			}
  1977  			req, _ := c.ListStreamsRequest(inCpy)
  1978  			req.SetContext(ctx)
  1979  			req.ApplyOptions(opts...)
  1980  			return req, nil
  1981  		},
  1982  	}
  1983  
  1984  	for p.Next() {
  1985  		if !fn(p.Page().(*ListStreamsOutput), !p.HasNextPage()) {
  1986  			break
  1987  		}
  1988  	}
  1989  
  1990  	return p.Err()
  1991  }
  1992  
  1993  const opListTagsForStream = "ListTagsForStream"
  1994  
  1995  // ListTagsForStreamRequest generates a "aws/request.Request" representing the
  1996  // client's request for the ListTagsForStream operation. The "output" return
  1997  // value will be populated with the request's response once the request completes
  1998  // successfully.
  1999  //
  2000  // Use "Send" method on the returned Request to send the API call to the service.
  2001  // the "output" return value is not valid until after Send returns without error.
  2002  //
  2003  // See ListTagsForStream for more information on using the ListTagsForStream
  2004  // API call, and error handling.
  2005  //
  2006  // This method is useful when you want to inject custom logic or configuration
  2007  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2008  //
  2009  //
  2010  //    // Example sending a request using the ListTagsForStreamRequest method.
  2011  //    req, resp := client.ListTagsForStreamRequest(params)
  2012  //
  2013  //    err := req.Send()
  2014  //    if err == nil { // resp is now filled
  2015  //        fmt.Println(resp)
  2016  //    }
  2017  //
  2018  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream
  2019  func (c *Kinesis) ListTagsForStreamRequest(input *ListTagsForStreamInput) (req *request.Request, output *ListTagsForStreamOutput) {
  2020  	op := &request.Operation{
  2021  		Name:       opListTagsForStream,
  2022  		HTTPMethod: "POST",
  2023  		HTTPPath:   "/",
  2024  	}
  2025  
  2026  	if input == nil {
  2027  		input = &ListTagsForStreamInput{}
  2028  	}
  2029  
  2030  	output = &ListTagsForStreamOutput{}
  2031  	req = c.newRequest(op, input, output)
  2032  	return
  2033  }
  2034  
  2035  // ListTagsForStream API operation for Amazon Kinesis.
  2036  //
  2037  // Lists the tags for the specified Kinesis data stream. This operation has
  2038  // a limit of five transactions per second per account.
  2039  //
  2040  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2041  // with awserr.Error's Code and Message methods to get detailed information about
  2042  // the error.
  2043  //
  2044  // See the AWS API reference guide for Amazon Kinesis's
  2045  // API operation ListTagsForStream for usage and error information.
  2046  //
  2047  // Returned Error Types:
  2048  //   * ResourceNotFoundException
  2049  //   The requested resource could not be found. The stream might not be specified
  2050  //   correctly.
  2051  //
  2052  //   * InvalidArgumentException
  2053  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2054  //   be used. For more information, see the returned message.
  2055  //
  2056  //   * LimitExceededException
  2057  //   The requested resource exceeds the maximum number allowed, or the number
  2058  //   of concurrent stream requests exceeds the maximum number allowed.
  2059  //
  2060  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ListTagsForStream
  2061  func (c *Kinesis) ListTagsForStream(input *ListTagsForStreamInput) (*ListTagsForStreamOutput, error) {
  2062  	req, out := c.ListTagsForStreamRequest(input)
  2063  	return out, req.Send()
  2064  }
  2065  
  2066  // ListTagsForStreamWithContext is the same as ListTagsForStream with the addition of
  2067  // the ability to pass a context and additional request options.
  2068  //
  2069  // See ListTagsForStream for details on how to use this API operation.
  2070  //
  2071  // The context must be non-nil and will be used for request cancellation. If
  2072  // the context is nil a panic will occur. In the future the SDK may create
  2073  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2074  // for more information on using Contexts.
  2075  func (c *Kinesis) ListTagsForStreamWithContext(ctx aws.Context, input *ListTagsForStreamInput, opts ...request.Option) (*ListTagsForStreamOutput, error) {
  2076  	req, out := c.ListTagsForStreamRequest(input)
  2077  	req.SetContext(ctx)
  2078  	req.ApplyOptions(opts...)
  2079  	return out, req.Send()
  2080  }
  2081  
  2082  const opMergeShards = "MergeShards"
  2083  
  2084  // MergeShardsRequest generates a "aws/request.Request" representing the
  2085  // client's request for the MergeShards operation. The "output" return
  2086  // value will be populated with the request's response once the request completes
  2087  // successfully.
  2088  //
  2089  // Use "Send" method on the returned Request to send the API call to the service.
  2090  // the "output" return value is not valid until after Send returns without error.
  2091  //
  2092  // See MergeShards for more information on using the MergeShards
  2093  // API call, and error handling.
  2094  //
  2095  // This method is useful when you want to inject custom logic or configuration
  2096  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2097  //
  2098  //
  2099  //    // Example sending a request using the MergeShardsRequest method.
  2100  //    req, resp := client.MergeShardsRequest(params)
  2101  //
  2102  //    err := req.Send()
  2103  //    if err == nil { // resp is now filled
  2104  //        fmt.Println(resp)
  2105  //    }
  2106  //
  2107  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards
  2108  func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Request, output *MergeShardsOutput) {
  2109  	op := &request.Operation{
  2110  		Name:       opMergeShards,
  2111  		HTTPMethod: "POST",
  2112  		HTTPPath:   "/",
  2113  	}
  2114  
  2115  	if input == nil {
  2116  		input = &MergeShardsInput{}
  2117  	}
  2118  
  2119  	output = &MergeShardsOutput{}
  2120  	req = c.newRequest(op, input, output)
  2121  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2122  	return
  2123  }
  2124  
  2125  // MergeShards API operation for Amazon Kinesis.
  2126  //
  2127  // Merges two adjacent shards in a Kinesis data stream and combines them into
  2128  // a single shard to reduce the stream's capacity to ingest and transport data.
  2129  // Two shards are considered adjacent if the union of the hash key ranges for
  2130  // the two shards form a contiguous set with no gaps. For example, if you have
  2131  // two shards, one with a hash key range of 276...381 and the other with a hash
  2132  // key range of 382...454, then you could merge these two shards into a single
  2133  // shard that would have a hash key range of 276...454. After the merge, the
  2134  // single child shard receives data for all hash key values covered by the two
  2135  // parent shards.
  2136  //
  2137  // MergeShards is called when there is a need to reduce the overall capacity
  2138  // of a stream because of excess capacity that is not being used. You must specify
  2139  // the shard to be merged and the adjacent shard for a stream. For more information
  2140  // about merging shards, see Merge Two Shards (https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html)
  2141  // in the Amazon Kinesis Data Streams Developer Guide.
  2142  //
  2143  // If the stream is in the ACTIVE state, you can call MergeShards. If a stream
  2144  // is in the CREATING, UPDATING, or DELETING state, MergeShards returns a ResourceInUseException.
  2145  // If the specified stream does not exist, MergeShards returns a ResourceNotFoundException.
  2146  //
  2147  // You can use DescribeStream to check the state of the stream, which is returned
  2148  // in StreamStatus.
  2149  //
  2150  // MergeShards is an asynchronous operation. Upon receiving a MergeShards request,
  2151  // Amazon Kinesis Data Streams immediately returns a response and sets the StreamStatus
  2152  // to UPDATING. After the operation is completed, Kinesis Data Streams sets
  2153  // the StreamStatus to ACTIVE. Read and write operations continue to work while
  2154  // the stream is in the UPDATING state.
  2155  //
  2156  // You use DescribeStream to determine the shard IDs that are specified in the
  2157  // MergeShards request.
  2158  //
  2159  // If you try to operate on too many streams in parallel using CreateStream,
  2160  // DeleteStream, MergeShards, or SplitShard, you receive a LimitExceededException.
  2161  //
  2162  // MergeShards has a limit of five transactions per second per account.
  2163  //
  2164  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2165  // with awserr.Error's Code and Message methods to get detailed information about
  2166  // the error.
  2167  //
  2168  // See the AWS API reference guide for Amazon Kinesis's
  2169  // API operation MergeShards for usage and error information.
  2170  //
  2171  // Returned Error Types:
  2172  //   * ResourceNotFoundException
  2173  //   The requested resource could not be found. The stream might not be specified
  2174  //   correctly.
  2175  //
  2176  //   * ResourceInUseException
  2177  //   The resource is not available for this operation. For successful operation,
  2178  //   the resource must be in the ACTIVE state.
  2179  //
  2180  //   * InvalidArgumentException
  2181  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2182  //   be used. For more information, see the returned message.
  2183  //
  2184  //   * LimitExceededException
  2185  //   The requested resource exceeds the maximum number allowed, or the number
  2186  //   of concurrent stream requests exceeds the maximum number allowed.
  2187  //
  2188  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/MergeShards
  2189  func (c *Kinesis) MergeShards(input *MergeShardsInput) (*MergeShardsOutput, error) {
  2190  	req, out := c.MergeShardsRequest(input)
  2191  	return out, req.Send()
  2192  }
  2193  
  2194  // MergeShardsWithContext is the same as MergeShards with the addition of
  2195  // the ability to pass a context and additional request options.
  2196  //
  2197  // See MergeShards for details on how to use this API operation.
  2198  //
  2199  // The context must be non-nil and will be used for request cancellation. If
  2200  // the context is nil a panic will occur. In the future the SDK may create
  2201  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2202  // for more information on using Contexts.
  2203  func (c *Kinesis) MergeShardsWithContext(ctx aws.Context, input *MergeShardsInput, opts ...request.Option) (*MergeShardsOutput, error) {
  2204  	req, out := c.MergeShardsRequest(input)
  2205  	req.SetContext(ctx)
  2206  	req.ApplyOptions(opts...)
  2207  	return out, req.Send()
  2208  }
  2209  
  2210  const opPutRecord = "PutRecord"
  2211  
  2212  // PutRecordRequest generates a "aws/request.Request" representing the
  2213  // client's request for the PutRecord operation. The "output" return
  2214  // value will be populated with the request's response once the request completes
  2215  // successfully.
  2216  //
  2217  // Use "Send" method on the returned Request to send the API call to the service.
  2218  // the "output" return value is not valid until after Send returns without error.
  2219  //
  2220  // See PutRecord for more information on using the PutRecord
  2221  // API call, and error handling.
  2222  //
  2223  // This method is useful when you want to inject custom logic or configuration
  2224  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2225  //
  2226  //
  2227  //    // Example sending a request using the PutRecordRequest method.
  2228  //    req, resp := client.PutRecordRequest(params)
  2229  //
  2230  //    err := req.Send()
  2231  //    if err == nil { // resp is now filled
  2232  //        fmt.Println(resp)
  2233  //    }
  2234  //
  2235  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord
  2236  func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) {
  2237  	op := &request.Operation{
  2238  		Name:       opPutRecord,
  2239  		HTTPMethod: "POST",
  2240  		HTTPPath:   "/",
  2241  	}
  2242  
  2243  	if input == nil {
  2244  		input = &PutRecordInput{}
  2245  	}
  2246  
  2247  	output = &PutRecordOutput{}
  2248  	req = c.newRequest(op, input, output)
  2249  	return
  2250  }
  2251  
  2252  // PutRecord API operation for Amazon Kinesis.
  2253  //
  2254  // Writes a single data record into an Amazon Kinesis data stream. Call PutRecord
  2255  // to send data into the stream for real-time ingestion and subsequent processing,
  2256  // one record at a time. Each shard can support writes up to 1,000 records per
  2257  // second, up to a maximum data write total of 1 MiB per second.
  2258  //
  2259  // You must specify the name of the stream that captures, stores, and transports
  2260  // the data; a partition key; and the data blob itself.
  2261  //
  2262  // The data blob can be any type of data; for example, a segment from a log
  2263  // file, geographic/location data, website clickstream data, and so on.
  2264  //
  2265  // The partition key is used by Kinesis Data Streams to distribute data across
  2266  // shards. Kinesis Data Streams segregates the data records that belong to a
  2267  // stream into multiple shards, using the partition key associated with each
  2268  // data record to determine the shard to which a given data record belongs.
  2269  //
  2270  // Partition keys are Unicode strings, with a maximum length limit of 256 characters
  2271  // for each key. An MD5 hash function is used to map partition keys to 128-bit
  2272  // integer values and to map associated data records to shards using the hash
  2273  // key ranges of the shards. You can override hashing the partition key to determine
  2274  // the shard by explicitly specifying a hash value using the ExplicitHashKey
  2275  // parameter. For more information, see Adding Data to a Stream (https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  2276  // in the Amazon Kinesis Data Streams Developer Guide.
  2277  //
  2278  // PutRecord returns the shard ID of where the data record was placed and the
  2279  // sequence number that was assigned to the data record.
  2280  //
  2281  // Sequence numbers increase over time and are specific to a shard within a
  2282  // stream, not across all shards within a stream. To guarantee strictly increasing
  2283  // ordering, write serially to a shard and use the SequenceNumberForOrdering
  2284  // parameter. For more information, see Adding Data to a Stream (https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  2285  // in the Amazon Kinesis Data Streams Developer Guide.
  2286  //
  2287  // After you write a record to a stream, you cannot modify that record or its
  2288  // order within the stream.
  2289  //
  2290  // If a PutRecord request cannot be processed because of insufficient provisioned
  2291  // throughput on the shard involved in the request, PutRecord throws ProvisionedThroughputExceededException.
  2292  //
  2293  // By default, data records are accessible for 24 hours from the time that they
  2294  // are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod
  2295  // to modify this retention period.
  2296  //
  2297  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2298  // with awserr.Error's Code and Message methods to get detailed information about
  2299  // the error.
  2300  //
  2301  // See the AWS API reference guide for Amazon Kinesis's
  2302  // API operation PutRecord for usage and error information.
  2303  //
  2304  // Returned Error Types:
  2305  //   * ResourceNotFoundException
  2306  //   The requested resource could not be found. The stream might not be specified
  2307  //   correctly.
  2308  //
  2309  //   * InvalidArgumentException
  2310  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2311  //   be used. For more information, see the returned message.
  2312  //
  2313  //   * ProvisionedThroughputExceededException
  2314  //   The request rate for the stream is too high, or the requested data is too
  2315  //   large for the available throughput. Reduce the frequency or size of your
  2316  //   requests. For more information, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  2317  //   in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and
  2318  //   Exponential Backoff in AWS (https://docs.aws.amazon.com/general/latest/gr/api-retries.html)
  2319  //   in the AWS General Reference.
  2320  //
  2321  //   * KMSDisabledException
  2322  //   The request was rejected because the specified customer master key (CMK)
  2323  //   isn't enabled.
  2324  //
  2325  //   * KMSInvalidStateException
  2326  //   The request was rejected because the state of the specified resource isn't
  2327  //   valid for this request. For more information, see How Key State Affects Use
  2328  //   of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
  2329  //   in the AWS Key Management Service Developer Guide.
  2330  //
  2331  //   * KMSAccessDeniedException
  2332  //   The ciphertext references a key that doesn't exist or that you don't have
  2333  //   access to.
  2334  //
  2335  //   * KMSNotFoundException
  2336  //   The request was rejected because the specified entity or resource can't be
  2337  //   found.
  2338  //
  2339  //   * KMSOptInRequired
  2340  //   The AWS access key ID needs a subscription for the service.
  2341  //
  2342  //   * KMSThrottlingException
  2343  //   The request was denied due to request throttling. For more information about
  2344  //   throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
  2345  //   in the AWS Key Management Service Developer Guide.
  2346  //
  2347  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecord
  2348  func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) {
  2349  	req, out := c.PutRecordRequest(input)
  2350  	return out, req.Send()
  2351  }
  2352  
  2353  // PutRecordWithContext is the same as PutRecord with the addition of
  2354  // the ability to pass a context and additional request options.
  2355  //
  2356  // See PutRecord for details on how to use this API operation.
  2357  //
  2358  // The context must be non-nil and will be used for request cancellation. If
  2359  // the context is nil a panic will occur. In the future the SDK may create
  2360  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2361  // for more information on using Contexts.
  2362  func (c *Kinesis) PutRecordWithContext(ctx aws.Context, input *PutRecordInput, opts ...request.Option) (*PutRecordOutput, error) {
  2363  	req, out := c.PutRecordRequest(input)
  2364  	req.SetContext(ctx)
  2365  	req.ApplyOptions(opts...)
  2366  	return out, req.Send()
  2367  }
  2368  
  2369  const opPutRecords = "PutRecords"
  2370  
  2371  // PutRecordsRequest generates a "aws/request.Request" representing the
  2372  // client's request for the PutRecords operation. The "output" return
  2373  // value will be populated with the request's response once the request completes
  2374  // successfully.
  2375  //
  2376  // Use "Send" method on the returned Request to send the API call to the service.
  2377  // the "output" return value is not valid until after Send returns without error.
  2378  //
  2379  // See PutRecords for more information on using the PutRecords
  2380  // API call, and error handling.
  2381  //
  2382  // This method is useful when you want to inject custom logic or configuration
  2383  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2384  //
  2385  //
  2386  //    // Example sending a request using the PutRecordsRequest method.
  2387  //    req, resp := client.PutRecordsRequest(params)
  2388  //
  2389  //    err := req.Send()
  2390  //    if err == nil { // resp is now filled
  2391  //        fmt.Println(resp)
  2392  //    }
  2393  //
  2394  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords
  2395  func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *request.Request, output *PutRecordsOutput) {
  2396  	op := &request.Operation{
  2397  		Name:       opPutRecords,
  2398  		HTTPMethod: "POST",
  2399  		HTTPPath:   "/",
  2400  	}
  2401  
  2402  	if input == nil {
  2403  		input = &PutRecordsInput{}
  2404  	}
  2405  
  2406  	output = &PutRecordsOutput{}
  2407  	req = c.newRequest(op, input, output)
  2408  	return
  2409  }
  2410  
  2411  // PutRecords API operation for Amazon Kinesis.
  2412  //
  2413  // Writes multiple data records into a Kinesis data stream in a single call
  2414  // (also referred to as a PutRecords request). Use this operation to send data
  2415  // into the stream for data ingestion and processing.
  2416  //
  2417  // Each PutRecords request can support up to 500 records. Each record in the
  2418  // request can be as large as 1 MiB, up to a limit of 5 MiB for the entire request,
  2419  // including partition keys. Each shard can support writes up to 1,000 records
  2420  // per second, up to a maximum data write total of 1 MiB per second.
  2421  //
  2422  // You must specify the name of the stream that captures, stores, and transports
  2423  // the data; and an array of request Records, with each record in the array
  2424  // requiring a partition key and data blob. The record size limit applies to
  2425  // the total size of the partition key and data blob.
  2426  //
  2427  // The data blob can be any type of data; for example, a segment from a log
  2428  // file, geographic/location data, website clickstream data, and so on.
  2429  //
  2430  // The partition key is used by Kinesis Data Streams as input to a hash function
  2431  // that maps the partition key and associated data to a specific shard. An MD5
  2432  // hash function is used to map partition keys to 128-bit integer values and
  2433  // to map associated data records to shards. As a result of this hashing mechanism,
  2434  // all data records with the same partition key map to the same shard within
  2435  // the stream. For more information, see Adding Data to a Stream (https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream)
  2436  // in the Amazon Kinesis Data Streams Developer Guide.
  2437  //
  2438  // Each record in the Records array may include an optional parameter, ExplicitHashKey,
  2439  // which overrides the partition key to shard mapping. This parameter allows
  2440  // a data producer to determine explicitly the shard where the record is stored.
  2441  // For more information, see Adding Multiple Records with PutRecords (https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords)
  2442  // in the Amazon Kinesis Data Streams Developer Guide.
  2443  //
  2444  // The PutRecords response includes an array of response Records. Each record
  2445  // in the response array directly correlates with a record in the request array
  2446  // using natural ordering, from the top to the bottom of the request and response.
  2447  // The response Records array always includes the same number of records as
  2448  // the request array.
  2449  //
  2450  // The response Records array includes both successfully and unsuccessfully
  2451  // processed records. Kinesis Data Streams attempts to process all records in
  2452  // each PutRecords request. A single record failure does not stop the processing
  2453  // of subsequent records. As a result, PutRecords doesn't guarantee the ordering
  2454  // of records. If you need to read records in the same order they are written
  2455  // to the stream, use PutRecord instead of PutRecords, and write to the same
  2456  // shard.
  2457  //
  2458  // A successfully processed record includes ShardId and SequenceNumber values.
  2459  // The ShardId parameter identifies the shard in the stream where the record
  2460  // is stored. The SequenceNumber parameter is an identifier assigned to the
  2461  // put record, unique to all records in the stream.
  2462  //
  2463  // An unsuccessfully processed record includes ErrorCode and ErrorMessage values.
  2464  // ErrorCode reflects the type of error and can be one of the following values:
  2465  // ProvisionedThroughputExceededException or InternalFailure. ErrorMessage provides
  2466  // more detailed information about the ProvisionedThroughputExceededException
  2467  // exception including the account ID, stream name, and shard ID of the record
  2468  // that was throttled. For more information about partially successful responses,
  2469  // see Adding Multiple Records with PutRecords (https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords)
  2470  // in the Amazon Kinesis Data Streams Developer Guide.
  2471  //
  2472  // After you write a record to a stream, you cannot modify that record or its
  2473  // order within the stream.
  2474  //
  2475  // By default, data records are accessible for 24 hours from the time that they
  2476  // are added to a stream. You can use IncreaseStreamRetentionPeriod or DecreaseStreamRetentionPeriod
  2477  // to modify this retention period.
  2478  //
  2479  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2480  // with awserr.Error's Code and Message methods to get detailed information about
  2481  // the error.
  2482  //
  2483  // See the AWS API reference guide for Amazon Kinesis's
  2484  // API operation PutRecords for usage and error information.
  2485  //
  2486  // Returned Error Types:
  2487  //   * ResourceNotFoundException
  2488  //   The requested resource could not be found. The stream might not be specified
  2489  //   correctly.
  2490  //
  2491  //   * InvalidArgumentException
  2492  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2493  //   be used. For more information, see the returned message.
  2494  //
  2495  //   * ProvisionedThroughputExceededException
  2496  //   The request rate for the stream is too high, or the requested data is too
  2497  //   large for the available throughput. Reduce the frequency or size of your
  2498  //   requests. For more information, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  2499  //   in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and
  2500  //   Exponential Backoff in AWS (https://docs.aws.amazon.com/general/latest/gr/api-retries.html)
  2501  //   in the AWS General Reference.
  2502  //
  2503  //   * KMSDisabledException
  2504  //   The request was rejected because the specified customer master key (CMK)
  2505  //   isn't enabled.
  2506  //
  2507  //   * KMSInvalidStateException
  2508  //   The request was rejected because the state of the specified resource isn't
  2509  //   valid for this request. For more information, see How Key State Affects Use
  2510  //   of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
  2511  //   in the AWS Key Management Service Developer Guide.
  2512  //
  2513  //   * KMSAccessDeniedException
  2514  //   The ciphertext references a key that doesn't exist or that you don't have
  2515  //   access to.
  2516  //
  2517  //   * KMSNotFoundException
  2518  //   The request was rejected because the specified entity or resource can't be
  2519  //   found.
  2520  //
  2521  //   * KMSOptInRequired
  2522  //   The AWS access key ID needs a subscription for the service.
  2523  //
  2524  //   * KMSThrottlingException
  2525  //   The request was denied due to request throttling. For more information about
  2526  //   throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
  2527  //   in the AWS Key Management Service Developer Guide.
  2528  //
  2529  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/PutRecords
  2530  func (c *Kinesis) PutRecords(input *PutRecordsInput) (*PutRecordsOutput, error) {
  2531  	req, out := c.PutRecordsRequest(input)
  2532  	return out, req.Send()
  2533  }
  2534  
  2535  // PutRecordsWithContext is the same as PutRecords with the addition of
  2536  // the ability to pass a context and additional request options.
  2537  //
  2538  // See PutRecords for details on how to use this API operation.
  2539  //
  2540  // The context must be non-nil and will be used for request cancellation. If
  2541  // the context is nil a panic will occur. In the future the SDK may create
  2542  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2543  // for more information on using Contexts.
  2544  func (c *Kinesis) PutRecordsWithContext(ctx aws.Context, input *PutRecordsInput, opts ...request.Option) (*PutRecordsOutput, error) {
  2545  	req, out := c.PutRecordsRequest(input)
  2546  	req.SetContext(ctx)
  2547  	req.ApplyOptions(opts...)
  2548  	return out, req.Send()
  2549  }
  2550  
  2551  const opRegisterStreamConsumer = "RegisterStreamConsumer"
  2552  
  2553  // RegisterStreamConsumerRequest generates a "aws/request.Request" representing the
  2554  // client's request for the RegisterStreamConsumer operation. The "output" return
  2555  // value will be populated with the request's response once the request completes
  2556  // successfully.
  2557  //
  2558  // Use "Send" method on the returned Request to send the API call to the service.
  2559  // the "output" return value is not valid until after Send returns without error.
  2560  //
  2561  // See RegisterStreamConsumer for more information on using the RegisterStreamConsumer
  2562  // API call, and error handling.
  2563  //
  2564  // This method is useful when you want to inject custom logic or configuration
  2565  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2566  //
  2567  //
  2568  //    // Example sending a request using the RegisterStreamConsumerRequest method.
  2569  //    req, resp := client.RegisterStreamConsumerRequest(params)
  2570  //
  2571  //    err := req.Send()
  2572  //    if err == nil { // resp is now filled
  2573  //        fmt.Println(resp)
  2574  //    }
  2575  //
  2576  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer
  2577  func (c *Kinesis) RegisterStreamConsumerRequest(input *RegisterStreamConsumerInput) (req *request.Request, output *RegisterStreamConsumerOutput) {
  2578  	op := &request.Operation{
  2579  		Name:       opRegisterStreamConsumer,
  2580  		HTTPMethod: "POST",
  2581  		HTTPPath:   "/",
  2582  	}
  2583  
  2584  	if input == nil {
  2585  		input = &RegisterStreamConsumerInput{}
  2586  	}
  2587  
  2588  	output = &RegisterStreamConsumerOutput{}
  2589  	req = c.newRequest(op, input, output)
  2590  	return
  2591  }
  2592  
  2593  // RegisterStreamConsumer API operation for Amazon Kinesis.
  2594  //
  2595  // Registers a consumer with a Kinesis data stream. When you use this operation,
  2596  // the consumer you register can then call SubscribeToShard to receive data
  2597  // from the stream using enhanced fan-out, at a rate of up to 2 MiB per second
  2598  // for every shard you subscribe to. This rate is unaffected by the total number
  2599  // of consumers that read from the same stream.
  2600  //
  2601  // You can register up to 20 consumers per stream. A given consumer can only
  2602  // be registered with one stream at a time.
  2603  //
  2604  // For an example of how to use this operations, see Enhanced Fan-Out Using
  2605  // the Kinesis Data Streams API (/streams/latest/dev/building-enhanced-consumers-api.html).
  2606  //
  2607  // The use of this operation has a limit of five transactions per second per
  2608  // account. Also, only 5 consumers can be created simultaneously. In other words,
  2609  // you cannot have more than 5 consumers in a CREATING status at the same time.
  2610  // Registering a 6th consumer while there are 5 in a CREATING status results
  2611  // in a LimitExceededException.
  2612  //
  2613  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2614  // with awserr.Error's Code and Message methods to get detailed information about
  2615  // the error.
  2616  //
  2617  // See the AWS API reference guide for Amazon Kinesis's
  2618  // API operation RegisterStreamConsumer for usage and error information.
  2619  //
  2620  // Returned Error Types:
  2621  //   * InvalidArgumentException
  2622  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2623  //   be used. For more information, see the returned message.
  2624  //
  2625  //   * LimitExceededException
  2626  //   The requested resource exceeds the maximum number allowed, or the number
  2627  //   of concurrent stream requests exceeds the maximum number allowed.
  2628  //
  2629  //   * ResourceInUseException
  2630  //   The resource is not available for this operation. For successful operation,
  2631  //   the resource must be in the ACTIVE state.
  2632  //
  2633  //   * ResourceNotFoundException
  2634  //   The requested resource could not be found. The stream might not be specified
  2635  //   correctly.
  2636  //
  2637  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RegisterStreamConsumer
  2638  func (c *Kinesis) RegisterStreamConsumer(input *RegisterStreamConsumerInput) (*RegisterStreamConsumerOutput, error) {
  2639  	req, out := c.RegisterStreamConsumerRequest(input)
  2640  	return out, req.Send()
  2641  }
  2642  
  2643  // RegisterStreamConsumerWithContext is the same as RegisterStreamConsumer with the addition of
  2644  // the ability to pass a context and additional request options.
  2645  //
  2646  // See RegisterStreamConsumer for details on how to use this API operation.
  2647  //
  2648  // The context must be non-nil and will be used for request cancellation. If
  2649  // the context is nil a panic will occur. In the future the SDK may create
  2650  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2651  // for more information on using Contexts.
  2652  func (c *Kinesis) RegisterStreamConsumerWithContext(ctx aws.Context, input *RegisterStreamConsumerInput, opts ...request.Option) (*RegisterStreamConsumerOutput, error) {
  2653  	req, out := c.RegisterStreamConsumerRequest(input)
  2654  	req.SetContext(ctx)
  2655  	req.ApplyOptions(opts...)
  2656  	return out, req.Send()
  2657  }
  2658  
  2659  const opRemoveTagsFromStream = "RemoveTagsFromStream"
  2660  
  2661  // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the
  2662  // client's request for the RemoveTagsFromStream operation. The "output" return
  2663  // value will be populated with the request's response once the request completes
  2664  // successfully.
  2665  //
  2666  // Use "Send" method on the returned Request to send the API call to the service.
  2667  // the "output" return value is not valid until after Send returns without error.
  2668  //
  2669  // See RemoveTagsFromStream for more information on using the RemoveTagsFromStream
  2670  // API call, and error handling.
  2671  //
  2672  // This method is useful when you want to inject custom logic or configuration
  2673  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2674  //
  2675  //
  2676  //    // Example sending a request using the RemoveTagsFromStreamRequest method.
  2677  //    req, resp := client.RemoveTagsFromStreamRequest(params)
  2678  //
  2679  //    err := req.Send()
  2680  //    if err == nil { // resp is now filled
  2681  //        fmt.Println(resp)
  2682  //    }
  2683  //
  2684  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream
  2685  func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) (req *request.Request, output *RemoveTagsFromStreamOutput) {
  2686  	op := &request.Operation{
  2687  		Name:       opRemoveTagsFromStream,
  2688  		HTTPMethod: "POST",
  2689  		HTTPPath:   "/",
  2690  	}
  2691  
  2692  	if input == nil {
  2693  		input = &RemoveTagsFromStreamInput{}
  2694  	}
  2695  
  2696  	output = &RemoveTagsFromStreamOutput{}
  2697  	req = c.newRequest(op, input, output)
  2698  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2699  	return
  2700  }
  2701  
  2702  // RemoveTagsFromStream API operation for Amazon Kinesis.
  2703  //
  2704  // Removes tags from the specified Kinesis data stream. Removed tags are deleted
  2705  // and cannot be recovered after this operation successfully completes.
  2706  //
  2707  // If you specify a tag that does not exist, it is ignored.
  2708  //
  2709  // RemoveTagsFromStream has a limit of five transactions per second per account.
  2710  //
  2711  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2712  // with awserr.Error's Code and Message methods to get detailed information about
  2713  // the error.
  2714  //
  2715  // See the AWS API reference guide for Amazon Kinesis's
  2716  // API operation RemoveTagsFromStream for usage and error information.
  2717  //
  2718  // Returned Error Types:
  2719  //   * ResourceNotFoundException
  2720  //   The requested resource could not be found. The stream might not be specified
  2721  //   correctly.
  2722  //
  2723  //   * ResourceInUseException
  2724  //   The resource is not available for this operation. For successful operation,
  2725  //   the resource must be in the ACTIVE state.
  2726  //
  2727  //   * InvalidArgumentException
  2728  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2729  //   be used. For more information, see the returned message.
  2730  //
  2731  //   * LimitExceededException
  2732  //   The requested resource exceeds the maximum number allowed, or the number
  2733  //   of concurrent stream requests exceeds the maximum number allowed.
  2734  //
  2735  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/RemoveTagsFromStream
  2736  func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput) (*RemoveTagsFromStreamOutput, error) {
  2737  	req, out := c.RemoveTagsFromStreamRequest(input)
  2738  	return out, req.Send()
  2739  }
  2740  
  2741  // RemoveTagsFromStreamWithContext is the same as RemoveTagsFromStream with the addition of
  2742  // the ability to pass a context and additional request options.
  2743  //
  2744  // See RemoveTagsFromStream for details on how to use this API operation.
  2745  //
  2746  // The context must be non-nil and will be used for request cancellation. If
  2747  // the context is nil a panic will occur. In the future the SDK may create
  2748  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2749  // for more information on using Contexts.
  2750  func (c *Kinesis) RemoveTagsFromStreamWithContext(ctx aws.Context, input *RemoveTagsFromStreamInput, opts ...request.Option) (*RemoveTagsFromStreamOutput, error) {
  2751  	req, out := c.RemoveTagsFromStreamRequest(input)
  2752  	req.SetContext(ctx)
  2753  	req.ApplyOptions(opts...)
  2754  	return out, req.Send()
  2755  }
  2756  
  2757  const opSplitShard = "SplitShard"
  2758  
  2759  // SplitShardRequest generates a "aws/request.Request" representing the
  2760  // client's request for the SplitShard operation. The "output" return
  2761  // value will be populated with the request's response once the request completes
  2762  // successfully.
  2763  //
  2764  // Use "Send" method on the returned Request to send the API call to the service.
  2765  // the "output" return value is not valid until after Send returns without error.
  2766  //
  2767  // See SplitShard for more information on using the SplitShard
  2768  // API call, and error handling.
  2769  //
  2770  // This method is useful when you want to inject custom logic or configuration
  2771  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2772  //
  2773  //
  2774  //    // Example sending a request using the SplitShardRequest method.
  2775  //    req, resp := client.SplitShardRequest(params)
  2776  //
  2777  //    err := req.Send()
  2778  //    if err == nil { // resp is now filled
  2779  //        fmt.Println(resp)
  2780  //    }
  2781  //
  2782  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard
  2783  func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Request, output *SplitShardOutput) {
  2784  	op := &request.Operation{
  2785  		Name:       opSplitShard,
  2786  		HTTPMethod: "POST",
  2787  		HTTPPath:   "/",
  2788  	}
  2789  
  2790  	if input == nil {
  2791  		input = &SplitShardInput{}
  2792  	}
  2793  
  2794  	output = &SplitShardOutput{}
  2795  	req = c.newRequest(op, input, output)
  2796  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2797  	return
  2798  }
  2799  
  2800  // SplitShard API operation for Amazon Kinesis.
  2801  //
  2802  // Splits a shard into two new shards in the Kinesis data stream, to increase
  2803  // the stream's capacity to ingest and transport data. SplitShard is called
  2804  // when there is a need to increase the overall capacity of a stream because
  2805  // of an expected increase in the volume of data records being ingested.
  2806  //
  2807  // You can also use SplitShard when a shard appears to be approaching its maximum
  2808  // utilization; for example, the producers sending data into the specific shard
  2809  // are suddenly sending more than previously anticipated. You can also call
  2810  // SplitShard to increase stream capacity, so that more Kinesis Data Streams
  2811  // applications can simultaneously read data from the stream for real-time processing.
  2812  //
  2813  // You must specify the shard to be split and the new hash key, which is the
  2814  // position in the shard where the shard gets split in two. In many cases, the
  2815  // new hash key might be the average of the beginning and ending hash key, but
  2816  // it can be any hash key value in the range being mapped into the shard. For
  2817  // more information, see Split a Shard (https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html)
  2818  // in the Amazon Kinesis Data Streams Developer Guide.
  2819  //
  2820  // You can use DescribeStream to determine the shard ID and hash key values
  2821  // for the ShardToSplit and NewStartingHashKey parameters that are specified
  2822  // in the SplitShard request.
  2823  //
  2824  // SplitShard is an asynchronous operation. Upon receiving a SplitShard request,
  2825  // Kinesis Data Streams immediately returns a response and sets the stream status
  2826  // to UPDATING. After the operation is completed, Kinesis Data Streams sets
  2827  // the stream status to ACTIVE. Read and write operations continue to work while
  2828  // the stream is in the UPDATING state.
  2829  //
  2830  // You can use DescribeStream to check the status of the stream, which is returned
  2831  // in StreamStatus. If the stream is in the ACTIVE state, you can call SplitShard.
  2832  // If a stream is in CREATING or UPDATING or DELETING states, DescribeStream
  2833  // returns a ResourceInUseException.
  2834  //
  2835  // If the specified stream does not exist, DescribeStream returns a ResourceNotFoundException.
  2836  // If you try to create more shards than are authorized for your account, you
  2837  // receive a LimitExceededException.
  2838  //
  2839  // For the default shard limit for an AWS account, see Kinesis Data Streams
  2840  // Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  2841  // in the Amazon Kinesis Data Streams Developer Guide. To increase this limit,
  2842  // contact AWS Support (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).
  2843  //
  2844  // If you try to operate on too many streams simultaneously using CreateStream,
  2845  // DeleteStream, MergeShards, and/or SplitShard, you receive a LimitExceededException.
  2846  //
  2847  // SplitShard has a limit of five transactions per second per account.
  2848  //
  2849  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2850  // with awserr.Error's Code and Message methods to get detailed information about
  2851  // the error.
  2852  //
  2853  // See the AWS API reference guide for Amazon Kinesis's
  2854  // API operation SplitShard for usage and error information.
  2855  //
  2856  // Returned Error Types:
  2857  //   * ResourceNotFoundException
  2858  //   The requested resource could not be found. The stream might not be specified
  2859  //   correctly.
  2860  //
  2861  //   * ResourceInUseException
  2862  //   The resource is not available for this operation. For successful operation,
  2863  //   the resource must be in the ACTIVE state.
  2864  //
  2865  //   * InvalidArgumentException
  2866  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2867  //   be used. For more information, see the returned message.
  2868  //
  2869  //   * LimitExceededException
  2870  //   The requested resource exceeds the maximum number allowed, or the number
  2871  //   of concurrent stream requests exceeds the maximum number allowed.
  2872  //
  2873  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SplitShard
  2874  func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput, error) {
  2875  	req, out := c.SplitShardRequest(input)
  2876  	return out, req.Send()
  2877  }
  2878  
  2879  // SplitShardWithContext is the same as SplitShard with the addition of
  2880  // the ability to pass a context and additional request options.
  2881  //
  2882  // See SplitShard for details on how to use this API operation.
  2883  //
  2884  // The context must be non-nil and will be used for request cancellation. If
  2885  // the context is nil a panic will occur. In the future the SDK may create
  2886  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2887  // for more information on using Contexts.
  2888  func (c *Kinesis) SplitShardWithContext(ctx aws.Context, input *SplitShardInput, opts ...request.Option) (*SplitShardOutput, error) {
  2889  	req, out := c.SplitShardRequest(input)
  2890  	req.SetContext(ctx)
  2891  	req.ApplyOptions(opts...)
  2892  	return out, req.Send()
  2893  }
  2894  
  2895  const opStartStreamEncryption = "StartStreamEncryption"
  2896  
  2897  // StartStreamEncryptionRequest generates a "aws/request.Request" representing the
  2898  // client's request for the StartStreamEncryption operation. The "output" return
  2899  // value will be populated with the request's response once the request completes
  2900  // successfully.
  2901  //
  2902  // Use "Send" method on the returned Request to send the API call to the service.
  2903  // the "output" return value is not valid until after Send returns without error.
  2904  //
  2905  // See StartStreamEncryption for more information on using the StartStreamEncryption
  2906  // API call, and error handling.
  2907  //
  2908  // This method is useful when you want to inject custom logic or configuration
  2909  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2910  //
  2911  //
  2912  //    // Example sending a request using the StartStreamEncryptionRequest method.
  2913  //    req, resp := client.StartStreamEncryptionRequest(params)
  2914  //
  2915  //    err := req.Send()
  2916  //    if err == nil { // resp is now filled
  2917  //        fmt.Println(resp)
  2918  //    }
  2919  //
  2920  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption
  2921  func (c *Kinesis) StartStreamEncryptionRequest(input *StartStreamEncryptionInput) (req *request.Request, output *StartStreamEncryptionOutput) {
  2922  	op := &request.Operation{
  2923  		Name:       opStartStreamEncryption,
  2924  		HTTPMethod: "POST",
  2925  		HTTPPath:   "/",
  2926  	}
  2927  
  2928  	if input == nil {
  2929  		input = &StartStreamEncryptionInput{}
  2930  	}
  2931  
  2932  	output = &StartStreamEncryptionOutput{}
  2933  	req = c.newRequest(op, input, output)
  2934  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2935  	return
  2936  }
  2937  
  2938  // StartStreamEncryption API operation for Amazon Kinesis.
  2939  //
  2940  // Enables or updates server-side encryption using an AWS KMS key for a specified
  2941  // stream.
  2942  //
  2943  // Starting encryption is an asynchronous operation. Upon receiving the request,
  2944  // Kinesis Data Streams returns immediately and sets the status of the stream
  2945  // to UPDATING. After the update is complete, Kinesis Data Streams sets the
  2946  // status of the stream back to ACTIVE. Updating or applying encryption normally
  2947  // takes a few seconds to complete, but it can take minutes. You can continue
  2948  // to read and write data to your stream while its status is UPDATING. Once
  2949  // the status of the stream is ACTIVE, encryption begins for records written
  2950  // to the stream.
  2951  //
  2952  // API Limits: You can successfully apply a new AWS KMS key for server-side
  2953  // encryption 25 times in a rolling 24-hour period.
  2954  //
  2955  // Note: It can take up to 5 seconds after the stream is in an ACTIVE status
  2956  // before all records written to the stream are encrypted. After you enable
  2957  // encryption, you can verify that encryption is applied by inspecting the API
  2958  // response from PutRecord or PutRecords.
  2959  //
  2960  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2961  // with awserr.Error's Code and Message methods to get detailed information about
  2962  // the error.
  2963  //
  2964  // See the AWS API reference guide for Amazon Kinesis's
  2965  // API operation StartStreamEncryption for usage and error information.
  2966  //
  2967  // Returned Error Types:
  2968  //   * InvalidArgumentException
  2969  //   A specified parameter exceeds its restrictions, is not supported, or can't
  2970  //   be used. For more information, see the returned message.
  2971  //
  2972  //   * LimitExceededException
  2973  //   The requested resource exceeds the maximum number allowed, or the number
  2974  //   of concurrent stream requests exceeds the maximum number allowed.
  2975  //
  2976  //   * ResourceInUseException
  2977  //   The resource is not available for this operation. For successful operation,
  2978  //   the resource must be in the ACTIVE state.
  2979  //
  2980  //   * ResourceNotFoundException
  2981  //   The requested resource could not be found. The stream might not be specified
  2982  //   correctly.
  2983  //
  2984  //   * KMSDisabledException
  2985  //   The request was rejected because the specified customer master key (CMK)
  2986  //   isn't enabled.
  2987  //
  2988  //   * KMSInvalidStateException
  2989  //   The request was rejected because the state of the specified resource isn't
  2990  //   valid for this request. For more information, see How Key State Affects Use
  2991  //   of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
  2992  //   in the AWS Key Management Service Developer Guide.
  2993  //
  2994  //   * KMSAccessDeniedException
  2995  //   The ciphertext references a key that doesn't exist or that you don't have
  2996  //   access to.
  2997  //
  2998  //   * KMSNotFoundException
  2999  //   The request was rejected because the specified entity or resource can't be
  3000  //   found.
  3001  //
  3002  //   * KMSOptInRequired
  3003  //   The AWS access key ID needs a subscription for the service.
  3004  //
  3005  //   * KMSThrottlingException
  3006  //   The request was denied due to request throttling. For more information about
  3007  //   throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
  3008  //   in the AWS Key Management Service Developer Guide.
  3009  //
  3010  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StartStreamEncryption
  3011  func (c *Kinesis) StartStreamEncryption(input *StartStreamEncryptionInput) (*StartStreamEncryptionOutput, error) {
  3012  	req, out := c.StartStreamEncryptionRequest(input)
  3013  	return out, req.Send()
  3014  }
  3015  
  3016  // StartStreamEncryptionWithContext is the same as StartStreamEncryption with the addition of
  3017  // the ability to pass a context and additional request options.
  3018  //
  3019  // See StartStreamEncryption for details on how to use this API operation.
  3020  //
  3021  // The context must be non-nil and will be used for request cancellation. If
  3022  // the context is nil a panic will occur. In the future the SDK may create
  3023  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3024  // for more information on using Contexts.
  3025  func (c *Kinesis) StartStreamEncryptionWithContext(ctx aws.Context, input *StartStreamEncryptionInput, opts ...request.Option) (*StartStreamEncryptionOutput, error) {
  3026  	req, out := c.StartStreamEncryptionRequest(input)
  3027  	req.SetContext(ctx)
  3028  	req.ApplyOptions(opts...)
  3029  	return out, req.Send()
  3030  }
  3031  
  3032  const opStopStreamEncryption = "StopStreamEncryption"
  3033  
  3034  // StopStreamEncryptionRequest generates a "aws/request.Request" representing the
  3035  // client's request for the StopStreamEncryption operation. The "output" return
  3036  // value will be populated with the request's response once the request completes
  3037  // successfully.
  3038  //
  3039  // Use "Send" method on the returned Request to send the API call to the service.
  3040  // the "output" return value is not valid until after Send returns without error.
  3041  //
  3042  // See StopStreamEncryption for more information on using the StopStreamEncryption
  3043  // API call, and error handling.
  3044  //
  3045  // This method is useful when you want to inject custom logic or configuration
  3046  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3047  //
  3048  //
  3049  //    // Example sending a request using the StopStreamEncryptionRequest method.
  3050  //    req, resp := client.StopStreamEncryptionRequest(params)
  3051  //
  3052  //    err := req.Send()
  3053  //    if err == nil { // resp is now filled
  3054  //        fmt.Println(resp)
  3055  //    }
  3056  //
  3057  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption
  3058  func (c *Kinesis) StopStreamEncryptionRequest(input *StopStreamEncryptionInput) (req *request.Request, output *StopStreamEncryptionOutput) {
  3059  	op := &request.Operation{
  3060  		Name:       opStopStreamEncryption,
  3061  		HTTPMethod: "POST",
  3062  		HTTPPath:   "/",
  3063  	}
  3064  
  3065  	if input == nil {
  3066  		input = &StopStreamEncryptionInput{}
  3067  	}
  3068  
  3069  	output = &StopStreamEncryptionOutput{}
  3070  	req = c.newRequest(op, input, output)
  3071  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3072  	return
  3073  }
  3074  
  3075  // StopStreamEncryption API operation for Amazon Kinesis.
  3076  //
  3077  // Disables server-side encryption for a specified stream.
  3078  //
  3079  // Stopping encryption is an asynchronous operation. Upon receiving the request,
  3080  // Kinesis Data Streams returns immediately and sets the status of the stream
  3081  // to UPDATING. After the update is complete, Kinesis Data Streams sets the
  3082  // status of the stream back to ACTIVE. Stopping encryption normally takes a
  3083  // few seconds to complete, but it can take minutes. You can continue to read
  3084  // and write data to your stream while its status is UPDATING. Once the status
  3085  // of the stream is ACTIVE, records written to the stream are no longer encrypted
  3086  // by Kinesis Data Streams.
  3087  //
  3088  // API Limits: You can successfully disable server-side encryption 25 times
  3089  // in a rolling 24-hour period.
  3090  //
  3091  // Note: It can take up to 5 seconds after the stream is in an ACTIVE status
  3092  // before all records written to the stream are no longer subject to encryption.
  3093  // After you disabled encryption, you can verify that encryption is not applied
  3094  // by inspecting the API response from PutRecord or PutRecords.
  3095  //
  3096  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3097  // with awserr.Error's Code and Message methods to get detailed information about
  3098  // the error.
  3099  //
  3100  // See the AWS API reference guide for Amazon Kinesis's
  3101  // API operation StopStreamEncryption for usage and error information.
  3102  //
  3103  // Returned Error Types:
  3104  //   * InvalidArgumentException
  3105  //   A specified parameter exceeds its restrictions, is not supported, or can't
  3106  //   be used. For more information, see the returned message.
  3107  //
  3108  //   * LimitExceededException
  3109  //   The requested resource exceeds the maximum number allowed, or the number
  3110  //   of concurrent stream requests exceeds the maximum number allowed.
  3111  //
  3112  //   * ResourceInUseException
  3113  //   The resource is not available for this operation. For successful operation,
  3114  //   the resource must be in the ACTIVE state.
  3115  //
  3116  //   * ResourceNotFoundException
  3117  //   The requested resource could not be found. The stream might not be specified
  3118  //   correctly.
  3119  //
  3120  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/StopStreamEncryption
  3121  func (c *Kinesis) StopStreamEncryption(input *StopStreamEncryptionInput) (*StopStreamEncryptionOutput, error) {
  3122  	req, out := c.StopStreamEncryptionRequest(input)
  3123  	return out, req.Send()
  3124  }
  3125  
  3126  // StopStreamEncryptionWithContext is the same as StopStreamEncryption with the addition of
  3127  // the ability to pass a context and additional request options.
  3128  //
  3129  // See StopStreamEncryption for details on how to use this API operation.
  3130  //
  3131  // The context must be non-nil and will be used for request cancellation. If
  3132  // the context is nil a panic will occur. In the future the SDK may create
  3133  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3134  // for more information on using Contexts.
  3135  func (c *Kinesis) StopStreamEncryptionWithContext(ctx aws.Context, input *StopStreamEncryptionInput, opts ...request.Option) (*StopStreamEncryptionOutput, error) {
  3136  	req, out := c.StopStreamEncryptionRequest(input)
  3137  	req.SetContext(ctx)
  3138  	req.ApplyOptions(opts...)
  3139  	return out, req.Send()
  3140  }
  3141  
  3142  const opSubscribeToShard = "SubscribeToShard"
  3143  
  3144  // SubscribeToShardRequest generates a "aws/request.Request" representing the
  3145  // client's request for the SubscribeToShard operation. The "output" return
  3146  // value will be populated with the request's response once the request completes
  3147  // successfully.
  3148  //
  3149  // Use "Send" method on the returned Request to send the API call to the service.
  3150  // the "output" return value is not valid until after Send returns without error.
  3151  //
  3152  // See SubscribeToShard for more information on using the SubscribeToShard
  3153  // API call, and error handling.
  3154  //
  3155  // This method is useful when you want to inject custom logic or configuration
  3156  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3157  //
  3158  //
  3159  //    // Example sending a request using the SubscribeToShardRequest method.
  3160  //    req, resp := client.SubscribeToShardRequest(params)
  3161  //
  3162  //    err := req.Send()
  3163  //    if err == nil { // resp is now filled
  3164  //        fmt.Println(resp)
  3165  //    }
  3166  //
  3167  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SubscribeToShard
  3168  func (c *Kinesis) SubscribeToShardRequest(input *SubscribeToShardInput) (req *request.Request, output *SubscribeToShardOutput) {
  3169  	op := &request.Operation{
  3170  		Name:       opSubscribeToShard,
  3171  		HTTPMethod: "POST",
  3172  		HTTPPath:   "/",
  3173  	}
  3174  
  3175  	if input == nil {
  3176  		input = &SubscribeToShardInput{}
  3177  	}
  3178  
  3179  	output = &SubscribeToShardOutput{}
  3180  	req = c.newRequest(op, input, output)
  3181  
  3182  	es := NewSubscribeToShardEventStream()
  3183  	req.Handlers.Unmarshal.PushBack(es.setStreamCloser)
  3184  	output.EventStream = es
  3185  
  3186  	req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  3187  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler)
  3188  	req.Handlers.Unmarshal.PushBack(es.runOutputStream)
  3189  	es.output = output
  3190  	req.Handlers.Unmarshal.PushBack(es.recvInitialEvent)
  3191  	req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose)
  3192  	return
  3193  }
  3194  
  3195  // SubscribeToShard API operation for Amazon Kinesis.
  3196  //
  3197  // This operation establishes an HTTP/2 connection between the consumer you
  3198  // specify in the ConsumerARN parameter and the shard you specify in the ShardId
  3199  // parameter. After the connection is successfully established, Kinesis Data
  3200  // Streams pushes records from the shard to the consumer over this connection.
  3201  // Before you call this operation, call RegisterStreamConsumer to register the
  3202  // consumer with Kinesis Data Streams.
  3203  //
  3204  // When the SubscribeToShard call succeeds, your consumer starts receiving events
  3205  // of type SubscribeToShardEvent over the HTTP/2 connection for up to 5 minutes,
  3206  // after which time you need to call SubscribeToShard again to renew the subscription
  3207  // if you want to continue to receive records.
  3208  //
  3209  // You can make one call to SubscribeToShard per second per registered consumer
  3210  // per shard. For example, if you have a 4000 shard stream and two registered
  3211  // stream consumers, you can make one SubscribeToShard request per second for
  3212  // each combination of shard and registered consumer, allowing you to subscribe
  3213  // both consumers to all 4000 shards in one second.
  3214  //
  3215  // If you call SubscribeToShard again with the same ConsumerARN and ShardId
  3216  // within 5 seconds of a successful call, you'll get a ResourceInUseException.
  3217  // If you call SubscribeToShard 5 seconds or more after a successful call, the
  3218  // first connection will expire and the second call will take over the subscription.
  3219  //
  3220  // For an example of how to use this operations, see Enhanced Fan-Out Using
  3221  // the Kinesis Data Streams API (/streams/latest/dev/building-enhanced-consumers-api.html).
  3222  //
  3223  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3224  // with awserr.Error's Code and Message methods to get detailed information about
  3225  // the error.
  3226  //
  3227  // See the AWS API reference guide for Amazon Kinesis's
  3228  // API operation SubscribeToShard for usage and error information.
  3229  //
  3230  // Returned Error Types:
  3231  //   * ResourceNotFoundException
  3232  //   The requested resource could not be found. The stream might not be specified
  3233  //   correctly.
  3234  //
  3235  //   * InvalidArgumentException
  3236  //   A specified parameter exceeds its restrictions, is not supported, or can't
  3237  //   be used. For more information, see the returned message.
  3238  //
  3239  //   * ResourceInUseException
  3240  //   The resource is not available for this operation. For successful operation,
  3241  //   the resource must be in the ACTIVE state.
  3242  //
  3243  //   * LimitExceededException
  3244  //   The requested resource exceeds the maximum number allowed, or the number
  3245  //   of concurrent stream requests exceeds the maximum number allowed.
  3246  //
  3247  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SubscribeToShard
  3248  func (c *Kinesis) SubscribeToShard(input *SubscribeToShardInput) (*SubscribeToShardOutput, error) {
  3249  	req, out := c.SubscribeToShardRequest(input)
  3250  	return out, req.Send()
  3251  }
  3252  
  3253  // SubscribeToShardWithContext is the same as SubscribeToShard with the addition of
  3254  // the ability to pass a context and additional request options.
  3255  //
  3256  // See SubscribeToShard for details on how to use this API operation.
  3257  //
  3258  // The context must be non-nil and will be used for request cancellation. If
  3259  // the context is nil a panic will occur. In the future the SDK may create
  3260  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3261  // for more information on using Contexts.
  3262  func (c *Kinesis) SubscribeToShardWithContext(ctx aws.Context, input *SubscribeToShardInput, opts ...request.Option) (*SubscribeToShardOutput, error) {
  3263  	req, out := c.SubscribeToShardRequest(input)
  3264  	req.SetContext(ctx)
  3265  	req.ApplyOptions(opts...)
  3266  	return out, req.Send()
  3267  }
  3268  
  3269  var _ awserr.Error
  3270  
  3271  // SubscribeToShardEventStream provides the event stream handling for the SubscribeToShard.
  3272  //
  3273  // For testing and mocking the event stream this type should be initialized via
  3274  // the NewSubscribeToShardEventStream constructor function. Using the functional options
  3275  // to pass in nested mock behavior.
  3276  type SubscribeToShardEventStream struct {
  3277  
  3278  	// Reader is the EventStream reader for the SubscribeToShardEventStream
  3279  	// events. This value is automatically set by the SDK when the API call is made
  3280  	// Use this member when unit testing your code with the SDK to mock out the
  3281  	// EventStream Reader.
  3282  	//
  3283  	// Must not be nil.
  3284  	Reader SubscribeToShardEventStreamReader
  3285  
  3286  	outputReader io.ReadCloser
  3287  	output       *SubscribeToShardOutput
  3288  
  3289  	// StreamCloser is the io.Closer for the EventStream connection. For HTTP
  3290  	// EventStream this is the response Body. The stream will be closed when
  3291  	// the Close method of the EventStream is called.
  3292  	StreamCloser io.Closer
  3293  
  3294  	done      chan struct{}
  3295  	closeOnce sync.Once
  3296  	err       *eventstreamapi.OnceError
  3297  }
  3298  
  3299  // NewSubscribeToShardEventStream initializes an SubscribeToShardEventStream.
  3300  // This function should only be used for testing and mocking the SubscribeToShardEventStream
  3301  // stream within your application.
  3302  //
  3303  // The Reader member must be set before reading events from the stream.
  3304  //
  3305  // The StreamCloser member should be set to the underlying io.Closer,
  3306  // (e.g. http.Response.Body), that will be closed when the stream Close method
  3307  // is called.
  3308  //
  3309  //   es := NewSubscribeToShardEventStream(func(o *SubscribeToShardEventStream{
  3310  //       es.Reader = myMockStreamReader
  3311  //       es.StreamCloser = myMockStreamCloser
  3312  //   })
  3313  func NewSubscribeToShardEventStream(opts ...func(*SubscribeToShardEventStream)) *SubscribeToShardEventStream {
  3314  	es := &SubscribeToShardEventStream{
  3315  		done: make(chan struct{}),
  3316  		err:  eventstreamapi.NewOnceError(),
  3317  	}
  3318  
  3319  	for _, fn := range opts {
  3320  		fn(es)
  3321  	}
  3322  
  3323  	return es
  3324  }
  3325  
  3326  func (es *SubscribeToShardEventStream) setStreamCloser(r *request.Request) {
  3327  	es.StreamCloser = r.HTTPResponse.Body
  3328  }
  3329  
  3330  func (es *SubscribeToShardEventStream) runOnStreamPartClose(r *request.Request) {
  3331  	if es.done == nil {
  3332  		return
  3333  	}
  3334  	go es.waitStreamPartClose()
  3335  
  3336  }
  3337  
  3338  func (es *SubscribeToShardEventStream) waitStreamPartClose() {
  3339  	var outputErrCh <-chan struct{}
  3340  	if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok {
  3341  		outputErrCh = v.ErrorSet()
  3342  	}
  3343  	var outputClosedCh <-chan struct{}
  3344  	if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok {
  3345  		outputClosedCh = v.Closed()
  3346  	}
  3347  
  3348  	select {
  3349  	case <-es.done:
  3350  	case <-outputErrCh:
  3351  		es.err.SetError(es.Reader.Err())
  3352  		es.Close()
  3353  	case <-outputClosedCh:
  3354  		if err := es.Reader.Err(); err != nil {
  3355  			es.err.SetError(es.Reader.Err())
  3356  		}
  3357  		es.Close()
  3358  	}
  3359  }
  3360  
  3361  type eventTypeForSubscribeToShardEventStreamOutputEvent struct {
  3362  	unmarshalerForEvent func(string) (eventstreamapi.Unmarshaler, error)
  3363  	output              *SubscribeToShardOutput
  3364  }
  3365  
  3366  func (e eventTypeForSubscribeToShardEventStreamOutputEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) {
  3367  	if eventType == "initial-response" {
  3368  		return e.output, nil
  3369  	}
  3370  	return e.unmarshalerForEvent(eventType)
  3371  }
  3372  
  3373  // Events returns a channel to read events from.
  3374  //
  3375  // These events are:
  3376  //
  3377  //     * SubscribeToShardEvent
  3378  //     * SubscribeToShardEventStreamUnknownEvent
  3379  func (es *SubscribeToShardEventStream) Events() <-chan SubscribeToShardEventStreamEvent {
  3380  	return es.Reader.Events()
  3381  }
  3382  
  3383  func (es *SubscribeToShardEventStream) runOutputStream(r *request.Request) {
  3384  	var opts []func(*eventstream.Decoder)
  3385  	if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) {
  3386  		opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger))
  3387  	}
  3388  
  3389  	unmarshalerForEvent := unmarshalerForSubscribeToShardEventStreamEvent{
  3390  		metadata: protocol.ResponseMetadata{
  3391  			StatusCode: r.HTTPResponse.StatusCode,
  3392  			RequestID:  r.RequestID,
  3393  		},
  3394  	}.UnmarshalerForEventName
  3395  	unmarshalerForEvent = eventTypeForSubscribeToShardEventStreamOutputEvent{
  3396  		unmarshalerForEvent: unmarshalerForEvent,
  3397  		output:              es.output,
  3398  	}.UnmarshalerForEventName
  3399  
  3400  	decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...)
  3401  	eventReader := eventstreamapi.NewEventReader(decoder,
  3402  		protocol.HandlerPayloadUnmarshal{
  3403  			Unmarshalers: r.Handlers.UnmarshalStream,
  3404  		},
  3405  		unmarshalerForEvent,
  3406  	)
  3407  
  3408  	es.outputReader = r.HTTPResponse.Body
  3409  	es.Reader = newReadSubscribeToShardEventStream(eventReader)
  3410  }
  3411  func (es *SubscribeToShardEventStream) recvInitialEvent(r *request.Request) {
  3412  	// Wait for the initial response event, which must be the first
  3413  	// event to be received from the API.
  3414  	select {
  3415  	case event, ok := <-es.Events():
  3416  		if !ok {
  3417  			return
  3418  		}
  3419  
  3420  		v, ok := event.(*SubscribeToShardOutput)
  3421  		if !ok || v == nil {
  3422  			r.Error = awserr.New(
  3423  				request.ErrCodeSerialization,
  3424  				fmt.Sprintf("invalid event, %T, expect %T, %v",
  3425  					event, (*SubscribeToShardOutput)(nil), v),
  3426  				nil,
  3427  			)
  3428  			return
  3429  		}
  3430  
  3431  		*es.output = *v
  3432  		es.output.EventStream = es
  3433  	}
  3434  }
  3435  
  3436  // Close closes the stream. This will also cause the stream to be closed.
  3437  // Close must be called when done using the stream API. Not calling Close
  3438  // may result in resource leaks.
  3439  //
  3440  // You can use the closing of the Reader's Events channel to terminate your
  3441  // application's read from the API's stream.
  3442  //
  3443  func (es *SubscribeToShardEventStream) Close() (err error) {
  3444  	es.closeOnce.Do(es.safeClose)
  3445  	return es.Err()
  3446  }
  3447  
  3448  func (es *SubscribeToShardEventStream) safeClose() {
  3449  	if es.done != nil {
  3450  		close(es.done)
  3451  	}
  3452  
  3453  	es.Reader.Close()
  3454  	if es.outputReader != nil {
  3455  		es.outputReader.Close()
  3456  	}
  3457  
  3458  	es.StreamCloser.Close()
  3459  }
  3460  
  3461  // Err returns any error that occurred while reading or writing EventStream
  3462  // Events from the service API's response. Returns nil if there were no errors.
  3463  func (es *SubscribeToShardEventStream) Err() error {
  3464  	if err := es.err.Err(); err != nil {
  3465  		return err
  3466  	}
  3467  	if err := es.Reader.Err(); err != nil {
  3468  		return err
  3469  	}
  3470  
  3471  	return nil
  3472  }
  3473  
  3474  const opUpdateShardCount = "UpdateShardCount"
  3475  
  3476  // UpdateShardCountRequest generates a "aws/request.Request" representing the
  3477  // client's request for the UpdateShardCount operation. The "output" return
  3478  // value will be populated with the request's response once the request completes
  3479  // successfully.
  3480  //
  3481  // Use "Send" method on the returned Request to send the API call to the service.
  3482  // the "output" return value is not valid until after Send returns without error.
  3483  //
  3484  // See UpdateShardCount for more information on using the UpdateShardCount
  3485  // API call, and error handling.
  3486  //
  3487  // This method is useful when you want to inject custom logic or configuration
  3488  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3489  //
  3490  //
  3491  //    // Example sending a request using the UpdateShardCountRequest method.
  3492  //    req, resp := client.UpdateShardCountRequest(params)
  3493  //
  3494  //    err := req.Send()
  3495  //    if err == nil { // resp is now filled
  3496  //        fmt.Println(resp)
  3497  //    }
  3498  //
  3499  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount
  3500  func (c *Kinesis) UpdateShardCountRequest(input *UpdateShardCountInput) (req *request.Request, output *UpdateShardCountOutput) {
  3501  	op := &request.Operation{
  3502  		Name:       opUpdateShardCount,
  3503  		HTTPMethod: "POST",
  3504  		HTTPPath:   "/",
  3505  	}
  3506  
  3507  	if input == nil {
  3508  		input = &UpdateShardCountInput{}
  3509  	}
  3510  
  3511  	output = &UpdateShardCountOutput{}
  3512  	req = c.newRequest(op, input, output)
  3513  	return
  3514  }
  3515  
  3516  // UpdateShardCount API operation for Amazon Kinesis.
  3517  //
  3518  // Updates the shard count of the specified stream to the specified number of
  3519  // shards.
  3520  //
  3521  // Updating the shard count is an asynchronous operation. Upon receiving the
  3522  // request, Kinesis Data Streams returns immediately and sets the status of
  3523  // the stream to UPDATING. After the update is complete, Kinesis Data Streams
  3524  // sets the status of the stream back to ACTIVE. Depending on the size of the
  3525  // stream, the scaling action could take a few minutes to complete. You can
  3526  // continue to read and write data to your stream while its status is UPDATING.
  3527  //
  3528  // To update the shard count, Kinesis Data Streams performs splits or merges
  3529  // on individual shards. This can cause short-lived shards to be created, in
  3530  // addition to the final shards. These short-lived shards count towards your
  3531  // total shard limit for your account in the Region.
  3532  //
  3533  // When using this operation, we recommend that you specify a target shard count
  3534  // that is a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target
  3535  // value within your shard limit. However, if you specify a target that isn't
  3536  // a multiple of 25%, the scaling action might take longer to complete.
  3537  //
  3538  // This operation has the following default limits. By default, you cannot do
  3539  // the following:
  3540  //
  3541  //    * Scale more than ten times per rolling 24-hour period per stream
  3542  //
  3543  //    * Scale up to more than double your current shard count for a stream
  3544  //
  3545  //    * Scale down below half your current shard count for a stream
  3546  //
  3547  //    * Scale up to more than 500 shards in a stream
  3548  //
  3549  //    * Scale a stream with more than 500 shards down unless the result is less
  3550  //    than 500 shards
  3551  //
  3552  //    * Scale up to more than the shard limit for your account
  3553  //
  3554  // For the default limits for an AWS account, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  3555  // in the Amazon Kinesis Data Streams Developer Guide. To request an increase
  3556  // in the call rate limit, the shard limit for this API, or your overall shard
  3557  // limit, use the limits form (https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase&limitType=service-code-kinesis).
  3558  //
  3559  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3560  // with awserr.Error's Code and Message methods to get detailed information about
  3561  // the error.
  3562  //
  3563  // See the AWS API reference guide for Amazon Kinesis's
  3564  // API operation UpdateShardCount for usage and error information.
  3565  //
  3566  // Returned Error Types:
  3567  //   * InvalidArgumentException
  3568  //   A specified parameter exceeds its restrictions, is not supported, or can't
  3569  //   be used. For more information, see the returned message.
  3570  //
  3571  //   * LimitExceededException
  3572  //   The requested resource exceeds the maximum number allowed, or the number
  3573  //   of concurrent stream requests exceeds the maximum number allowed.
  3574  //
  3575  //   * ResourceInUseException
  3576  //   The resource is not available for this operation. For successful operation,
  3577  //   the resource must be in the ACTIVE state.
  3578  //
  3579  //   * ResourceNotFoundException
  3580  //   The requested resource could not be found. The stream might not be specified
  3581  //   correctly.
  3582  //
  3583  // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/UpdateShardCount
  3584  func (c *Kinesis) UpdateShardCount(input *UpdateShardCountInput) (*UpdateShardCountOutput, error) {
  3585  	req, out := c.UpdateShardCountRequest(input)
  3586  	return out, req.Send()
  3587  }
  3588  
  3589  // UpdateShardCountWithContext is the same as UpdateShardCount with the addition of
  3590  // the ability to pass a context and additional request options.
  3591  //
  3592  // See UpdateShardCount for details on how to use this API operation.
  3593  //
  3594  // The context must be non-nil and will be used for request cancellation. If
  3595  // the context is nil a panic will occur. In the future the SDK may create
  3596  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3597  // for more information on using Contexts.
  3598  func (c *Kinesis) UpdateShardCountWithContext(ctx aws.Context, input *UpdateShardCountInput, opts ...request.Option) (*UpdateShardCountOutput, error) {
  3599  	req, out := c.UpdateShardCountRequest(input)
  3600  	req.SetContext(ctx)
  3601  	req.ApplyOptions(opts...)
  3602  	return out, req.Send()
  3603  }
  3604  
  3605  // Represents the input for AddTagsToStream.
  3606  type AddTagsToStreamInput struct {
  3607  	_ struct{} `type:"structure"`
  3608  
  3609  	// The name of the stream.
  3610  	//
  3611  	// StreamName is a required field
  3612  	StreamName *string `min:"1" type:"string" required:"true"`
  3613  
  3614  	// A set of up to 10 key-value pairs to use to create the tags.
  3615  	//
  3616  	// Tags is a required field
  3617  	Tags map[string]*string `min:"1" type:"map" required:"true"`
  3618  }
  3619  
  3620  // String returns the string representation.
  3621  //
  3622  // API parameter values that are decorated as "sensitive" in the API will not
  3623  // be included in the string output. The member name will be present, but the
  3624  // value will be replaced with "sensitive".
  3625  func (s AddTagsToStreamInput) String() string {
  3626  	return awsutil.Prettify(s)
  3627  }
  3628  
  3629  // GoString returns the string representation.
  3630  //
  3631  // API parameter values that are decorated as "sensitive" in the API will not
  3632  // be included in the string output. The member name will be present, but the
  3633  // value will be replaced with "sensitive".
  3634  func (s AddTagsToStreamInput) GoString() string {
  3635  	return s.String()
  3636  }
  3637  
  3638  // Validate inspects the fields of the type to determine if they are valid.
  3639  func (s *AddTagsToStreamInput) Validate() error {
  3640  	invalidParams := request.ErrInvalidParams{Context: "AddTagsToStreamInput"}
  3641  	if s.StreamName == nil {
  3642  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  3643  	}
  3644  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  3645  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  3646  	}
  3647  	if s.Tags == nil {
  3648  		invalidParams.Add(request.NewErrParamRequired("Tags"))
  3649  	}
  3650  	if s.Tags != nil && len(s.Tags) < 1 {
  3651  		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3652  	}
  3653  
  3654  	if invalidParams.Len() > 0 {
  3655  		return invalidParams
  3656  	}
  3657  	return nil
  3658  }
  3659  
  3660  // SetStreamName sets the StreamName field's value.
  3661  func (s *AddTagsToStreamInput) SetStreamName(v string) *AddTagsToStreamInput {
  3662  	s.StreamName = &v
  3663  	return s
  3664  }
  3665  
  3666  // SetTags sets the Tags field's value.
  3667  func (s *AddTagsToStreamInput) SetTags(v map[string]*string) *AddTagsToStreamInput {
  3668  	s.Tags = v
  3669  	return s
  3670  }
  3671  
  3672  type AddTagsToStreamOutput struct {
  3673  	_ struct{} `type:"structure"`
  3674  }
  3675  
  3676  // String returns the string representation.
  3677  //
  3678  // API parameter values that are decorated as "sensitive" in the API will not
  3679  // be included in the string output. The member name will be present, but the
  3680  // value will be replaced with "sensitive".
  3681  func (s AddTagsToStreamOutput) String() string {
  3682  	return awsutil.Prettify(s)
  3683  }
  3684  
  3685  // GoString returns the string representation.
  3686  //
  3687  // API parameter values that are decorated as "sensitive" in the API will not
  3688  // be included in the string output. The member name will be present, but the
  3689  // value will be replaced with "sensitive".
  3690  func (s AddTagsToStreamOutput) GoString() string {
  3691  	return s.String()
  3692  }
  3693  
  3694  type ChildShard struct {
  3695  	_ struct{} `type:"structure"`
  3696  
  3697  	// The range of possible hash key values for the shard, which is a set of ordered
  3698  	// contiguous positive integers.
  3699  	//
  3700  	// HashKeyRange is a required field
  3701  	HashKeyRange *HashKeyRange `type:"structure" required:"true"`
  3702  
  3703  	// ParentShards is a required field
  3704  	ParentShards []*string `type:"list" required:"true"`
  3705  
  3706  	// ShardId is a required field
  3707  	ShardId *string `min:"1" type:"string" required:"true"`
  3708  }
  3709  
  3710  // String returns the string representation.
  3711  //
  3712  // API parameter values that are decorated as "sensitive" in the API will not
  3713  // be included in the string output. The member name will be present, but the
  3714  // value will be replaced with "sensitive".
  3715  func (s ChildShard) String() string {
  3716  	return awsutil.Prettify(s)
  3717  }
  3718  
  3719  // GoString returns the string representation.
  3720  //
  3721  // API parameter values that are decorated as "sensitive" in the API will not
  3722  // be included in the string output. The member name will be present, but the
  3723  // value will be replaced with "sensitive".
  3724  func (s ChildShard) GoString() string {
  3725  	return s.String()
  3726  }
  3727  
  3728  // SetHashKeyRange sets the HashKeyRange field's value.
  3729  func (s *ChildShard) SetHashKeyRange(v *HashKeyRange) *ChildShard {
  3730  	s.HashKeyRange = v
  3731  	return s
  3732  }
  3733  
  3734  // SetParentShards sets the ParentShards field's value.
  3735  func (s *ChildShard) SetParentShards(v []*string) *ChildShard {
  3736  	s.ParentShards = v
  3737  	return s
  3738  }
  3739  
  3740  // SetShardId sets the ShardId field's value.
  3741  func (s *ChildShard) SetShardId(v string) *ChildShard {
  3742  	s.ShardId = &v
  3743  	return s
  3744  }
  3745  
  3746  // An object that represents the details of the consumer you registered. This
  3747  // type of object is returned by RegisterStreamConsumer.
  3748  type Consumer struct {
  3749  	_ struct{} `type:"structure"`
  3750  
  3751  	// When you register a consumer, Kinesis Data Streams generates an ARN for it.
  3752  	// You need this ARN to be able to call SubscribeToShard.
  3753  	//
  3754  	// If you delete a consumer and then create a new one with the same name, it
  3755  	// won't have the same ARN. That's because consumer ARNs contain the creation
  3756  	// timestamp. This is important to keep in mind if you have IAM policies that
  3757  	// reference consumer ARNs.
  3758  	//
  3759  	// ConsumerARN is a required field
  3760  	ConsumerARN *string `min:"1" type:"string" required:"true"`
  3761  
  3762  	// ConsumerCreationTimestamp is a required field
  3763  	ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"`
  3764  
  3765  	// The name of the consumer is something you choose when you register the consumer.
  3766  	//
  3767  	// ConsumerName is a required field
  3768  	ConsumerName *string `min:"1" type:"string" required:"true"`
  3769  
  3770  	// A consumer can't read data while in the CREATING or DELETING states.
  3771  	//
  3772  	// ConsumerStatus is a required field
  3773  	ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"`
  3774  }
  3775  
  3776  // String returns the string representation.
  3777  //
  3778  // API parameter values that are decorated as "sensitive" in the API will not
  3779  // be included in the string output. The member name will be present, but the
  3780  // value will be replaced with "sensitive".
  3781  func (s Consumer) String() string {
  3782  	return awsutil.Prettify(s)
  3783  }
  3784  
  3785  // GoString returns the string representation.
  3786  //
  3787  // API parameter values that are decorated as "sensitive" in the API will not
  3788  // be included in the string output. The member name will be present, but the
  3789  // value will be replaced with "sensitive".
  3790  func (s Consumer) GoString() string {
  3791  	return s.String()
  3792  }
  3793  
  3794  // SetConsumerARN sets the ConsumerARN field's value.
  3795  func (s *Consumer) SetConsumerARN(v string) *Consumer {
  3796  	s.ConsumerARN = &v
  3797  	return s
  3798  }
  3799  
  3800  // SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value.
  3801  func (s *Consumer) SetConsumerCreationTimestamp(v time.Time) *Consumer {
  3802  	s.ConsumerCreationTimestamp = &v
  3803  	return s
  3804  }
  3805  
  3806  // SetConsumerName sets the ConsumerName field's value.
  3807  func (s *Consumer) SetConsumerName(v string) *Consumer {
  3808  	s.ConsumerName = &v
  3809  	return s
  3810  }
  3811  
  3812  // SetConsumerStatus sets the ConsumerStatus field's value.
  3813  func (s *Consumer) SetConsumerStatus(v string) *Consumer {
  3814  	s.ConsumerStatus = &v
  3815  	return s
  3816  }
  3817  
  3818  // An object that represents the details of a registered consumer. This type
  3819  // of object is returned by DescribeStreamConsumer.
  3820  type ConsumerDescription struct {
  3821  	_ struct{} `type:"structure"`
  3822  
  3823  	// When you register a consumer, Kinesis Data Streams generates an ARN for it.
  3824  	// You need this ARN to be able to call SubscribeToShard.
  3825  	//
  3826  	// If you delete a consumer and then create a new one with the same name, it
  3827  	// won't have the same ARN. That's because consumer ARNs contain the creation
  3828  	// timestamp. This is important to keep in mind if you have IAM policies that
  3829  	// reference consumer ARNs.
  3830  	//
  3831  	// ConsumerARN is a required field
  3832  	ConsumerARN *string `min:"1" type:"string" required:"true"`
  3833  
  3834  	// ConsumerCreationTimestamp is a required field
  3835  	ConsumerCreationTimestamp *time.Time `type:"timestamp" required:"true"`
  3836  
  3837  	// The name of the consumer is something you choose when you register the consumer.
  3838  	//
  3839  	// ConsumerName is a required field
  3840  	ConsumerName *string `min:"1" type:"string" required:"true"`
  3841  
  3842  	// A consumer can't read data while in the CREATING or DELETING states.
  3843  	//
  3844  	// ConsumerStatus is a required field
  3845  	ConsumerStatus *string `type:"string" required:"true" enum:"ConsumerStatus"`
  3846  
  3847  	// The ARN of the stream with which you registered the consumer.
  3848  	//
  3849  	// StreamARN is a required field
  3850  	StreamARN *string `min:"1" type:"string" required:"true"`
  3851  }
  3852  
  3853  // String returns the string representation.
  3854  //
  3855  // API parameter values that are decorated as "sensitive" in the API will not
  3856  // be included in the string output. The member name will be present, but the
  3857  // value will be replaced with "sensitive".
  3858  func (s ConsumerDescription) String() string {
  3859  	return awsutil.Prettify(s)
  3860  }
  3861  
  3862  // GoString returns the string representation.
  3863  //
  3864  // API parameter values that are decorated as "sensitive" in the API will not
  3865  // be included in the string output. The member name will be present, but the
  3866  // value will be replaced with "sensitive".
  3867  func (s ConsumerDescription) GoString() string {
  3868  	return s.String()
  3869  }
  3870  
  3871  // SetConsumerARN sets the ConsumerARN field's value.
  3872  func (s *ConsumerDescription) SetConsumerARN(v string) *ConsumerDescription {
  3873  	s.ConsumerARN = &v
  3874  	return s
  3875  }
  3876  
  3877  // SetConsumerCreationTimestamp sets the ConsumerCreationTimestamp field's value.
  3878  func (s *ConsumerDescription) SetConsumerCreationTimestamp(v time.Time) *ConsumerDescription {
  3879  	s.ConsumerCreationTimestamp = &v
  3880  	return s
  3881  }
  3882  
  3883  // SetConsumerName sets the ConsumerName field's value.
  3884  func (s *ConsumerDescription) SetConsumerName(v string) *ConsumerDescription {
  3885  	s.ConsumerName = &v
  3886  	return s
  3887  }
  3888  
  3889  // SetConsumerStatus sets the ConsumerStatus field's value.
  3890  func (s *ConsumerDescription) SetConsumerStatus(v string) *ConsumerDescription {
  3891  	s.ConsumerStatus = &v
  3892  	return s
  3893  }
  3894  
  3895  // SetStreamARN sets the StreamARN field's value.
  3896  func (s *ConsumerDescription) SetStreamARN(v string) *ConsumerDescription {
  3897  	s.StreamARN = &v
  3898  	return s
  3899  }
  3900  
  3901  // Represents the input for CreateStream.
  3902  type CreateStreamInput struct {
  3903  	_ struct{} `type:"structure"`
  3904  
  3905  	// The number of shards that the stream will use. The throughput of the stream
  3906  	// is a function of the number of shards; more shards are required for greater
  3907  	// provisioned throughput.
  3908  	//
  3909  	// ShardCount is a required field
  3910  	ShardCount *int64 `min:"1" type:"integer" required:"true"`
  3911  
  3912  	// A name to identify the stream. The stream name is scoped to the AWS account
  3913  	// used by the application that creates the stream. It is also scoped by AWS
  3914  	// Region. That is, two streams in two different AWS accounts can have the same
  3915  	// name. Two streams in the same AWS account but in two different Regions can
  3916  	// also have the same name.
  3917  	//
  3918  	// StreamName is a required field
  3919  	StreamName *string `min:"1" type:"string" required:"true"`
  3920  }
  3921  
  3922  // String returns the string representation.
  3923  //
  3924  // API parameter values that are decorated as "sensitive" in the API will not
  3925  // be included in the string output. The member name will be present, but the
  3926  // value will be replaced with "sensitive".
  3927  func (s CreateStreamInput) String() string {
  3928  	return awsutil.Prettify(s)
  3929  }
  3930  
  3931  // GoString returns the string representation.
  3932  //
  3933  // API parameter values that are decorated as "sensitive" in the API will not
  3934  // be included in the string output. The member name will be present, but the
  3935  // value will be replaced with "sensitive".
  3936  func (s CreateStreamInput) GoString() string {
  3937  	return s.String()
  3938  }
  3939  
  3940  // Validate inspects the fields of the type to determine if they are valid.
  3941  func (s *CreateStreamInput) Validate() error {
  3942  	invalidParams := request.ErrInvalidParams{Context: "CreateStreamInput"}
  3943  	if s.ShardCount == nil {
  3944  		invalidParams.Add(request.NewErrParamRequired("ShardCount"))
  3945  	}
  3946  	if s.ShardCount != nil && *s.ShardCount < 1 {
  3947  		invalidParams.Add(request.NewErrParamMinValue("ShardCount", 1))
  3948  	}
  3949  	if s.StreamName == nil {
  3950  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  3951  	}
  3952  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  3953  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  3954  	}
  3955  
  3956  	if invalidParams.Len() > 0 {
  3957  		return invalidParams
  3958  	}
  3959  	return nil
  3960  }
  3961  
  3962  // SetShardCount sets the ShardCount field's value.
  3963  func (s *CreateStreamInput) SetShardCount(v int64) *CreateStreamInput {
  3964  	s.ShardCount = &v
  3965  	return s
  3966  }
  3967  
  3968  // SetStreamName sets the StreamName field's value.
  3969  func (s *CreateStreamInput) SetStreamName(v string) *CreateStreamInput {
  3970  	s.StreamName = &v
  3971  	return s
  3972  }
  3973  
  3974  type CreateStreamOutput struct {
  3975  	_ struct{} `type:"structure"`
  3976  }
  3977  
  3978  // String returns the string representation.
  3979  //
  3980  // API parameter values that are decorated as "sensitive" in the API will not
  3981  // be included in the string output. The member name will be present, but the
  3982  // value will be replaced with "sensitive".
  3983  func (s CreateStreamOutput) String() string {
  3984  	return awsutil.Prettify(s)
  3985  }
  3986  
  3987  // GoString returns the string representation.
  3988  //
  3989  // API parameter values that are decorated as "sensitive" in the API will not
  3990  // be included in the string output. The member name will be present, but the
  3991  // value will be replaced with "sensitive".
  3992  func (s CreateStreamOutput) GoString() string {
  3993  	return s.String()
  3994  }
  3995  
  3996  // Represents the input for DecreaseStreamRetentionPeriod.
  3997  type DecreaseStreamRetentionPeriodInput struct {
  3998  	_ struct{} `type:"structure"`
  3999  
  4000  	// The new retention period of the stream, in hours. Must be less than the current
  4001  	// retention period.
  4002  	//
  4003  	// RetentionPeriodHours is a required field
  4004  	RetentionPeriodHours *int64 `type:"integer" required:"true"`
  4005  
  4006  	// The name of the stream to modify.
  4007  	//
  4008  	// StreamName is a required field
  4009  	StreamName *string `min:"1" type:"string" required:"true"`
  4010  }
  4011  
  4012  // String returns the string representation.
  4013  //
  4014  // API parameter values that are decorated as "sensitive" in the API will not
  4015  // be included in the string output. The member name will be present, but the
  4016  // value will be replaced with "sensitive".
  4017  func (s DecreaseStreamRetentionPeriodInput) String() string {
  4018  	return awsutil.Prettify(s)
  4019  }
  4020  
  4021  // GoString returns the string representation.
  4022  //
  4023  // API parameter values that are decorated as "sensitive" in the API will not
  4024  // be included in the string output. The member name will be present, but the
  4025  // value will be replaced with "sensitive".
  4026  func (s DecreaseStreamRetentionPeriodInput) GoString() string {
  4027  	return s.String()
  4028  }
  4029  
  4030  // Validate inspects the fields of the type to determine if they are valid.
  4031  func (s *DecreaseStreamRetentionPeriodInput) Validate() error {
  4032  	invalidParams := request.ErrInvalidParams{Context: "DecreaseStreamRetentionPeriodInput"}
  4033  	if s.RetentionPeriodHours == nil {
  4034  		invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
  4035  	}
  4036  	if s.StreamName == nil {
  4037  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4038  	}
  4039  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4040  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4041  	}
  4042  
  4043  	if invalidParams.Len() > 0 {
  4044  		return invalidParams
  4045  	}
  4046  	return nil
  4047  }
  4048  
  4049  // SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
  4050  func (s *DecreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *DecreaseStreamRetentionPeriodInput {
  4051  	s.RetentionPeriodHours = &v
  4052  	return s
  4053  }
  4054  
  4055  // SetStreamName sets the StreamName field's value.
  4056  func (s *DecreaseStreamRetentionPeriodInput) SetStreamName(v string) *DecreaseStreamRetentionPeriodInput {
  4057  	s.StreamName = &v
  4058  	return s
  4059  }
  4060  
  4061  type DecreaseStreamRetentionPeriodOutput struct {
  4062  	_ struct{} `type:"structure"`
  4063  }
  4064  
  4065  // String returns the string representation.
  4066  //
  4067  // API parameter values that are decorated as "sensitive" in the API will not
  4068  // be included in the string output. The member name will be present, but the
  4069  // value will be replaced with "sensitive".
  4070  func (s DecreaseStreamRetentionPeriodOutput) String() string {
  4071  	return awsutil.Prettify(s)
  4072  }
  4073  
  4074  // GoString returns the string representation.
  4075  //
  4076  // API parameter values that are decorated as "sensitive" in the API will not
  4077  // be included in the string output. The member name will be present, but the
  4078  // value will be replaced with "sensitive".
  4079  func (s DecreaseStreamRetentionPeriodOutput) GoString() string {
  4080  	return s.String()
  4081  }
  4082  
  4083  // Represents the input for DeleteStream.
  4084  type DeleteStreamInput struct {
  4085  	_ struct{} `type:"structure"`
  4086  
  4087  	// If this parameter is unset (null) or if you set it to false, and the stream
  4088  	// has registered consumers, the call to DeleteStream fails with a ResourceInUseException.
  4089  	EnforceConsumerDeletion *bool `type:"boolean"`
  4090  
  4091  	// The name of the stream to delete.
  4092  	//
  4093  	// StreamName is a required field
  4094  	StreamName *string `min:"1" type:"string" required:"true"`
  4095  }
  4096  
  4097  // String returns the string representation.
  4098  //
  4099  // API parameter values that are decorated as "sensitive" in the API will not
  4100  // be included in the string output. The member name will be present, but the
  4101  // value will be replaced with "sensitive".
  4102  func (s DeleteStreamInput) String() string {
  4103  	return awsutil.Prettify(s)
  4104  }
  4105  
  4106  // GoString returns the string representation.
  4107  //
  4108  // API parameter values that are decorated as "sensitive" in the API will not
  4109  // be included in the string output. The member name will be present, but the
  4110  // value will be replaced with "sensitive".
  4111  func (s DeleteStreamInput) GoString() string {
  4112  	return s.String()
  4113  }
  4114  
  4115  // Validate inspects the fields of the type to determine if they are valid.
  4116  func (s *DeleteStreamInput) Validate() error {
  4117  	invalidParams := request.ErrInvalidParams{Context: "DeleteStreamInput"}
  4118  	if s.StreamName == nil {
  4119  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4120  	}
  4121  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4122  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4123  	}
  4124  
  4125  	if invalidParams.Len() > 0 {
  4126  		return invalidParams
  4127  	}
  4128  	return nil
  4129  }
  4130  
  4131  // SetEnforceConsumerDeletion sets the EnforceConsumerDeletion field's value.
  4132  func (s *DeleteStreamInput) SetEnforceConsumerDeletion(v bool) *DeleteStreamInput {
  4133  	s.EnforceConsumerDeletion = &v
  4134  	return s
  4135  }
  4136  
  4137  // SetStreamName sets the StreamName field's value.
  4138  func (s *DeleteStreamInput) SetStreamName(v string) *DeleteStreamInput {
  4139  	s.StreamName = &v
  4140  	return s
  4141  }
  4142  
  4143  type DeleteStreamOutput struct {
  4144  	_ struct{} `type:"structure"`
  4145  }
  4146  
  4147  // String returns the string representation.
  4148  //
  4149  // API parameter values that are decorated as "sensitive" in the API will not
  4150  // be included in the string output. The member name will be present, but the
  4151  // value will be replaced with "sensitive".
  4152  func (s DeleteStreamOutput) String() string {
  4153  	return awsutil.Prettify(s)
  4154  }
  4155  
  4156  // GoString returns the string representation.
  4157  //
  4158  // API parameter values that are decorated as "sensitive" in the API will not
  4159  // be included in the string output. The member name will be present, but the
  4160  // value will be replaced with "sensitive".
  4161  func (s DeleteStreamOutput) GoString() string {
  4162  	return s.String()
  4163  }
  4164  
  4165  type DeregisterStreamConsumerInput struct {
  4166  	_ struct{} `type:"structure"`
  4167  
  4168  	// The ARN returned by Kinesis Data Streams when you registered the consumer.
  4169  	// If you don't know the ARN of the consumer that you want to deregister, you
  4170  	// can use the ListStreamConsumers operation to get a list of the descriptions
  4171  	// of all the consumers that are currently registered with a given data stream.
  4172  	// The description of a consumer contains its ARN.
  4173  	ConsumerARN *string `min:"1" type:"string"`
  4174  
  4175  	// The name that you gave to the consumer.
  4176  	ConsumerName *string `min:"1" type:"string"`
  4177  
  4178  	// The ARN of the Kinesis data stream that the consumer is registered with.
  4179  	// For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces
  4180  	// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams).
  4181  	StreamARN *string `min:"1" type:"string"`
  4182  }
  4183  
  4184  // String returns the string representation.
  4185  //
  4186  // API parameter values that are decorated as "sensitive" in the API will not
  4187  // be included in the string output. The member name will be present, but the
  4188  // value will be replaced with "sensitive".
  4189  func (s DeregisterStreamConsumerInput) String() string {
  4190  	return awsutil.Prettify(s)
  4191  }
  4192  
  4193  // GoString returns the string representation.
  4194  //
  4195  // API parameter values that are decorated as "sensitive" in the API will not
  4196  // be included in the string output. The member name will be present, but the
  4197  // value will be replaced with "sensitive".
  4198  func (s DeregisterStreamConsumerInput) GoString() string {
  4199  	return s.String()
  4200  }
  4201  
  4202  // Validate inspects the fields of the type to determine if they are valid.
  4203  func (s *DeregisterStreamConsumerInput) Validate() error {
  4204  	invalidParams := request.ErrInvalidParams{Context: "DeregisterStreamConsumerInput"}
  4205  	if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 {
  4206  		invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1))
  4207  	}
  4208  	if s.ConsumerName != nil && len(*s.ConsumerName) < 1 {
  4209  		invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1))
  4210  	}
  4211  	if s.StreamARN != nil && len(*s.StreamARN) < 1 {
  4212  		invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1))
  4213  	}
  4214  
  4215  	if invalidParams.Len() > 0 {
  4216  		return invalidParams
  4217  	}
  4218  	return nil
  4219  }
  4220  
  4221  // SetConsumerARN sets the ConsumerARN field's value.
  4222  func (s *DeregisterStreamConsumerInput) SetConsumerARN(v string) *DeregisterStreamConsumerInput {
  4223  	s.ConsumerARN = &v
  4224  	return s
  4225  }
  4226  
  4227  // SetConsumerName sets the ConsumerName field's value.
  4228  func (s *DeregisterStreamConsumerInput) SetConsumerName(v string) *DeregisterStreamConsumerInput {
  4229  	s.ConsumerName = &v
  4230  	return s
  4231  }
  4232  
  4233  // SetStreamARN sets the StreamARN field's value.
  4234  func (s *DeregisterStreamConsumerInput) SetStreamARN(v string) *DeregisterStreamConsumerInput {
  4235  	s.StreamARN = &v
  4236  	return s
  4237  }
  4238  
  4239  type DeregisterStreamConsumerOutput struct {
  4240  	_ struct{} `type:"structure"`
  4241  }
  4242  
  4243  // String returns the string representation.
  4244  //
  4245  // API parameter values that are decorated as "sensitive" in the API will not
  4246  // be included in the string output. The member name will be present, but the
  4247  // value will be replaced with "sensitive".
  4248  func (s DeregisterStreamConsumerOutput) String() string {
  4249  	return awsutil.Prettify(s)
  4250  }
  4251  
  4252  // GoString returns the string representation.
  4253  //
  4254  // API parameter values that are decorated as "sensitive" in the API will not
  4255  // be included in the string output. The member name will be present, but the
  4256  // value will be replaced with "sensitive".
  4257  func (s DeregisterStreamConsumerOutput) GoString() string {
  4258  	return s.String()
  4259  }
  4260  
  4261  type DescribeLimitsInput struct {
  4262  	_ struct{} `type:"structure"`
  4263  }
  4264  
  4265  // String returns the string representation.
  4266  //
  4267  // API parameter values that are decorated as "sensitive" in the API will not
  4268  // be included in the string output. The member name will be present, but the
  4269  // value will be replaced with "sensitive".
  4270  func (s DescribeLimitsInput) String() string {
  4271  	return awsutil.Prettify(s)
  4272  }
  4273  
  4274  // GoString returns the string representation.
  4275  //
  4276  // API parameter values that are decorated as "sensitive" in the API will not
  4277  // be included in the string output. The member name will be present, but the
  4278  // value will be replaced with "sensitive".
  4279  func (s DescribeLimitsInput) GoString() string {
  4280  	return s.String()
  4281  }
  4282  
  4283  type DescribeLimitsOutput struct {
  4284  	_ struct{} `type:"structure"`
  4285  
  4286  	// The number of open shards.
  4287  	//
  4288  	// OpenShardCount is a required field
  4289  	OpenShardCount *int64 `type:"integer" required:"true"`
  4290  
  4291  	// The maximum number of shards.
  4292  	//
  4293  	// ShardLimit is a required field
  4294  	ShardLimit *int64 `type:"integer" required:"true"`
  4295  }
  4296  
  4297  // String returns the string representation.
  4298  //
  4299  // API parameter values that are decorated as "sensitive" in the API will not
  4300  // be included in the string output. The member name will be present, but the
  4301  // value will be replaced with "sensitive".
  4302  func (s DescribeLimitsOutput) String() string {
  4303  	return awsutil.Prettify(s)
  4304  }
  4305  
  4306  // GoString returns the string representation.
  4307  //
  4308  // API parameter values that are decorated as "sensitive" in the API will not
  4309  // be included in the string output. The member name will be present, but the
  4310  // value will be replaced with "sensitive".
  4311  func (s DescribeLimitsOutput) GoString() string {
  4312  	return s.String()
  4313  }
  4314  
  4315  // SetOpenShardCount sets the OpenShardCount field's value.
  4316  func (s *DescribeLimitsOutput) SetOpenShardCount(v int64) *DescribeLimitsOutput {
  4317  	s.OpenShardCount = &v
  4318  	return s
  4319  }
  4320  
  4321  // SetShardLimit sets the ShardLimit field's value.
  4322  func (s *DescribeLimitsOutput) SetShardLimit(v int64) *DescribeLimitsOutput {
  4323  	s.ShardLimit = &v
  4324  	return s
  4325  }
  4326  
  4327  type DescribeStreamConsumerInput struct {
  4328  	_ struct{} `type:"structure"`
  4329  
  4330  	// The ARN returned by Kinesis Data Streams when you registered the consumer.
  4331  	ConsumerARN *string `min:"1" type:"string"`
  4332  
  4333  	// The name that you gave to the consumer.
  4334  	ConsumerName *string `min:"1" type:"string"`
  4335  
  4336  	// The ARN of the Kinesis data stream that the consumer is registered with.
  4337  	// For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces
  4338  	// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams).
  4339  	StreamARN *string `min:"1" type:"string"`
  4340  }
  4341  
  4342  // String returns the string representation.
  4343  //
  4344  // API parameter values that are decorated as "sensitive" in the API will not
  4345  // be included in the string output. The member name will be present, but the
  4346  // value will be replaced with "sensitive".
  4347  func (s DescribeStreamConsumerInput) String() string {
  4348  	return awsutil.Prettify(s)
  4349  }
  4350  
  4351  // GoString returns the string representation.
  4352  //
  4353  // API parameter values that are decorated as "sensitive" in the API will not
  4354  // be included in the string output. The member name will be present, but the
  4355  // value will be replaced with "sensitive".
  4356  func (s DescribeStreamConsumerInput) GoString() string {
  4357  	return s.String()
  4358  }
  4359  
  4360  // Validate inspects the fields of the type to determine if they are valid.
  4361  func (s *DescribeStreamConsumerInput) Validate() error {
  4362  	invalidParams := request.ErrInvalidParams{Context: "DescribeStreamConsumerInput"}
  4363  	if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 {
  4364  		invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1))
  4365  	}
  4366  	if s.ConsumerName != nil && len(*s.ConsumerName) < 1 {
  4367  		invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1))
  4368  	}
  4369  	if s.StreamARN != nil && len(*s.StreamARN) < 1 {
  4370  		invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1))
  4371  	}
  4372  
  4373  	if invalidParams.Len() > 0 {
  4374  		return invalidParams
  4375  	}
  4376  	return nil
  4377  }
  4378  
  4379  // SetConsumerARN sets the ConsumerARN field's value.
  4380  func (s *DescribeStreamConsumerInput) SetConsumerARN(v string) *DescribeStreamConsumerInput {
  4381  	s.ConsumerARN = &v
  4382  	return s
  4383  }
  4384  
  4385  // SetConsumerName sets the ConsumerName field's value.
  4386  func (s *DescribeStreamConsumerInput) SetConsumerName(v string) *DescribeStreamConsumerInput {
  4387  	s.ConsumerName = &v
  4388  	return s
  4389  }
  4390  
  4391  // SetStreamARN sets the StreamARN field's value.
  4392  func (s *DescribeStreamConsumerInput) SetStreamARN(v string) *DescribeStreamConsumerInput {
  4393  	s.StreamARN = &v
  4394  	return s
  4395  }
  4396  
  4397  type DescribeStreamConsumerOutput struct {
  4398  	_ struct{} `type:"structure"`
  4399  
  4400  	// An object that represents the details of the consumer.
  4401  	//
  4402  	// ConsumerDescription is a required field
  4403  	ConsumerDescription *ConsumerDescription `type:"structure" required:"true"`
  4404  }
  4405  
  4406  // String returns the string representation.
  4407  //
  4408  // API parameter values that are decorated as "sensitive" in the API will not
  4409  // be included in the string output. The member name will be present, but the
  4410  // value will be replaced with "sensitive".
  4411  func (s DescribeStreamConsumerOutput) String() string {
  4412  	return awsutil.Prettify(s)
  4413  }
  4414  
  4415  // GoString returns the string representation.
  4416  //
  4417  // API parameter values that are decorated as "sensitive" in the API will not
  4418  // be included in the string output. The member name will be present, but the
  4419  // value will be replaced with "sensitive".
  4420  func (s DescribeStreamConsumerOutput) GoString() string {
  4421  	return s.String()
  4422  }
  4423  
  4424  // SetConsumerDescription sets the ConsumerDescription field's value.
  4425  func (s *DescribeStreamConsumerOutput) SetConsumerDescription(v *ConsumerDescription) *DescribeStreamConsumerOutput {
  4426  	s.ConsumerDescription = v
  4427  	return s
  4428  }
  4429  
  4430  // Represents the input for DescribeStream.
  4431  type DescribeStreamInput struct {
  4432  	_ struct{} `type:"structure"`
  4433  
  4434  	// The shard ID of the shard to start with.
  4435  	ExclusiveStartShardId *string `min:"1" type:"string"`
  4436  
  4437  	// The maximum number of shards to return in a single call. The default value
  4438  	// is 100. If you specify a value greater than 100, at most 100 shards are returned.
  4439  	Limit *int64 `min:"1" type:"integer"`
  4440  
  4441  	// The name of the stream to describe.
  4442  	//
  4443  	// StreamName is a required field
  4444  	StreamName *string `min:"1" type:"string" required:"true"`
  4445  }
  4446  
  4447  // String returns the string representation.
  4448  //
  4449  // API parameter values that are decorated as "sensitive" in the API will not
  4450  // be included in the string output. The member name will be present, but the
  4451  // value will be replaced with "sensitive".
  4452  func (s DescribeStreamInput) String() string {
  4453  	return awsutil.Prettify(s)
  4454  }
  4455  
  4456  // GoString returns the string representation.
  4457  //
  4458  // API parameter values that are decorated as "sensitive" in the API will not
  4459  // be included in the string output. The member name will be present, but the
  4460  // value will be replaced with "sensitive".
  4461  func (s DescribeStreamInput) GoString() string {
  4462  	return s.String()
  4463  }
  4464  
  4465  // Validate inspects the fields of the type to determine if they are valid.
  4466  func (s *DescribeStreamInput) Validate() error {
  4467  	invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"}
  4468  	if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 {
  4469  		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1))
  4470  	}
  4471  	if s.Limit != nil && *s.Limit < 1 {
  4472  		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4473  	}
  4474  	if s.StreamName == nil {
  4475  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4476  	}
  4477  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4478  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4479  	}
  4480  
  4481  	if invalidParams.Len() > 0 {
  4482  		return invalidParams
  4483  	}
  4484  	return nil
  4485  }
  4486  
  4487  // SetExclusiveStartShardId sets the ExclusiveStartShardId field's value.
  4488  func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *DescribeStreamInput {
  4489  	s.ExclusiveStartShardId = &v
  4490  	return s
  4491  }
  4492  
  4493  // SetLimit sets the Limit field's value.
  4494  func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput {
  4495  	s.Limit = &v
  4496  	return s
  4497  }
  4498  
  4499  // SetStreamName sets the StreamName field's value.
  4500  func (s *DescribeStreamInput) SetStreamName(v string) *DescribeStreamInput {
  4501  	s.StreamName = &v
  4502  	return s
  4503  }
  4504  
  4505  // Represents the output for DescribeStream.
  4506  type DescribeStreamOutput struct {
  4507  	_ struct{} `type:"structure"`
  4508  
  4509  	// The current status of the stream, the stream Amazon Resource Name (ARN),
  4510  	// an array of shard objects that comprise the stream, and whether there are
  4511  	// more shards available.
  4512  	//
  4513  	// StreamDescription is a required field
  4514  	StreamDescription *StreamDescription `type:"structure" required:"true"`
  4515  }
  4516  
  4517  // String returns the string representation.
  4518  //
  4519  // API parameter values that are decorated as "sensitive" in the API will not
  4520  // be included in the string output. The member name will be present, but the
  4521  // value will be replaced with "sensitive".
  4522  func (s DescribeStreamOutput) String() string {
  4523  	return awsutil.Prettify(s)
  4524  }
  4525  
  4526  // GoString returns the string representation.
  4527  //
  4528  // API parameter values that are decorated as "sensitive" in the API will not
  4529  // be included in the string output. The member name will be present, but the
  4530  // value will be replaced with "sensitive".
  4531  func (s DescribeStreamOutput) GoString() string {
  4532  	return s.String()
  4533  }
  4534  
  4535  // SetStreamDescription sets the StreamDescription field's value.
  4536  func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescription) *DescribeStreamOutput {
  4537  	s.StreamDescription = v
  4538  	return s
  4539  }
  4540  
  4541  type DescribeStreamSummaryInput struct {
  4542  	_ struct{} `type:"structure"`
  4543  
  4544  	// The name of the stream to describe.
  4545  	//
  4546  	// StreamName is a required field
  4547  	StreamName *string `min:"1" type:"string" required:"true"`
  4548  }
  4549  
  4550  // String returns the string representation.
  4551  //
  4552  // API parameter values that are decorated as "sensitive" in the API will not
  4553  // be included in the string output. The member name will be present, but the
  4554  // value will be replaced with "sensitive".
  4555  func (s DescribeStreamSummaryInput) String() string {
  4556  	return awsutil.Prettify(s)
  4557  }
  4558  
  4559  // GoString returns the string representation.
  4560  //
  4561  // API parameter values that are decorated as "sensitive" in the API will not
  4562  // be included in the string output. The member name will be present, but the
  4563  // value will be replaced with "sensitive".
  4564  func (s DescribeStreamSummaryInput) GoString() string {
  4565  	return s.String()
  4566  }
  4567  
  4568  // Validate inspects the fields of the type to determine if they are valid.
  4569  func (s *DescribeStreamSummaryInput) Validate() error {
  4570  	invalidParams := request.ErrInvalidParams{Context: "DescribeStreamSummaryInput"}
  4571  	if s.StreamName == nil {
  4572  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4573  	}
  4574  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4575  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4576  	}
  4577  
  4578  	if invalidParams.Len() > 0 {
  4579  		return invalidParams
  4580  	}
  4581  	return nil
  4582  }
  4583  
  4584  // SetStreamName sets the StreamName field's value.
  4585  func (s *DescribeStreamSummaryInput) SetStreamName(v string) *DescribeStreamSummaryInput {
  4586  	s.StreamName = &v
  4587  	return s
  4588  }
  4589  
  4590  type DescribeStreamSummaryOutput struct {
  4591  	_ struct{} `type:"structure"`
  4592  
  4593  	// A StreamDescriptionSummary containing information about the stream.
  4594  	//
  4595  	// StreamDescriptionSummary is a required field
  4596  	StreamDescriptionSummary *StreamDescriptionSummary `type:"structure" required:"true"`
  4597  }
  4598  
  4599  // String returns the string representation.
  4600  //
  4601  // API parameter values that are decorated as "sensitive" in the API will not
  4602  // be included in the string output. The member name will be present, but the
  4603  // value will be replaced with "sensitive".
  4604  func (s DescribeStreamSummaryOutput) String() string {
  4605  	return awsutil.Prettify(s)
  4606  }
  4607  
  4608  // GoString returns the string representation.
  4609  //
  4610  // API parameter values that are decorated as "sensitive" in the API will not
  4611  // be included in the string output. The member name will be present, but the
  4612  // value will be replaced with "sensitive".
  4613  func (s DescribeStreamSummaryOutput) GoString() string {
  4614  	return s.String()
  4615  }
  4616  
  4617  // SetStreamDescriptionSummary sets the StreamDescriptionSummary field's value.
  4618  func (s *DescribeStreamSummaryOutput) SetStreamDescriptionSummary(v *StreamDescriptionSummary) *DescribeStreamSummaryOutput {
  4619  	s.StreamDescriptionSummary = v
  4620  	return s
  4621  }
  4622  
  4623  // Represents the input for DisableEnhancedMonitoring.
  4624  type DisableEnhancedMonitoringInput struct {
  4625  	_ struct{} `type:"structure"`
  4626  
  4627  	// List of shard-level metrics to disable.
  4628  	//
  4629  	// The following are the valid shard-level metrics. The value "ALL" disables
  4630  	// every metric.
  4631  	//
  4632  	//    * IncomingBytes
  4633  	//
  4634  	//    * IncomingRecords
  4635  	//
  4636  	//    * OutgoingBytes
  4637  	//
  4638  	//    * OutgoingRecords
  4639  	//
  4640  	//    * WriteProvisionedThroughputExceeded
  4641  	//
  4642  	//    * ReadProvisionedThroughputExceeded
  4643  	//
  4644  	//    * IteratorAgeMilliseconds
  4645  	//
  4646  	//    * ALL
  4647  	//
  4648  	// For more information, see Monitoring the Amazon Kinesis Data Streams Service
  4649  	// with Amazon CloudWatch (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  4650  	// in the Amazon Kinesis Data Streams Developer Guide.
  4651  	//
  4652  	// ShardLevelMetrics is a required field
  4653  	ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
  4654  
  4655  	// The name of the Kinesis data stream for which to disable enhanced monitoring.
  4656  	//
  4657  	// StreamName is a required field
  4658  	StreamName *string `min:"1" type:"string" required:"true"`
  4659  }
  4660  
  4661  // String returns the string representation.
  4662  //
  4663  // API parameter values that are decorated as "sensitive" in the API will not
  4664  // be included in the string output. The member name will be present, but the
  4665  // value will be replaced with "sensitive".
  4666  func (s DisableEnhancedMonitoringInput) String() string {
  4667  	return awsutil.Prettify(s)
  4668  }
  4669  
  4670  // GoString returns the string representation.
  4671  //
  4672  // API parameter values that are decorated as "sensitive" in the API will not
  4673  // be included in the string output. The member name will be present, but the
  4674  // value will be replaced with "sensitive".
  4675  func (s DisableEnhancedMonitoringInput) GoString() string {
  4676  	return s.String()
  4677  }
  4678  
  4679  // Validate inspects the fields of the type to determine if they are valid.
  4680  func (s *DisableEnhancedMonitoringInput) Validate() error {
  4681  	invalidParams := request.ErrInvalidParams{Context: "DisableEnhancedMonitoringInput"}
  4682  	if s.ShardLevelMetrics == nil {
  4683  		invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
  4684  	}
  4685  	if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
  4686  		invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
  4687  	}
  4688  	if s.StreamName == nil {
  4689  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4690  	}
  4691  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4692  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4693  	}
  4694  
  4695  	if invalidParams.Len() > 0 {
  4696  		return invalidParams
  4697  	}
  4698  	return nil
  4699  }
  4700  
  4701  // SetShardLevelMetrics sets the ShardLevelMetrics field's value.
  4702  func (s *DisableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *DisableEnhancedMonitoringInput {
  4703  	s.ShardLevelMetrics = v
  4704  	return s
  4705  }
  4706  
  4707  // SetStreamName sets the StreamName field's value.
  4708  func (s *DisableEnhancedMonitoringInput) SetStreamName(v string) *DisableEnhancedMonitoringInput {
  4709  	s.StreamName = &v
  4710  	return s
  4711  }
  4712  
  4713  // Represents the input for EnableEnhancedMonitoring.
  4714  type EnableEnhancedMonitoringInput struct {
  4715  	_ struct{} `type:"structure"`
  4716  
  4717  	// List of shard-level metrics to enable.
  4718  	//
  4719  	// The following are the valid shard-level metrics. The value "ALL" enables
  4720  	// every metric.
  4721  	//
  4722  	//    * IncomingBytes
  4723  	//
  4724  	//    * IncomingRecords
  4725  	//
  4726  	//    * OutgoingBytes
  4727  	//
  4728  	//    * OutgoingRecords
  4729  	//
  4730  	//    * WriteProvisionedThroughputExceeded
  4731  	//
  4732  	//    * ReadProvisionedThroughputExceeded
  4733  	//
  4734  	//    * IteratorAgeMilliseconds
  4735  	//
  4736  	//    * ALL
  4737  	//
  4738  	// For more information, see Monitoring the Amazon Kinesis Data Streams Service
  4739  	// with Amazon CloudWatch (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  4740  	// in the Amazon Kinesis Data Streams Developer Guide.
  4741  	//
  4742  	// ShardLevelMetrics is a required field
  4743  	ShardLevelMetrics []*string `min:"1" type:"list" required:"true"`
  4744  
  4745  	// The name of the stream for which to enable enhanced monitoring.
  4746  	//
  4747  	// StreamName is a required field
  4748  	StreamName *string `min:"1" type:"string" required:"true"`
  4749  }
  4750  
  4751  // String returns the string representation.
  4752  //
  4753  // API parameter values that are decorated as "sensitive" in the API will not
  4754  // be included in the string output. The member name will be present, but the
  4755  // value will be replaced with "sensitive".
  4756  func (s EnableEnhancedMonitoringInput) String() string {
  4757  	return awsutil.Prettify(s)
  4758  }
  4759  
  4760  // GoString returns the string representation.
  4761  //
  4762  // API parameter values that are decorated as "sensitive" in the API will not
  4763  // be included in the string output. The member name will be present, but the
  4764  // value will be replaced with "sensitive".
  4765  func (s EnableEnhancedMonitoringInput) GoString() string {
  4766  	return s.String()
  4767  }
  4768  
  4769  // Validate inspects the fields of the type to determine if they are valid.
  4770  func (s *EnableEnhancedMonitoringInput) Validate() error {
  4771  	invalidParams := request.ErrInvalidParams{Context: "EnableEnhancedMonitoringInput"}
  4772  	if s.ShardLevelMetrics == nil {
  4773  		invalidParams.Add(request.NewErrParamRequired("ShardLevelMetrics"))
  4774  	}
  4775  	if s.ShardLevelMetrics != nil && len(s.ShardLevelMetrics) < 1 {
  4776  		invalidParams.Add(request.NewErrParamMinLen("ShardLevelMetrics", 1))
  4777  	}
  4778  	if s.StreamName == nil {
  4779  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  4780  	}
  4781  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  4782  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  4783  	}
  4784  
  4785  	if invalidParams.Len() > 0 {
  4786  		return invalidParams
  4787  	}
  4788  	return nil
  4789  }
  4790  
  4791  // SetShardLevelMetrics sets the ShardLevelMetrics field's value.
  4792  func (s *EnableEnhancedMonitoringInput) SetShardLevelMetrics(v []*string) *EnableEnhancedMonitoringInput {
  4793  	s.ShardLevelMetrics = v
  4794  	return s
  4795  }
  4796  
  4797  // SetStreamName sets the StreamName field's value.
  4798  func (s *EnableEnhancedMonitoringInput) SetStreamName(v string) *EnableEnhancedMonitoringInput {
  4799  	s.StreamName = &v
  4800  	return s
  4801  }
  4802  
  4803  // Represents enhanced metrics types.
  4804  type EnhancedMetrics struct {
  4805  	_ struct{} `type:"structure"`
  4806  
  4807  	// List of shard-level metrics.
  4808  	//
  4809  	// The following are the valid shard-level metrics. The value "ALL" enhances
  4810  	// every metric.
  4811  	//
  4812  	//    * IncomingBytes
  4813  	//
  4814  	//    * IncomingRecords
  4815  	//
  4816  	//    * OutgoingBytes
  4817  	//
  4818  	//    * OutgoingRecords
  4819  	//
  4820  	//    * WriteProvisionedThroughputExceeded
  4821  	//
  4822  	//    * ReadProvisionedThroughputExceeded
  4823  	//
  4824  	//    * IteratorAgeMilliseconds
  4825  	//
  4826  	//    * ALL
  4827  	//
  4828  	// For more information, see Monitoring the Amazon Kinesis Data Streams Service
  4829  	// with Amazon CloudWatch (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
  4830  	// in the Amazon Kinesis Data Streams Developer Guide.
  4831  	ShardLevelMetrics []*string `min:"1" type:"list"`
  4832  }
  4833  
  4834  // String returns the string representation.
  4835  //
  4836  // API parameter values that are decorated as "sensitive" in the API will not
  4837  // be included in the string output. The member name will be present, but the
  4838  // value will be replaced with "sensitive".
  4839  func (s EnhancedMetrics) String() string {
  4840  	return awsutil.Prettify(s)
  4841  }
  4842  
  4843  // GoString returns the string representation.
  4844  //
  4845  // API parameter values that are decorated as "sensitive" in the API will not
  4846  // be included in the string output. The member name will be present, but the
  4847  // value will be replaced with "sensitive".
  4848  func (s EnhancedMetrics) GoString() string {
  4849  	return s.String()
  4850  }
  4851  
  4852  // SetShardLevelMetrics sets the ShardLevelMetrics field's value.
  4853  func (s *EnhancedMetrics) SetShardLevelMetrics(v []*string) *EnhancedMetrics {
  4854  	s.ShardLevelMetrics = v
  4855  	return s
  4856  }
  4857  
  4858  // Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.
  4859  type EnhancedMonitoringOutput struct {
  4860  	_ struct{} `type:"structure"`
  4861  
  4862  	// Represents the current state of the metrics that are in the enhanced state
  4863  	// before the operation.
  4864  	CurrentShardLevelMetrics []*string `min:"1" type:"list"`
  4865  
  4866  	// Represents the list of all the metrics that would be in the enhanced state
  4867  	// after the operation.
  4868  	DesiredShardLevelMetrics []*string `min:"1" type:"list"`
  4869  
  4870  	// The name of the Kinesis data stream.
  4871  	StreamName *string `min:"1" type:"string"`
  4872  }
  4873  
  4874  // String returns the string representation.
  4875  //
  4876  // API parameter values that are decorated as "sensitive" in the API will not
  4877  // be included in the string output. The member name will be present, but the
  4878  // value will be replaced with "sensitive".
  4879  func (s EnhancedMonitoringOutput) String() string {
  4880  	return awsutil.Prettify(s)
  4881  }
  4882  
  4883  // GoString returns the string representation.
  4884  //
  4885  // API parameter values that are decorated as "sensitive" in the API will not
  4886  // be included in the string output. The member name will be present, but the
  4887  // value will be replaced with "sensitive".
  4888  func (s EnhancedMonitoringOutput) GoString() string {
  4889  	return s.String()
  4890  }
  4891  
  4892  // SetCurrentShardLevelMetrics sets the CurrentShardLevelMetrics field's value.
  4893  func (s *EnhancedMonitoringOutput) SetCurrentShardLevelMetrics(v []*string) *EnhancedMonitoringOutput {
  4894  	s.CurrentShardLevelMetrics = v
  4895  	return s
  4896  }
  4897  
  4898  // SetDesiredShardLevelMetrics sets the DesiredShardLevelMetrics field's value.
  4899  func (s *EnhancedMonitoringOutput) SetDesiredShardLevelMetrics(v []*string) *EnhancedMonitoringOutput {
  4900  	s.DesiredShardLevelMetrics = v
  4901  	return s
  4902  }
  4903  
  4904  // SetStreamName sets the StreamName field's value.
  4905  func (s *EnhancedMonitoringOutput) SetStreamName(v string) *EnhancedMonitoringOutput {
  4906  	s.StreamName = &v
  4907  	return s
  4908  }
  4909  
  4910  // The provided iterator exceeds the maximum age allowed.
  4911  type ExpiredIteratorException struct {
  4912  	_            struct{}                  `type:"structure"`
  4913  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4914  
  4915  	// A message that provides information about the error.
  4916  	Message_ *string `locationName:"message" type:"string"`
  4917  }
  4918  
  4919  // String returns the string representation.
  4920  //
  4921  // API parameter values that are decorated as "sensitive" in the API will not
  4922  // be included in the string output. The member name will be present, but the
  4923  // value will be replaced with "sensitive".
  4924  func (s ExpiredIteratorException) String() string {
  4925  	return awsutil.Prettify(s)
  4926  }
  4927  
  4928  // GoString returns the string representation.
  4929  //
  4930  // API parameter values that are decorated as "sensitive" in the API will not
  4931  // be included in the string output. The member name will be present, but the
  4932  // value will be replaced with "sensitive".
  4933  func (s ExpiredIteratorException) GoString() string {
  4934  	return s.String()
  4935  }
  4936  
  4937  func newErrorExpiredIteratorException(v protocol.ResponseMetadata) error {
  4938  	return &ExpiredIteratorException{
  4939  		RespMetadata: v,
  4940  	}
  4941  }
  4942  
  4943  // Code returns the exception type name.
  4944  func (s *ExpiredIteratorException) Code() string {
  4945  	return "ExpiredIteratorException"
  4946  }
  4947  
  4948  // Message returns the exception's message.
  4949  func (s *ExpiredIteratorException) Message() string {
  4950  	if s.Message_ != nil {
  4951  		return *s.Message_
  4952  	}
  4953  	return ""
  4954  }
  4955  
  4956  // OrigErr always returns nil, satisfies awserr.Error interface.
  4957  func (s *ExpiredIteratorException) OrigErr() error {
  4958  	return nil
  4959  }
  4960  
  4961  func (s *ExpiredIteratorException) Error() string {
  4962  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4963  }
  4964  
  4965  // Status code returns the HTTP status code for the request's response error.
  4966  func (s *ExpiredIteratorException) StatusCode() int {
  4967  	return s.RespMetadata.StatusCode
  4968  }
  4969  
  4970  // RequestID returns the service's response RequestID for request.
  4971  func (s *ExpiredIteratorException) RequestID() string {
  4972  	return s.RespMetadata.RequestID
  4973  }
  4974  
  4975  // The pagination token passed to the operation is expired.
  4976  type ExpiredNextTokenException struct {
  4977  	_            struct{}                  `type:"structure"`
  4978  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4979  
  4980  	Message_ *string `locationName:"message" type:"string"`
  4981  }
  4982  
  4983  // String returns the string representation.
  4984  //
  4985  // API parameter values that are decorated as "sensitive" in the API will not
  4986  // be included in the string output. The member name will be present, but the
  4987  // value will be replaced with "sensitive".
  4988  func (s ExpiredNextTokenException) String() string {
  4989  	return awsutil.Prettify(s)
  4990  }
  4991  
  4992  // GoString returns the string representation.
  4993  //
  4994  // API parameter values that are decorated as "sensitive" in the API will not
  4995  // be included in the string output. The member name will be present, but the
  4996  // value will be replaced with "sensitive".
  4997  func (s ExpiredNextTokenException) GoString() string {
  4998  	return s.String()
  4999  }
  5000  
  5001  func newErrorExpiredNextTokenException(v protocol.ResponseMetadata) error {
  5002  	return &ExpiredNextTokenException{
  5003  		RespMetadata: v,
  5004  	}
  5005  }
  5006  
  5007  // Code returns the exception type name.
  5008  func (s *ExpiredNextTokenException) Code() string {
  5009  	return "ExpiredNextTokenException"
  5010  }
  5011  
  5012  // Message returns the exception's message.
  5013  func (s *ExpiredNextTokenException) Message() string {
  5014  	if s.Message_ != nil {
  5015  		return *s.Message_
  5016  	}
  5017  	return ""
  5018  }
  5019  
  5020  // OrigErr always returns nil, satisfies awserr.Error interface.
  5021  func (s *ExpiredNextTokenException) OrigErr() error {
  5022  	return nil
  5023  }
  5024  
  5025  func (s *ExpiredNextTokenException) Error() string {
  5026  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5027  }
  5028  
  5029  // Status code returns the HTTP status code for the request's response error.
  5030  func (s *ExpiredNextTokenException) StatusCode() int {
  5031  	return s.RespMetadata.StatusCode
  5032  }
  5033  
  5034  // RequestID returns the service's response RequestID for request.
  5035  func (s *ExpiredNextTokenException) RequestID() string {
  5036  	return s.RespMetadata.RequestID
  5037  }
  5038  
  5039  // Represents the input for GetRecords.
  5040  type GetRecordsInput struct {
  5041  	_ struct{} `type:"structure"`
  5042  
  5043  	// The maximum number of records to return. Specify a value of up to 10,000.
  5044  	// If you specify a value that is greater than 10,000, GetRecords throws InvalidArgumentException.
  5045  	// The default value is 10,000.
  5046  	Limit *int64 `min:"1" type:"integer"`
  5047  
  5048  	// The position in the shard from which you want to start sequentially reading
  5049  	// data records. A shard iterator specifies this position using the sequence
  5050  	// number of a data record in the shard.
  5051  	//
  5052  	// ShardIterator is a required field
  5053  	ShardIterator *string `min:"1" type:"string" required:"true"`
  5054  }
  5055  
  5056  // String returns the string representation.
  5057  //
  5058  // API parameter values that are decorated as "sensitive" in the API will not
  5059  // be included in the string output. The member name will be present, but the
  5060  // value will be replaced with "sensitive".
  5061  func (s GetRecordsInput) String() string {
  5062  	return awsutil.Prettify(s)
  5063  }
  5064  
  5065  // GoString returns the string representation.
  5066  //
  5067  // API parameter values that are decorated as "sensitive" in the API will not
  5068  // be included in the string output. The member name will be present, but the
  5069  // value will be replaced with "sensitive".
  5070  func (s GetRecordsInput) GoString() string {
  5071  	return s.String()
  5072  }
  5073  
  5074  // Validate inspects the fields of the type to determine if they are valid.
  5075  func (s *GetRecordsInput) Validate() error {
  5076  	invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"}
  5077  	if s.Limit != nil && *s.Limit < 1 {
  5078  		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5079  	}
  5080  	if s.ShardIterator == nil {
  5081  		invalidParams.Add(request.NewErrParamRequired("ShardIterator"))
  5082  	}
  5083  	if s.ShardIterator != nil && len(*s.ShardIterator) < 1 {
  5084  		invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1))
  5085  	}
  5086  
  5087  	if invalidParams.Len() > 0 {
  5088  		return invalidParams
  5089  	}
  5090  	return nil
  5091  }
  5092  
  5093  // SetLimit sets the Limit field's value.
  5094  func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput {
  5095  	s.Limit = &v
  5096  	return s
  5097  }
  5098  
  5099  // SetShardIterator sets the ShardIterator field's value.
  5100  func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput {
  5101  	s.ShardIterator = &v
  5102  	return s
  5103  }
  5104  
  5105  // Represents the output for GetRecords.
  5106  type GetRecordsOutput struct {
  5107  	_ struct{} `type:"structure"`
  5108  
  5109  	ChildShards []*ChildShard `type:"list"`
  5110  
  5111  	// The number of milliseconds the GetRecords response is from the tip of the
  5112  	// stream, indicating how far behind current time the consumer is. A value of
  5113  	// zero indicates that record processing is caught up, and there are no new
  5114  	// records to process at this moment.
  5115  	MillisBehindLatest *int64 `type:"long"`
  5116  
  5117  	// The next position in the shard from which to start sequentially reading data
  5118  	// records. If set to null, the shard has been closed and the requested iterator
  5119  	// does not return any more data.
  5120  	NextShardIterator *string `min:"1" type:"string"`
  5121  
  5122  	// The data records retrieved from the shard.
  5123  	//
  5124  	// Records is a required field
  5125  	Records []*Record `type:"list" required:"true"`
  5126  }
  5127  
  5128  // String returns the string representation.
  5129  //
  5130  // API parameter values that are decorated as "sensitive" in the API will not
  5131  // be included in the string output. The member name will be present, but the
  5132  // value will be replaced with "sensitive".
  5133  func (s GetRecordsOutput) String() string {
  5134  	return awsutil.Prettify(s)
  5135  }
  5136  
  5137  // GoString returns the string representation.
  5138  //
  5139  // API parameter values that are decorated as "sensitive" in the API will not
  5140  // be included in the string output. The member name will be present, but the
  5141  // value will be replaced with "sensitive".
  5142  func (s GetRecordsOutput) GoString() string {
  5143  	return s.String()
  5144  }
  5145  
  5146  // SetChildShards sets the ChildShards field's value.
  5147  func (s *GetRecordsOutput) SetChildShards(v []*ChildShard) *GetRecordsOutput {
  5148  	s.ChildShards = v
  5149  	return s
  5150  }
  5151  
  5152  // SetMillisBehindLatest sets the MillisBehindLatest field's value.
  5153  func (s *GetRecordsOutput) SetMillisBehindLatest(v int64) *GetRecordsOutput {
  5154  	s.MillisBehindLatest = &v
  5155  	return s
  5156  }
  5157  
  5158  // SetNextShardIterator sets the NextShardIterator field's value.
  5159  func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsOutput {
  5160  	s.NextShardIterator = &v
  5161  	return s
  5162  }
  5163  
  5164  // SetRecords sets the Records field's value.
  5165  func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput {
  5166  	s.Records = v
  5167  	return s
  5168  }
  5169  
  5170  // Represents the input for GetShardIterator.
  5171  type GetShardIteratorInput struct {
  5172  	_ struct{} `type:"structure"`
  5173  
  5174  	// The shard ID of the Kinesis Data Streams shard to get the iterator for.
  5175  	//
  5176  	// ShardId is a required field
  5177  	ShardId *string `min:"1" type:"string" required:"true"`
  5178  
  5179  	// Determines how the shard iterator is used to start reading data records from
  5180  	// the shard.
  5181  	//
  5182  	// The following are the valid Amazon Kinesis shard iterator types:
  5183  	//
  5184  	//    * AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific
  5185  	//    sequence number, provided in the value StartingSequenceNumber.
  5186  	//
  5187  	//    * AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted
  5188  	//    by a specific sequence number, provided in the value StartingSequenceNumber.
  5189  	//
  5190  	//    * AT_TIMESTAMP - Start reading from the position denoted by a specific
  5191  	//    time stamp, provided in the value Timestamp.
  5192  	//
  5193  	//    * TRIM_HORIZON - Start reading at the last untrimmed record in the shard
  5194  	//    in the system, which is the oldest data record in the shard.
  5195  	//
  5196  	//    * LATEST - Start reading just after the most recent record in the shard,
  5197  	//    so that you always read the most recent data in the shard.
  5198  	//
  5199  	// ShardIteratorType is a required field
  5200  	ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"`
  5201  
  5202  	// The sequence number of the data record in the shard from which to start reading.
  5203  	// Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.
  5204  	StartingSequenceNumber *string `type:"string"`
  5205  
  5206  	// The name of the Amazon Kinesis data stream.
  5207  	//
  5208  	// StreamName is a required field
  5209  	StreamName *string `min:"1" type:"string" required:"true"`
  5210  
  5211  	// The time stamp of the data record from which to start reading. Used with
  5212  	// shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with
  5213  	// precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00 or
  5214  	// 1459799926.480. If a record with this exact time stamp does not exist, the
  5215  	// iterator returned is for the next (later) record. If the time stamp is older
  5216  	// than the current trim horizon, the iterator returned is for the oldest untrimmed
  5217  	// data record (TRIM_HORIZON).
  5218  	Timestamp *time.Time `type:"timestamp"`
  5219  }
  5220  
  5221  // String returns the string representation.
  5222  //
  5223  // API parameter values that are decorated as "sensitive" in the API will not
  5224  // be included in the string output. The member name will be present, but the
  5225  // value will be replaced with "sensitive".
  5226  func (s GetShardIteratorInput) String() string {
  5227  	return awsutil.Prettify(s)
  5228  }
  5229  
  5230  // GoString returns the string representation.
  5231  //
  5232  // API parameter values that are decorated as "sensitive" in the API will not
  5233  // be included in the string output. The member name will be present, but the
  5234  // value will be replaced with "sensitive".
  5235  func (s GetShardIteratorInput) GoString() string {
  5236  	return s.String()
  5237  }
  5238  
  5239  // Validate inspects the fields of the type to determine if they are valid.
  5240  func (s *GetShardIteratorInput) Validate() error {
  5241  	invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"}
  5242  	if s.ShardId == nil {
  5243  		invalidParams.Add(request.NewErrParamRequired("ShardId"))
  5244  	}
  5245  	if s.ShardId != nil && len(*s.ShardId) < 1 {
  5246  		invalidParams.Add(request.NewErrParamMinLen("ShardId", 1))
  5247  	}
  5248  	if s.ShardIteratorType == nil {
  5249  		invalidParams.Add(request.NewErrParamRequired("ShardIteratorType"))
  5250  	}
  5251  	if s.StreamName == nil {
  5252  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  5253  	}
  5254  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  5255  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  5256  	}
  5257  
  5258  	if invalidParams.Len() > 0 {
  5259  		return invalidParams
  5260  	}
  5261  	return nil
  5262  }
  5263  
  5264  // SetShardId sets the ShardId field's value.
  5265  func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIteratorInput {
  5266  	s.ShardId = &v
  5267  	return s
  5268  }
  5269  
  5270  // SetShardIteratorType sets the ShardIteratorType field's value.
  5271  func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetShardIteratorInput {
  5272  	s.ShardIteratorType = &v
  5273  	return s
  5274  }
  5275  
  5276  // SetStartingSequenceNumber sets the StartingSequenceNumber field's value.
  5277  func (s *GetShardIteratorInput) SetStartingSequenceNumber(v string) *GetShardIteratorInput {
  5278  	s.StartingSequenceNumber = &v
  5279  	return s
  5280  }
  5281  
  5282  // SetStreamName sets the StreamName field's value.
  5283  func (s *GetShardIteratorInput) SetStreamName(v string) *GetShardIteratorInput {
  5284  	s.StreamName = &v
  5285  	return s
  5286  }
  5287  
  5288  // SetTimestamp sets the Timestamp field's value.
  5289  func (s *GetShardIteratorInput) SetTimestamp(v time.Time) *GetShardIteratorInput {
  5290  	s.Timestamp = &v
  5291  	return s
  5292  }
  5293  
  5294  // Represents the output for GetShardIterator.
  5295  type GetShardIteratorOutput struct {
  5296  	_ struct{} `type:"structure"`
  5297  
  5298  	// The position in the shard from which to start reading data records sequentially.
  5299  	// A shard iterator specifies this position using the sequence number of a data
  5300  	// record in a shard.
  5301  	ShardIterator *string `min:"1" type:"string"`
  5302  }
  5303  
  5304  // String returns the string representation.
  5305  //
  5306  // API parameter values that are decorated as "sensitive" in the API will not
  5307  // be included in the string output. The member name will be present, but the
  5308  // value will be replaced with "sensitive".
  5309  func (s GetShardIteratorOutput) String() string {
  5310  	return awsutil.Prettify(s)
  5311  }
  5312  
  5313  // GoString returns the string representation.
  5314  //
  5315  // API parameter values that are decorated as "sensitive" in the API will not
  5316  // be included in the string output. The member name will be present, but the
  5317  // value will be replaced with "sensitive".
  5318  func (s GetShardIteratorOutput) GoString() string {
  5319  	return s.String()
  5320  }
  5321  
  5322  // SetShardIterator sets the ShardIterator field's value.
  5323  func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardIteratorOutput {
  5324  	s.ShardIterator = &v
  5325  	return s
  5326  }
  5327  
  5328  // The range of possible hash key values for the shard, which is a set of ordered
  5329  // contiguous positive integers.
  5330  type HashKeyRange struct {
  5331  	_ struct{} `type:"structure"`
  5332  
  5333  	// The ending hash key of the hash key range.
  5334  	//
  5335  	// EndingHashKey is a required field
  5336  	EndingHashKey *string `type:"string" required:"true"`
  5337  
  5338  	// The starting hash key of the hash key range.
  5339  	//
  5340  	// StartingHashKey is a required field
  5341  	StartingHashKey *string `type:"string" required:"true"`
  5342  }
  5343  
  5344  // String returns the string representation.
  5345  //
  5346  // API parameter values that are decorated as "sensitive" in the API will not
  5347  // be included in the string output. The member name will be present, but the
  5348  // value will be replaced with "sensitive".
  5349  func (s HashKeyRange) String() string {
  5350  	return awsutil.Prettify(s)
  5351  }
  5352  
  5353  // GoString returns the string representation.
  5354  //
  5355  // API parameter values that are decorated as "sensitive" in the API will not
  5356  // be included in the string output. The member name will be present, but the
  5357  // value will be replaced with "sensitive".
  5358  func (s HashKeyRange) GoString() string {
  5359  	return s.String()
  5360  }
  5361  
  5362  // SetEndingHashKey sets the EndingHashKey field's value.
  5363  func (s *HashKeyRange) SetEndingHashKey(v string) *HashKeyRange {
  5364  	s.EndingHashKey = &v
  5365  	return s
  5366  }
  5367  
  5368  // SetStartingHashKey sets the StartingHashKey field's value.
  5369  func (s *HashKeyRange) SetStartingHashKey(v string) *HashKeyRange {
  5370  	s.StartingHashKey = &v
  5371  	return s
  5372  }
  5373  
  5374  // Represents the input for IncreaseStreamRetentionPeriod.
  5375  type IncreaseStreamRetentionPeriodInput struct {
  5376  	_ struct{} `type:"structure"`
  5377  
  5378  	// The new retention period of the stream, in hours. Must be more than the current
  5379  	// retention period.
  5380  	//
  5381  	// RetentionPeriodHours is a required field
  5382  	RetentionPeriodHours *int64 `type:"integer" required:"true"`
  5383  
  5384  	// The name of the stream to modify.
  5385  	//
  5386  	// StreamName is a required field
  5387  	StreamName *string `min:"1" type:"string" required:"true"`
  5388  }
  5389  
  5390  // String returns the string representation.
  5391  //
  5392  // API parameter values that are decorated as "sensitive" in the API will not
  5393  // be included in the string output. The member name will be present, but the
  5394  // value will be replaced with "sensitive".
  5395  func (s IncreaseStreamRetentionPeriodInput) String() string {
  5396  	return awsutil.Prettify(s)
  5397  }
  5398  
  5399  // GoString returns the string representation.
  5400  //
  5401  // API parameter values that are decorated as "sensitive" in the API will not
  5402  // be included in the string output. The member name will be present, but the
  5403  // value will be replaced with "sensitive".
  5404  func (s IncreaseStreamRetentionPeriodInput) GoString() string {
  5405  	return s.String()
  5406  }
  5407  
  5408  // Validate inspects the fields of the type to determine if they are valid.
  5409  func (s *IncreaseStreamRetentionPeriodInput) Validate() error {
  5410  	invalidParams := request.ErrInvalidParams{Context: "IncreaseStreamRetentionPeriodInput"}
  5411  	if s.RetentionPeriodHours == nil {
  5412  		invalidParams.Add(request.NewErrParamRequired("RetentionPeriodHours"))
  5413  	}
  5414  	if s.StreamName == nil {
  5415  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  5416  	}
  5417  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  5418  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  5419  	}
  5420  
  5421  	if invalidParams.Len() > 0 {
  5422  		return invalidParams
  5423  	}
  5424  	return nil
  5425  }
  5426  
  5427  // SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
  5428  func (s *IncreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v int64) *IncreaseStreamRetentionPeriodInput {
  5429  	s.RetentionPeriodHours = &v
  5430  	return s
  5431  }
  5432  
  5433  // SetStreamName sets the StreamName field's value.
  5434  func (s *IncreaseStreamRetentionPeriodInput) SetStreamName(v string) *IncreaseStreamRetentionPeriodInput {
  5435  	s.StreamName = &v
  5436  	return s
  5437  }
  5438  
  5439  type IncreaseStreamRetentionPeriodOutput struct {
  5440  	_ struct{} `type:"structure"`
  5441  }
  5442  
  5443  // String returns the string representation.
  5444  //
  5445  // API parameter values that are decorated as "sensitive" in the API will not
  5446  // be included in the string output. The member name will be present, but the
  5447  // value will be replaced with "sensitive".
  5448  func (s IncreaseStreamRetentionPeriodOutput) String() string {
  5449  	return awsutil.Prettify(s)
  5450  }
  5451  
  5452  // GoString returns the string representation.
  5453  //
  5454  // API parameter values that are decorated as "sensitive" in the API will not
  5455  // be included in the string output. The member name will be present, but the
  5456  // value will be replaced with "sensitive".
  5457  func (s IncreaseStreamRetentionPeriodOutput) GoString() string {
  5458  	return s.String()
  5459  }
  5460  
  5461  // The processing of the request failed because of an unknown error, exception,
  5462  // or failure.
  5463  type InternalFailureException struct {
  5464  	_            struct{}                  `type:"structure"`
  5465  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5466  
  5467  	Message_ *string `locationName:"message" type:"string"`
  5468  }
  5469  
  5470  // String returns the string representation.
  5471  //
  5472  // API parameter values that are decorated as "sensitive" in the API will not
  5473  // be included in the string output. The member name will be present, but the
  5474  // value will be replaced with "sensitive".
  5475  func (s InternalFailureException) String() string {
  5476  	return awsutil.Prettify(s)
  5477  }
  5478  
  5479  // GoString returns the string representation.
  5480  //
  5481  // API parameter values that are decorated as "sensitive" in the API will not
  5482  // be included in the string output. The member name will be present, but the
  5483  // value will be replaced with "sensitive".
  5484  func (s InternalFailureException) GoString() string {
  5485  	return s.String()
  5486  }
  5487  
  5488  // The InternalFailureException is and event in the SubscribeToShardEventStream group of events.
  5489  func (s *InternalFailureException) eventSubscribeToShardEventStream() {}
  5490  
  5491  // UnmarshalEvent unmarshals the EventStream Message into the InternalFailureException value.
  5492  // This method is only used internally within the SDK's EventStream handling.
  5493  func (s *InternalFailureException) UnmarshalEvent(
  5494  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  5495  	msg eventstream.Message,
  5496  ) error {
  5497  	if err := payloadUnmarshaler.UnmarshalPayload(
  5498  		bytes.NewReader(msg.Payload), s,
  5499  	); err != nil {
  5500  		return err
  5501  	}
  5502  	return nil
  5503  }
  5504  
  5505  // MarshalEvent marshals the type into an stream event value. This method
  5506  // should only used internally within the SDK's EventStream handling.
  5507  func (s *InternalFailureException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  5508  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  5509  	var buf bytes.Buffer
  5510  	if err = pm.MarshalPayload(&buf, s); err != nil {
  5511  		return eventstream.Message{}, err
  5512  	}
  5513  	msg.Payload = buf.Bytes()
  5514  	return msg, err
  5515  }
  5516  
  5517  func newErrorInternalFailureException(v protocol.ResponseMetadata) error {
  5518  	return &InternalFailureException{
  5519  		RespMetadata: v,
  5520  	}
  5521  }
  5522  
  5523  // Code returns the exception type name.
  5524  func (s *InternalFailureException) Code() string {
  5525  	return "InternalFailureException"
  5526  }
  5527  
  5528  // Message returns the exception's message.
  5529  func (s *InternalFailureException) Message() string {
  5530  	if s.Message_ != nil {
  5531  		return *s.Message_
  5532  	}
  5533  	return ""
  5534  }
  5535  
  5536  // OrigErr always returns nil, satisfies awserr.Error interface.
  5537  func (s *InternalFailureException) OrigErr() error {
  5538  	return nil
  5539  }
  5540  
  5541  func (s *InternalFailureException) Error() string {
  5542  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5543  }
  5544  
  5545  // Status code returns the HTTP status code for the request's response error.
  5546  func (s *InternalFailureException) StatusCode() int {
  5547  	return s.RespMetadata.StatusCode
  5548  }
  5549  
  5550  // RequestID returns the service's response RequestID for request.
  5551  func (s *InternalFailureException) RequestID() string {
  5552  	return s.RespMetadata.RequestID
  5553  }
  5554  
  5555  // A specified parameter exceeds its restrictions, is not supported, or can't
  5556  // be used. For more information, see the returned message.
  5557  type InvalidArgumentException struct {
  5558  	_            struct{}                  `type:"structure"`
  5559  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5560  
  5561  	// A message that provides information about the error.
  5562  	Message_ *string `locationName:"message" type:"string"`
  5563  }
  5564  
  5565  // String returns the string representation.
  5566  //
  5567  // API parameter values that are decorated as "sensitive" in the API will not
  5568  // be included in the string output. The member name will be present, but the
  5569  // value will be replaced with "sensitive".
  5570  func (s InvalidArgumentException) String() string {
  5571  	return awsutil.Prettify(s)
  5572  }
  5573  
  5574  // GoString returns the string representation.
  5575  //
  5576  // API parameter values that are decorated as "sensitive" in the API will not
  5577  // be included in the string output. The member name will be present, but the
  5578  // value will be replaced with "sensitive".
  5579  func (s InvalidArgumentException) GoString() string {
  5580  	return s.String()
  5581  }
  5582  
  5583  func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error {
  5584  	return &InvalidArgumentException{
  5585  		RespMetadata: v,
  5586  	}
  5587  }
  5588  
  5589  // Code returns the exception type name.
  5590  func (s *InvalidArgumentException) Code() string {
  5591  	return "InvalidArgumentException"
  5592  }
  5593  
  5594  // Message returns the exception's message.
  5595  func (s *InvalidArgumentException) Message() string {
  5596  	if s.Message_ != nil {
  5597  		return *s.Message_
  5598  	}
  5599  	return ""
  5600  }
  5601  
  5602  // OrigErr always returns nil, satisfies awserr.Error interface.
  5603  func (s *InvalidArgumentException) OrigErr() error {
  5604  	return nil
  5605  }
  5606  
  5607  func (s *InvalidArgumentException) Error() string {
  5608  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5609  }
  5610  
  5611  // Status code returns the HTTP status code for the request's response error.
  5612  func (s *InvalidArgumentException) StatusCode() int {
  5613  	return s.RespMetadata.StatusCode
  5614  }
  5615  
  5616  // RequestID returns the service's response RequestID for request.
  5617  func (s *InvalidArgumentException) RequestID() string {
  5618  	return s.RespMetadata.RequestID
  5619  }
  5620  
  5621  // The ciphertext references a key that doesn't exist or that you don't have
  5622  // access to.
  5623  type KMSAccessDeniedException struct {
  5624  	_            struct{}                  `type:"structure"`
  5625  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5626  
  5627  	// A message that provides information about the error.
  5628  	Message_ *string `locationName:"message" type:"string"`
  5629  }
  5630  
  5631  // String returns the string representation.
  5632  //
  5633  // API parameter values that are decorated as "sensitive" in the API will not
  5634  // be included in the string output. The member name will be present, but the
  5635  // value will be replaced with "sensitive".
  5636  func (s KMSAccessDeniedException) String() string {
  5637  	return awsutil.Prettify(s)
  5638  }
  5639  
  5640  // GoString returns the string representation.
  5641  //
  5642  // API parameter values that are decorated as "sensitive" in the API will not
  5643  // be included in the string output. The member name will be present, but the
  5644  // value will be replaced with "sensitive".
  5645  func (s KMSAccessDeniedException) GoString() string {
  5646  	return s.String()
  5647  }
  5648  
  5649  // The KMSAccessDeniedException is and event in the SubscribeToShardEventStream group of events.
  5650  func (s *KMSAccessDeniedException) eventSubscribeToShardEventStream() {}
  5651  
  5652  // UnmarshalEvent unmarshals the EventStream Message into the KMSAccessDeniedException value.
  5653  // This method is only used internally within the SDK's EventStream handling.
  5654  func (s *KMSAccessDeniedException) UnmarshalEvent(
  5655  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  5656  	msg eventstream.Message,
  5657  ) error {
  5658  	if err := payloadUnmarshaler.UnmarshalPayload(
  5659  		bytes.NewReader(msg.Payload), s,
  5660  	); err != nil {
  5661  		return err
  5662  	}
  5663  	return nil
  5664  }
  5665  
  5666  // MarshalEvent marshals the type into an stream event value. This method
  5667  // should only used internally within the SDK's EventStream handling.
  5668  func (s *KMSAccessDeniedException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  5669  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  5670  	var buf bytes.Buffer
  5671  	if err = pm.MarshalPayload(&buf, s); err != nil {
  5672  		return eventstream.Message{}, err
  5673  	}
  5674  	msg.Payload = buf.Bytes()
  5675  	return msg, err
  5676  }
  5677  
  5678  func newErrorKMSAccessDeniedException(v protocol.ResponseMetadata) error {
  5679  	return &KMSAccessDeniedException{
  5680  		RespMetadata: v,
  5681  	}
  5682  }
  5683  
  5684  // Code returns the exception type name.
  5685  func (s *KMSAccessDeniedException) Code() string {
  5686  	return "KMSAccessDeniedException"
  5687  }
  5688  
  5689  // Message returns the exception's message.
  5690  func (s *KMSAccessDeniedException) Message() string {
  5691  	if s.Message_ != nil {
  5692  		return *s.Message_
  5693  	}
  5694  	return ""
  5695  }
  5696  
  5697  // OrigErr always returns nil, satisfies awserr.Error interface.
  5698  func (s *KMSAccessDeniedException) OrigErr() error {
  5699  	return nil
  5700  }
  5701  
  5702  func (s *KMSAccessDeniedException) Error() string {
  5703  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5704  }
  5705  
  5706  // Status code returns the HTTP status code for the request's response error.
  5707  func (s *KMSAccessDeniedException) StatusCode() int {
  5708  	return s.RespMetadata.StatusCode
  5709  }
  5710  
  5711  // RequestID returns the service's response RequestID for request.
  5712  func (s *KMSAccessDeniedException) RequestID() string {
  5713  	return s.RespMetadata.RequestID
  5714  }
  5715  
  5716  // The request was rejected because the specified customer master key (CMK)
  5717  // isn't enabled.
  5718  type KMSDisabledException struct {
  5719  	_            struct{}                  `type:"structure"`
  5720  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5721  
  5722  	// A message that provides information about the error.
  5723  	Message_ *string `locationName:"message" type:"string"`
  5724  }
  5725  
  5726  // String returns the string representation.
  5727  //
  5728  // API parameter values that are decorated as "sensitive" in the API will not
  5729  // be included in the string output. The member name will be present, but the
  5730  // value will be replaced with "sensitive".
  5731  func (s KMSDisabledException) String() string {
  5732  	return awsutil.Prettify(s)
  5733  }
  5734  
  5735  // GoString returns the string representation.
  5736  //
  5737  // API parameter values that are decorated as "sensitive" in the API will not
  5738  // be included in the string output. The member name will be present, but the
  5739  // value will be replaced with "sensitive".
  5740  func (s KMSDisabledException) GoString() string {
  5741  	return s.String()
  5742  }
  5743  
  5744  // The KMSDisabledException is and event in the SubscribeToShardEventStream group of events.
  5745  func (s *KMSDisabledException) eventSubscribeToShardEventStream() {}
  5746  
  5747  // UnmarshalEvent unmarshals the EventStream Message into the KMSDisabledException value.
  5748  // This method is only used internally within the SDK's EventStream handling.
  5749  func (s *KMSDisabledException) UnmarshalEvent(
  5750  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  5751  	msg eventstream.Message,
  5752  ) error {
  5753  	if err := payloadUnmarshaler.UnmarshalPayload(
  5754  		bytes.NewReader(msg.Payload), s,
  5755  	); err != nil {
  5756  		return err
  5757  	}
  5758  	return nil
  5759  }
  5760  
  5761  // MarshalEvent marshals the type into an stream event value. This method
  5762  // should only used internally within the SDK's EventStream handling.
  5763  func (s *KMSDisabledException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  5764  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  5765  	var buf bytes.Buffer
  5766  	if err = pm.MarshalPayload(&buf, s); err != nil {
  5767  		return eventstream.Message{}, err
  5768  	}
  5769  	msg.Payload = buf.Bytes()
  5770  	return msg, err
  5771  }
  5772  
  5773  func newErrorKMSDisabledException(v protocol.ResponseMetadata) error {
  5774  	return &KMSDisabledException{
  5775  		RespMetadata: v,
  5776  	}
  5777  }
  5778  
  5779  // Code returns the exception type name.
  5780  func (s *KMSDisabledException) Code() string {
  5781  	return "KMSDisabledException"
  5782  }
  5783  
  5784  // Message returns the exception's message.
  5785  func (s *KMSDisabledException) Message() string {
  5786  	if s.Message_ != nil {
  5787  		return *s.Message_
  5788  	}
  5789  	return ""
  5790  }
  5791  
  5792  // OrigErr always returns nil, satisfies awserr.Error interface.
  5793  func (s *KMSDisabledException) OrigErr() error {
  5794  	return nil
  5795  }
  5796  
  5797  func (s *KMSDisabledException) Error() string {
  5798  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5799  }
  5800  
  5801  // Status code returns the HTTP status code for the request's response error.
  5802  func (s *KMSDisabledException) StatusCode() int {
  5803  	return s.RespMetadata.StatusCode
  5804  }
  5805  
  5806  // RequestID returns the service's response RequestID for request.
  5807  func (s *KMSDisabledException) RequestID() string {
  5808  	return s.RespMetadata.RequestID
  5809  }
  5810  
  5811  // The request was rejected because the state of the specified resource isn't
  5812  // valid for this request. For more information, see How Key State Affects Use
  5813  // of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
  5814  // in the AWS Key Management Service Developer Guide.
  5815  type KMSInvalidStateException struct {
  5816  	_            struct{}                  `type:"structure"`
  5817  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5818  
  5819  	// A message that provides information about the error.
  5820  	Message_ *string `locationName:"message" type:"string"`
  5821  }
  5822  
  5823  // String returns the string representation.
  5824  //
  5825  // API parameter values that are decorated as "sensitive" in the API will not
  5826  // be included in the string output. The member name will be present, but the
  5827  // value will be replaced with "sensitive".
  5828  func (s KMSInvalidStateException) String() string {
  5829  	return awsutil.Prettify(s)
  5830  }
  5831  
  5832  // GoString returns the string representation.
  5833  //
  5834  // API parameter values that are decorated as "sensitive" in the API will not
  5835  // be included in the string output. The member name will be present, but the
  5836  // value will be replaced with "sensitive".
  5837  func (s KMSInvalidStateException) GoString() string {
  5838  	return s.String()
  5839  }
  5840  
  5841  // The KMSInvalidStateException is and event in the SubscribeToShardEventStream group of events.
  5842  func (s *KMSInvalidStateException) eventSubscribeToShardEventStream() {}
  5843  
  5844  // UnmarshalEvent unmarshals the EventStream Message into the KMSInvalidStateException value.
  5845  // This method is only used internally within the SDK's EventStream handling.
  5846  func (s *KMSInvalidStateException) UnmarshalEvent(
  5847  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  5848  	msg eventstream.Message,
  5849  ) error {
  5850  	if err := payloadUnmarshaler.UnmarshalPayload(
  5851  		bytes.NewReader(msg.Payload), s,
  5852  	); err != nil {
  5853  		return err
  5854  	}
  5855  	return nil
  5856  }
  5857  
  5858  // MarshalEvent marshals the type into an stream event value. This method
  5859  // should only used internally within the SDK's EventStream handling.
  5860  func (s *KMSInvalidStateException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  5861  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  5862  	var buf bytes.Buffer
  5863  	if err = pm.MarshalPayload(&buf, s); err != nil {
  5864  		return eventstream.Message{}, err
  5865  	}
  5866  	msg.Payload = buf.Bytes()
  5867  	return msg, err
  5868  }
  5869  
  5870  func newErrorKMSInvalidStateException(v protocol.ResponseMetadata) error {
  5871  	return &KMSInvalidStateException{
  5872  		RespMetadata: v,
  5873  	}
  5874  }
  5875  
  5876  // Code returns the exception type name.
  5877  func (s *KMSInvalidStateException) Code() string {
  5878  	return "KMSInvalidStateException"
  5879  }
  5880  
  5881  // Message returns the exception's message.
  5882  func (s *KMSInvalidStateException) Message() string {
  5883  	if s.Message_ != nil {
  5884  		return *s.Message_
  5885  	}
  5886  	return ""
  5887  }
  5888  
  5889  // OrigErr always returns nil, satisfies awserr.Error interface.
  5890  func (s *KMSInvalidStateException) OrigErr() error {
  5891  	return nil
  5892  }
  5893  
  5894  func (s *KMSInvalidStateException) Error() string {
  5895  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5896  }
  5897  
  5898  // Status code returns the HTTP status code for the request's response error.
  5899  func (s *KMSInvalidStateException) StatusCode() int {
  5900  	return s.RespMetadata.StatusCode
  5901  }
  5902  
  5903  // RequestID returns the service's response RequestID for request.
  5904  func (s *KMSInvalidStateException) RequestID() string {
  5905  	return s.RespMetadata.RequestID
  5906  }
  5907  
  5908  // The request was rejected because the specified entity or resource can't be
  5909  // found.
  5910  type KMSNotFoundException struct {
  5911  	_            struct{}                  `type:"structure"`
  5912  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5913  
  5914  	// A message that provides information about the error.
  5915  	Message_ *string `locationName:"message" type:"string"`
  5916  }
  5917  
  5918  // String returns the string representation.
  5919  //
  5920  // API parameter values that are decorated as "sensitive" in the API will not
  5921  // be included in the string output. The member name will be present, but the
  5922  // value will be replaced with "sensitive".
  5923  func (s KMSNotFoundException) String() string {
  5924  	return awsutil.Prettify(s)
  5925  }
  5926  
  5927  // GoString returns the string representation.
  5928  //
  5929  // API parameter values that are decorated as "sensitive" in the API will not
  5930  // be included in the string output. The member name will be present, but the
  5931  // value will be replaced with "sensitive".
  5932  func (s KMSNotFoundException) GoString() string {
  5933  	return s.String()
  5934  }
  5935  
  5936  // The KMSNotFoundException is and event in the SubscribeToShardEventStream group of events.
  5937  func (s *KMSNotFoundException) eventSubscribeToShardEventStream() {}
  5938  
  5939  // UnmarshalEvent unmarshals the EventStream Message into the KMSNotFoundException value.
  5940  // This method is only used internally within the SDK's EventStream handling.
  5941  func (s *KMSNotFoundException) UnmarshalEvent(
  5942  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  5943  	msg eventstream.Message,
  5944  ) error {
  5945  	if err := payloadUnmarshaler.UnmarshalPayload(
  5946  		bytes.NewReader(msg.Payload), s,
  5947  	); err != nil {
  5948  		return err
  5949  	}
  5950  	return nil
  5951  }
  5952  
  5953  // MarshalEvent marshals the type into an stream event value. This method
  5954  // should only used internally within the SDK's EventStream handling.
  5955  func (s *KMSNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  5956  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  5957  	var buf bytes.Buffer
  5958  	if err = pm.MarshalPayload(&buf, s); err != nil {
  5959  		return eventstream.Message{}, err
  5960  	}
  5961  	msg.Payload = buf.Bytes()
  5962  	return msg, err
  5963  }
  5964  
  5965  func newErrorKMSNotFoundException(v protocol.ResponseMetadata) error {
  5966  	return &KMSNotFoundException{
  5967  		RespMetadata: v,
  5968  	}
  5969  }
  5970  
  5971  // Code returns the exception type name.
  5972  func (s *KMSNotFoundException) Code() string {
  5973  	return "KMSNotFoundException"
  5974  }
  5975  
  5976  // Message returns the exception's message.
  5977  func (s *KMSNotFoundException) Message() string {
  5978  	if s.Message_ != nil {
  5979  		return *s.Message_
  5980  	}
  5981  	return ""
  5982  }
  5983  
  5984  // OrigErr always returns nil, satisfies awserr.Error interface.
  5985  func (s *KMSNotFoundException) OrigErr() error {
  5986  	return nil
  5987  }
  5988  
  5989  func (s *KMSNotFoundException) Error() string {
  5990  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5991  }
  5992  
  5993  // Status code returns the HTTP status code for the request's response error.
  5994  func (s *KMSNotFoundException) StatusCode() int {
  5995  	return s.RespMetadata.StatusCode
  5996  }
  5997  
  5998  // RequestID returns the service's response RequestID for request.
  5999  func (s *KMSNotFoundException) RequestID() string {
  6000  	return s.RespMetadata.RequestID
  6001  }
  6002  
  6003  // The AWS access key ID needs a subscription for the service.
  6004  type KMSOptInRequired struct {
  6005  	_            struct{}                  `type:"structure"`
  6006  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6007  
  6008  	// A message that provides information about the error.
  6009  	Message_ *string `locationName:"message" type:"string"`
  6010  }
  6011  
  6012  // String returns the string representation.
  6013  //
  6014  // API parameter values that are decorated as "sensitive" in the API will not
  6015  // be included in the string output. The member name will be present, but the
  6016  // value will be replaced with "sensitive".
  6017  func (s KMSOptInRequired) String() string {
  6018  	return awsutil.Prettify(s)
  6019  }
  6020  
  6021  // GoString returns the string representation.
  6022  //
  6023  // API parameter values that are decorated as "sensitive" in the API will not
  6024  // be included in the string output. The member name will be present, but the
  6025  // value will be replaced with "sensitive".
  6026  func (s KMSOptInRequired) GoString() string {
  6027  	return s.String()
  6028  }
  6029  
  6030  // The KMSOptInRequired is and event in the SubscribeToShardEventStream group of events.
  6031  func (s *KMSOptInRequired) eventSubscribeToShardEventStream() {}
  6032  
  6033  // UnmarshalEvent unmarshals the EventStream Message into the KMSOptInRequired value.
  6034  // This method is only used internally within the SDK's EventStream handling.
  6035  func (s *KMSOptInRequired) UnmarshalEvent(
  6036  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  6037  	msg eventstream.Message,
  6038  ) error {
  6039  	if err := payloadUnmarshaler.UnmarshalPayload(
  6040  		bytes.NewReader(msg.Payload), s,
  6041  	); err != nil {
  6042  		return err
  6043  	}
  6044  	return nil
  6045  }
  6046  
  6047  // MarshalEvent marshals the type into an stream event value. This method
  6048  // should only used internally within the SDK's EventStream handling.
  6049  func (s *KMSOptInRequired) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  6050  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  6051  	var buf bytes.Buffer
  6052  	if err = pm.MarshalPayload(&buf, s); err != nil {
  6053  		return eventstream.Message{}, err
  6054  	}
  6055  	msg.Payload = buf.Bytes()
  6056  	return msg, err
  6057  }
  6058  
  6059  func newErrorKMSOptInRequired(v protocol.ResponseMetadata) error {
  6060  	return &KMSOptInRequired{
  6061  		RespMetadata: v,
  6062  	}
  6063  }
  6064  
  6065  // Code returns the exception type name.
  6066  func (s *KMSOptInRequired) Code() string {
  6067  	return "KMSOptInRequired"
  6068  }
  6069  
  6070  // Message returns the exception's message.
  6071  func (s *KMSOptInRequired) Message() string {
  6072  	if s.Message_ != nil {
  6073  		return *s.Message_
  6074  	}
  6075  	return ""
  6076  }
  6077  
  6078  // OrigErr always returns nil, satisfies awserr.Error interface.
  6079  func (s *KMSOptInRequired) OrigErr() error {
  6080  	return nil
  6081  }
  6082  
  6083  func (s *KMSOptInRequired) Error() string {
  6084  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6085  }
  6086  
  6087  // Status code returns the HTTP status code for the request's response error.
  6088  func (s *KMSOptInRequired) StatusCode() int {
  6089  	return s.RespMetadata.StatusCode
  6090  }
  6091  
  6092  // RequestID returns the service's response RequestID for request.
  6093  func (s *KMSOptInRequired) RequestID() string {
  6094  	return s.RespMetadata.RequestID
  6095  }
  6096  
  6097  // The request was denied due to request throttling. For more information about
  6098  // throttling, see Limits (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second)
  6099  // in the AWS Key Management Service Developer Guide.
  6100  type KMSThrottlingException struct {
  6101  	_            struct{}                  `type:"structure"`
  6102  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6103  
  6104  	// A message that provides information about the error.
  6105  	Message_ *string `locationName:"message" type:"string"`
  6106  }
  6107  
  6108  // String returns the string representation.
  6109  //
  6110  // API parameter values that are decorated as "sensitive" in the API will not
  6111  // be included in the string output. The member name will be present, but the
  6112  // value will be replaced with "sensitive".
  6113  func (s KMSThrottlingException) String() string {
  6114  	return awsutil.Prettify(s)
  6115  }
  6116  
  6117  // GoString returns the string representation.
  6118  //
  6119  // API parameter values that are decorated as "sensitive" in the API will not
  6120  // be included in the string output. The member name will be present, but the
  6121  // value will be replaced with "sensitive".
  6122  func (s KMSThrottlingException) GoString() string {
  6123  	return s.String()
  6124  }
  6125  
  6126  // The KMSThrottlingException is and event in the SubscribeToShardEventStream group of events.
  6127  func (s *KMSThrottlingException) eventSubscribeToShardEventStream() {}
  6128  
  6129  // UnmarshalEvent unmarshals the EventStream Message into the KMSThrottlingException value.
  6130  // This method is only used internally within the SDK's EventStream handling.
  6131  func (s *KMSThrottlingException) UnmarshalEvent(
  6132  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  6133  	msg eventstream.Message,
  6134  ) error {
  6135  	if err := payloadUnmarshaler.UnmarshalPayload(
  6136  		bytes.NewReader(msg.Payload), s,
  6137  	); err != nil {
  6138  		return err
  6139  	}
  6140  	return nil
  6141  }
  6142  
  6143  // MarshalEvent marshals the type into an stream event value. This method
  6144  // should only used internally within the SDK's EventStream handling.
  6145  func (s *KMSThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  6146  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  6147  	var buf bytes.Buffer
  6148  	if err = pm.MarshalPayload(&buf, s); err != nil {
  6149  		return eventstream.Message{}, err
  6150  	}
  6151  	msg.Payload = buf.Bytes()
  6152  	return msg, err
  6153  }
  6154  
  6155  func newErrorKMSThrottlingException(v protocol.ResponseMetadata) error {
  6156  	return &KMSThrottlingException{
  6157  		RespMetadata: v,
  6158  	}
  6159  }
  6160  
  6161  // Code returns the exception type name.
  6162  func (s *KMSThrottlingException) Code() string {
  6163  	return "KMSThrottlingException"
  6164  }
  6165  
  6166  // Message returns the exception's message.
  6167  func (s *KMSThrottlingException) Message() string {
  6168  	if s.Message_ != nil {
  6169  		return *s.Message_
  6170  	}
  6171  	return ""
  6172  }
  6173  
  6174  // OrigErr always returns nil, satisfies awserr.Error interface.
  6175  func (s *KMSThrottlingException) OrigErr() error {
  6176  	return nil
  6177  }
  6178  
  6179  func (s *KMSThrottlingException) Error() string {
  6180  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6181  }
  6182  
  6183  // Status code returns the HTTP status code for the request's response error.
  6184  func (s *KMSThrottlingException) StatusCode() int {
  6185  	return s.RespMetadata.StatusCode
  6186  }
  6187  
  6188  // RequestID returns the service's response RequestID for request.
  6189  func (s *KMSThrottlingException) RequestID() string {
  6190  	return s.RespMetadata.RequestID
  6191  }
  6192  
  6193  // The requested resource exceeds the maximum number allowed, or the number
  6194  // of concurrent stream requests exceeds the maximum number allowed.
  6195  type LimitExceededException struct {
  6196  	_            struct{}                  `type:"structure"`
  6197  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6198  
  6199  	// A message that provides information about the error.
  6200  	Message_ *string `locationName:"message" type:"string"`
  6201  }
  6202  
  6203  // String returns the string representation.
  6204  //
  6205  // API parameter values that are decorated as "sensitive" in the API will not
  6206  // be included in the string output. The member name will be present, but the
  6207  // value will be replaced with "sensitive".
  6208  func (s LimitExceededException) String() string {
  6209  	return awsutil.Prettify(s)
  6210  }
  6211  
  6212  // GoString returns the string representation.
  6213  //
  6214  // API parameter values that are decorated as "sensitive" in the API will not
  6215  // be included in the string output. The member name will be present, but the
  6216  // value will be replaced with "sensitive".
  6217  func (s LimitExceededException) GoString() string {
  6218  	return s.String()
  6219  }
  6220  
  6221  func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
  6222  	return &LimitExceededException{
  6223  		RespMetadata: v,
  6224  	}
  6225  }
  6226  
  6227  // Code returns the exception type name.
  6228  func (s *LimitExceededException) Code() string {
  6229  	return "LimitExceededException"
  6230  }
  6231  
  6232  // Message returns the exception's message.
  6233  func (s *LimitExceededException) Message() string {
  6234  	if s.Message_ != nil {
  6235  		return *s.Message_
  6236  	}
  6237  	return ""
  6238  }
  6239  
  6240  // OrigErr always returns nil, satisfies awserr.Error interface.
  6241  func (s *LimitExceededException) OrigErr() error {
  6242  	return nil
  6243  }
  6244  
  6245  func (s *LimitExceededException) Error() string {
  6246  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6247  }
  6248  
  6249  // Status code returns the HTTP status code for the request's response error.
  6250  func (s *LimitExceededException) StatusCode() int {
  6251  	return s.RespMetadata.StatusCode
  6252  }
  6253  
  6254  // RequestID returns the service's response RequestID for request.
  6255  func (s *LimitExceededException) RequestID() string {
  6256  	return s.RespMetadata.RequestID
  6257  }
  6258  
  6259  type ListShardsInput struct {
  6260  	_ struct{} `type:"structure"`
  6261  
  6262  	// Specify this parameter to indicate that you want to list the shards starting
  6263  	// with the shard whose ID immediately follows ExclusiveStartShardId.
  6264  	//
  6265  	// If you don't specify this parameter, the default behavior is for ListShards
  6266  	// to list the shards starting with the first one in the stream.
  6267  	//
  6268  	// You cannot specify this parameter if you specify NextToken.
  6269  	ExclusiveStartShardId *string `min:"1" type:"string"`
  6270  
  6271  	// The maximum number of shards to return in a single call to ListShards. The
  6272  	// minimum value you can specify for this parameter is 1, and the maximum is
  6273  	// 10,000, which is also the default.
  6274  	//
  6275  	// When the number of shards to be listed is greater than the value of MaxResults,
  6276  	// the response contains a NextToken value that you can use in a subsequent
  6277  	// call to ListShards to list the next set of shards.
  6278  	MaxResults *int64 `min:"1" type:"integer"`
  6279  
  6280  	// When the number of shards in the data stream is greater than the default
  6281  	// value for the MaxResults parameter, or if you explicitly specify a value
  6282  	// for MaxResults that is less than the number of shards in the data stream,
  6283  	// the response includes a pagination token named NextToken. You can specify
  6284  	// this NextToken value in a subsequent call to ListShards to list the next
  6285  	// set of shards.
  6286  	//
  6287  	// Don't specify StreamName or StreamCreationTimestamp if you specify NextToken
  6288  	// because the latter unambiguously identifies the stream.
  6289  	//
  6290  	// You can optionally specify a value for the MaxResults parameter when you
  6291  	// specify NextToken. If you specify a MaxResults value that is less than the
  6292  	// number of shards that the operation returns if you don't specify MaxResults,
  6293  	// the response will contain a new NextToken value. You can use the new NextToken
  6294  	// value in a subsequent call to the ListShards operation.
  6295  	//
  6296  	// Tokens expire after 300 seconds. When you obtain a value for NextToken in
  6297  	// the response to a call to ListShards, you have 300 seconds to use that value.
  6298  	// If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException.
  6299  	NextToken *string `min:"1" type:"string"`
  6300  
  6301  	ShardFilter *ShardFilter `type:"structure"`
  6302  
  6303  	// Specify this input parameter to distinguish data streams that have the same
  6304  	// name. For example, if you create a data stream and then delete it, and you
  6305  	// later create another data stream with the same name, you can use this input
  6306  	// parameter to specify which of the two streams you want to list the shards
  6307  	// for.
  6308  	//
  6309  	// You cannot specify this parameter if you specify the NextToken parameter.
  6310  	StreamCreationTimestamp *time.Time `type:"timestamp"`
  6311  
  6312  	// The name of the data stream whose shards you want to list.
  6313  	//
  6314  	// You cannot specify this parameter if you specify the NextToken parameter.
  6315  	StreamName *string `min:"1" type:"string"`
  6316  }
  6317  
  6318  // String returns the string representation.
  6319  //
  6320  // API parameter values that are decorated as "sensitive" in the API will not
  6321  // be included in the string output. The member name will be present, but the
  6322  // value will be replaced with "sensitive".
  6323  func (s ListShardsInput) String() string {
  6324  	return awsutil.Prettify(s)
  6325  }
  6326  
  6327  // GoString returns the string representation.
  6328  //
  6329  // API parameter values that are decorated as "sensitive" in the API will not
  6330  // be included in the string output. The member name will be present, but the
  6331  // value will be replaced with "sensitive".
  6332  func (s ListShardsInput) GoString() string {
  6333  	return s.String()
  6334  }
  6335  
  6336  // Validate inspects the fields of the type to determine if they are valid.
  6337  func (s *ListShardsInput) Validate() error {
  6338  	invalidParams := request.ErrInvalidParams{Context: "ListShardsInput"}
  6339  	if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 1 {
  6340  		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 1))
  6341  	}
  6342  	if s.MaxResults != nil && *s.MaxResults < 1 {
  6343  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6344  	}
  6345  	if s.NextToken != nil && len(*s.NextToken) < 1 {
  6346  		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  6347  	}
  6348  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  6349  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  6350  	}
  6351  	if s.ShardFilter != nil {
  6352  		if err := s.ShardFilter.Validate(); err != nil {
  6353  			invalidParams.AddNested("ShardFilter", err.(request.ErrInvalidParams))
  6354  		}
  6355  	}
  6356  
  6357  	if invalidParams.Len() > 0 {
  6358  		return invalidParams
  6359  	}
  6360  	return nil
  6361  }
  6362  
  6363  // SetExclusiveStartShardId sets the ExclusiveStartShardId field's value.
  6364  func (s *ListShardsInput) SetExclusiveStartShardId(v string) *ListShardsInput {
  6365  	s.ExclusiveStartShardId = &v
  6366  	return s
  6367  }
  6368  
  6369  // SetMaxResults sets the MaxResults field's value.
  6370  func (s *ListShardsInput) SetMaxResults(v int64) *ListShardsInput {
  6371  	s.MaxResults = &v
  6372  	return s
  6373  }
  6374  
  6375  // SetNextToken sets the NextToken field's value.
  6376  func (s *ListShardsInput) SetNextToken(v string) *ListShardsInput {
  6377  	s.NextToken = &v
  6378  	return s
  6379  }
  6380  
  6381  // SetShardFilter sets the ShardFilter field's value.
  6382  func (s *ListShardsInput) SetShardFilter(v *ShardFilter) *ListShardsInput {
  6383  	s.ShardFilter = v
  6384  	return s
  6385  }
  6386  
  6387  // SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value.
  6388  func (s *ListShardsInput) SetStreamCreationTimestamp(v time.Time) *ListShardsInput {
  6389  	s.StreamCreationTimestamp = &v
  6390  	return s
  6391  }
  6392  
  6393  // SetStreamName sets the StreamName field's value.
  6394  func (s *ListShardsInput) SetStreamName(v string) *ListShardsInput {
  6395  	s.StreamName = &v
  6396  	return s
  6397  }
  6398  
  6399  type ListShardsOutput struct {
  6400  	_ struct{} `type:"structure"`
  6401  
  6402  	// When the number of shards in the data stream is greater than the default
  6403  	// value for the MaxResults parameter, or if you explicitly specify a value
  6404  	// for MaxResults that is less than the number of shards in the data stream,
  6405  	// the response includes a pagination token named NextToken. You can specify
  6406  	// this NextToken value in a subsequent call to ListShards to list the next
  6407  	// set of shards. For more information about the use of this pagination token
  6408  	// when calling the ListShards operation, see ListShardsInput$NextToken.
  6409  	//
  6410  	// Tokens expire after 300 seconds. When you obtain a value for NextToken in
  6411  	// the response to a call to ListShards, you have 300 seconds to use that value.
  6412  	// If you specify an expired token in a call to ListShards, you get ExpiredNextTokenException.
  6413  	NextToken *string `min:"1" type:"string"`
  6414  
  6415  	// An array of JSON objects. Each object represents one shard and specifies
  6416  	// the IDs of the shard, the shard's parent, and the shard that's adjacent to
  6417  	// the shard's parent. Each object also contains the starting and ending hash
  6418  	// keys and the starting and ending sequence numbers for the shard.
  6419  	Shards []*Shard `type:"list"`
  6420  }
  6421  
  6422  // String returns the string representation.
  6423  //
  6424  // API parameter values that are decorated as "sensitive" in the API will not
  6425  // be included in the string output. The member name will be present, but the
  6426  // value will be replaced with "sensitive".
  6427  func (s ListShardsOutput) String() string {
  6428  	return awsutil.Prettify(s)
  6429  }
  6430  
  6431  // GoString returns the string representation.
  6432  //
  6433  // API parameter values that are decorated as "sensitive" in the API will not
  6434  // be included in the string output. The member name will be present, but the
  6435  // value will be replaced with "sensitive".
  6436  func (s ListShardsOutput) GoString() string {
  6437  	return s.String()
  6438  }
  6439  
  6440  // SetNextToken sets the NextToken field's value.
  6441  func (s *ListShardsOutput) SetNextToken(v string) *ListShardsOutput {
  6442  	s.NextToken = &v
  6443  	return s
  6444  }
  6445  
  6446  // SetShards sets the Shards field's value.
  6447  func (s *ListShardsOutput) SetShards(v []*Shard) *ListShardsOutput {
  6448  	s.Shards = v
  6449  	return s
  6450  }
  6451  
  6452  type ListStreamConsumersInput struct {
  6453  	_ struct{} `type:"structure"`
  6454  
  6455  	// The maximum number of consumers that you want a single call of ListStreamConsumers
  6456  	// to return.
  6457  	MaxResults *int64 `min:"1" type:"integer"`
  6458  
  6459  	// When the number of consumers that are registered with the data stream is
  6460  	// greater than the default value for the MaxResults parameter, or if you explicitly
  6461  	// specify a value for MaxResults that is less than the number of consumers
  6462  	// that are registered with the data stream, the response includes a pagination
  6463  	// token named NextToken. You can specify this NextToken value in a subsequent
  6464  	// call to ListStreamConsumers to list the next set of registered consumers.
  6465  	//
  6466  	// Don't specify StreamName or StreamCreationTimestamp if you specify NextToken
  6467  	// because the latter unambiguously identifies the stream.
  6468  	//
  6469  	// You can optionally specify a value for the MaxResults parameter when you
  6470  	// specify NextToken. If you specify a MaxResults value that is less than the
  6471  	// number of consumers that the operation returns if you don't specify MaxResults,
  6472  	// the response will contain a new NextToken value. You can use the new NextToken
  6473  	// value in a subsequent call to the ListStreamConsumers operation to list the
  6474  	// next set of consumers.
  6475  	//
  6476  	// Tokens expire after 300 seconds. When you obtain a value for NextToken in
  6477  	// the response to a call to ListStreamConsumers, you have 300 seconds to use
  6478  	// that value. If you specify an expired token in a call to ListStreamConsumers,
  6479  	// you get ExpiredNextTokenException.
  6480  	NextToken *string `min:"1" type:"string"`
  6481  
  6482  	// The ARN of the Kinesis data stream for which you want to list the registered
  6483  	// consumers. For more information, see Amazon Resource Names (ARNs) and AWS
  6484  	// Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams).
  6485  	//
  6486  	// StreamARN is a required field
  6487  	StreamARN *string `min:"1" type:"string" required:"true"`
  6488  
  6489  	// Specify this input parameter to distinguish data streams that have the same
  6490  	// name. For example, if you create a data stream and then delete it, and you
  6491  	// later create another data stream with the same name, you can use this input
  6492  	// parameter to specify which of the two streams you want to list the consumers
  6493  	// for.
  6494  	//
  6495  	// You can't specify this parameter if you specify the NextToken parameter.
  6496  	StreamCreationTimestamp *time.Time `type:"timestamp"`
  6497  }
  6498  
  6499  // String returns the string representation.
  6500  //
  6501  // API parameter values that are decorated as "sensitive" in the API will not
  6502  // be included in the string output. The member name will be present, but the
  6503  // value will be replaced with "sensitive".
  6504  func (s ListStreamConsumersInput) String() string {
  6505  	return awsutil.Prettify(s)
  6506  }
  6507  
  6508  // GoString returns the string representation.
  6509  //
  6510  // API parameter values that are decorated as "sensitive" in the API will not
  6511  // be included in the string output. The member name will be present, but the
  6512  // value will be replaced with "sensitive".
  6513  func (s ListStreamConsumersInput) GoString() string {
  6514  	return s.String()
  6515  }
  6516  
  6517  // Validate inspects the fields of the type to determine if they are valid.
  6518  func (s *ListStreamConsumersInput) Validate() error {
  6519  	invalidParams := request.ErrInvalidParams{Context: "ListStreamConsumersInput"}
  6520  	if s.MaxResults != nil && *s.MaxResults < 1 {
  6521  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6522  	}
  6523  	if s.NextToken != nil && len(*s.NextToken) < 1 {
  6524  		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  6525  	}
  6526  	if s.StreamARN == nil {
  6527  		invalidParams.Add(request.NewErrParamRequired("StreamARN"))
  6528  	}
  6529  	if s.StreamARN != nil && len(*s.StreamARN) < 1 {
  6530  		invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1))
  6531  	}
  6532  
  6533  	if invalidParams.Len() > 0 {
  6534  		return invalidParams
  6535  	}
  6536  	return nil
  6537  }
  6538  
  6539  // SetMaxResults sets the MaxResults field's value.
  6540  func (s *ListStreamConsumersInput) SetMaxResults(v int64) *ListStreamConsumersInput {
  6541  	s.MaxResults = &v
  6542  	return s
  6543  }
  6544  
  6545  // SetNextToken sets the NextToken field's value.
  6546  func (s *ListStreamConsumersInput) SetNextToken(v string) *ListStreamConsumersInput {
  6547  	s.NextToken = &v
  6548  	return s
  6549  }
  6550  
  6551  // SetStreamARN sets the StreamARN field's value.
  6552  func (s *ListStreamConsumersInput) SetStreamARN(v string) *ListStreamConsumersInput {
  6553  	s.StreamARN = &v
  6554  	return s
  6555  }
  6556  
  6557  // SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value.
  6558  func (s *ListStreamConsumersInput) SetStreamCreationTimestamp(v time.Time) *ListStreamConsumersInput {
  6559  	s.StreamCreationTimestamp = &v
  6560  	return s
  6561  }
  6562  
  6563  type ListStreamConsumersOutput struct {
  6564  	_ struct{} `type:"structure"`
  6565  
  6566  	// An array of JSON objects. Each object represents one registered consumer.
  6567  	Consumers []*Consumer `type:"list"`
  6568  
  6569  	// When the number of consumers that are registered with the data stream is
  6570  	// greater than the default value for the MaxResults parameter, or if you explicitly
  6571  	// specify a value for MaxResults that is less than the number of registered
  6572  	// consumers, the response includes a pagination token named NextToken. You
  6573  	// can specify this NextToken value in a subsequent call to ListStreamConsumers
  6574  	// to list the next set of registered consumers. For more information about
  6575  	// the use of this pagination token when calling the ListStreamConsumers operation,
  6576  	// see ListStreamConsumersInput$NextToken.
  6577  	//
  6578  	// Tokens expire after 300 seconds. When you obtain a value for NextToken in
  6579  	// the response to a call to ListStreamConsumers, you have 300 seconds to use
  6580  	// that value. If you specify an expired token in a call to ListStreamConsumers,
  6581  	// you get ExpiredNextTokenException.
  6582  	NextToken *string `min:"1" type:"string"`
  6583  }
  6584  
  6585  // String returns the string representation.
  6586  //
  6587  // API parameter values that are decorated as "sensitive" in the API will not
  6588  // be included in the string output. The member name will be present, but the
  6589  // value will be replaced with "sensitive".
  6590  func (s ListStreamConsumersOutput) String() string {
  6591  	return awsutil.Prettify(s)
  6592  }
  6593  
  6594  // GoString returns the string representation.
  6595  //
  6596  // API parameter values that are decorated as "sensitive" in the API will not
  6597  // be included in the string output. The member name will be present, but the
  6598  // value will be replaced with "sensitive".
  6599  func (s ListStreamConsumersOutput) GoString() string {
  6600  	return s.String()
  6601  }
  6602  
  6603  // SetConsumers sets the Consumers field's value.
  6604  func (s *ListStreamConsumersOutput) SetConsumers(v []*Consumer) *ListStreamConsumersOutput {
  6605  	s.Consumers = v
  6606  	return s
  6607  }
  6608  
  6609  // SetNextToken sets the NextToken field's value.
  6610  func (s *ListStreamConsumersOutput) SetNextToken(v string) *ListStreamConsumersOutput {
  6611  	s.NextToken = &v
  6612  	return s
  6613  }
  6614  
  6615  // Represents the input for ListStreams.
  6616  type ListStreamsInput struct {
  6617  	_ struct{} `type:"structure"`
  6618  
  6619  	// The name of the stream to start the list with.
  6620  	ExclusiveStartStreamName *string `min:"1" type:"string"`
  6621  
  6622  	// The maximum number of streams to list.
  6623  	Limit *int64 `min:"1" type:"integer"`
  6624  }
  6625  
  6626  // String returns the string representation.
  6627  //
  6628  // API parameter values that are decorated as "sensitive" in the API will not
  6629  // be included in the string output. The member name will be present, but the
  6630  // value will be replaced with "sensitive".
  6631  func (s ListStreamsInput) String() string {
  6632  	return awsutil.Prettify(s)
  6633  }
  6634  
  6635  // GoString returns the string representation.
  6636  //
  6637  // API parameter values that are decorated as "sensitive" in the API will not
  6638  // be included in the string output. The member name will be present, but the
  6639  // value will be replaced with "sensitive".
  6640  func (s ListStreamsInput) GoString() string {
  6641  	return s.String()
  6642  }
  6643  
  6644  // Validate inspects the fields of the type to determine if they are valid.
  6645  func (s *ListStreamsInput) Validate() error {
  6646  	invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"}
  6647  	if s.ExclusiveStartStreamName != nil && len(*s.ExclusiveStartStreamName) < 1 {
  6648  		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamName", 1))
  6649  	}
  6650  	if s.Limit != nil && *s.Limit < 1 {
  6651  		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6652  	}
  6653  
  6654  	if invalidParams.Len() > 0 {
  6655  		return invalidParams
  6656  	}
  6657  	return nil
  6658  }
  6659  
  6660  // SetExclusiveStartStreamName sets the ExclusiveStartStreamName field's value.
  6661  func (s *ListStreamsInput) SetExclusiveStartStreamName(v string) *ListStreamsInput {
  6662  	s.ExclusiveStartStreamName = &v
  6663  	return s
  6664  }
  6665  
  6666  // SetLimit sets the Limit field's value.
  6667  func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput {
  6668  	s.Limit = &v
  6669  	return s
  6670  }
  6671  
  6672  // Represents the output for ListStreams.
  6673  type ListStreamsOutput struct {
  6674  	_ struct{} `type:"structure"`
  6675  
  6676  	// If set to true, there are more streams available to list.
  6677  	//
  6678  	// HasMoreStreams is a required field
  6679  	HasMoreStreams *bool `type:"boolean" required:"true"`
  6680  
  6681  	// The names of the streams that are associated with the AWS account making
  6682  	// the ListStreams request.
  6683  	//
  6684  	// StreamNames is a required field
  6685  	StreamNames []*string `type:"list" required:"true"`
  6686  }
  6687  
  6688  // String returns the string representation.
  6689  //
  6690  // API parameter values that are decorated as "sensitive" in the API will not
  6691  // be included in the string output. The member name will be present, but the
  6692  // value will be replaced with "sensitive".
  6693  func (s ListStreamsOutput) String() string {
  6694  	return awsutil.Prettify(s)
  6695  }
  6696  
  6697  // GoString returns the string representation.
  6698  //
  6699  // API parameter values that are decorated as "sensitive" in the API will not
  6700  // be included in the string output. The member name will be present, but the
  6701  // value will be replaced with "sensitive".
  6702  func (s ListStreamsOutput) GoString() string {
  6703  	return s.String()
  6704  }
  6705  
  6706  // SetHasMoreStreams sets the HasMoreStreams field's value.
  6707  func (s *ListStreamsOutput) SetHasMoreStreams(v bool) *ListStreamsOutput {
  6708  	s.HasMoreStreams = &v
  6709  	return s
  6710  }
  6711  
  6712  // SetStreamNames sets the StreamNames field's value.
  6713  func (s *ListStreamsOutput) SetStreamNames(v []*string) *ListStreamsOutput {
  6714  	s.StreamNames = v
  6715  	return s
  6716  }
  6717  
  6718  // Represents the input for ListTagsForStream.
  6719  type ListTagsForStreamInput struct {
  6720  	_ struct{} `type:"structure"`
  6721  
  6722  	// The key to use as the starting point for the list of tags. If this parameter
  6723  	// is set, ListTagsForStream gets all tags that occur after ExclusiveStartTagKey.
  6724  	ExclusiveStartTagKey *string `min:"1" type:"string"`
  6725  
  6726  	// The number of tags to return. If this number is less than the total number
  6727  	// of tags associated with the stream, HasMoreTags is set to true. To list additional
  6728  	// tags, set ExclusiveStartTagKey to the last key in the response.
  6729  	Limit *int64 `min:"1" type:"integer"`
  6730  
  6731  	// The name of the stream.
  6732  	//
  6733  	// StreamName is a required field
  6734  	StreamName *string `min:"1" type:"string" required:"true"`
  6735  }
  6736  
  6737  // String returns the string representation.
  6738  //
  6739  // API parameter values that are decorated as "sensitive" in the API will not
  6740  // be included in the string output. The member name will be present, but the
  6741  // value will be replaced with "sensitive".
  6742  func (s ListTagsForStreamInput) String() string {
  6743  	return awsutil.Prettify(s)
  6744  }
  6745  
  6746  // GoString returns the string representation.
  6747  //
  6748  // API parameter values that are decorated as "sensitive" in the API will not
  6749  // be included in the string output. The member name will be present, but the
  6750  // value will be replaced with "sensitive".
  6751  func (s ListTagsForStreamInput) GoString() string {
  6752  	return s.String()
  6753  }
  6754  
  6755  // Validate inspects the fields of the type to determine if they are valid.
  6756  func (s *ListTagsForStreamInput) Validate() error {
  6757  	invalidParams := request.ErrInvalidParams{Context: "ListTagsForStreamInput"}
  6758  	if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 {
  6759  		invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1))
  6760  	}
  6761  	if s.Limit != nil && *s.Limit < 1 {
  6762  		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6763  	}
  6764  	if s.StreamName == nil {
  6765  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  6766  	}
  6767  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  6768  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  6769  	}
  6770  
  6771  	if invalidParams.Len() > 0 {
  6772  		return invalidParams
  6773  	}
  6774  	return nil
  6775  }
  6776  
  6777  // SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value.
  6778  func (s *ListTagsForStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForStreamInput {
  6779  	s.ExclusiveStartTagKey = &v
  6780  	return s
  6781  }
  6782  
  6783  // SetLimit sets the Limit field's value.
  6784  func (s *ListTagsForStreamInput) SetLimit(v int64) *ListTagsForStreamInput {
  6785  	s.Limit = &v
  6786  	return s
  6787  }
  6788  
  6789  // SetStreamName sets the StreamName field's value.
  6790  func (s *ListTagsForStreamInput) SetStreamName(v string) *ListTagsForStreamInput {
  6791  	s.StreamName = &v
  6792  	return s
  6793  }
  6794  
  6795  // Represents the output for ListTagsForStream.
  6796  type ListTagsForStreamOutput struct {
  6797  	_ struct{} `type:"structure"`
  6798  
  6799  	// If set to true, more tags are available. To request additional tags, set
  6800  	// ExclusiveStartTagKey to the key of the last tag returned.
  6801  	//
  6802  	// HasMoreTags is a required field
  6803  	HasMoreTags *bool `type:"boolean" required:"true"`
  6804  
  6805  	// A list of tags associated with StreamName, starting with the first tag after
  6806  	// ExclusiveStartTagKey and up to the specified Limit.
  6807  	//
  6808  	// Tags is a required field
  6809  	Tags []*Tag `type:"list" required:"true"`
  6810  }
  6811  
  6812  // String returns the string representation.
  6813  //
  6814  // API parameter values that are decorated as "sensitive" in the API will not
  6815  // be included in the string output. The member name will be present, but the
  6816  // value will be replaced with "sensitive".
  6817  func (s ListTagsForStreamOutput) String() string {
  6818  	return awsutil.Prettify(s)
  6819  }
  6820  
  6821  // GoString returns the string representation.
  6822  //
  6823  // API parameter values that are decorated as "sensitive" in the API will not
  6824  // be included in the string output. The member name will be present, but the
  6825  // value will be replaced with "sensitive".
  6826  func (s ListTagsForStreamOutput) GoString() string {
  6827  	return s.String()
  6828  }
  6829  
  6830  // SetHasMoreTags sets the HasMoreTags field's value.
  6831  func (s *ListTagsForStreamOutput) SetHasMoreTags(v bool) *ListTagsForStreamOutput {
  6832  	s.HasMoreTags = &v
  6833  	return s
  6834  }
  6835  
  6836  // SetTags sets the Tags field's value.
  6837  func (s *ListTagsForStreamOutput) SetTags(v []*Tag) *ListTagsForStreamOutput {
  6838  	s.Tags = v
  6839  	return s
  6840  }
  6841  
  6842  // Represents the input for MergeShards.
  6843  type MergeShardsInput struct {
  6844  	_ struct{} `type:"structure"`
  6845  
  6846  	// The shard ID of the adjacent shard for the merge.
  6847  	//
  6848  	// AdjacentShardToMerge is a required field
  6849  	AdjacentShardToMerge *string `min:"1" type:"string" required:"true"`
  6850  
  6851  	// The shard ID of the shard to combine with the adjacent shard for the merge.
  6852  	//
  6853  	// ShardToMerge is a required field
  6854  	ShardToMerge *string `min:"1" type:"string" required:"true"`
  6855  
  6856  	// The name of the stream for the merge.
  6857  	//
  6858  	// StreamName is a required field
  6859  	StreamName *string `min:"1" type:"string" required:"true"`
  6860  }
  6861  
  6862  // String returns the string representation.
  6863  //
  6864  // API parameter values that are decorated as "sensitive" in the API will not
  6865  // be included in the string output. The member name will be present, but the
  6866  // value will be replaced with "sensitive".
  6867  func (s MergeShardsInput) String() string {
  6868  	return awsutil.Prettify(s)
  6869  }
  6870  
  6871  // GoString returns the string representation.
  6872  //
  6873  // API parameter values that are decorated as "sensitive" in the API will not
  6874  // be included in the string output. The member name will be present, but the
  6875  // value will be replaced with "sensitive".
  6876  func (s MergeShardsInput) GoString() string {
  6877  	return s.String()
  6878  }
  6879  
  6880  // Validate inspects the fields of the type to determine if they are valid.
  6881  func (s *MergeShardsInput) Validate() error {
  6882  	invalidParams := request.ErrInvalidParams{Context: "MergeShardsInput"}
  6883  	if s.AdjacentShardToMerge == nil {
  6884  		invalidParams.Add(request.NewErrParamRequired("AdjacentShardToMerge"))
  6885  	}
  6886  	if s.AdjacentShardToMerge != nil && len(*s.AdjacentShardToMerge) < 1 {
  6887  		invalidParams.Add(request.NewErrParamMinLen("AdjacentShardToMerge", 1))
  6888  	}
  6889  	if s.ShardToMerge == nil {
  6890  		invalidParams.Add(request.NewErrParamRequired("ShardToMerge"))
  6891  	}
  6892  	if s.ShardToMerge != nil && len(*s.ShardToMerge) < 1 {
  6893  		invalidParams.Add(request.NewErrParamMinLen("ShardToMerge", 1))
  6894  	}
  6895  	if s.StreamName == nil {
  6896  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  6897  	}
  6898  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  6899  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  6900  	}
  6901  
  6902  	if invalidParams.Len() > 0 {
  6903  		return invalidParams
  6904  	}
  6905  	return nil
  6906  }
  6907  
  6908  // SetAdjacentShardToMerge sets the AdjacentShardToMerge field's value.
  6909  func (s *MergeShardsInput) SetAdjacentShardToMerge(v string) *MergeShardsInput {
  6910  	s.AdjacentShardToMerge = &v
  6911  	return s
  6912  }
  6913  
  6914  // SetShardToMerge sets the ShardToMerge field's value.
  6915  func (s *MergeShardsInput) SetShardToMerge(v string) *MergeShardsInput {
  6916  	s.ShardToMerge = &v
  6917  	return s
  6918  }
  6919  
  6920  // SetStreamName sets the StreamName field's value.
  6921  func (s *MergeShardsInput) SetStreamName(v string) *MergeShardsInput {
  6922  	s.StreamName = &v
  6923  	return s
  6924  }
  6925  
  6926  type MergeShardsOutput struct {
  6927  	_ struct{} `type:"structure"`
  6928  }
  6929  
  6930  // String returns the string representation.
  6931  //
  6932  // API parameter values that are decorated as "sensitive" in the API will not
  6933  // be included in the string output. The member name will be present, but the
  6934  // value will be replaced with "sensitive".
  6935  func (s MergeShardsOutput) String() string {
  6936  	return awsutil.Prettify(s)
  6937  }
  6938  
  6939  // GoString returns the string representation.
  6940  //
  6941  // API parameter values that are decorated as "sensitive" in the API will not
  6942  // be included in the string output. The member name will be present, but the
  6943  // value will be replaced with "sensitive".
  6944  func (s MergeShardsOutput) GoString() string {
  6945  	return s.String()
  6946  }
  6947  
  6948  // The request rate for the stream is too high, or the requested data is too
  6949  // large for the available throughput. Reduce the frequency or size of your
  6950  // requests. For more information, see Streams Limits (https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html)
  6951  // in the Amazon Kinesis Data Streams Developer Guide, and Error Retries and
  6952  // Exponential Backoff in AWS (https://docs.aws.amazon.com/general/latest/gr/api-retries.html)
  6953  // in the AWS General Reference.
  6954  type ProvisionedThroughputExceededException struct {
  6955  	_            struct{}                  `type:"structure"`
  6956  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6957  
  6958  	// A message that provides information about the error.
  6959  	Message_ *string `locationName:"message" type:"string"`
  6960  }
  6961  
  6962  // String returns the string representation.
  6963  //
  6964  // API parameter values that are decorated as "sensitive" in the API will not
  6965  // be included in the string output. The member name will be present, but the
  6966  // value will be replaced with "sensitive".
  6967  func (s ProvisionedThroughputExceededException) String() string {
  6968  	return awsutil.Prettify(s)
  6969  }
  6970  
  6971  // GoString returns the string representation.
  6972  //
  6973  // API parameter values that are decorated as "sensitive" in the API will not
  6974  // be included in the string output. The member name will be present, but the
  6975  // value will be replaced with "sensitive".
  6976  func (s ProvisionedThroughputExceededException) GoString() string {
  6977  	return s.String()
  6978  }
  6979  
  6980  func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error {
  6981  	return &ProvisionedThroughputExceededException{
  6982  		RespMetadata: v,
  6983  	}
  6984  }
  6985  
  6986  // Code returns the exception type name.
  6987  func (s *ProvisionedThroughputExceededException) Code() string {
  6988  	return "ProvisionedThroughputExceededException"
  6989  }
  6990  
  6991  // Message returns the exception's message.
  6992  func (s *ProvisionedThroughputExceededException) Message() string {
  6993  	if s.Message_ != nil {
  6994  		return *s.Message_
  6995  	}
  6996  	return ""
  6997  }
  6998  
  6999  // OrigErr always returns nil, satisfies awserr.Error interface.
  7000  func (s *ProvisionedThroughputExceededException) OrigErr() error {
  7001  	return nil
  7002  }
  7003  
  7004  func (s *ProvisionedThroughputExceededException) Error() string {
  7005  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7006  }
  7007  
  7008  // Status code returns the HTTP status code for the request's response error.
  7009  func (s *ProvisionedThroughputExceededException) StatusCode() int {
  7010  	return s.RespMetadata.StatusCode
  7011  }
  7012  
  7013  // RequestID returns the service's response RequestID for request.
  7014  func (s *ProvisionedThroughputExceededException) RequestID() string {
  7015  	return s.RespMetadata.RequestID
  7016  }
  7017  
  7018  // Represents the input for PutRecord.
  7019  type PutRecordInput struct {
  7020  	_ struct{} `type:"structure"`
  7021  
  7022  	// The data blob to put into the record, which is base64-encoded when the blob
  7023  	// is serialized. When the data blob (the payload before base64-encoding) is
  7024  	// added to the partition key size, the total size must not exceed the maximum
  7025  	// record size (1 MiB).
  7026  	// Data is automatically base64 encoded/decoded by the SDK.
  7027  	//
  7028  	// Data is a required field
  7029  	Data []byte `type:"blob" required:"true"`
  7030  
  7031  	// The hash value used to explicitly determine the shard the data record is
  7032  	// assigned to by overriding the partition key hash.
  7033  	ExplicitHashKey *string `type:"string"`
  7034  
  7035  	// Determines which shard in the stream the data record is assigned to. Partition
  7036  	// keys are Unicode strings with a maximum length limit of 256 characters for
  7037  	// each key. Amazon Kinesis Data Streams uses the partition key as input to
  7038  	// a hash function that maps the partition key and associated data to a specific
  7039  	// shard. Specifically, an MD5 hash function is used to map partition keys to
  7040  	// 128-bit integer values and to map associated data records to shards. As a
  7041  	// result of this hashing mechanism, all data records with the same partition
  7042  	// key map to the same shard within the stream.
  7043  	//
  7044  	// PartitionKey is a required field
  7045  	PartitionKey *string `min:"1" type:"string" required:"true"`
  7046  
  7047  	// Guarantees strictly increasing sequence numbers, for puts from the same client
  7048  	// and to the same partition key. Usage: set the SequenceNumberForOrdering of
  7049  	// record n to the sequence number of record n-1 (as returned in the result
  7050  	// when putting record n-1). If this parameter is not set, records are coarsely
  7051  	// ordered based on arrival time.
  7052  	SequenceNumberForOrdering *string `type:"string"`
  7053  
  7054  	// The name of the stream to put the data record into.
  7055  	//
  7056  	// StreamName is a required field
  7057  	StreamName *string `min:"1" type:"string" required:"true"`
  7058  }
  7059  
  7060  // String returns the string representation.
  7061  //
  7062  // API parameter values that are decorated as "sensitive" in the API will not
  7063  // be included in the string output. The member name will be present, but the
  7064  // value will be replaced with "sensitive".
  7065  func (s PutRecordInput) String() string {
  7066  	return awsutil.Prettify(s)
  7067  }
  7068  
  7069  // GoString returns the string representation.
  7070  //
  7071  // API parameter values that are decorated as "sensitive" in the API will not
  7072  // be included in the string output. The member name will be present, but the
  7073  // value will be replaced with "sensitive".
  7074  func (s PutRecordInput) GoString() string {
  7075  	return s.String()
  7076  }
  7077  
  7078  // Validate inspects the fields of the type to determine if they are valid.
  7079  func (s *PutRecordInput) Validate() error {
  7080  	invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"}
  7081  	if s.Data == nil {
  7082  		invalidParams.Add(request.NewErrParamRequired("Data"))
  7083  	}
  7084  	if s.PartitionKey == nil {
  7085  		invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
  7086  	}
  7087  	if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
  7088  		invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
  7089  	}
  7090  	if s.StreamName == nil {
  7091  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  7092  	}
  7093  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  7094  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  7095  	}
  7096  
  7097  	if invalidParams.Len() > 0 {
  7098  		return invalidParams
  7099  	}
  7100  	return nil
  7101  }
  7102  
  7103  // SetData sets the Data field's value.
  7104  func (s *PutRecordInput) SetData(v []byte) *PutRecordInput {
  7105  	s.Data = v
  7106  	return s
  7107  }
  7108  
  7109  // SetExplicitHashKey sets the ExplicitHashKey field's value.
  7110  func (s *PutRecordInput) SetExplicitHashKey(v string) *PutRecordInput {
  7111  	s.ExplicitHashKey = &v
  7112  	return s
  7113  }
  7114  
  7115  // SetPartitionKey sets the PartitionKey field's value.
  7116  func (s *PutRecordInput) SetPartitionKey(v string) *PutRecordInput {
  7117  	s.PartitionKey = &v
  7118  	return s
  7119  }
  7120  
  7121  // SetSequenceNumberForOrdering sets the SequenceNumberForOrdering field's value.
  7122  func (s *PutRecordInput) SetSequenceNumberForOrdering(v string) *PutRecordInput {
  7123  	s.SequenceNumberForOrdering = &v
  7124  	return s
  7125  }
  7126  
  7127  // SetStreamName sets the StreamName field's value.
  7128  func (s *PutRecordInput) SetStreamName(v string) *PutRecordInput {
  7129  	s.StreamName = &v
  7130  	return s
  7131  }
  7132  
  7133  // Represents the output for PutRecord.
  7134  type PutRecordOutput struct {
  7135  	_ struct{} `type:"structure"`
  7136  
  7137  	// The encryption type to use on the record. This parameter can be one of the
  7138  	// following values:
  7139  	//
  7140  	//    * NONE: Do not encrypt the records in the stream.
  7141  	//
  7142  	//    * KMS: Use server-side encryption on the records in the stream using a
  7143  	//    customer-managed AWS KMS key.
  7144  	EncryptionType *string `type:"string" enum:"EncryptionType"`
  7145  
  7146  	// The sequence number identifier that was assigned to the put data record.
  7147  	// The sequence number for the record is unique across all records in the stream.
  7148  	// A sequence number is the identifier associated with every record put into
  7149  	// the stream.
  7150  	//
  7151  	// SequenceNumber is a required field
  7152  	SequenceNumber *string `type:"string" required:"true"`
  7153  
  7154  	// The shard ID of the shard where the data record was placed.
  7155  	//
  7156  	// ShardId is a required field
  7157  	ShardId *string `min:"1" type:"string" required:"true"`
  7158  }
  7159  
  7160  // String returns the string representation.
  7161  //
  7162  // API parameter values that are decorated as "sensitive" in the API will not
  7163  // be included in the string output. The member name will be present, but the
  7164  // value will be replaced with "sensitive".
  7165  func (s PutRecordOutput) String() string {
  7166  	return awsutil.Prettify(s)
  7167  }
  7168  
  7169  // GoString returns the string representation.
  7170  //
  7171  // API parameter values that are decorated as "sensitive" in the API will not
  7172  // be included in the string output. The member name will be present, but the
  7173  // value will be replaced with "sensitive".
  7174  func (s PutRecordOutput) GoString() string {
  7175  	return s.String()
  7176  }
  7177  
  7178  // SetEncryptionType sets the EncryptionType field's value.
  7179  func (s *PutRecordOutput) SetEncryptionType(v string) *PutRecordOutput {
  7180  	s.EncryptionType = &v
  7181  	return s
  7182  }
  7183  
  7184  // SetSequenceNumber sets the SequenceNumber field's value.
  7185  func (s *PutRecordOutput) SetSequenceNumber(v string) *PutRecordOutput {
  7186  	s.SequenceNumber = &v
  7187  	return s
  7188  }
  7189  
  7190  // SetShardId sets the ShardId field's value.
  7191  func (s *PutRecordOutput) SetShardId(v string) *PutRecordOutput {
  7192  	s.ShardId = &v
  7193  	return s
  7194  }
  7195  
  7196  // A PutRecords request.
  7197  type PutRecordsInput struct {
  7198  	_ struct{} `type:"structure"`
  7199  
  7200  	// The records associated with the request.
  7201  	//
  7202  	// Records is a required field
  7203  	Records []*PutRecordsRequestEntry `min:"1" type:"list" required:"true"`
  7204  
  7205  	// The stream name associated with the request.
  7206  	//
  7207  	// StreamName is a required field
  7208  	StreamName *string `min:"1" type:"string" required:"true"`
  7209  }
  7210  
  7211  // String returns the string representation.
  7212  //
  7213  // API parameter values that are decorated as "sensitive" in the API will not
  7214  // be included in the string output. The member name will be present, but the
  7215  // value will be replaced with "sensitive".
  7216  func (s PutRecordsInput) String() string {
  7217  	return awsutil.Prettify(s)
  7218  }
  7219  
  7220  // GoString returns the string representation.
  7221  //
  7222  // API parameter values that are decorated as "sensitive" in the API will not
  7223  // be included in the string output. The member name will be present, but the
  7224  // value will be replaced with "sensitive".
  7225  func (s PutRecordsInput) GoString() string {
  7226  	return s.String()
  7227  }
  7228  
  7229  // Validate inspects the fields of the type to determine if they are valid.
  7230  func (s *PutRecordsInput) Validate() error {
  7231  	invalidParams := request.ErrInvalidParams{Context: "PutRecordsInput"}
  7232  	if s.Records == nil {
  7233  		invalidParams.Add(request.NewErrParamRequired("Records"))
  7234  	}
  7235  	if s.Records != nil && len(s.Records) < 1 {
  7236  		invalidParams.Add(request.NewErrParamMinLen("Records", 1))
  7237  	}
  7238  	if s.StreamName == nil {
  7239  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  7240  	}
  7241  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  7242  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  7243  	}
  7244  	if s.Records != nil {
  7245  		for i, v := range s.Records {
  7246  			if v == nil {
  7247  				continue
  7248  			}
  7249  			if err := v.Validate(); err != nil {
  7250  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams))
  7251  			}
  7252  		}
  7253  	}
  7254  
  7255  	if invalidParams.Len() > 0 {
  7256  		return invalidParams
  7257  	}
  7258  	return nil
  7259  }
  7260  
  7261  // SetRecords sets the Records field's value.
  7262  func (s *PutRecordsInput) SetRecords(v []*PutRecordsRequestEntry) *PutRecordsInput {
  7263  	s.Records = v
  7264  	return s
  7265  }
  7266  
  7267  // SetStreamName sets the StreamName field's value.
  7268  func (s *PutRecordsInput) SetStreamName(v string) *PutRecordsInput {
  7269  	s.StreamName = &v
  7270  	return s
  7271  }
  7272  
  7273  // PutRecords results.
  7274  type PutRecordsOutput struct {
  7275  	_ struct{} `type:"structure"`
  7276  
  7277  	// The encryption type used on the records. This parameter can be one of the
  7278  	// following values:
  7279  	//
  7280  	//    * NONE: Do not encrypt the records.
  7281  	//
  7282  	//    * KMS: Use server-side encryption on the records using a customer-managed
  7283  	//    AWS KMS key.
  7284  	EncryptionType *string `type:"string" enum:"EncryptionType"`
  7285  
  7286  	// The number of unsuccessfully processed records in a PutRecords request.
  7287  	FailedRecordCount *int64 `min:"1" type:"integer"`
  7288  
  7289  	// An array of successfully and unsuccessfully processed record results, correlated
  7290  	// with the request by natural ordering. A record that is successfully added
  7291  	// to a stream includes SequenceNumber and ShardId in the result. A record that
  7292  	// fails to be added to a stream includes ErrorCode and ErrorMessage in the
  7293  	// result.
  7294  	//
  7295  	// Records is a required field
  7296  	Records []*PutRecordsResultEntry `min:"1" type:"list" required:"true"`
  7297  }
  7298  
  7299  // String returns the string representation.
  7300  //
  7301  // API parameter values that are decorated as "sensitive" in the API will not
  7302  // be included in the string output. The member name will be present, but the
  7303  // value will be replaced with "sensitive".
  7304  func (s PutRecordsOutput) String() string {
  7305  	return awsutil.Prettify(s)
  7306  }
  7307  
  7308  // GoString returns the string representation.
  7309  //
  7310  // API parameter values that are decorated as "sensitive" in the API will not
  7311  // be included in the string output. The member name will be present, but the
  7312  // value will be replaced with "sensitive".
  7313  func (s PutRecordsOutput) GoString() string {
  7314  	return s.String()
  7315  }
  7316  
  7317  // SetEncryptionType sets the EncryptionType field's value.
  7318  func (s *PutRecordsOutput) SetEncryptionType(v string) *PutRecordsOutput {
  7319  	s.EncryptionType = &v
  7320  	return s
  7321  }
  7322  
  7323  // SetFailedRecordCount sets the FailedRecordCount field's value.
  7324  func (s *PutRecordsOutput) SetFailedRecordCount(v int64) *PutRecordsOutput {
  7325  	s.FailedRecordCount = &v
  7326  	return s
  7327  }
  7328  
  7329  // SetRecords sets the Records field's value.
  7330  func (s *PutRecordsOutput) SetRecords(v []*PutRecordsResultEntry) *PutRecordsOutput {
  7331  	s.Records = v
  7332  	return s
  7333  }
  7334  
  7335  // Represents the output for PutRecords.
  7336  type PutRecordsRequestEntry struct {
  7337  	_ struct{} `type:"structure"`
  7338  
  7339  	// The data blob to put into the record, which is base64-encoded when the blob
  7340  	// is serialized. When the data blob (the payload before base64-encoding) is
  7341  	// added to the partition key size, the total size must not exceed the maximum
  7342  	// record size (1 MiB).
  7343  	// Data is automatically base64 encoded/decoded by the SDK.
  7344  	//
  7345  	// Data is a required field
  7346  	Data []byte `type:"blob" required:"true"`
  7347  
  7348  	// The hash value used to determine explicitly the shard that the data record
  7349  	// is assigned to by overriding the partition key hash.
  7350  	ExplicitHashKey *string `type:"string"`
  7351  
  7352  	// Determines which shard in the stream the data record is assigned to. Partition
  7353  	// keys are Unicode strings with a maximum length limit of 256 characters for
  7354  	// each key. Amazon Kinesis Data Streams uses the partition key as input to
  7355  	// a hash function that maps the partition key and associated data to a specific
  7356  	// shard. Specifically, an MD5 hash function is used to map partition keys to
  7357  	// 128-bit integer values and to map associated data records to shards. As a
  7358  	// result of this hashing mechanism, all data records with the same partition
  7359  	// key map to the same shard within the stream.
  7360  	//
  7361  	// PartitionKey is a required field
  7362  	PartitionKey *string `min:"1" type:"string" required:"true"`
  7363  }
  7364  
  7365  // String returns the string representation.
  7366  //
  7367  // API parameter values that are decorated as "sensitive" in the API will not
  7368  // be included in the string output. The member name will be present, but the
  7369  // value will be replaced with "sensitive".
  7370  func (s PutRecordsRequestEntry) String() string {
  7371  	return awsutil.Prettify(s)
  7372  }
  7373  
  7374  // GoString returns the string representation.
  7375  //
  7376  // API parameter values that are decorated as "sensitive" in the API will not
  7377  // be included in the string output. The member name will be present, but the
  7378  // value will be replaced with "sensitive".
  7379  func (s PutRecordsRequestEntry) GoString() string {
  7380  	return s.String()
  7381  }
  7382  
  7383  // Validate inspects the fields of the type to determine if they are valid.
  7384  func (s *PutRecordsRequestEntry) Validate() error {
  7385  	invalidParams := request.ErrInvalidParams{Context: "PutRecordsRequestEntry"}
  7386  	if s.Data == nil {
  7387  		invalidParams.Add(request.NewErrParamRequired("Data"))
  7388  	}
  7389  	if s.PartitionKey == nil {
  7390  		invalidParams.Add(request.NewErrParamRequired("PartitionKey"))
  7391  	}
  7392  	if s.PartitionKey != nil && len(*s.PartitionKey) < 1 {
  7393  		invalidParams.Add(request.NewErrParamMinLen("PartitionKey", 1))
  7394  	}
  7395  
  7396  	if invalidParams.Len() > 0 {
  7397  		return invalidParams
  7398  	}
  7399  	return nil
  7400  }
  7401  
  7402  // SetData sets the Data field's value.
  7403  func (s *PutRecordsRequestEntry) SetData(v []byte) *PutRecordsRequestEntry {
  7404  	s.Data = v
  7405  	return s
  7406  }
  7407  
  7408  // SetExplicitHashKey sets the ExplicitHashKey field's value.
  7409  func (s *PutRecordsRequestEntry) SetExplicitHashKey(v string) *PutRecordsRequestEntry {
  7410  	s.ExplicitHashKey = &v
  7411  	return s
  7412  }
  7413  
  7414  // SetPartitionKey sets the PartitionKey field's value.
  7415  func (s *PutRecordsRequestEntry) SetPartitionKey(v string) *PutRecordsRequestEntry {
  7416  	s.PartitionKey = &v
  7417  	return s
  7418  }
  7419  
  7420  // Represents the result of an individual record from a PutRecords request.
  7421  // A record that is successfully added to a stream includes SequenceNumber and
  7422  // ShardId in the result. A record that fails to be added to the stream includes
  7423  // ErrorCode and ErrorMessage in the result.
  7424  type PutRecordsResultEntry struct {
  7425  	_ struct{} `type:"structure"`
  7426  
  7427  	// The error code for an individual record result. ErrorCodes can be either
  7428  	// ProvisionedThroughputExceededException or InternalFailure.
  7429  	ErrorCode *string `type:"string"`
  7430  
  7431  	// The error message for an individual record result. An ErrorCode value of
  7432  	// ProvisionedThroughputExceededException has an error message that includes
  7433  	// the account ID, stream name, and shard ID. An ErrorCode value of InternalFailure
  7434  	// has the error message "Internal Service Failure".
  7435  	ErrorMessage *string `type:"string"`
  7436  
  7437  	// The sequence number for an individual record result.
  7438  	SequenceNumber *string `type:"string"`
  7439  
  7440  	// The shard ID for an individual record result.
  7441  	ShardId *string `min:"1" type:"string"`
  7442  }
  7443  
  7444  // String returns the string representation.
  7445  //
  7446  // API parameter values that are decorated as "sensitive" in the API will not
  7447  // be included in the string output. The member name will be present, but the
  7448  // value will be replaced with "sensitive".
  7449  func (s PutRecordsResultEntry) String() string {
  7450  	return awsutil.Prettify(s)
  7451  }
  7452  
  7453  // GoString returns the string representation.
  7454  //
  7455  // API parameter values that are decorated as "sensitive" in the API will not
  7456  // be included in the string output. The member name will be present, but the
  7457  // value will be replaced with "sensitive".
  7458  func (s PutRecordsResultEntry) GoString() string {
  7459  	return s.String()
  7460  }
  7461  
  7462  // SetErrorCode sets the ErrorCode field's value.
  7463  func (s *PutRecordsResultEntry) SetErrorCode(v string) *PutRecordsResultEntry {
  7464  	s.ErrorCode = &v
  7465  	return s
  7466  }
  7467  
  7468  // SetErrorMessage sets the ErrorMessage field's value.
  7469  func (s *PutRecordsResultEntry) SetErrorMessage(v string) *PutRecordsResultEntry {
  7470  	s.ErrorMessage = &v
  7471  	return s
  7472  }
  7473  
  7474  // SetSequenceNumber sets the SequenceNumber field's value.
  7475  func (s *PutRecordsResultEntry) SetSequenceNumber(v string) *PutRecordsResultEntry {
  7476  	s.SequenceNumber = &v
  7477  	return s
  7478  }
  7479  
  7480  // SetShardId sets the ShardId field's value.
  7481  func (s *PutRecordsResultEntry) SetShardId(v string) *PutRecordsResultEntry {
  7482  	s.ShardId = &v
  7483  	return s
  7484  }
  7485  
  7486  // The unit of data of the Kinesis data stream, which is composed of a sequence
  7487  // number, a partition key, and a data blob.
  7488  type Record struct {
  7489  	_ struct{} `type:"structure"`
  7490  
  7491  	// The approximate time that the record was inserted into the stream.
  7492  	ApproximateArrivalTimestamp *time.Time `type:"timestamp"`
  7493  
  7494  	// The data blob. The data in the blob is both opaque and immutable to Kinesis
  7495  	// Data Streams, which does not inspect, interpret, or change the data in the
  7496  	// blob in any way. When the data blob (the payload before base64-encoding)
  7497  	// is added to the partition key size, the total size must not exceed the maximum
  7498  	// record size (1 MiB).
  7499  	// Data is automatically base64 encoded/decoded by the SDK.
  7500  	//
  7501  	// Data is a required field
  7502  	Data []byte `type:"blob" required:"true"`
  7503  
  7504  	// The encryption type used on the record. This parameter can be one of the
  7505  	// following values:
  7506  	//
  7507  	//    * NONE: Do not encrypt the records in the stream.
  7508  	//
  7509  	//    * KMS: Use server-side encryption on the records in the stream using a
  7510  	//    customer-managed AWS KMS key.
  7511  	EncryptionType *string `type:"string" enum:"EncryptionType"`
  7512  
  7513  	// Identifies which shard in the stream the data record is assigned to.
  7514  	//
  7515  	// PartitionKey is a required field
  7516  	PartitionKey *string `min:"1" type:"string" required:"true"`
  7517  
  7518  	// The unique identifier of the record within its shard.
  7519  	//
  7520  	// SequenceNumber is a required field
  7521  	SequenceNumber *string `type:"string" required:"true"`
  7522  }
  7523  
  7524  // String returns the string representation.
  7525  //
  7526  // API parameter values that are decorated as "sensitive" in the API will not
  7527  // be included in the string output. The member name will be present, but the
  7528  // value will be replaced with "sensitive".
  7529  func (s Record) String() string {
  7530  	return awsutil.Prettify(s)
  7531  }
  7532  
  7533  // GoString returns the string representation.
  7534  //
  7535  // API parameter values that are decorated as "sensitive" in the API will not
  7536  // be included in the string output. The member name will be present, but the
  7537  // value will be replaced with "sensitive".
  7538  func (s Record) GoString() string {
  7539  	return s.String()
  7540  }
  7541  
  7542  // SetApproximateArrivalTimestamp sets the ApproximateArrivalTimestamp field's value.
  7543  func (s *Record) SetApproximateArrivalTimestamp(v time.Time) *Record {
  7544  	s.ApproximateArrivalTimestamp = &v
  7545  	return s
  7546  }
  7547  
  7548  // SetData sets the Data field's value.
  7549  func (s *Record) SetData(v []byte) *Record {
  7550  	s.Data = v
  7551  	return s
  7552  }
  7553  
  7554  // SetEncryptionType sets the EncryptionType field's value.
  7555  func (s *Record) SetEncryptionType(v string) *Record {
  7556  	s.EncryptionType = &v
  7557  	return s
  7558  }
  7559  
  7560  // SetPartitionKey sets the PartitionKey field's value.
  7561  func (s *Record) SetPartitionKey(v string) *Record {
  7562  	s.PartitionKey = &v
  7563  	return s
  7564  }
  7565  
  7566  // SetSequenceNumber sets the SequenceNumber field's value.
  7567  func (s *Record) SetSequenceNumber(v string) *Record {
  7568  	s.SequenceNumber = &v
  7569  	return s
  7570  }
  7571  
  7572  type RegisterStreamConsumerInput struct {
  7573  	_ struct{} `type:"structure"`
  7574  
  7575  	// For a given Kinesis data stream, each consumer must have a unique name. However,
  7576  	// consumer names don't have to be unique across data streams.
  7577  	//
  7578  	// ConsumerName is a required field
  7579  	ConsumerName *string `min:"1" type:"string" required:"true"`
  7580  
  7581  	// The ARN of the Kinesis data stream that you want to register the consumer
  7582  	// with. For more info, see Amazon Resource Names (ARNs) and AWS Service Namespaces
  7583  	// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams).
  7584  	//
  7585  	// StreamARN is a required field
  7586  	StreamARN *string `min:"1" type:"string" required:"true"`
  7587  }
  7588  
  7589  // String returns the string representation.
  7590  //
  7591  // API parameter values that are decorated as "sensitive" in the API will not
  7592  // be included in the string output. The member name will be present, but the
  7593  // value will be replaced with "sensitive".
  7594  func (s RegisterStreamConsumerInput) String() string {
  7595  	return awsutil.Prettify(s)
  7596  }
  7597  
  7598  // GoString returns the string representation.
  7599  //
  7600  // API parameter values that are decorated as "sensitive" in the API will not
  7601  // be included in the string output. The member name will be present, but the
  7602  // value will be replaced with "sensitive".
  7603  func (s RegisterStreamConsumerInput) GoString() string {
  7604  	return s.String()
  7605  }
  7606  
  7607  // Validate inspects the fields of the type to determine if they are valid.
  7608  func (s *RegisterStreamConsumerInput) Validate() error {
  7609  	invalidParams := request.ErrInvalidParams{Context: "RegisterStreamConsumerInput"}
  7610  	if s.ConsumerName == nil {
  7611  		invalidParams.Add(request.NewErrParamRequired("ConsumerName"))
  7612  	}
  7613  	if s.ConsumerName != nil && len(*s.ConsumerName) < 1 {
  7614  		invalidParams.Add(request.NewErrParamMinLen("ConsumerName", 1))
  7615  	}
  7616  	if s.StreamARN == nil {
  7617  		invalidParams.Add(request.NewErrParamRequired("StreamARN"))
  7618  	}
  7619  	if s.StreamARN != nil && len(*s.StreamARN) < 1 {
  7620  		invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1))
  7621  	}
  7622  
  7623  	if invalidParams.Len() > 0 {
  7624  		return invalidParams
  7625  	}
  7626  	return nil
  7627  }
  7628  
  7629  // SetConsumerName sets the ConsumerName field's value.
  7630  func (s *RegisterStreamConsumerInput) SetConsumerName(v string) *RegisterStreamConsumerInput {
  7631  	s.ConsumerName = &v
  7632  	return s
  7633  }
  7634  
  7635  // SetStreamARN sets the StreamARN field's value.
  7636  func (s *RegisterStreamConsumerInput) SetStreamARN(v string) *RegisterStreamConsumerInput {
  7637  	s.StreamARN = &v
  7638  	return s
  7639  }
  7640  
  7641  type RegisterStreamConsumerOutput struct {
  7642  	_ struct{} `type:"structure"`
  7643  
  7644  	// An object that represents the details of the consumer you registered. When
  7645  	// you register a consumer, it gets an ARN that is generated by Kinesis Data
  7646  	// Streams.
  7647  	//
  7648  	// Consumer is a required field
  7649  	Consumer *Consumer `type:"structure" required:"true"`
  7650  }
  7651  
  7652  // String returns the string representation.
  7653  //
  7654  // API parameter values that are decorated as "sensitive" in the API will not
  7655  // be included in the string output. The member name will be present, but the
  7656  // value will be replaced with "sensitive".
  7657  func (s RegisterStreamConsumerOutput) String() string {
  7658  	return awsutil.Prettify(s)
  7659  }
  7660  
  7661  // GoString returns the string representation.
  7662  //
  7663  // API parameter values that are decorated as "sensitive" in the API will not
  7664  // be included in the string output. The member name will be present, but the
  7665  // value will be replaced with "sensitive".
  7666  func (s RegisterStreamConsumerOutput) GoString() string {
  7667  	return s.String()
  7668  }
  7669  
  7670  // SetConsumer sets the Consumer field's value.
  7671  func (s *RegisterStreamConsumerOutput) SetConsumer(v *Consumer) *RegisterStreamConsumerOutput {
  7672  	s.Consumer = v
  7673  	return s
  7674  }
  7675  
  7676  // Represents the input for RemoveTagsFromStream.
  7677  type RemoveTagsFromStreamInput struct {
  7678  	_ struct{} `type:"structure"`
  7679  
  7680  	// The name of the stream.
  7681  	//
  7682  	// StreamName is a required field
  7683  	StreamName *string `min:"1" type:"string" required:"true"`
  7684  
  7685  	// A list of tag keys. Each corresponding tag is removed from the stream.
  7686  	//
  7687  	// TagKeys is a required field
  7688  	TagKeys []*string `min:"1" type:"list" required:"true"`
  7689  }
  7690  
  7691  // String returns the string representation.
  7692  //
  7693  // API parameter values that are decorated as "sensitive" in the API will not
  7694  // be included in the string output. The member name will be present, but the
  7695  // value will be replaced with "sensitive".
  7696  func (s RemoveTagsFromStreamInput) String() string {
  7697  	return awsutil.Prettify(s)
  7698  }
  7699  
  7700  // GoString returns the string representation.
  7701  //
  7702  // API parameter values that are decorated as "sensitive" in the API will not
  7703  // be included in the string output. The member name will be present, but the
  7704  // value will be replaced with "sensitive".
  7705  func (s RemoveTagsFromStreamInput) GoString() string {
  7706  	return s.String()
  7707  }
  7708  
  7709  // Validate inspects the fields of the type to determine if they are valid.
  7710  func (s *RemoveTagsFromStreamInput) Validate() error {
  7711  	invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromStreamInput"}
  7712  	if s.StreamName == nil {
  7713  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  7714  	}
  7715  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  7716  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  7717  	}
  7718  	if s.TagKeys == nil {
  7719  		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  7720  	}
  7721  	if s.TagKeys != nil && len(s.TagKeys) < 1 {
  7722  		invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
  7723  	}
  7724  
  7725  	if invalidParams.Len() > 0 {
  7726  		return invalidParams
  7727  	}
  7728  	return nil
  7729  }
  7730  
  7731  // SetStreamName sets the StreamName field's value.
  7732  func (s *RemoveTagsFromStreamInput) SetStreamName(v string) *RemoveTagsFromStreamInput {
  7733  	s.StreamName = &v
  7734  	return s
  7735  }
  7736  
  7737  // SetTagKeys sets the TagKeys field's value.
  7738  func (s *RemoveTagsFromStreamInput) SetTagKeys(v []*string) *RemoveTagsFromStreamInput {
  7739  	s.TagKeys = v
  7740  	return s
  7741  }
  7742  
  7743  type RemoveTagsFromStreamOutput struct {
  7744  	_ struct{} `type:"structure"`
  7745  }
  7746  
  7747  // String returns the string representation.
  7748  //
  7749  // API parameter values that are decorated as "sensitive" in the API will not
  7750  // be included in the string output. The member name will be present, but the
  7751  // value will be replaced with "sensitive".
  7752  func (s RemoveTagsFromStreamOutput) String() string {
  7753  	return awsutil.Prettify(s)
  7754  }
  7755  
  7756  // GoString returns the string representation.
  7757  //
  7758  // API parameter values that are decorated as "sensitive" in the API will not
  7759  // be included in the string output. The member name will be present, but the
  7760  // value will be replaced with "sensitive".
  7761  func (s RemoveTagsFromStreamOutput) GoString() string {
  7762  	return s.String()
  7763  }
  7764  
  7765  // The resource is not available for this operation. For successful operation,
  7766  // the resource must be in the ACTIVE state.
  7767  type ResourceInUseException struct {
  7768  	_            struct{}                  `type:"structure"`
  7769  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7770  
  7771  	// A message that provides information about the error.
  7772  	Message_ *string `locationName:"message" type:"string"`
  7773  }
  7774  
  7775  // String returns the string representation.
  7776  //
  7777  // API parameter values that are decorated as "sensitive" in the API will not
  7778  // be included in the string output. The member name will be present, but the
  7779  // value will be replaced with "sensitive".
  7780  func (s ResourceInUseException) String() string {
  7781  	return awsutil.Prettify(s)
  7782  }
  7783  
  7784  // GoString returns the string representation.
  7785  //
  7786  // API parameter values that are decorated as "sensitive" in the API will not
  7787  // be included in the string output. The member name will be present, but the
  7788  // value will be replaced with "sensitive".
  7789  func (s ResourceInUseException) GoString() string {
  7790  	return s.String()
  7791  }
  7792  
  7793  // The ResourceInUseException is and event in the SubscribeToShardEventStream group of events.
  7794  func (s *ResourceInUseException) eventSubscribeToShardEventStream() {}
  7795  
  7796  // UnmarshalEvent unmarshals the EventStream Message into the ResourceInUseException value.
  7797  // This method is only used internally within the SDK's EventStream handling.
  7798  func (s *ResourceInUseException) UnmarshalEvent(
  7799  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  7800  	msg eventstream.Message,
  7801  ) error {
  7802  	if err := payloadUnmarshaler.UnmarshalPayload(
  7803  		bytes.NewReader(msg.Payload), s,
  7804  	); err != nil {
  7805  		return err
  7806  	}
  7807  	return nil
  7808  }
  7809  
  7810  // MarshalEvent marshals the type into an stream event value. This method
  7811  // should only used internally within the SDK's EventStream handling.
  7812  func (s *ResourceInUseException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  7813  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  7814  	var buf bytes.Buffer
  7815  	if err = pm.MarshalPayload(&buf, s); err != nil {
  7816  		return eventstream.Message{}, err
  7817  	}
  7818  	msg.Payload = buf.Bytes()
  7819  	return msg, err
  7820  }
  7821  
  7822  func newErrorResourceInUseException(v protocol.ResponseMetadata) error {
  7823  	return &ResourceInUseException{
  7824  		RespMetadata: v,
  7825  	}
  7826  }
  7827  
  7828  // Code returns the exception type name.
  7829  func (s *ResourceInUseException) Code() string {
  7830  	return "ResourceInUseException"
  7831  }
  7832  
  7833  // Message returns the exception's message.
  7834  func (s *ResourceInUseException) Message() string {
  7835  	if s.Message_ != nil {
  7836  		return *s.Message_
  7837  	}
  7838  	return ""
  7839  }
  7840  
  7841  // OrigErr always returns nil, satisfies awserr.Error interface.
  7842  func (s *ResourceInUseException) OrigErr() error {
  7843  	return nil
  7844  }
  7845  
  7846  func (s *ResourceInUseException) Error() string {
  7847  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7848  }
  7849  
  7850  // Status code returns the HTTP status code for the request's response error.
  7851  func (s *ResourceInUseException) StatusCode() int {
  7852  	return s.RespMetadata.StatusCode
  7853  }
  7854  
  7855  // RequestID returns the service's response RequestID for request.
  7856  func (s *ResourceInUseException) RequestID() string {
  7857  	return s.RespMetadata.RequestID
  7858  }
  7859  
  7860  // The requested resource could not be found. The stream might not be specified
  7861  // correctly.
  7862  type ResourceNotFoundException struct {
  7863  	_            struct{}                  `type:"structure"`
  7864  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7865  
  7866  	// A message that provides information about the error.
  7867  	Message_ *string `locationName:"message" type:"string"`
  7868  }
  7869  
  7870  // String returns the string representation.
  7871  //
  7872  // API parameter values that are decorated as "sensitive" in the API will not
  7873  // be included in the string output. The member name will be present, but the
  7874  // value will be replaced with "sensitive".
  7875  func (s ResourceNotFoundException) String() string {
  7876  	return awsutil.Prettify(s)
  7877  }
  7878  
  7879  // GoString returns the string representation.
  7880  //
  7881  // API parameter values that are decorated as "sensitive" in the API will not
  7882  // be included in the string output. The member name will be present, but the
  7883  // value will be replaced with "sensitive".
  7884  func (s ResourceNotFoundException) GoString() string {
  7885  	return s.String()
  7886  }
  7887  
  7888  // The ResourceNotFoundException is and event in the SubscribeToShardEventStream group of events.
  7889  func (s *ResourceNotFoundException) eventSubscribeToShardEventStream() {}
  7890  
  7891  // UnmarshalEvent unmarshals the EventStream Message into the ResourceNotFoundException value.
  7892  // This method is only used internally within the SDK's EventStream handling.
  7893  func (s *ResourceNotFoundException) UnmarshalEvent(
  7894  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  7895  	msg eventstream.Message,
  7896  ) error {
  7897  	if err := payloadUnmarshaler.UnmarshalPayload(
  7898  		bytes.NewReader(msg.Payload), s,
  7899  	); err != nil {
  7900  		return err
  7901  	}
  7902  	return nil
  7903  }
  7904  
  7905  // MarshalEvent marshals the type into an stream event value. This method
  7906  // should only used internally within the SDK's EventStream handling.
  7907  func (s *ResourceNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  7908  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType))
  7909  	var buf bytes.Buffer
  7910  	if err = pm.MarshalPayload(&buf, s); err != nil {
  7911  		return eventstream.Message{}, err
  7912  	}
  7913  	msg.Payload = buf.Bytes()
  7914  	return msg, err
  7915  }
  7916  
  7917  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  7918  	return &ResourceNotFoundException{
  7919  		RespMetadata: v,
  7920  	}
  7921  }
  7922  
  7923  // Code returns the exception type name.
  7924  func (s *ResourceNotFoundException) Code() string {
  7925  	return "ResourceNotFoundException"
  7926  }
  7927  
  7928  // Message returns the exception's message.
  7929  func (s *ResourceNotFoundException) Message() string {
  7930  	if s.Message_ != nil {
  7931  		return *s.Message_
  7932  	}
  7933  	return ""
  7934  }
  7935  
  7936  // OrigErr always returns nil, satisfies awserr.Error interface.
  7937  func (s *ResourceNotFoundException) OrigErr() error {
  7938  	return nil
  7939  }
  7940  
  7941  func (s *ResourceNotFoundException) Error() string {
  7942  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7943  }
  7944  
  7945  // Status code returns the HTTP status code for the request's response error.
  7946  func (s *ResourceNotFoundException) StatusCode() int {
  7947  	return s.RespMetadata.StatusCode
  7948  }
  7949  
  7950  // RequestID returns the service's response RequestID for request.
  7951  func (s *ResourceNotFoundException) RequestID() string {
  7952  	return s.RespMetadata.RequestID
  7953  }
  7954  
  7955  // The range of possible sequence numbers for the shard.
  7956  type SequenceNumberRange struct {
  7957  	_ struct{} `type:"structure"`
  7958  
  7959  	// The ending sequence number for the range. Shards that are in the OPEN state
  7960  	// have an ending sequence number of null.
  7961  	EndingSequenceNumber *string `type:"string"`
  7962  
  7963  	// The starting sequence number for the range.
  7964  	//
  7965  	// StartingSequenceNumber is a required field
  7966  	StartingSequenceNumber *string `type:"string" required:"true"`
  7967  }
  7968  
  7969  // String returns the string representation.
  7970  //
  7971  // API parameter values that are decorated as "sensitive" in the API will not
  7972  // be included in the string output. The member name will be present, but the
  7973  // value will be replaced with "sensitive".
  7974  func (s SequenceNumberRange) String() string {
  7975  	return awsutil.Prettify(s)
  7976  }
  7977  
  7978  // GoString returns the string representation.
  7979  //
  7980  // API parameter values that are decorated as "sensitive" in the API will not
  7981  // be included in the string output. The member name will be present, but the
  7982  // value will be replaced with "sensitive".
  7983  func (s SequenceNumberRange) GoString() string {
  7984  	return s.String()
  7985  }
  7986  
  7987  // SetEndingSequenceNumber sets the EndingSequenceNumber field's value.
  7988  func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *SequenceNumberRange {
  7989  	s.EndingSequenceNumber = &v
  7990  	return s
  7991  }
  7992  
  7993  // SetStartingSequenceNumber sets the StartingSequenceNumber field's value.
  7994  func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *SequenceNumberRange {
  7995  	s.StartingSequenceNumber = &v
  7996  	return s
  7997  }
  7998  
  7999  // A uniquely identified group of data records in a Kinesis data stream.
  8000  type Shard struct {
  8001  	_ struct{} `type:"structure"`
  8002  
  8003  	// The shard ID of the shard adjacent to the shard's parent.
  8004  	AdjacentParentShardId *string `min:"1" type:"string"`
  8005  
  8006  	// The range of possible hash key values for the shard, which is a set of ordered
  8007  	// contiguous positive integers.
  8008  	//
  8009  	// HashKeyRange is a required field
  8010  	HashKeyRange *HashKeyRange `type:"structure" required:"true"`
  8011  
  8012  	// The shard ID of the shard's parent.
  8013  	ParentShardId *string `min:"1" type:"string"`
  8014  
  8015  	// The range of possible sequence numbers for the shard.
  8016  	//
  8017  	// SequenceNumberRange is a required field
  8018  	SequenceNumberRange *SequenceNumberRange `type:"structure" required:"true"`
  8019  
  8020  	// The unique identifier of the shard within the stream.
  8021  	//
  8022  	// ShardId is a required field
  8023  	ShardId *string `min:"1" type:"string" required:"true"`
  8024  }
  8025  
  8026  // String returns the string representation.
  8027  //
  8028  // API parameter values that are decorated as "sensitive" in the API will not
  8029  // be included in the string output. The member name will be present, but the
  8030  // value will be replaced with "sensitive".
  8031  func (s Shard) String() string {
  8032  	return awsutil.Prettify(s)
  8033  }
  8034  
  8035  // GoString returns the string representation.
  8036  //
  8037  // API parameter values that are decorated as "sensitive" in the API will not
  8038  // be included in the string output. The member name will be present, but the
  8039  // value will be replaced with "sensitive".
  8040  func (s Shard) GoString() string {
  8041  	return s.String()
  8042  }
  8043  
  8044  // SetAdjacentParentShardId sets the AdjacentParentShardId field's value.
  8045  func (s *Shard) SetAdjacentParentShardId(v string) *Shard {
  8046  	s.AdjacentParentShardId = &v
  8047  	return s
  8048  }
  8049  
  8050  // SetHashKeyRange sets the HashKeyRange field's value.
  8051  func (s *Shard) SetHashKeyRange(v *HashKeyRange) *Shard {
  8052  	s.HashKeyRange = v
  8053  	return s
  8054  }
  8055  
  8056  // SetParentShardId sets the ParentShardId field's value.
  8057  func (s *Shard) SetParentShardId(v string) *Shard {
  8058  	s.ParentShardId = &v
  8059  	return s
  8060  }
  8061  
  8062  // SetSequenceNumberRange sets the SequenceNumberRange field's value.
  8063  func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard {
  8064  	s.SequenceNumberRange = v
  8065  	return s
  8066  }
  8067  
  8068  // SetShardId sets the ShardId field's value.
  8069  func (s *Shard) SetShardId(v string) *Shard {
  8070  	s.ShardId = &v
  8071  	return s
  8072  }
  8073  
  8074  type ShardFilter struct {
  8075  	_ struct{} `type:"structure"`
  8076  
  8077  	ShardId *string `min:"1" type:"string"`
  8078  
  8079  	Timestamp *time.Time `type:"timestamp"`
  8080  
  8081  	// Type is a required field
  8082  	Type *string `type:"string" required:"true" enum:"ShardFilterType"`
  8083  }
  8084  
  8085  // String returns the string representation.
  8086  //
  8087  // API parameter values that are decorated as "sensitive" in the API will not
  8088  // be included in the string output. The member name will be present, but the
  8089  // value will be replaced with "sensitive".
  8090  func (s ShardFilter) String() string {
  8091  	return awsutil.Prettify(s)
  8092  }
  8093  
  8094  // GoString returns the string representation.
  8095  //
  8096  // API parameter values that are decorated as "sensitive" in the API will not
  8097  // be included in the string output. The member name will be present, but the
  8098  // value will be replaced with "sensitive".
  8099  func (s ShardFilter) GoString() string {
  8100  	return s.String()
  8101  }
  8102  
  8103  // Validate inspects the fields of the type to determine if they are valid.
  8104  func (s *ShardFilter) Validate() error {
  8105  	invalidParams := request.ErrInvalidParams{Context: "ShardFilter"}
  8106  	if s.ShardId != nil && len(*s.ShardId) < 1 {
  8107  		invalidParams.Add(request.NewErrParamMinLen("ShardId", 1))
  8108  	}
  8109  	if s.Type == nil {
  8110  		invalidParams.Add(request.NewErrParamRequired("Type"))
  8111  	}
  8112  
  8113  	if invalidParams.Len() > 0 {
  8114  		return invalidParams
  8115  	}
  8116  	return nil
  8117  }
  8118  
  8119  // SetShardId sets the ShardId field's value.
  8120  func (s *ShardFilter) SetShardId(v string) *ShardFilter {
  8121  	s.ShardId = &v
  8122  	return s
  8123  }
  8124  
  8125  // SetTimestamp sets the Timestamp field's value.
  8126  func (s *ShardFilter) SetTimestamp(v time.Time) *ShardFilter {
  8127  	s.Timestamp = &v
  8128  	return s
  8129  }
  8130  
  8131  // SetType sets the Type field's value.
  8132  func (s *ShardFilter) SetType(v string) *ShardFilter {
  8133  	s.Type = &v
  8134  	return s
  8135  }
  8136  
  8137  // Represents the input for SplitShard.
  8138  type SplitShardInput struct {
  8139  	_ struct{} `type:"structure"`
  8140  
  8141  	// A hash key value for the starting hash key of one of the child shards created
  8142  	// by the split. The hash key range for a given shard constitutes a set of ordered
  8143  	// contiguous positive integers. The value for NewStartingHashKey must be in
  8144  	// the range of hash keys being mapped into the shard. The NewStartingHashKey
  8145  	// hash key value and all higher hash key values in hash key range are distributed
  8146  	// to one of the child shards. All the lower hash key values in the range are
  8147  	// distributed to the other child shard.
  8148  	//
  8149  	// NewStartingHashKey is a required field
  8150  	NewStartingHashKey *string `type:"string" required:"true"`
  8151  
  8152  	// The shard ID of the shard to split.
  8153  	//
  8154  	// ShardToSplit is a required field
  8155  	ShardToSplit *string `min:"1" type:"string" required:"true"`
  8156  
  8157  	// The name of the stream for the shard split.
  8158  	//
  8159  	// StreamName is a required field
  8160  	StreamName *string `min:"1" type:"string" required:"true"`
  8161  }
  8162  
  8163  // String returns the string representation.
  8164  //
  8165  // API parameter values that are decorated as "sensitive" in the API will not
  8166  // be included in the string output. The member name will be present, but the
  8167  // value will be replaced with "sensitive".
  8168  func (s SplitShardInput) String() string {
  8169  	return awsutil.Prettify(s)
  8170  }
  8171  
  8172  // GoString returns the string representation.
  8173  //
  8174  // API parameter values that are decorated as "sensitive" in the API will not
  8175  // be included in the string output. The member name will be present, but the
  8176  // value will be replaced with "sensitive".
  8177  func (s SplitShardInput) GoString() string {
  8178  	return s.String()
  8179  }
  8180  
  8181  // Validate inspects the fields of the type to determine if they are valid.
  8182  func (s *SplitShardInput) Validate() error {
  8183  	invalidParams := request.ErrInvalidParams{Context: "SplitShardInput"}
  8184  	if s.NewStartingHashKey == nil {
  8185  		invalidParams.Add(request.NewErrParamRequired("NewStartingHashKey"))
  8186  	}
  8187  	if s.ShardToSplit == nil {
  8188  		invalidParams.Add(request.NewErrParamRequired("ShardToSplit"))
  8189  	}
  8190  	if s.ShardToSplit != nil && len(*s.ShardToSplit) < 1 {
  8191  		invalidParams.Add(request.NewErrParamMinLen("ShardToSplit", 1))
  8192  	}
  8193  	if s.StreamName == nil {
  8194  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  8195  	}
  8196  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  8197  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  8198  	}
  8199  
  8200  	if invalidParams.Len() > 0 {
  8201  		return invalidParams
  8202  	}
  8203  	return nil
  8204  }
  8205  
  8206  // SetNewStartingHashKey sets the NewStartingHashKey field's value.
  8207  func (s *SplitShardInput) SetNewStartingHashKey(v string) *SplitShardInput {
  8208  	s.NewStartingHashKey = &v
  8209  	return s
  8210  }
  8211  
  8212  // SetShardToSplit sets the ShardToSplit field's value.
  8213  func (s *SplitShardInput) SetShardToSplit(v string) *SplitShardInput {
  8214  	s.ShardToSplit = &v
  8215  	return s
  8216  }
  8217  
  8218  // SetStreamName sets the StreamName field's value.
  8219  func (s *SplitShardInput) SetStreamName(v string) *SplitShardInput {
  8220  	s.StreamName = &v
  8221  	return s
  8222  }
  8223  
  8224  type SplitShardOutput struct {
  8225  	_ struct{} `type:"structure"`
  8226  }
  8227  
  8228  // String returns the string representation.
  8229  //
  8230  // API parameter values that are decorated as "sensitive" in the API will not
  8231  // be included in the string output. The member name will be present, but the
  8232  // value will be replaced with "sensitive".
  8233  func (s SplitShardOutput) String() string {
  8234  	return awsutil.Prettify(s)
  8235  }
  8236  
  8237  // GoString returns the string representation.
  8238  //
  8239  // API parameter values that are decorated as "sensitive" in the API will not
  8240  // be included in the string output. The member name will be present, but the
  8241  // value will be replaced with "sensitive".
  8242  func (s SplitShardOutput) GoString() string {
  8243  	return s.String()
  8244  }
  8245  
  8246  type StartStreamEncryptionInput struct {
  8247  	_ struct{} `type:"structure"`
  8248  
  8249  	// The encryption type to use. The only valid value is KMS.
  8250  	//
  8251  	// EncryptionType is a required field
  8252  	EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"`
  8253  
  8254  	// The GUID for the customer-managed AWS KMS key to use for encryption. This
  8255  	// value can be a globally unique identifier, a fully specified Amazon Resource
  8256  	// Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You
  8257  	// can also use a master key owned by Kinesis Data Streams by specifying the
  8258  	// alias aws/kinesis.
  8259  	//
  8260  	//    * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  8261  	//
  8262  	//    * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  8263  	//
  8264  	//    * Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  8265  	//
  8266  	//    * Alias name example: alias/MyAliasName
  8267  	//
  8268  	//    * Master key owned by Kinesis Data Streams: alias/aws/kinesis
  8269  	//
  8270  	// KeyId is a required field
  8271  	KeyId *string `min:"1" type:"string" required:"true"`
  8272  
  8273  	// The name of the stream for which to start encrypting records.
  8274  	//
  8275  	// StreamName is a required field
  8276  	StreamName *string `min:"1" type:"string" required:"true"`
  8277  }
  8278  
  8279  // String returns the string representation.
  8280  //
  8281  // API parameter values that are decorated as "sensitive" in the API will not
  8282  // be included in the string output. The member name will be present, but the
  8283  // value will be replaced with "sensitive".
  8284  func (s StartStreamEncryptionInput) String() string {
  8285  	return awsutil.Prettify(s)
  8286  }
  8287  
  8288  // GoString returns the string representation.
  8289  //
  8290  // API parameter values that are decorated as "sensitive" in the API will not
  8291  // be included in the string output. The member name will be present, but the
  8292  // value will be replaced with "sensitive".
  8293  func (s StartStreamEncryptionInput) GoString() string {
  8294  	return s.String()
  8295  }
  8296  
  8297  // Validate inspects the fields of the type to determine if they are valid.
  8298  func (s *StartStreamEncryptionInput) Validate() error {
  8299  	invalidParams := request.ErrInvalidParams{Context: "StartStreamEncryptionInput"}
  8300  	if s.EncryptionType == nil {
  8301  		invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  8302  	}
  8303  	if s.KeyId == nil {
  8304  		invalidParams.Add(request.NewErrParamRequired("KeyId"))
  8305  	}
  8306  	if s.KeyId != nil && len(*s.KeyId) < 1 {
  8307  		invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
  8308  	}
  8309  	if s.StreamName == nil {
  8310  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  8311  	}
  8312  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  8313  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  8314  	}
  8315  
  8316  	if invalidParams.Len() > 0 {
  8317  		return invalidParams
  8318  	}
  8319  	return nil
  8320  }
  8321  
  8322  // SetEncryptionType sets the EncryptionType field's value.
  8323  func (s *StartStreamEncryptionInput) SetEncryptionType(v string) *StartStreamEncryptionInput {
  8324  	s.EncryptionType = &v
  8325  	return s
  8326  }
  8327  
  8328  // SetKeyId sets the KeyId field's value.
  8329  func (s *StartStreamEncryptionInput) SetKeyId(v string) *StartStreamEncryptionInput {
  8330  	s.KeyId = &v
  8331  	return s
  8332  }
  8333  
  8334  // SetStreamName sets the StreamName field's value.
  8335  func (s *StartStreamEncryptionInput) SetStreamName(v string) *StartStreamEncryptionInput {
  8336  	s.StreamName = &v
  8337  	return s
  8338  }
  8339  
  8340  type StartStreamEncryptionOutput struct {
  8341  	_ struct{} `type:"structure"`
  8342  }
  8343  
  8344  // String returns the string representation.
  8345  //
  8346  // API parameter values that are decorated as "sensitive" in the API will not
  8347  // be included in the string output. The member name will be present, but the
  8348  // value will be replaced with "sensitive".
  8349  func (s StartStreamEncryptionOutput) String() string {
  8350  	return awsutil.Prettify(s)
  8351  }
  8352  
  8353  // GoString returns the string representation.
  8354  //
  8355  // API parameter values that are decorated as "sensitive" in the API will not
  8356  // be included in the string output. The member name will be present, but the
  8357  // value will be replaced with "sensitive".
  8358  func (s StartStreamEncryptionOutput) GoString() string {
  8359  	return s.String()
  8360  }
  8361  
  8362  type StartingPosition struct {
  8363  	_ struct{} `type:"structure"`
  8364  
  8365  	// The sequence number of the data record in the shard from which to start streaming.
  8366  	// To specify a sequence number, set StartingPosition to AT_SEQUENCE_NUMBER
  8367  	// or AFTER_SEQUENCE_NUMBER.
  8368  	SequenceNumber *string `type:"string"`
  8369  
  8370  	// The time stamp of the data record from which to start reading. To specify
  8371  	// a time stamp, set StartingPosition to Type AT_TIMESTAMP. A time stamp is
  8372  	// the Unix epoch date with precision in milliseconds. For example, 2016-04-04T19:58:46.480-00:00
  8373  	// or 1459799926.480. If a record with this exact time stamp does not exist,
  8374  	// records will be streamed from the next (later) record. If the time stamp
  8375  	// is older than the current trim horizon, records will be streamed from the
  8376  	// oldest untrimmed data record (TRIM_HORIZON).
  8377  	Timestamp *time.Time `type:"timestamp"`
  8378  
  8379  	// You can set the starting position to one of the following values:
  8380  	//
  8381  	// AT_SEQUENCE_NUMBER: Start streaming from the position denoted by the sequence
  8382  	// number specified in the SequenceNumber field.
  8383  	//
  8384  	// AFTER_SEQUENCE_NUMBER: Start streaming right after the position denoted by
  8385  	// the sequence number specified in the SequenceNumber field.
  8386  	//
  8387  	// AT_TIMESTAMP: Start streaming from the position denoted by the time stamp
  8388  	// specified in the Timestamp field.
  8389  	//
  8390  	// TRIM_HORIZON: Start streaming at the last untrimmed record in the shard,
  8391  	// which is the oldest data record in the shard.
  8392  	//
  8393  	// LATEST: Start streaming just after the most recent record in the shard, so
  8394  	// that you always read the most recent data in the shard.
  8395  	//
  8396  	// Type is a required field
  8397  	Type *string `type:"string" required:"true" enum:"ShardIteratorType"`
  8398  }
  8399  
  8400  // String returns the string representation.
  8401  //
  8402  // API parameter values that are decorated as "sensitive" in the API will not
  8403  // be included in the string output. The member name will be present, but the
  8404  // value will be replaced with "sensitive".
  8405  func (s StartingPosition) String() string {
  8406  	return awsutil.Prettify(s)
  8407  }
  8408  
  8409  // GoString returns the string representation.
  8410  //
  8411  // API parameter values that are decorated as "sensitive" in the API will not
  8412  // be included in the string output. The member name will be present, but the
  8413  // value will be replaced with "sensitive".
  8414  func (s StartingPosition) GoString() string {
  8415  	return s.String()
  8416  }
  8417  
  8418  // Validate inspects the fields of the type to determine if they are valid.
  8419  func (s *StartingPosition) Validate() error {
  8420  	invalidParams := request.ErrInvalidParams{Context: "StartingPosition"}
  8421  	if s.Type == nil {
  8422  		invalidParams.Add(request.NewErrParamRequired("Type"))
  8423  	}
  8424  
  8425  	if invalidParams.Len() > 0 {
  8426  		return invalidParams
  8427  	}
  8428  	return nil
  8429  }
  8430  
  8431  // SetSequenceNumber sets the SequenceNumber field's value.
  8432  func (s *StartingPosition) SetSequenceNumber(v string) *StartingPosition {
  8433  	s.SequenceNumber = &v
  8434  	return s
  8435  }
  8436  
  8437  // SetTimestamp sets the Timestamp field's value.
  8438  func (s *StartingPosition) SetTimestamp(v time.Time) *StartingPosition {
  8439  	s.Timestamp = &v
  8440  	return s
  8441  }
  8442  
  8443  // SetType sets the Type field's value.
  8444  func (s *StartingPosition) SetType(v string) *StartingPosition {
  8445  	s.Type = &v
  8446  	return s
  8447  }
  8448  
  8449  type StopStreamEncryptionInput struct {
  8450  	_ struct{} `type:"structure"`
  8451  
  8452  	// The encryption type. The only valid value is KMS.
  8453  	//
  8454  	// EncryptionType is a required field
  8455  	EncryptionType *string `type:"string" required:"true" enum:"EncryptionType"`
  8456  
  8457  	// The GUID for the customer-managed AWS KMS key to use for encryption. This
  8458  	// value can be a globally unique identifier, a fully specified Amazon Resource
  8459  	// Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You
  8460  	// can also use a master key owned by Kinesis Data Streams by specifying the
  8461  	// alias aws/kinesis.
  8462  	//
  8463  	//    * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  8464  	//
  8465  	//    * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  8466  	//
  8467  	//    * Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  8468  	//
  8469  	//    * Alias name example: alias/MyAliasName
  8470  	//
  8471  	//    * Master key owned by Kinesis Data Streams: alias/aws/kinesis
  8472  	//
  8473  	// KeyId is a required field
  8474  	KeyId *string `min:"1" type:"string" required:"true"`
  8475  
  8476  	// The name of the stream on which to stop encrypting records.
  8477  	//
  8478  	// StreamName is a required field
  8479  	StreamName *string `min:"1" type:"string" required:"true"`
  8480  }
  8481  
  8482  // String returns the string representation.
  8483  //
  8484  // API parameter values that are decorated as "sensitive" in the API will not
  8485  // be included in the string output. The member name will be present, but the
  8486  // value will be replaced with "sensitive".
  8487  func (s StopStreamEncryptionInput) String() string {
  8488  	return awsutil.Prettify(s)
  8489  }
  8490  
  8491  // GoString returns the string representation.
  8492  //
  8493  // API parameter values that are decorated as "sensitive" in the API will not
  8494  // be included in the string output. The member name will be present, but the
  8495  // value will be replaced with "sensitive".
  8496  func (s StopStreamEncryptionInput) GoString() string {
  8497  	return s.String()
  8498  }
  8499  
  8500  // Validate inspects the fields of the type to determine if they are valid.
  8501  func (s *StopStreamEncryptionInput) Validate() error {
  8502  	invalidParams := request.ErrInvalidParams{Context: "StopStreamEncryptionInput"}
  8503  	if s.EncryptionType == nil {
  8504  		invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  8505  	}
  8506  	if s.KeyId == nil {
  8507  		invalidParams.Add(request.NewErrParamRequired("KeyId"))
  8508  	}
  8509  	if s.KeyId != nil && len(*s.KeyId) < 1 {
  8510  		invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
  8511  	}
  8512  	if s.StreamName == nil {
  8513  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  8514  	}
  8515  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  8516  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  8517  	}
  8518  
  8519  	if invalidParams.Len() > 0 {
  8520  		return invalidParams
  8521  	}
  8522  	return nil
  8523  }
  8524  
  8525  // SetEncryptionType sets the EncryptionType field's value.
  8526  func (s *StopStreamEncryptionInput) SetEncryptionType(v string) *StopStreamEncryptionInput {
  8527  	s.EncryptionType = &v
  8528  	return s
  8529  }
  8530  
  8531  // SetKeyId sets the KeyId field's value.
  8532  func (s *StopStreamEncryptionInput) SetKeyId(v string) *StopStreamEncryptionInput {
  8533  	s.KeyId = &v
  8534  	return s
  8535  }
  8536  
  8537  // SetStreamName sets the StreamName field's value.
  8538  func (s *StopStreamEncryptionInput) SetStreamName(v string) *StopStreamEncryptionInput {
  8539  	s.StreamName = &v
  8540  	return s
  8541  }
  8542  
  8543  type StopStreamEncryptionOutput struct {
  8544  	_ struct{} `type:"structure"`
  8545  }
  8546  
  8547  // String returns the string representation.
  8548  //
  8549  // API parameter values that are decorated as "sensitive" in the API will not
  8550  // be included in the string output. The member name will be present, but the
  8551  // value will be replaced with "sensitive".
  8552  func (s StopStreamEncryptionOutput) String() string {
  8553  	return awsutil.Prettify(s)
  8554  }
  8555  
  8556  // GoString returns the string representation.
  8557  //
  8558  // API parameter values that are decorated as "sensitive" in the API will not
  8559  // be included in the string output. The member name will be present, but the
  8560  // value will be replaced with "sensitive".
  8561  func (s StopStreamEncryptionOutput) GoString() string {
  8562  	return s.String()
  8563  }
  8564  
  8565  // Represents the output for DescribeStream.
  8566  type StreamDescription struct {
  8567  	_ struct{} `type:"structure"`
  8568  
  8569  	// The server-side encryption type used on the stream. This parameter can be
  8570  	// one of the following values:
  8571  	//
  8572  	//    * NONE: Do not encrypt the records in the stream.
  8573  	//
  8574  	//    * KMS: Use server-side encryption on the records in the stream using a
  8575  	//    customer-managed AWS KMS key.
  8576  	EncryptionType *string `type:"string" enum:"EncryptionType"`
  8577  
  8578  	// Represents the current enhanced monitoring settings of the stream.
  8579  	//
  8580  	// EnhancedMonitoring is a required field
  8581  	EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"`
  8582  
  8583  	// If set to true, more shards in the stream are available to describe.
  8584  	//
  8585  	// HasMoreShards is a required field
  8586  	HasMoreShards *bool `type:"boolean" required:"true"`
  8587  
  8588  	// The GUID for the customer-managed AWS KMS key to use for encryption. This
  8589  	// value can be a globally unique identifier, a fully specified ARN to either
  8590  	// an alias or a key, or an alias name prefixed by "alias/".You can also use
  8591  	// a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.
  8592  	//
  8593  	//    * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  8594  	//
  8595  	//    * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  8596  	//
  8597  	//    * Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  8598  	//
  8599  	//    * Alias name example: alias/MyAliasName
  8600  	//
  8601  	//    * Master key owned by Kinesis Data Streams: alias/aws/kinesis
  8602  	KeyId *string `min:"1" type:"string"`
  8603  
  8604  	// The current retention period, in hours. Minimum value of 24. Maximum value
  8605  	// of 168.
  8606  	//
  8607  	// RetentionPeriodHours is a required field
  8608  	RetentionPeriodHours *int64 `type:"integer" required:"true"`
  8609  
  8610  	// The shards that comprise the stream.
  8611  	//
  8612  	// Shards is a required field
  8613  	Shards []*Shard `type:"list" required:"true"`
  8614  
  8615  	// The Amazon Resource Name (ARN) for the stream being described.
  8616  	//
  8617  	// StreamARN is a required field
  8618  	StreamARN *string `min:"1" type:"string" required:"true"`
  8619  
  8620  	// The approximate time that the stream was created.
  8621  	//
  8622  	// StreamCreationTimestamp is a required field
  8623  	StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"`
  8624  
  8625  	// The name of the stream being described.
  8626  	//
  8627  	// StreamName is a required field
  8628  	StreamName *string `min:"1" type:"string" required:"true"`
  8629  
  8630  	// The current status of the stream being described. The stream status is one
  8631  	// of the following states:
  8632  	//
  8633  	//    * CREATING - The stream is being created. Kinesis Data Streams immediately
  8634  	//    returns and sets StreamStatus to CREATING.
  8635  	//
  8636  	//    * DELETING - The stream is being deleted. The specified stream is in the
  8637  	//    DELETING state until Kinesis Data Streams completes the deletion.
  8638  	//
  8639  	//    * ACTIVE - The stream exists and is ready for read and write operations
  8640  	//    or deletion. You should perform read and write operations only on an ACTIVE
  8641  	//    stream.
  8642  	//
  8643  	//    * UPDATING - Shards in the stream are being merged or split. Read and
  8644  	//    write operations continue to work while the stream is in the UPDATING
  8645  	//    state.
  8646  	//
  8647  	// StreamStatus is a required field
  8648  	StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"`
  8649  }
  8650  
  8651  // String returns the string representation.
  8652  //
  8653  // API parameter values that are decorated as "sensitive" in the API will not
  8654  // be included in the string output. The member name will be present, but the
  8655  // value will be replaced with "sensitive".
  8656  func (s StreamDescription) String() string {
  8657  	return awsutil.Prettify(s)
  8658  }
  8659  
  8660  // GoString returns the string representation.
  8661  //
  8662  // API parameter values that are decorated as "sensitive" in the API will not
  8663  // be included in the string output. The member name will be present, but the
  8664  // value will be replaced with "sensitive".
  8665  func (s StreamDescription) GoString() string {
  8666  	return s.String()
  8667  }
  8668  
  8669  // SetEncryptionType sets the EncryptionType field's value.
  8670  func (s *StreamDescription) SetEncryptionType(v string) *StreamDescription {
  8671  	s.EncryptionType = &v
  8672  	return s
  8673  }
  8674  
  8675  // SetEnhancedMonitoring sets the EnhancedMonitoring field's value.
  8676  func (s *StreamDescription) SetEnhancedMonitoring(v []*EnhancedMetrics) *StreamDescription {
  8677  	s.EnhancedMonitoring = v
  8678  	return s
  8679  }
  8680  
  8681  // SetHasMoreShards sets the HasMoreShards field's value.
  8682  func (s *StreamDescription) SetHasMoreShards(v bool) *StreamDescription {
  8683  	s.HasMoreShards = &v
  8684  	return s
  8685  }
  8686  
  8687  // SetKeyId sets the KeyId field's value.
  8688  func (s *StreamDescription) SetKeyId(v string) *StreamDescription {
  8689  	s.KeyId = &v
  8690  	return s
  8691  }
  8692  
  8693  // SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
  8694  func (s *StreamDescription) SetRetentionPeriodHours(v int64) *StreamDescription {
  8695  	s.RetentionPeriodHours = &v
  8696  	return s
  8697  }
  8698  
  8699  // SetShards sets the Shards field's value.
  8700  func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription {
  8701  	s.Shards = v
  8702  	return s
  8703  }
  8704  
  8705  // SetStreamARN sets the StreamARN field's value.
  8706  func (s *StreamDescription) SetStreamARN(v string) *StreamDescription {
  8707  	s.StreamARN = &v
  8708  	return s
  8709  }
  8710  
  8711  // SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value.
  8712  func (s *StreamDescription) SetStreamCreationTimestamp(v time.Time) *StreamDescription {
  8713  	s.StreamCreationTimestamp = &v
  8714  	return s
  8715  }
  8716  
  8717  // SetStreamName sets the StreamName field's value.
  8718  func (s *StreamDescription) SetStreamName(v string) *StreamDescription {
  8719  	s.StreamName = &v
  8720  	return s
  8721  }
  8722  
  8723  // SetStreamStatus sets the StreamStatus field's value.
  8724  func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription {
  8725  	s.StreamStatus = &v
  8726  	return s
  8727  }
  8728  
  8729  // Represents the output for DescribeStreamSummary
  8730  type StreamDescriptionSummary struct {
  8731  	_ struct{} `type:"structure"`
  8732  
  8733  	// The number of enhanced fan-out consumers registered with the stream.
  8734  	ConsumerCount *int64 `type:"integer"`
  8735  
  8736  	// The encryption type used. This value is one of the following:
  8737  	//
  8738  	//    * KMS
  8739  	//
  8740  	//    * NONE
  8741  	EncryptionType *string `type:"string" enum:"EncryptionType"`
  8742  
  8743  	// Represents the current enhanced monitoring settings of the stream.
  8744  	//
  8745  	// EnhancedMonitoring is a required field
  8746  	EnhancedMonitoring []*EnhancedMetrics `type:"list" required:"true"`
  8747  
  8748  	// The GUID for the customer-managed AWS KMS key to use for encryption. This
  8749  	// value can be a globally unique identifier, a fully specified ARN to either
  8750  	// an alias or a key, or an alias name prefixed by "alias/".You can also use
  8751  	// a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis.
  8752  	//
  8753  	//    * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  8754  	//
  8755  	//    * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  8756  	//
  8757  	//    * Globally unique key ID example: 12345678-1234-1234-1234-123456789012
  8758  	//
  8759  	//    * Alias name example: alias/MyAliasName
  8760  	//
  8761  	//    * Master key owned by Kinesis Data Streams: alias/aws/kinesis
  8762  	KeyId *string `min:"1" type:"string"`
  8763  
  8764  	// The number of open shards in the stream.
  8765  	//
  8766  	// OpenShardCount is a required field
  8767  	OpenShardCount *int64 `type:"integer" required:"true"`
  8768  
  8769  	// The current retention period, in hours.
  8770  	//
  8771  	// RetentionPeriodHours is a required field
  8772  	RetentionPeriodHours *int64 `type:"integer" required:"true"`
  8773  
  8774  	// The Amazon Resource Name (ARN) for the stream being described.
  8775  	//
  8776  	// StreamARN is a required field
  8777  	StreamARN *string `min:"1" type:"string" required:"true"`
  8778  
  8779  	// The approximate time that the stream was created.
  8780  	//
  8781  	// StreamCreationTimestamp is a required field
  8782  	StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"`
  8783  
  8784  	// The name of the stream being described.
  8785  	//
  8786  	// StreamName is a required field
  8787  	StreamName *string `min:"1" type:"string" required:"true"`
  8788  
  8789  	// The current status of the stream being described. The stream status is one
  8790  	// of the following states:
  8791  	//
  8792  	//    * CREATING - The stream is being created. Kinesis Data Streams immediately
  8793  	//    returns and sets StreamStatus to CREATING.
  8794  	//
  8795  	//    * DELETING - The stream is being deleted. The specified stream is in the
  8796  	//    DELETING state until Kinesis Data Streams completes the deletion.
  8797  	//
  8798  	//    * ACTIVE - The stream exists and is ready for read and write operations
  8799  	//    or deletion. You should perform read and write operations only on an ACTIVE
  8800  	//    stream.
  8801  	//
  8802  	//    * UPDATING - Shards in the stream are being merged or split. Read and
  8803  	//    write operations continue to work while the stream is in the UPDATING
  8804  	//    state.
  8805  	//
  8806  	// StreamStatus is a required field
  8807  	StreamStatus *string `type:"string" required:"true" enum:"StreamStatus"`
  8808  }
  8809  
  8810  // String returns the string representation.
  8811  //
  8812  // API parameter values that are decorated as "sensitive" in the API will not
  8813  // be included in the string output. The member name will be present, but the
  8814  // value will be replaced with "sensitive".
  8815  func (s StreamDescriptionSummary) String() string {
  8816  	return awsutil.Prettify(s)
  8817  }
  8818  
  8819  // GoString returns the string representation.
  8820  //
  8821  // API parameter values that are decorated as "sensitive" in the API will not
  8822  // be included in the string output. The member name will be present, but the
  8823  // value will be replaced with "sensitive".
  8824  func (s StreamDescriptionSummary) GoString() string {
  8825  	return s.String()
  8826  }
  8827  
  8828  // SetConsumerCount sets the ConsumerCount field's value.
  8829  func (s *StreamDescriptionSummary) SetConsumerCount(v int64) *StreamDescriptionSummary {
  8830  	s.ConsumerCount = &v
  8831  	return s
  8832  }
  8833  
  8834  // SetEncryptionType sets the EncryptionType field's value.
  8835  func (s *StreamDescriptionSummary) SetEncryptionType(v string) *StreamDescriptionSummary {
  8836  	s.EncryptionType = &v
  8837  	return s
  8838  }
  8839  
  8840  // SetEnhancedMonitoring sets the EnhancedMonitoring field's value.
  8841  func (s *StreamDescriptionSummary) SetEnhancedMonitoring(v []*EnhancedMetrics) *StreamDescriptionSummary {
  8842  	s.EnhancedMonitoring = v
  8843  	return s
  8844  }
  8845  
  8846  // SetKeyId sets the KeyId field's value.
  8847  func (s *StreamDescriptionSummary) SetKeyId(v string) *StreamDescriptionSummary {
  8848  	s.KeyId = &v
  8849  	return s
  8850  }
  8851  
  8852  // SetOpenShardCount sets the OpenShardCount field's value.
  8853  func (s *StreamDescriptionSummary) SetOpenShardCount(v int64) *StreamDescriptionSummary {
  8854  	s.OpenShardCount = &v
  8855  	return s
  8856  }
  8857  
  8858  // SetRetentionPeriodHours sets the RetentionPeriodHours field's value.
  8859  func (s *StreamDescriptionSummary) SetRetentionPeriodHours(v int64) *StreamDescriptionSummary {
  8860  	s.RetentionPeriodHours = &v
  8861  	return s
  8862  }
  8863  
  8864  // SetStreamARN sets the StreamARN field's value.
  8865  func (s *StreamDescriptionSummary) SetStreamARN(v string) *StreamDescriptionSummary {
  8866  	s.StreamARN = &v
  8867  	return s
  8868  }
  8869  
  8870  // SetStreamCreationTimestamp sets the StreamCreationTimestamp field's value.
  8871  func (s *StreamDescriptionSummary) SetStreamCreationTimestamp(v time.Time) *StreamDescriptionSummary {
  8872  	s.StreamCreationTimestamp = &v
  8873  	return s
  8874  }
  8875  
  8876  // SetStreamName sets the StreamName field's value.
  8877  func (s *StreamDescriptionSummary) SetStreamName(v string) *StreamDescriptionSummary {
  8878  	s.StreamName = &v
  8879  	return s
  8880  }
  8881  
  8882  // SetStreamStatus sets the StreamStatus field's value.
  8883  func (s *StreamDescriptionSummary) SetStreamStatus(v string) *StreamDescriptionSummary {
  8884  	s.StreamStatus = &v
  8885  	return s
  8886  }
  8887  
  8888  // After you call SubscribeToShard, Kinesis Data Streams sends events of this
  8889  // type over an HTTP/2 connection to your consumer.
  8890  type SubscribeToShardEvent struct {
  8891  	_ struct{} `type:"structure"`
  8892  
  8893  	ChildShards []*ChildShard `type:"list"`
  8894  
  8895  	// Use this as SequenceNumber in the next call to SubscribeToShard, with StartingPosition
  8896  	// set to AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use ContinuationSequenceNumber
  8897  	// for checkpointing because it captures your shard progress even when no data
  8898  	// is written to the shard.
  8899  	//
  8900  	// ContinuationSequenceNumber is a required field
  8901  	ContinuationSequenceNumber *string `type:"string" required:"true"`
  8902  
  8903  	// The number of milliseconds the read records are from the tip of the stream,
  8904  	// indicating how far behind current time the consumer is. A value of zero indicates
  8905  	// that record processing is caught up, and there are no new records to process
  8906  	// at this moment.
  8907  	//
  8908  	// MillisBehindLatest is a required field
  8909  	MillisBehindLatest *int64 `type:"long" required:"true"`
  8910  
  8911  	// Records is a required field
  8912  	Records []*Record `type:"list" required:"true"`
  8913  }
  8914  
  8915  // String returns the string representation.
  8916  //
  8917  // API parameter values that are decorated as "sensitive" in the API will not
  8918  // be included in the string output. The member name will be present, but the
  8919  // value will be replaced with "sensitive".
  8920  func (s SubscribeToShardEvent) String() string {
  8921  	return awsutil.Prettify(s)
  8922  }
  8923  
  8924  // GoString returns the string representation.
  8925  //
  8926  // API parameter values that are decorated as "sensitive" in the API will not
  8927  // be included in the string output. The member name will be present, but the
  8928  // value will be replaced with "sensitive".
  8929  func (s SubscribeToShardEvent) GoString() string {
  8930  	return s.String()
  8931  }
  8932  
  8933  // SetChildShards sets the ChildShards field's value.
  8934  func (s *SubscribeToShardEvent) SetChildShards(v []*ChildShard) *SubscribeToShardEvent {
  8935  	s.ChildShards = v
  8936  	return s
  8937  }
  8938  
  8939  // SetContinuationSequenceNumber sets the ContinuationSequenceNumber field's value.
  8940  func (s *SubscribeToShardEvent) SetContinuationSequenceNumber(v string) *SubscribeToShardEvent {
  8941  	s.ContinuationSequenceNumber = &v
  8942  	return s
  8943  }
  8944  
  8945  // SetMillisBehindLatest sets the MillisBehindLatest field's value.
  8946  func (s *SubscribeToShardEvent) SetMillisBehindLatest(v int64) *SubscribeToShardEvent {
  8947  	s.MillisBehindLatest = &v
  8948  	return s
  8949  }
  8950  
  8951  // SetRecords sets the Records field's value.
  8952  func (s *SubscribeToShardEvent) SetRecords(v []*Record) *SubscribeToShardEvent {
  8953  	s.Records = v
  8954  	return s
  8955  }
  8956  
  8957  // The SubscribeToShardEvent is and event in the SubscribeToShardEventStream group of events.
  8958  func (s *SubscribeToShardEvent) eventSubscribeToShardEventStream() {}
  8959  
  8960  // UnmarshalEvent unmarshals the EventStream Message into the SubscribeToShardEvent value.
  8961  // This method is only used internally within the SDK's EventStream handling.
  8962  func (s *SubscribeToShardEvent) UnmarshalEvent(
  8963  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  8964  	msg eventstream.Message,
  8965  ) error {
  8966  	if err := payloadUnmarshaler.UnmarshalPayload(
  8967  		bytes.NewReader(msg.Payload), s,
  8968  	); err != nil {
  8969  		return err
  8970  	}
  8971  	return nil
  8972  }
  8973  
  8974  // MarshalEvent marshals the type into an stream event value. This method
  8975  // should only used internally within the SDK's EventStream handling.
  8976  func (s *SubscribeToShardEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  8977  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  8978  	var buf bytes.Buffer
  8979  	if err = pm.MarshalPayload(&buf, s); err != nil {
  8980  		return eventstream.Message{}, err
  8981  	}
  8982  	msg.Payload = buf.Bytes()
  8983  	return msg, err
  8984  }
  8985  
  8986  // SubscribeToShardEventStreamEvent groups together all EventStream
  8987  // events writes for SubscribeToShardEventStream.
  8988  //
  8989  // These events are:
  8990  //
  8991  //     * SubscribeToShardEvent
  8992  type SubscribeToShardEventStreamEvent interface {
  8993  	eventSubscribeToShardEventStream()
  8994  	eventstreamapi.Marshaler
  8995  	eventstreamapi.Unmarshaler
  8996  }
  8997  
  8998  // SubscribeToShardEventStreamReader provides the interface for reading to the stream. The
  8999  // default implementation for this interface will be SubscribeToShardEventStreamData.
  9000  //
  9001  // The reader's Close method must allow multiple concurrent calls.
  9002  //
  9003  // These events are:
  9004  //
  9005  //     * SubscribeToShardEvent
  9006  //     * SubscribeToShardEventStreamUnknownEvent
  9007  type SubscribeToShardEventStreamReader interface {
  9008  	// Returns a channel of events as they are read from the event stream.
  9009  	Events() <-chan SubscribeToShardEventStreamEvent
  9010  
  9011  	// Close will stop the reader reading events from the stream.
  9012  	Close() error
  9013  
  9014  	// Returns any error that has occurred while reading from the event stream.
  9015  	Err() error
  9016  }
  9017  
  9018  type readSubscribeToShardEventStream struct {
  9019  	eventReader *eventstreamapi.EventReader
  9020  	stream      chan SubscribeToShardEventStreamEvent
  9021  	err         *eventstreamapi.OnceError
  9022  
  9023  	done      chan struct{}
  9024  	closeOnce sync.Once
  9025  }
  9026  
  9027  func newReadSubscribeToShardEventStream(eventReader *eventstreamapi.EventReader) *readSubscribeToShardEventStream {
  9028  	r := &readSubscribeToShardEventStream{
  9029  		eventReader: eventReader,
  9030  		stream:      make(chan SubscribeToShardEventStreamEvent),
  9031  		done:        make(chan struct{}),
  9032  		err:         eventstreamapi.NewOnceError(),
  9033  	}
  9034  	go r.readEventStream()
  9035  
  9036  	return r
  9037  }
  9038  
  9039  // Close will close the underlying event stream reader.
  9040  func (r *readSubscribeToShardEventStream) Close() error {
  9041  	r.closeOnce.Do(r.safeClose)
  9042  	return r.Err()
  9043  }
  9044  
  9045  func (r *readSubscribeToShardEventStream) ErrorSet() <-chan struct{} {
  9046  	return r.err.ErrorSet()
  9047  }
  9048  
  9049  func (r *readSubscribeToShardEventStream) Closed() <-chan struct{} {
  9050  	return r.done
  9051  }
  9052  
  9053  func (r *readSubscribeToShardEventStream) safeClose() {
  9054  	close(r.done)
  9055  }
  9056  
  9057  func (r *readSubscribeToShardEventStream) Err() error {
  9058  	return r.err.Err()
  9059  }
  9060  
  9061  func (r *readSubscribeToShardEventStream) Events() <-chan SubscribeToShardEventStreamEvent {
  9062  	return r.stream
  9063  }
  9064  
  9065  func (r *readSubscribeToShardEventStream) readEventStream() {
  9066  	defer r.Close()
  9067  	defer close(r.stream)
  9068  
  9069  	for {
  9070  		event, err := r.eventReader.ReadEvent()
  9071  		if err != nil {
  9072  			if err == io.EOF {
  9073  				return
  9074  			}
  9075  			select {
  9076  			case <-r.done:
  9077  				// If closed already ignore the error
  9078  				return
  9079  			default:
  9080  			}
  9081  			if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok {
  9082  				continue
  9083  			}
  9084  			r.err.SetError(err)
  9085  			return
  9086  		}
  9087  
  9088  		select {
  9089  		case r.stream <- event.(SubscribeToShardEventStreamEvent):
  9090  		case <-r.done:
  9091  			return
  9092  		}
  9093  	}
  9094  }
  9095  
  9096  type unmarshalerForSubscribeToShardEventStreamEvent struct {
  9097  	metadata protocol.ResponseMetadata
  9098  }
  9099  
  9100  func (u unmarshalerForSubscribeToShardEventStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) {
  9101  	switch eventType {
  9102  	case "SubscribeToShardEvent":
  9103  		return &SubscribeToShardEvent{}, nil
  9104  	case "InternalFailureException":
  9105  		return newErrorInternalFailureException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9106  	case "KMSAccessDeniedException":
  9107  		return newErrorKMSAccessDeniedException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9108  	case "KMSDisabledException":
  9109  		return newErrorKMSDisabledException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9110  	case "KMSInvalidStateException":
  9111  		return newErrorKMSInvalidStateException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9112  	case "KMSNotFoundException":
  9113  		return newErrorKMSNotFoundException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9114  	case "KMSOptInRequired":
  9115  		return newErrorKMSOptInRequired(u.metadata).(eventstreamapi.Unmarshaler), nil
  9116  	case "KMSThrottlingException":
  9117  		return newErrorKMSThrottlingException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9118  	case "ResourceInUseException":
  9119  		return newErrorResourceInUseException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9120  	case "ResourceNotFoundException":
  9121  		return newErrorResourceNotFoundException(u.metadata).(eventstreamapi.Unmarshaler), nil
  9122  	default:
  9123  		return &SubscribeToShardEventStreamUnknownEvent{Type: eventType}, nil
  9124  	}
  9125  }
  9126  
  9127  // SubscribeToShardEventStreamUnknownEvent provides a failsafe event for the
  9128  // SubscribeToShardEventStream group of events when an unknown event is received.
  9129  type SubscribeToShardEventStreamUnknownEvent struct {
  9130  	Type    string
  9131  	Message eventstream.Message
  9132  }
  9133  
  9134  // The SubscribeToShardEventStreamUnknownEvent is and event in the SubscribeToShardEventStream
  9135  // group of events.
  9136  func (s *SubscribeToShardEventStreamUnknownEvent) eventSubscribeToShardEventStream() {}
  9137  
  9138  // MarshalEvent marshals the type into an stream event value. This method
  9139  // should only used internally within the SDK's EventStream handling.
  9140  func (e *SubscribeToShardEventStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) (
  9141  	msg eventstream.Message, err error,
  9142  ) {
  9143  	return e.Message.Clone(), nil
  9144  }
  9145  
  9146  // UnmarshalEvent unmarshals the EventStream Message into the SubscribeToShardEventStreamData value.
  9147  // This method is only used internally within the SDK's EventStream handling.
  9148  func (e *SubscribeToShardEventStreamUnknownEvent) UnmarshalEvent(
  9149  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  9150  	msg eventstream.Message,
  9151  ) error {
  9152  	e.Message = msg.Clone()
  9153  	return nil
  9154  }
  9155  
  9156  type SubscribeToShardInput struct {
  9157  	_ struct{} `type:"structure"`
  9158  
  9159  	// For this parameter, use the value you obtained when you called RegisterStreamConsumer.
  9160  	//
  9161  	// ConsumerARN is a required field
  9162  	ConsumerARN *string `min:"1" type:"string" required:"true"`
  9163  
  9164  	// The ID of the shard you want to subscribe to. To see a list of all the shards
  9165  	// for a given stream, use ListShards.
  9166  	//
  9167  	// ShardId is a required field
  9168  	ShardId *string `min:"1" type:"string" required:"true"`
  9169  
  9170  	// StartingPosition is a required field
  9171  	StartingPosition *StartingPosition `type:"structure" required:"true"`
  9172  }
  9173  
  9174  // String returns the string representation.
  9175  //
  9176  // API parameter values that are decorated as "sensitive" in the API will not
  9177  // be included in the string output. The member name will be present, but the
  9178  // value will be replaced with "sensitive".
  9179  func (s SubscribeToShardInput) String() string {
  9180  	return awsutil.Prettify(s)
  9181  }
  9182  
  9183  // GoString returns the string representation.
  9184  //
  9185  // API parameter values that are decorated as "sensitive" in the API will not
  9186  // be included in the string output. The member name will be present, but the
  9187  // value will be replaced with "sensitive".
  9188  func (s SubscribeToShardInput) GoString() string {
  9189  	return s.String()
  9190  }
  9191  
  9192  // Validate inspects the fields of the type to determine if they are valid.
  9193  func (s *SubscribeToShardInput) Validate() error {
  9194  	invalidParams := request.ErrInvalidParams{Context: "SubscribeToShardInput"}
  9195  	if s.ConsumerARN == nil {
  9196  		invalidParams.Add(request.NewErrParamRequired("ConsumerARN"))
  9197  	}
  9198  	if s.ConsumerARN != nil && len(*s.ConsumerARN) < 1 {
  9199  		invalidParams.Add(request.NewErrParamMinLen("ConsumerARN", 1))
  9200  	}
  9201  	if s.ShardId == nil {
  9202  		invalidParams.Add(request.NewErrParamRequired("ShardId"))
  9203  	}
  9204  	if s.ShardId != nil && len(*s.ShardId) < 1 {
  9205  		invalidParams.Add(request.NewErrParamMinLen("ShardId", 1))
  9206  	}
  9207  	if s.StartingPosition == nil {
  9208  		invalidParams.Add(request.NewErrParamRequired("StartingPosition"))
  9209  	}
  9210  	if s.StartingPosition != nil {
  9211  		if err := s.StartingPosition.Validate(); err != nil {
  9212  			invalidParams.AddNested("StartingPosition", err.(request.ErrInvalidParams))
  9213  		}
  9214  	}
  9215  
  9216  	if invalidParams.Len() > 0 {
  9217  		return invalidParams
  9218  	}
  9219  	return nil
  9220  }
  9221  
  9222  // SetConsumerARN sets the ConsumerARN field's value.
  9223  func (s *SubscribeToShardInput) SetConsumerARN(v string) *SubscribeToShardInput {
  9224  	s.ConsumerARN = &v
  9225  	return s
  9226  }
  9227  
  9228  // SetShardId sets the ShardId field's value.
  9229  func (s *SubscribeToShardInput) SetShardId(v string) *SubscribeToShardInput {
  9230  	s.ShardId = &v
  9231  	return s
  9232  }
  9233  
  9234  // SetStartingPosition sets the StartingPosition field's value.
  9235  func (s *SubscribeToShardInput) SetStartingPosition(v *StartingPosition) *SubscribeToShardInput {
  9236  	s.StartingPosition = v
  9237  	return s
  9238  }
  9239  
  9240  type SubscribeToShardOutput struct {
  9241  	_ struct{} `type:"structure"`
  9242  
  9243  	EventStream *SubscribeToShardEventStream
  9244  }
  9245  
  9246  // String returns the string representation.
  9247  //
  9248  // API parameter values that are decorated as "sensitive" in the API will not
  9249  // be included in the string output. The member name will be present, but the
  9250  // value will be replaced with "sensitive".
  9251  func (s SubscribeToShardOutput) String() string {
  9252  	return awsutil.Prettify(s)
  9253  }
  9254  
  9255  // GoString returns the string representation.
  9256  //
  9257  // API parameter values that are decorated as "sensitive" in the API will not
  9258  // be included in the string output. The member name will be present, but the
  9259  // value will be replaced with "sensitive".
  9260  func (s SubscribeToShardOutput) GoString() string {
  9261  	return s.String()
  9262  }
  9263  
  9264  func (s *SubscribeToShardOutput) SetEventStream(v *SubscribeToShardEventStream) *SubscribeToShardOutput {
  9265  	s.EventStream = v
  9266  	return s
  9267  }
  9268  func (s *SubscribeToShardOutput) GetEventStream() *SubscribeToShardEventStream {
  9269  	return s.EventStream
  9270  }
  9271  
  9272  // GetStream returns the type to interact with the event stream.
  9273  func (s *SubscribeToShardOutput) GetStream() *SubscribeToShardEventStream {
  9274  	return s.EventStream
  9275  }
  9276  
  9277  // The SubscribeToShardOutput is and event in the SubscribeToShardEventStream group of events.
  9278  func (s *SubscribeToShardOutput) eventSubscribeToShardEventStream() {}
  9279  
  9280  // UnmarshalEvent unmarshals the EventStream Message into the SubscribeToShardOutput value.
  9281  // This method is only used internally within the SDK's EventStream handling.
  9282  func (s *SubscribeToShardOutput) UnmarshalEvent(
  9283  	payloadUnmarshaler protocol.PayloadUnmarshaler,
  9284  	msg eventstream.Message,
  9285  ) error {
  9286  	if err := payloadUnmarshaler.UnmarshalPayload(
  9287  		bytes.NewReader(msg.Payload), s,
  9288  	); err != nil {
  9289  		return err
  9290  	}
  9291  	return nil
  9292  }
  9293  
  9294  // MarshalEvent marshals the type into an stream event value. This method
  9295  // should only used internally within the SDK's EventStream handling.
  9296  func (s *SubscribeToShardOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  9297  	msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  9298  	var buf bytes.Buffer
  9299  	if err = pm.MarshalPayload(&buf, s); err != nil {
  9300  		return eventstream.Message{}, err
  9301  	}
  9302  	msg.Payload = buf.Bytes()
  9303  	return msg, err
  9304  }
  9305  
  9306  // Metadata assigned to the stream, consisting of a key-value pair.
  9307  type Tag struct {
  9308  	_ struct{} `type:"structure"`
  9309  
  9310  	// A unique identifier for the tag. Maximum length: 128 characters. Valid characters:
  9311  	// Unicode letters, digits, white space, _ . / = + - % @
  9312  	//
  9313  	// Key is a required field
  9314  	Key *string `min:"1" type:"string" required:"true"`
  9315  
  9316  	// An optional string, typically used to describe or define the tag. Maximum
  9317  	// length: 256 characters. Valid characters: Unicode letters, digits, white
  9318  	// space, _ . / = + - % @
  9319  	Value *string `type:"string"`
  9320  }
  9321  
  9322  // String returns the string representation.
  9323  //
  9324  // API parameter values that are decorated as "sensitive" in the API will not
  9325  // be included in the string output. The member name will be present, but the
  9326  // value will be replaced with "sensitive".
  9327  func (s Tag) String() string {
  9328  	return awsutil.Prettify(s)
  9329  }
  9330  
  9331  // GoString returns the string representation.
  9332  //
  9333  // API parameter values that are decorated as "sensitive" in the API will not
  9334  // be included in the string output. The member name will be present, but the
  9335  // value will be replaced with "sensitive".
  9336  func (s Tag) GoString() string {
  9337  	return s.String()
  9338  }
  9339  
  9340  // SetKey sets the Key field's value.
  9341  func (s *Tag) SetKey(v string) *Tag {
  9342  	s.Key = &v
  9343  	return s
  9344  }
  9345  
  9346  // SetValue sets the Value field's value.
  9347  func (s *Tag) SetValue(v string) *Tag {
  9348  	s.Value = &v
  9349  	return s
  9350  }
  9351  
  9352  type UpdateShardCountInput struct {
  9353  	_ struct{} `type:"structure"`
  9354  
  9355  	// The scaling type. Uniform scaling creates shards of equal size.
  9356  	//
  9357  	// ScalingType is a required field
  9358  	ScalingType *string `type:"string" required:"true" enum:"ScalingType"`
  9359  
  9360  	// The name of the stream.
  9361  	//
  9362  	// StreamName is a required field
  9363  	StreamName *string `min:"1" type:"string" required:"true"`
  9364  
  9365  	// The new number of shards. This value has the following default limits. By
  9366  	// default, you cannot do the following:
  9367  	//
  9368  	//    * Set this value to more than double your current shard count for a stream.
  9369  	//
  9370  	//    * Set this value below half your current shard count for a stream.
  9371  	//
  9372  	//    * Set this value to more than 500 shards in a stream (the default limit
  9373  	//    for shard count per stream is 500 per account per region), unless you
  9374  	//    request a limit increase.
  9375  	//
  9376  	//    * Scale a stream with more than 500 shards down unless you set this value
  9377  	//    to less than 500 shards.
  9378  	//
  9379  	// TargetShardCount is a required field
  9380  	TargetShardCount *int64 `min:"1" type:"integer" required:"true"`
  9381  }
  9382  
  9383  // String returns the string representation.
  9384  //
  9385  // API parameter values that are decorated as "sensitive" in the API will not
  9386  // be included in the string output. The member name will be present, but the
  9387  // value will be replaced with "sensitive".
  9388  func (s UpdateShardCountInput) String() string {
  9389  	return awsutil.Prettify(s)
  9390  }
  9391  
  9392  // GoString returns the string representation.
  9393  //
  9394  // API parameter values that are decorated as "sensitive" in the API will not
  9395  // be included in the string output. The member name will be present, but the
  9396  // value will be replaced with "sensitive".
  9397  func (s UpdateShardCountInput) GoString() string {
  9398  	return s.String()
  9399  }
  9400  
  9401  // Validate inspects the fields of the type to determine if they are valid.
  9402  func (s *UpdateShardCountInput) Validate() error {
  9403  	invalidParams := request.ErrInvalidParams{Context: "UpdateShardCountInput"}
  9404  	if s.ScalingType == nil {
  9405  		invalidParams.Add(request.NewErrParamRequired("ScalingType"))
  9406  	}
  9407  	if s.StreamName == nil {
  9408  		invalidParams.Add(request.NewErrParamRequired("StreamName"))
  9409  	}
  9410  	if s.StreamName != nil && len(*s.StreamName) < 1 {
  9411  		invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  9412  	}
  9413  	if s.TargetShardCount == nil {
  9414  		invalidParams.Add(request.NewErrParamRequired("TargetShardCount"))
  9415  	}
  9416  	if s.TargetShardCount != nil && *s.TargetShardCount < 1 {
  9417  		invalidParams.Add(request.NewErrParamMinValue("TargetShardCount", 1))
  9418  	}
  9419  
  9420  	if invalidParams.Len() > 0 {
  9421  		return invalidParams
  9422  	}
  9423  	return nil
  9424  }
  9425  
  9426  // SetScalingType sets the ScalingType field's value.
  9427  func (s *UpdateShardCountInput) SetScalingType(v string) *UpdateShardCountInput {
  9428  	s.ScalingType = &v
  9429  	return s
  9430  }
  9431  
  9432  // SetStreamName sets the StreamName field's value.
  9433  func (s *UpdateShardCountInput) SetStreamName(v string) *UpdateShardCountInput {
  9434  	s.StreamName = &v
  9435  	return s
  9436  }
  9437  
  9438  // SetTargetShardCount sets the TargetShardCount field's value.
  9439  func (s *UpdateShardCountInput) SetTargetShardCount(v int64) *UpdateShardCountInput {
  9440  	s.TargetShardCount = &v
  9441  	return s
  9442  }
  9443  
  9444  type UpdateShardCountOutput struct {
  9445  	_ struct{} `type:"structure"`
  9446  
  9447  	// The current number of shards.
  9448  	CurrentShardCount *int64 `min:"1" type:"integer"`
  9449  
  9450  	// The name of the stream.
  9451  	StreamName *string `min:"1" type:"string"`
  9452  
  9453  	// The updated number of shards.
  9454  	TargetShardCount *int64 `min:"1" type:"integer"`
  9455  }
  9456  
  9457  // String returns the string representation.
  9458  //
  9459  // API parameter values that are decorated as "sensitive" in the API will not
  9460  // be included in the string output. The member name will be present, but the
  9461  // value will be replaced with "sensitive".
  9462  func (s UpdateShardCountOutput) String() string {
  9463  	return awsutil.Prettify(s)
  9464  }
  9465  
  9466  // GoString returns the string representation.
  9467  //
  9468  // API parameter values that are decorated as "sensitive" in the API will not
  9469  // be included in the string output. The member name will be present, but the
  9470  // value will be replaced with "sensitive".
  9471  func (s UpdateShardCountOutput) GoString() string {
  9472  	return s.String()
  9473  }
  9474  
  9475  // SetCurrentShardCount sets the CurrentShardCount field's value.
  9476  func (s *UpdateShardCountOutput) SetCurrentShardCount(v int64) *UpdateShardCountOutput {
  9477  	s.CurrentShardCount = &v
  9478  	return s
  9479  }
  9480  
  9481  // SetStreamName sets the StreamName field's value.
  9482  func (s *UpdateShardCountOutput) SetStreamName(v string) *UpdateShardCountOutput {
  9483  	s.StreamName = &v
  9484  	return s
  9485  }
  9486  
  9487  // SetTargetShardCount sets the TargetShardCount field's value.
  9488  func (s *UpdateShardCountOutput) SetTargetShardCount(v int64) *UpdateShardCountOutput {
  9489  	s.TargetShardCount = &v
  9490  	return s
  9491  }
  9492  
  9493  const (
  9494  	// ConsumerStatusCreating is a ConsumerStatus enum value
  9495  	ConsumerStatusCreating = "CREATING"
  9496  
  9497  	// ConsumerStatusDeleting is a ConsumerStatus enum value
  9498  	ConsumerStatusDeleting = "DELETING"
  9499  
  9500  	// ConsumerStatusActive is a ConsumerStatus enum value
  9501  	ConsumerStatusActive = "ACTIVE"
  9502  )
  9503  
  9504  // ConsumerStatus_Values returns all elements of the ConsumerStatus enum
  9505  func ConsumerStatus_Values() []string {
  9506  	return []string{
  9507  		ConsumerStatusCreating,
  9508  		ConsumerStatusDeleting,
  9509  		ConsumerStatusActive,
  9510  	}
  9511  }
  9512  
  9513  const (
  9514  	// EncryptionTypeNone is a EncryptionType enum value
  9515  	EncryptionTypeNone = "NONE"
  9516  
  9517  	// EncryptionTypeKms is a EncryptionType enum value
  9518  	EncryptionTypeKms = "KMS"
  9519  )
  9520  
  9521  // EncryptionType_Values returns all elements of the EncryptionType enum
  9522  func EncryptionType_Values() []string {
  9523  	return []string{
  9524  		EncryptionTypeNone,
  9525  		EncryptionTypeKms,
  9526  	}
  9527  }
  9528  
  9529  const (
  9530  	// MetricsNameIncomingBytes is a MetricsName enum value
  9531  	MetricsNameIncomingBytes = "IncomingBytes"
  9532  
  9533  	// MetricsNameIncomingRecords is a MetricsName enum value
  9534  	MetricsNameIncomingRecords = "IncomingRecords"
  9535  
  9536  	// MetricsNameOutgoingBytes is a MetricsName enum value
  9537  	MetricsNameOutgoingBytes = "OutgoingBytes"
  9538  
  9539  	// MetricsNameOutgoingRecords is a MetricsName enum value
  9540  	MetricsNameOutgoingRecords = "OutgoingRecords"
  9541  
  9542  	// MetricsNameWriteProvisionedThroughputExceeded is a MetricsName enum value
  9543  	MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThroughputExceeded"
  9544  
  9545  	// MetricsNameReadProvisionedThroughputExceeded is a MetricsName enum value
  9546  	MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughputExceeded"
  9547  
  9548  	// MetricsNameIteratorAgeMilliseconds is a MetricsName enum value
  9549  	MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds"
  9550  
  9551  	// MetricsNameAll is a MetricsName enum value
  9552  	MetricsNameAll = "ALL"
  9553  )
  9554  
  9555  // MetricsName_Values returns all elements of the MetricsName enum
  9556  func MetricsName_Values() []string {
  9557  	return []string{
  9558  		MetricsNameIncomingBytes,
  9559  		MetricsNameIncomingRecords,
  9560  		MetricsNameOutgoingBytes,
  9561  		MetricsNameOutgoingRecords,
  9562  		MetricsNameWriteProvisionedThroughputExceeded,
  9563  		MetricsNameReadProvisionedThroughputExceeded,
  9564  		MetricsNameIteratorAgeMilliseconds,
  9565  		MetricsNameAll,
  9566  	}
  9567  }
  9568  
  9569  const (
  9570  	// ScalingTypeUniformScaling is a ScalingType enum value
  9571  	ScalingTypeUniformScaling = "UNIFORM_SCALING"
  9572  )
  9573  
  9574  // ScalingType_Values returns all elements of the ScalingType enum
  9575  func ScalingType_Values() []string {
  9576  	return []string{
  9577  		ScalingTypeUniformScaling,
  9578  	}
  9579  }
  9580  
  9581  const (
  9582  	// ShardFilterTypeAfterShardId is a ShardFilterType enum value
  9583  	ShardFilterTypeAfterShardId = "AFTER_SHARD_ID"
  9584  
  9585  	// ShardFilterTypeAtTrimHorizon is a ShardFilterType enum value
  9586  	ShardFilterTypeAtTrimHorizon = "AT_TRIM_HORIZON"
  9587  
  9588  	// ShardFilterTypeFromTrimHorizon is a ShardFilterType enum value
  9589  	ShardFilterTypeFromTrimHorizon = "FROM_TRIM_HORIZON"
  9590  
  9591  	// ShardFilterTypeAtLatest is a ShardFilterType enum value
  9592  	ShardFilterTypeAtLatest = "AT_LATEST"
  9593  
  9594  	// ShardFilterTypeAtTimestamp is a ShardFilterType enum value
  9595  	ShardFilterTypeAtTimestamp = "AT_TIMESTAMP"
  9596  
  9597  	// ShardFilterTypeFromTimestamp is a ShardFilterType enum value
  9598  	ShardFilterTypeFromTimestamp = "FROM_TIMESTAMP"
  9599  )
  9600  
  9601  // ShardFilterType_Values returns all elements of the ShardFilterType enum
  9602  func ShardFilterType_Values() []string {
  9603  	return []string{
  9604  		ShardFilterTypeAfterShardId,
  9605  		ShardFilterTypeAtTrimHorizon,
  9606  		ShardFilterTypeFromTrimHorizon,
  9607  		ShardFilterTypeAtLatest,
  9608  		ShardFilterTypeAtTimestamp,
  9609  		ShardFilterTypeFromTimestamp,
  9610  	}
  9611  }
  9612  
  9613  const (
  9614  	// ShardIteratorTypeAtSequenceNumber is a ShardIteratorType enum value
  9615  	ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
  9616  
  9617  	// ShardIteratorTypeAfterSequenceNumber is a ShardIteratorType enum value
  9618  	ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
  9619  
  9620  	// ShardIteratorTypeTrimHorizon is a ShardIteratorType enum value
  9621  	ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
  9622  
  9623  	// ShardIteratorTypeLatest is a ShardIteratorType enum value
  9624  	ShardIteratorTypeLatest = "LATEST"
  9625  
  9626  	// ShardIteratorTypeAtTimestamp is a ShardIteratorType enum value
  9627  	ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP"
  9628  )
  9629  
  9630  // ShardIteratorType_Values returns all elements of the ShardIteratorType enum
  9631  func ShardIteratorType_Values() []string {
  9632  	return []string{
  9633  		ShardIteratorTypeAtSequenceNumber,
  9634  		ShardIteratorTypeAfterSequenceNumber,
  9635  		ShardIteratorTypeTrimHorizon,
  9636  		ShardIteratorTypeLatest,
  9637  		ShardIteratorTypeAtTimestamp,
  9638  	}
  9639  }
  9640  
  9641  const (
  9642  	// StreamStatusCreating is a StreamStatus enum value
  9643  	StreamStatusCreating = "CREATING"
  9644  
  9645  	// StreamStatusDeleting is a StreamStatus enum value
  9646  	StreamStatusDeleting = "DELETING"
  9647  
  9648  	// StreamStatusActive is a StreamStatus enum value
  9649  	StreamStatusActive = "ACTIVE"
  9650  
  9651  	// StreamStatusUpdating is a StreamStatus enum value
  9652  	StreamStatusUpdating = "UPDATING"
  9653  )
  9654  
  9655  // StreamStatus_Values returns all elements of the StreamStatus enum
  9656  func StreamStatus_Values() []string {
  9657  	return []string{
  9658  		StreamStatusCreating,
  9659  		StreamStatusDeleting,
  9660  		StreamStatusActive,
  9661  		StreamStatusUpdating,
  9662  	}
  9663  }