github.com/aavshr/aws-sdk-go@v1.41.3/private/protocol/jsonrpc/build_test.go (about)

     1  // Code generated by models/protocol_tests/generate.go. DO NOT EDIT.
     2  
     3  package jsonrpc_test
     4  
     5  import (
     6  	"bytes"
     7  	"encoding/json"
     8  	"encoding/xml"
     9  	"fmt"
    10  	"io"
    11  	"io/ioutil"
    12  	"net/http"
    13  	"net/url"
    14  	"reflect"
    15  	"testing"
    16  	"time"
    17  
    18  	"github.com/aavshr/aws-sdk-go/aws"
    19  	"github.com/aavshr/aws-sdk-go/aws/client"
    20  	"github.com/aavshr/aws-sdk-go/aws/client/metadata"
    21  	"github.com/aavshr/aws-sdk-go/aws/request"
    22  	"github.com/aavshr/aws-sdk-go/aws/signer/v4"
    23  	"github.com/aavshr/aws-sdk-go/awstesting"
    24  	"github.com/aavshr/aws-sdk-go/awstesting/unit"
    25  	"github.com/aavshr/aws-sdk-go/private/protocol"
    26  	"github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc"
    27  	"github.com/aavshr/aws-sdk-go/private/protocol/xml/xmlutil"
    28  	"github.com/aavshr/aws-sdk-go/private/util"
    29  )
    30  
    31  var _ bytes.Buffer // always import bytes
    32  var _ http.Request
    33  var _ json.Marshaler
    34  var _ time.Time
    35  var _ xmlutil.XMLNode
    36  var _ xml.Attr
    37  var _ = ioutil.Discard
    38  var _ = util.Trim("")
    39  var _ = url.Values{}
    40  var _ = io.EOF
    41  var _ = aws.String
    42  var _ = fmt.Println
    43  var _ = reflect.Value{}
    44  
    45  func init() {
    46  	protocol.RandReader = &awstesting.ZeroReader{}
    47  }
    48  
    49  // InputService1ProtocolTest provides the API operation methods for making requests to
    50  // . See this package's package overview docs
    51  // for details on the service.
    52  //
    53  // InputService1ProtocolTest methods are safe to use concurrently. It is not safe to
    54  // modify mutate any of the struct's properties though.
    55  type InputService1ProtocolTest struct {
    56  	*client.Client
    57  }
    58  
    59  // New creates a new instance of the InputService1ProtocolTest client with a session.
    60  // If additional configuration is needed for the client instance use the optional
    61  // aws.Config parameter to add your extra config.
    62  //
    63  // Example:
    64  //     mySession := session.Must(session.NewSession())
    65  //
    66  //     // Create a InputService1ProtocolTest client from just a session.
    67  //     svc := inputservice1protocoltest.New(mySession)
    68  //
    69  //     // Create a InputService1ProtocolTest client with additional configuration
    70  //     svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
    71  func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest {
    72  	c := p.ClientConfig("inputservice1protocoltest", cfgs...)
    73  	return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
    74  }
    75  
    76  // newClient creates, initializes and returns a new service client instance.
    77  func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService1ProtocolTest {
    78  	svc := &InputService1ProtocolTest{
    79  		Client: client.New(
    80  			cfg,
    81  			metadata.ClientInfo{
    82  				ServiceName:   "InputService1ProtocolTest",
    83  				ServiceID:     "InputService1ProtocolTest",
    84  				SigningName:   signingName,
    85  				SigningRegion: signingRegion,
    86  				PartitionID:   partitionID,
    87  				Endpoint:      endpoint,
    88  				APIVersion:    "",
    89  				JSONVersion:   "1.1",
    90  				TargetPrefix:  "com.amazonaws.foo",
    91  			},
    92  			handlers,
    93  		),
    94  	}
    95  
    96  	// Handlers
    97  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
    98  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
    99  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
   100  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
   101  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
   102  
   103  	return svc
   104  }
   105  
   106  // newRequest creates a new request for a InputService1ProtocolTest operation and runs any
   107  // custom request initialization.
   108  func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
   109  	req := c.NewRequest(op, params, data)
   110  
   111  	return req
   112  }
   113  
   114  const opInputService1TestCaseOperation1 = "OperationName"
   115  
   116  // InputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
   117  // client's request for the InputService1TestCaseOperation1 operation. The "output" return
   118  // value will be populated with the request's response once the request completes
   119  // successfully.
   120  //
   121  // Use "Send" method on the returned Request to send the API call to the service.
   122  // the "output" return value is not valid until after Send returns without error.
   123  //
   124  // See InputService1TestCaseOperation1 for more information on using the InputService1TestCaseOperation1
   125  // API call, and error handling.
   126  //
   127  // This method is useful when you want to inject custom logic or configuration
   128  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   129  //
   130  //
   131  //    // Example sending a request using the InputService1TestCaseOperation1Request method.
   132  //    req, resp := client.InputService1TestCaseOperation1Request(params)
   133  //
   134  //    err := req.Send()
   135  //    if err == nil { // resp is now filled
   136  //        fmt.Println(resp)
   137  //    }
   138  func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
   139  	op := &request.Operation{
   140  		Name:       opInputService1TestCaseOperation1,
   141  		HTTPMethod: "POST",
   142  		HTTPPath:   "/",
   143  	}
   144  
   145  	if input == nil {
   146  		input = &InputService1TestShapeInputService1TestCaseOperation1Input{}
   147  	}
   148  
   149  	output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
   150  	req = c.newRequest(op, input, output)
   151  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   152  	return
   153  }
   154  
   155  // InputService1TestCaseOperation1 API operation for .
   156  //
   157  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   158  // with awserr.Error's Code and Message methods to get detailed information about
   159  // the error.
   160  //
   161  // See the AWS API reference guide for 's
   162  // API operation InputService1TestCaseOperation1 for usage and error information.
   163  func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
   164  	req, out := c.InputService1TestCaseOperation1Request(input)
   165  	return out, req.Send()
   166  }
   167  
   168  // InputService1TestCaseOperation1WithContext is the same as InputService1TestCaseOperation1 with the addition of
   169  // the ability to pass a context and additional request options.
   170  //
   171  // See InputService1TestCaseOperation1 for details on how to use this API operation.
   172  //
   173  // The context must be non-nil and will be used for request cancellation. If
   174  // the context is nil a panic will occur. In the future the SDK may create
   175  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   176  // for more information on using Contexts.
   177  func (c *InputService1ProtocolTest) InputService1TestCaseOperation1WithContext(ctx aws.Context, input *InputService1TestShapeInputService1TestCaseOperation1Input, opts ...request.Option) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
   178  	req, out := c.InputService1TestCaseOperation1Request(input)
   179  	req.SetContext(ctx)
   180  	req.ApplyOptions(opts...)
   181  	return out, req.Send()
   182  }
   183  
   184  type InputService1TestShapeInputService1TestCaseOperation1Input struct {
   185  	_ struct{} `type:"structure"`
   186  
   187  	Name *string `type:"string"`
   188  }
   189  
   190  // SetName sets the Name field's value.
   191  func (s *InputService1TestShapeInputService1TestCaseOperation1Input) SetName(v string) *InputService1TestShapeInputService1TestCaseOperation1Input {
   192  	s.Name = &v
   193  	return s
   194  }
   195  
   196  type InputService1TestShapeInputService1TestCaseOperation1Output struct {
   197  	_ struct{} `type:"structure"`
   198  }
   199  
   200  // InputService2ProtocolTest provides the API operation methods for making requests to
   201  // . See this package's package overview docs
   202  // for details on the service.
   203  //
   204  // InputService2ProtocolTest methods are safe to use concurrently. It is not safe to
   205  // modify mutate any of the struct's properties though.
   206  type InputService2ProtocolTest struct {
   207  	*client.Client
   208  }
   209  
   210  // New creates a new instance of the InputService2ProtocolTest client with a session.
   211  // If additional configuration is needed for the client instance use the optional
   212  // aws.Config parameter to add your extra config.
   213  //
   214  // Example:
   215  //     mySession := session.Must(session.NewSession())
   216  //
   217  //     // Create a InputService2ProtocolTest client from just a session.
   218  //     svc := inputservice2protocoltest.New(mySession)
   219  //
   220  //     // Create a InputService2ProtocolTest client with additional configuration
   221  //     svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
   222  func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest {
   223  	c := p.ClientConfig("inputservice2protocoltest", cfgs...)
   224  	return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
   225  }
   226  
   227  // newClient creates, initializes and returns a new service client instance.
   228  func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService2ProtocolTest {
   229  	svc := &InputService2ProtocolTest{
   230  		Client: client.New(
   231  			cfg,
   232  			metadata.ClientInfo{
   233  				ServiceName:   "InputService2ProtocolTest",
   234  				ServiceID:     "InputService2ProtocolTest",
   235  				SigningName:   signingName,
   236  				SigningRegion: signingRegion,
   237  				PartitionID:   partitionID,
   238  				Endpoint:      endpoint,
   239  				APIVersion:    "",
   240  				JSONVersion:   "1.1",
   241  				TargetPrefix:  "com.amazonaws.foo",
   242  			},
   243  			handlers,
   244  		),
   245  	}
   246  
   247  	// Handlers
   248  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
   249  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
   250  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
   251  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
   252  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
   253  
   254  	return svc
   255  }
   256  
   257  // newRequest creates a new request for a InputService2ProtocolTest operation and runs any
   258  // custom request initialization.
   259  func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
   260  	req := c.NewRequest(op, params, data)
   261  
   262  	return req
   263  }
   264  
   265  const opInputService2TestCaseOperation1 = "OperationName"
   266  
   267  // InputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
   268  // client's request for the InputService2TestCaseOperation1 operation. The "output" return
   269  // value will be populated with the request's response once the request completes
   270  // successfully.
   271  //
   272  // Use "Send" method on the returned Request to send the API call to the service.
   273  // the "output" return value is not valid until after Send returns without error.
   274  //
   275  // See InputService2TestCaseOperation1 for more information on using the InputService2TestCaseOperation1
   276  // API call, and error handling.
   277  //
   278  // This method is useful when you want to inject custom logic or configuration
   279  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   280  //
   281  //
   282  //    // Example sending a request using the InputService2TestCaseOperation1Request method.
   283  //    req, resp := client.InputService2TestCaseOperation1Request(params)
   284  //
   285  //    err := req.Send()
   286  //    if err == nil { // resp is now filled
   287  //        fmt.Println(resp)
   288  //    }
   289  func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
   290  	op := &request.Operation{
   291  		Name:     opInputService2TestCaseOperation1,
   292  		HTTPPath: "/",
   293  	}
   294  
   295  	if input == nil {
   296  		input = &InputService2TestShapeInputService2TestCaseOperation1Input{}
   297  	}
   298  
   299  	output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
   300  	req = c.newRequest(op, input, output)
   301  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   302  	return
   303  }
   304  
   305  // InputService2TestCaseOperation1 API operation for .
   306  //
   307  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   308  // with awserr.Error's Code and Message methods to get detailed information about
   309  // the error.
   310  //
   311  // See the AWS API reference guide for 's
   312  // API operation InputService2TestCaseOperation1 for usage and error information.
   313  func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
   314  	req, out := c.InputService2TestCaseOperation1Request(input)
   315  	return out, req.Send()
   316  }
   317  
   318  // InputService2TestCaseOperation1WithContext is the same as InputService2TestCaseOperation1 with the addition of
   319  // the ability to pass a context and additional request options.
   320  //
   321  // See InputService2TestCaseOperation1 for details on how to use this API operation.
   322  //
   323  // The context must be non-nil and will be used for request cancellation. If
   324  // the context is nil a panic will occur. In the future the SDK may create
   325  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   326  // for more information on using Contexts.
   327  func (c *InputService2ProtocolTest) InputService2TestCaseOperation1WithContext(ctx aws.Context, input *InputService2TestShapeInputService2TestCaseOperation1Input, opts ...request.Option) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
   328  	req, out := c.InputService2TestCaseOperation1Request(input)
   329  	req.SetContext(ctx)
   330  	req.ApplyOptions(opts...)
   331  	return out, req.Send()
   332  }
   333  
   334  type InputService2TestShapeInputService2TestCaseOperation1Input struct {
   335  	_ struct{} `type:"structure"`
   336  
   337  	TimeArg *time.Time `type:"timestamp"`
   338  
   339  	TimeCustom *time.Time `type:"timestamp" timestampFormat:"rfc822"`
   340  
   341  	TimeFormat *time.Time `type:"timestamp" timestampFormat:"rfc822"`
   342  }
   343  
   344  // SetTimeArg sets the TimeArg field's value.
   345  func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetTimeArg(v time.Time) *InputService2TestShapeInputService2TestCaseOperation1Input {
   346  	s.TimeArg = &v
   347  	return s
   348  }
   349  
   350  // SetTimeCustom sets the TimeCustom field's value.
   351  func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetTimeCustom(v time.Time) *InputService2TestShapeInputService2TestCaseOperation1Input {
   352  	s.TimeCustom = &v
   353  	return s
   354  }
   355  
   356  // SetTimeFormat sets the TimeFormat field's value.
   357  func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetTimeFormat(v time.Time) *InputService2TestShapeInputService2TestCaseOperation1Input {
   358  	s.TimeFormat = &v
   359  	return s
   360  }
   361  
   362  type InputService2TestShapeInputService2TestCaseOperation1Output struct {
   363  	_ struct{} `type:"structure"`
   364  }
   365  
   366  // InputService3ProtocolTest provides the API operation methods for making requests to
   367  // . See this package's package overview docs
   368  // for details on the service.
   369  //
   370  // InputService3ProtocolTest methods are safe to use concurrently. It is not safe to
   371  // modify mutate any of the struct's properties though.
   372  type InputService3ProtocolTest struct {
   373  	*client.Client
   374  }
   375  
   376  // New creates a new instance of the InputService3ProtocolTest client with a session.
   377  // If additional configuration is needed for the client instance use the optional
   378  // aws.Config parameter to add your extra config.
   379  //
   380  // Example:
   381  //     mySession := session.Must(session.NewSession())
   382  //
   383  //     // Create a InputService3ProtocolTest client from just a session.
   384  //     svc := inputservice3protocoltest.New(mySession)
   385  //
   386  //     // Create a InputService3ProtocolTest client with additional configuration
   387  //     svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
   388  func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest {
   389  	c := p.ClientConfig("inputservice3protocoltest", cfgs...)
   390  	return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
   391  }
   392  
   393  // newClient creates, initializes and returns a new service client instance.
   394  func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService3ProtocolTest {
   395  	svc := &InputService3ProtocolTest{
   396  		Client: client.New(
   397  			cfg,
   398  			metadata.ClientInfo{
   399  				ServiceName:   "InputService3ProtocolTest",
   400  				ServiceID:     "InputService3ProtocolTest",
   401  				SigningName:   signingName,
   402  				SigningRegion: signingRegion,
   403  				PartitionID:   partitionID,
   404  				Endpoint:      endpoint,
   405  				APIVersion:    "",
   406  				JSONVersion:   "1.1",
   407  				TargetPrefix:  "com.amazonaws.foo",
   408  			},
   409  			handlers,
   410  		),
   411  	}
   412  
   413  	// Handlers
   414  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
   415  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
   416  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
   417  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
   418  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
   419  
   420  	return svc
   421  }
   422  
   423  // newRequest creates a new request for a InputService3ProtocolTest operation and runs any
   424  // custom request initialization.
   425  func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
   426  	req := c.NewRequest(op, params, data)
   427  
   428  	return req
   429  }
   430  
   431  const opInputService3TestCaseOperation1 = "OperationName"
   432  
   433  // InputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
   434  // client's request for the InputService3TestCaseOperation1 operation. The "output" return
   435  // value will be populated with the request's response once the request completes
   436  // successfully.
   437  //
   438  // Use "Send" method on the returned Request to send the API call to the service.
   439  // the "output" return value is not valid until after Send returns without error.
   440  //
   441  // See InputService3TestCaseOperation1 for more information on using the InputService3TestCaseOperation1
   442  // API call, and error handling.
   443  //
   444  // This method is useful when you want to inject custom logic or configuration
   445  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   446  //
   447  //
   448  //    // Example sending a request using the InputService3TestCaseOperation1Request method.
   449  //    req, resp := client.InputService3TestCaseOperation1Request(params)
   450  //
   451  //    err := req.Send()
   452  //    if err == nil { // resp is now filled
   453  //        fmt.Println(resp)
   454  //    }
   455  func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
   456  	op := &request.Operation{
   457  		Name:     opInputService3TestCaseOperation1,
   458  		HTTPPath: "/",
   459  	}
   460  
   461  	if input == nil {
   462  		input = &InputService3TestShapeInputService3TestCaseOperation1Input{}
   463  	}
   464  
   465  	output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
   466  	req = c.newRequest(op, input, output)
   467  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   468  	return
   469  }
   470  
   471  // InputService3TestCaseOperation1 API operation for .
   472  //
   473  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   474  // with awserr.Error's Code and Message methods to get detailed information about
   475  // the error.
   476  //
   477  // See the AWS API reference guide for 's
   478  // API operation InputService3TestCaseOperation1 for usage and error information.
   479  func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
   480  	req, out := c.InputService3TestCaseOperation1Request(input)
   481  	return out, req.Send()
   482  }
   483  
   484  // InputService3TestCaseOperation1WithContext is the same as InputService3TestCaseOperation1 with the addition of
   485  // the ability to pass a context and additional request options.
   486  //
   487  // See InputService3TestCaseOperation1 for details on how to use this API operation.
   488  //
   489  // The context must be non-nil and will be used for request cancellation. If
   490  // the context is nil a panic will occur. In the future the SDK may create
   491  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   492  // for more information on using Contexts.
   493  func (c *InputService3ProtocolTest) InputService3TestCaseOperation1WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation1Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
   494  	req, out := c.InputService3TestCaseOperation1Request(input)
   495  	req.SetContext(ctx)
   496  	req.ApplyOptions(opts...)
   497  	return out, req.Send()
   498  }
   499  
   500  const opInputService3TestCaseOperation2 = "OperationName"
   501  
   502  // InputService3TestCaseOperation2Request generates a "aws/request.Request" representing the
   503  // client's request for the InputService3TestCaseOperation2 operation. The "output" return
   504  // value will be populated with the request's response once the request completes
   505  // successfully.
   506  //
   507  // Use "Send" method on the returned Request to send the API call to the service.
   508  // the "output" return value is not valid until after Send returns without error.
   509  //
   510  // See InputService3TestCaseOperation2 for more information on using the InputService3TestCaseOperation2
   511  // API call, and error handling.
   512  //
   513  // This method is useful when you want to inject custom logic or configuration
   514  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   515  //
   516  //
   517  //    // Example sending a request using the InputService3TestCaseOperation2Request method.
   518  //    req, resp := client.InputService3TestCaseOperation2Request(params)
   519  //
   520  //    err := req.Send()
   521  //    if err == nil { // resp is now filled
   522  //        fmt.Println(resp)
   523  //    }
   524  func (c *InputService3ProtocolTest) InputService3TestCaseOperation2Request(input *InputService3TestShapeInputService3TestCaseOperation2Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation2Output) {
   525  	op := &request.Operation{
   526  		Name:     opInputService3TestCaseOperation2,
   527  		HTTPPath: "/",
   528  	}
   529  
   530  	if input == nil {
   531  		input = &InputService3TestShapeInputService3TestCaseOperation2Input{}
   532  	}
   533  
   534  	output = &InputService3TestShapeInputService3TestCaseOperation2Output{}
   535  	req = c.newRequest(op, input, output)
   536  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   537  	return
   538  }
   539  
   540  // InputService3TestCaseOperation2 API operation for .
   541  //
   542  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   543  // with awserr.Error's Code and Message methods to get detailed information about
   544  // the error.
   545  //
   546  // See the AWS API reference guide for 's
   547  // API operation InputService3TestCaseOperation2 for usage and error information.
   548  func (c *InputService3ProtocolTest) InputService3TestCaseOperation2(input *InputService3TestShapeInputService3TestCaseOperation2Input) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) {
   549  	req, out := c.InputService3TestCaseOperation2Request(input)
   550  	return out, req.Send()
   551  }
   552  
   553  // InputService3TestCaseOperation2WithContext is the same as InputService3TestCaseOperation2 with the addition of
   554  // the ability to pass a context and additional request options.
   555  //
   556  // See InputService3TestCaseOperation2 for details on how to use this API operation.
   557  //
   558  // The context must be non-nil and will be used for request cancellation. If
   559  // the context is nil a panic will occur. In the future the SDK may create
   560  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   561  // for more information on using Contexts.
   562  func (c *InputService3ProtocolTest) InputService3TestCaseOperation2WithContext(ctx aws.Context, input *InputService3TestShapeInputService3TestCaseOperation2Input, opts ...request.Option) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) {
   563  	req, out := c.InputService3TestCaseOperation2Request(input)
   564  	req.SetContext(ctx)
   565  	req.ApplyOptions(opts...)
   566  	return out, req.Send()
   567  }
   568  
   569  type InputService3TestShapeInputService3TestCaseOperation1Input struct {
   570  	_ struct{} `type:"structure"`
   571  
   572  	// BlobArg is automatically base64 encoded/decoded by the SDK.
   573  	BlobArg []byte `type:"blob"`
   574  
   575  	BlobMap map[string][]byte `type:"map"`
   576  }
   577  
   578  // SetBlobArg sets the BlobArg field's value.
   579  func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetBlobArg(v []byte) *InputService3TestShapeInputService3TestCaseOperation1Input {
   580  	s.BlobArg = v
   581  	return s
   582  }
   583  
   584  // SetBlobMap sets the BlobMap field's value.
   585  func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetBlobMap(v map[string][]byte) *InputService3TestShapeInputService3TestCaseOperation1Input {
   586  	s.BlobMap = v
   587  	return s
   588  }
   589  
   590  type InputService3TestShapeInputService3TestCaseOperation1Output struct {
   591  	_ struct{} `type:"structure"`
   592  }
   593  
   594  type InputService3TestShapeInputService3TestCaseOperation2Input struct {
   595  	_ struct{} `type:"structure"`
   596  
   597  	// BlobArg is automatically base64 encoded/decoded by the SDK.
   598  	BlobArg []byte `type:"blob"`
   599  
   600  	BlobMap map[string][]byte `type:"map"`
   601  }
   602  
   603  // SetBlobArg sets the BlobArg field's value.
   604  func (s *InputService3TestShapeInputService3TestCaseOperation2Input) SetBlobArg(v []byte) *InputService3TestShapeInputService3TestCaseOperation2Input {
   605  	s.BlobArg = v
   606  	return s
   607  }
   608  
   609  // SetBlobMap sets the BlobMap field's value.
   610  func (s *InputService3TestShapeInputService3TestCaseOperation2Input) SetBlobMap(v map[string][]byte) *InputService3TestShapeInputService3TestCaseOperation2Input {
   611  	s.BlobMap = v
   612  	return s
   613  }
   614  
   615  type InputService3TestShapeInputService3TestCaseOperation2Output struct {
   616  	_ struct{} `type:"structure"`
   617  }
   618  
   619  // InputService4ProtocolTest provides the API operation methods for making requests to
   620  // . See this package's package overview docs
   621  // for details on the service.
   622  //
   623  // InputService4ProtocolTest methods are safe to use concurrently. It is not safe to
   624  // modify mutate any of the struct's properties though.
   625  type InputService4ProtocolTest struct {
   626  	*client.Client
   627  }
   628  
   629  // New creates a new instance of the InputService4ProtocolTest client with a session.
   630  // If additional configuration is needed for the client instance use the optional
   631  // aws.Config parameter to add your extra config.
   632  //
   633  // Example:
   634  //     mySession := session.Must(session.NewSession())
   635  //
   636  //     // Create a InputService4ProtocolTest client from just a session.
   637  //     svc := inputservice4protocoltest.New(mySession)
   638  //
   639  //     // Create a InputService4ProtocolTest client with additional configuration
   640  //     svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
   641  func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest {
   642  	c := p.ClientConfig("inputservice4protocoltest", cfgs...)
   643  	return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
   644  }
   645  
   646  // newClient creates, initializes and returns a new service client instance.
   647  func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService4ProtocolTest {
   648  	svc := &InputService4ProtocolTest{
   649  		Client: client.New(
   650  			cfg,
   651  			metadata.ClientInfo{
   652  				ServiceName:   "InputService4ProtocolTest",
   653  				ServiceID:     "InputService4ProtocolTest",
   654  				SigningName:   signingName,
   655  				SigningRegion: signingRegion,
   656  				PartitionID:   partitionID,
   657  				Endpoint:      endpoint,
   658  				APIVersion:    "",
   659  				JSONVersion:   "1.1",
   660  				TargetPrefix:  "com.amazonaws.foo",
   661  			},
   662  			handlers,
   663  		),
   664  	}
   665  
   666  	// Handlers
   667  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
   668  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
   669  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
   670  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
   671  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
   672  
   673  	return svc
   674  }
   675  
   676  // newRequest creates a new request for a InputService4ProtocolTest operation and runs any
   677  // custom request initialization.
   678  func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
   679  	req := c.NewRequest(op, params, data)
   680  
   681  	return req
   682  }
   683  
   684  const opInputService4TestCaseOperation1 = "OperationName"
   685  
   686  // InputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
   687  // client's request for the InputService4TestCaseOperation1 operation. The "output" return
   688  // value will be populated with the request's response once the request completes
   689  // successfully.
   690  //
   691  // Use "Send" method on the returned Request to send the API call to the service.
   692  // the "output" return value is not valid until after Send returns without error.
   693  //
   694  // See InputService4TestCaseOperation1 for more information on using the InputService4TestCaseOperation1
   695  // API call, and error handling.
   696  //
   697  // This method is useful when you want to inject custom logic or configuration
   698  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   699  //
   700  //
   701  //    // Example sending a request using the InputService4TestCaseOperation1Request method.
   702  //    req, resp := client.InputService4TestCaseOperation1Request(params)
   703  //
   704  //    err := req.Send()
   705  //    if err == nil { // resp is now filled
   706  //        fmt.Println(resp)
   707  //    }
   708  func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
   709  	op := &request.Operation{
   710  		Name:       opInputService4TestCaseOperation1,
   711  		HTTPMethod: "POST",
   712  		HTTPPath:   "/",
   713  	}
   714  
   715  	if input == nil {
   716  		input = &InputService4TestShapeInputService4TestCaseOperation1Input{}
   717  	}
   718  
   719  	output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
   720  	req = c.newRequest(op, input, output)
   721  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   722  	return
   723  }
   724  
   725  // InputService4TestCaseOperation1 API operation for .
   726  //
   727  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   728  // with awserr.Error's Code and Message methods to get detailed information about
   729  // the error.
   730  //
   731  // See the AWS API reference guide for 's
   732  // API operation InputService4TestCaseOperation1 for usage and error information.
   733  func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
   734  	req, out := c.InputService4TestCaseOperation1Request(input)
   735  	return out, req.Send()
   736  }
   737  
   738  // InputService4TestCaseOperation1WithContext is the same as InputService4TestCaseOperation1 with the addition of
   739  // the ability to pass a context and additional request options.
   740  //
   741  // See InputService4TestCaseOperation1 for details on how to use this API operation.
   742  //
   743  // The context must be non-nil and will be used for request cancellation. If
   744  // the context is nil a panic will occur. In the future the SDK may create
   745  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   746  // for more information on using Contexts.
   747  func (c *InputService4ProtocolTest) InputService4TestCaseOperation1WithContext(ctx aws.Context, input *InputService4TestShapeInputService4TestCaseOperation1Input, opts ...request.Option) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
   748  	req, out := c.InputService4TestCaseOperation1Request(input)
   749  	req.SetContext(ctx)
   750  	req.ApplyOptions(opts...)
   751  	return out, req.Send()
   752  }
   753  
   754  type InputService4TestShapeInputService4TestCaseOperation1Input struct {
   755  	_ struct{} `type:"structure"`
   756  
   757  	ListParam [][]byte `type:"list"`
   758  }
   759  
   760  // SetListParam sets the ListParam field's value.
   761  func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetListParam(v [][]byte) *InputService4TestShapeInputService4TestCaseOperation1Input {
   762  	s.ListParam = v
   763  	return s
   764  }
   765  
   766  type InputService4TestShapeInputService4TestCaseOperation1Output struct {
   767  	_ struct{} `type:"structure"`
   768  }
   769  
   770  // InputService5ProtocolTest provides the API operation methods for making requests to
   771  // . See this package's package overview docs
   772  // for details on the service.
   773  //
   774  // InputService5ProtocolTest methods are safe to use concurrently. It is not safe to
   775  // modify mutate any of the struct's properties though.
   776  type InputService5ProtocolTest struct {
   777  	*client.Client
   778  }
   779  
   780  // New creates a new instance of the InputService5ProtocolTest client with a session.
   781  // If additional configuration is needed for the client instance use the optional
   782  // aws.Config parameter to add your extra config.
   783  //
   784  // Example:
   785  //     mySession := session.Must(session.NewSession())
   786  //
   787  //     // Create a InputService5ProtocolTest client from just a session.
   788  //     svc := inputservice5protocoltest.New(mySession)
   789  //
   790  //     // Create a InputService5ProtocolTest client with additional configuration
   791  //     svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
   792  func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest {
   793  	c := p.ClientConfig("inputservice5protocoltest", cfgs...)
   794  	return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
   795  }
   796  
   797  // newClient creates, initializes and returns a new service client instance.
   798  func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService5ProtocolTest {
   799  	svc := &InputService5ProtocolTest{
   800  		Client: client.New(
   801  			cfg,
   802  			metadata.ClientInfo{
   803  				ServiceName:   "InputService5ProtocolTest",
   804  				ServiceID:     "InputService5ProtocolTest",
   805  				SigningName:   signingName,
   806  				SigningRegion: signingRegion,
   807  				PartitionID:   partitionID,
   808  				Endpoint:      endpoint,
   809  				APIVersion:    "",
   810  				JSONVersion:   "1.1",
   811  				TargetPrefix:  "com.amazonaws.foo",
   812  			},
   813  			handlers,
   814  		),
   815  	}
   816  
   817  	// Handlers
   818  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
   819  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
   820  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
   821  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
   822  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
   823  
   824  	return svc
   825  }
   826  
   827  // newRequest creates a new request for a InputService5ProtocolTest operation and runs any
   828  // custom request initialization.
   829  func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
   830  	req := c.NewRequest(op, params, data)
   831  
   832  	return req
   833  }
   834  
   835  const opInputService5TestCaseOperation1 = "OperationName"
   836  
   837  // InputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
   838  // client's request for the InputService5TestCaseOperation1 operation. The "output" return
   839  // value will be populated with the request's response once the request completes
   840  // successfully.
   841  //
   842  // Use "Send" method on the returned Request to send the API call to the service.
   843  // the "output" return value is not valid until after Send returns without error.
   844  //
   845  // See InputService5TestCaseOperation1 for more information on using the InputService5TestCaseOperation1
   846  // API call, and error handling.
   847  //
   848  // This method is useful when you want to inject custom logic or configuration
   849  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   850  //
   851  //
   852  //    // Example sending a request using the InputService5TestCaseOperation1Request method.
   853  //    req, resp := client.InputService5TestCaseOperation1Request(params)
   854  //
   855  //    err := req.Send()
   856  //    if err == nil { // resp is now filled
   857  //        fmt.Println(resp)
   858  //    }
   859  func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
   860  	op := &request.Operation{
   861  		Name:     opInputService5TestCaseOperation1,
   862  		HTTPPath: "/",
   863  	}
   864  
   865  	if input == nil {
   866  		input = &InputService5TestShapeInputService5TestCaseOperation1Input{}
   867  	}
   868  
   869  	output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
   870  	req = c.newRequest(op, input, output)
   871  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   872  	return
   873  }
   874  
   875  // InputService5TestCaseOperation1 API operation for .
   876  //
   877  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   878  // with awserr.Error's Code and Message methods to get detailed information about
   879  // the error.
   880  //
   881  // See the AWS API reference guide for 's
   882  // API operation InputService5TestCaseOperation1 for usage and error information.
   883  func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
   884  	req, out := c.InputService5TestCaseOperation1Request(input)
   885  	return out, req.Send()
   886  }
   887  
   888  // InputService5TestCaseOperation1WithContext is the same as InputService5TestCaseOperation1 with the addition of
   889  // the ability to pass a context and additional request options.
   890  //
   891  // See InputService5TestCaseOperation1 for details on how to use this API operation.
   892  //
   893  // The context must be non-nil and will be used for request cancellation. If
   894  // the context is nil a panic will occur. In the future the SDK may create
   895  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   896  // for more information on using Contexts.
   897  func (c *InputService5ProtocolTest) InputService5TestCaseOperation1WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation1Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
   898  	req, out := c.InputService5TestCaseOperation1Request(input)
   899  	req.SetContext(ctx)
   900  	req.ApplyOptions(opts...)
   901  	return out, req.Send()
   902  }
   903  
   904  const opInputService5TestCaseOperation2 = "OperationName"
   905  
   906  // InputService5TestCaseOperation2Request generates a "aws/request.Request" representing the
   907  // client's request for the InputService5TestCaseOperation2 operation. The "output" return
   908  // value will be populated with the request's response once the request completes
   909  // successfully.
   910  //
   911  // Use "Send" method on the returned Request to send the API call to the service.
   912  // the "output" return value is not valid until after Send returns without error.
   913  //
   914  // See InputService5TestCaseOperation2 for more information on using the InputService5TestCaseOperation2
   915  // API call, and error handling.
   916  //
   917  // This method is useful when you want to inject custom logic or configuration
   918  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   919  //
   920  //
   921  //    // Example sending a request using the InputService5TestCaseOperation2Request method.
   922  //    req, resp := client.InputService5TestCaseOperation2Request(params)
   923  //
   924  //    err := req.Send()
   925  //    if err == nil { // resp is now filled
   926  //        fmt.Println(resp)
   927  //    }
   928  func (c *InputService5ProtocolTest) InputService5TestCaseOperation2Request(input *InputService5TestShapeInputService5TestCaseOperation2Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation2Output) {
   929  	op := &request.Operation{
   930  		Name:     opInputService5TestCaseOperation2,
   931  		HTTPPath: "/",
   932  	}
   933  
   934  	if input == nil {
   935  		input = &InputService5TestShapeInputService5TestCaseOperation2Input{}
   936  	}
   937  
   938  	output = &InputService5TestShapeInputService5TestCaseOperation2Output{}
   939  	req = c.newRequest(op, input, output)
   940  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   941  	return
   942  }
   943  
   944  // InputService5TestCaseOperation2 API operation for .
   945  //
   946  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   947  // with awserr.Error's Code and Message methods to get detailed information about
   948  // the error.
   949  //
   950  // See the AWS API reference guide for 's
   951  // API operation InputService5TestCaseOperation2 for usage and error information.
   952  func (c *InputService5ProtocolTest) InputService5TestCaseOperation2(input *InputService5TestShapeInputService5TestCaseOperation2Input) (*InputService5TestShapeInputService5TestCaseOperation2Output, error) {
   953  	req, out := c.InputService5TestCaseOperation2Request(input)
   954  	return out, req.Send()
   955  }
   956  
   957  // InputService5TestCaseOperation2WithContext is the same as InputService5TestCaseOperation2 with the addition of
   958  // the ability to pass a context and additional request options.
   959  //
   960  // See InputService5TestCaseOperation2 for details on how to use this API operation.
   961  //
   962  // The context must be non-nil and will be used for request cancellation. If
   963  // the context is nil a panic will occur. In the future the SDK may create
   964  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   965  // for more information on using Contexts.
   966  func (c *InputService5ProtocolTest) InputService5TestCaseOperation2WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation2Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation2Output, error) {
   967  	req, out := c.InputService5TestCaseOperation2Request(input)
   968  	req.SetContext(ctx)
   969  	req.ApplyOptions(opts...)
   970  	return out, req.Send()
   971  }
   972  
   973  const opInputService5TestCaseOperation3 = "OperationName"
   974  
   975  // InputService5TestCaseOperation3Request generates a "aws/request.Request" representing the
   976  // client's request for the InputService5TestCaseOperation3 operation. The "output" return
   977  // value will be populated with the request's response once the request completes
   978  // successfully.
   979  //
   980  // Use "Send" method on the returned Request to send the API call to the service.
   981  // the "output" return value is not valid until after Send returns without error.
   982  //
   983  // See InputService5TestCaseOperation3 for more information on using the InputService5TestCaseOperation3
   984  // API call, and error handling.
   985  //
   986  // This method is useful when you want to inject custom logic or configuration
   987  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   988  //
   989  //
   990  //    // Example sending a request using the InputService5TestCaseOperation3Request method.
   991  //    req, resp := client.InputService5TestCaseOperation3Request(params)
   992  //
   993  //    err := req.Send()
   994  //    if err == nil { // resp is now filled
   995  //        fmt.Println(resp)
   996  //    }
   997  func (c *InputService5ProtocolTest) InputService5TestCaseOperation3Request(input *InputService5TestShapeInputService5TestCaseOperation3Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation3Output) {
   998  	op := &request.Operation{
   999  		Name:     opInputService5TestCaseOperation3,
  1000  		HTTPPath: "/",
  1001  	}
  1002  
  1003  	if input == nil {
  1004  		input = &InputService5TestShapeInputService5TestCaseOperation3Input{}
  1005  	}
  1006  
  1007  	output = &InputService5TestShapeInputService5TestCaseOperation3Output{}
  1008  	req = c.newRequest(op, input, output)
  1009  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1010  	return
  1011  }
  1012  
  1013  // InputService5TestCaseOperation3 API operation for .
  1014  //
  1015  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1016  // with awserr.Error's Code and Message methods to get detailed information about
  1017  // the error.
  1018  //
  1019  // See the AWS API reference guide for 's
  1020  // API operation InputService5TestCaseOperation3 for usage and error information.
  1021  func (c *InputService5ProtocolTest) InputService5TestCaseOperation3(input *InputService5TestShapeInputService5TestCaseOperation3Input) (*InputService5TestShapeInputService5TestCaseOperation3Output, error) {
  1022  	req, out := c.InputService5TestCaseOperation3Request(input)
  1023  	return out, req.Send()
  1024  }
  1025  
  1026  // InputService5TestCaseOperation3WithContext is the same as InputService5TestCaseOperation3 with the addition of
  1027  // the ability to pass a context and additional request options.
  1028  //
  1029  // See InputService5TestCaseOperation3 for details on how to use this API operation.
  1030  //
  1031  // The context must be non-nil and will be used for request cancellation. If
  1032  // the context is nil a panic will occur. In the future the SDK may create
  1033  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1034  // for more information on using Contexts.
  1035  func (c *InputService5ProtocolTest) InputService5TestCaseOperation3WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation3Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation3Output, error) {
  1036  	req, out := c.InputService5TestCaseOperation3Request(input)
  1037  	req.SetContext(ctx)
  1038  	req.ApplyOptions(opts...)
  1039  	return out, req.Send()
  1040  }
  1041  
  1042  const opInputService5TestCaseOperation4 = "OperationName"
  1043  
  1044  // InputService5TestCaseOperation4Request generates a "aws/request.Request" representing the
  1045  // client's request for the InputService5TestCaseOperation4 operation. The "output" return
  1046  // value will be populated with the request's response once the request completes
  1047  // successfully.
  1048  //
  1049  // Use "Send" method on the returned Request to send the API call to the service.
  1050  // the "output" return value is not valid until after Send returns without error.
  1051  //
  1052  // See InputService5TestCaseOperation4 for more information on using the InputService5TestCaseOperation4
  1053  // API call, and error handling.
  1054  //
  1055  // This method is useful when you want to inject custom logic or configuration
  1056  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1057  //
  1058  //
  1059  //    // Example sending a request using the InputService5TestCaseOperation4Request method.
  1060  //    req, resp := client.InputService5TestCaseOperation4Request(params)
  1061  //
  1062  //    err := req.Send()
  1063  //    if err == nil { // resp is now filled
  1064  //        fmt.Println(resp)
  1065  //    }
  1066  func (c *InputService5ProtocolTest) InputService5TestCaseOperation4Request(input *InputService5TestShapeInputService5TestCaseOperation4Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation4Output) {
  1067  	op := &request.Operation{
  1068  		Name:     opInputService5TestCaseOperation4,
  1069  		HTTPPath: "/",
  1070  	}
  1071  
  1072  	if input == nil {
  1073  		input = &InputService5TestShapeInputService5TestCaseOperation4Input{}
  1074  	}
  1075  
  1076  	output = &InputService5TestShapeInputService5TestCaseOperation4Output{}
  1077  	req = c.newRequest(op, input, output)
  1078  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1079  	return
  1080  }
  1081  
  1082  // InputService5TestCaseOperation4 API operation for .
  1083  //
  1084  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1085  // with awserr.Error's Code and Message methods to get detailed information about
  1086  // the error.
  1087  //
  1088  // See the AWS API reference guide for 's
  1089  // API operation InputService5TestCaseOperation4 for usage and error information.
  1090  func (c *InputService5ProtocolTest) InputService5TestCaseOperation4(input *InputService5TestShapeInputService5TestCaseOperation4Input) (*InputService5TestShapeInputService5TestCaseOperation4Output, error) {
  1091  	req, out := c.InputService5TestCaseOperation4Request(input)
  1092  	return out, req.Send()
  1093  }
  1094  
  1095  // InputService5TestCaseOperation4WithContext is the same as InputService5TestCaseOperation4 with the addition of
  1096  // the ability to pass a context and additional request options.
  1097  //
  1098  // See InputService5TestCaseOperation4 for details on how to use this API operation.
  1099  //
  1100  // The context must be non-nil and will be used for request cancellation. If
  1101  // the context is nil a panic will occur. In the future the SDK may create
  1102  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1103  // for more information on using Contexts.
  1104  func (c *InputService5ProtocolTest) InputService5TestCaseOperation4WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation4Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation4Output, error) {
  1105  	req, out := c.InputService5TestCaseOperation4Request(input)
  1106  	req.SetContext(ctx)
  1107  	req.ApplyOptions(opts...)
  1108  	return out, req.Send()
  1109  }
  1110  
  1111  const opInputService5TestCaseOperation5 = "OperationName"
  1112  
  1113  // InputService5TestCaseOperation5Request generates a "aws/request.Request" representing the
  1114  // client's request for the InputService5TestCaseOperation5 operation. The "output" return
  1115  // value will be populated with the request's response once the request completes
  1116  // successfully.
  1117  //
  1118  // Use "Send" method on the returned Request to send the API call to the service.
  1119  // the "output" return value is not valid until after Send returns without error.
  1120  //
  1121  // See InputService5TestCaseOperation5 for more information on using the InputService5TestCaseOperation5
  1122  // API call, and error handling.
  1123  //
  1124  // This method is useful when you want to inject custom logic or configuration
  1125  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1126  //
  1127  //
  1128  //    // Example sending a request using the InputService5TestCaseOperation5Request method.
  1129  //    req, resp := client.InputService5TestCaseOperation5Request(params)
  1130  //
  1131  //    err := req.Send()
  1132  //    if err == nil { // resp is now filled
  1133  //        fmt.Println(resp)
  1134  //    }
  1135  func (c *InputService5ProtocolTest) InputService5TestCaseOperation5Request(input *InputService5TestShapeInputService5TestCaseOperation5Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation5Output) {
  1136  	op := &request.Operation{
  1137  		Name:     opInputService5TestCaseOperation5,
  1138  		HTTPPath: "/",
  1139  	}
  1140  
  1141  	if input == nil {
  1142  		input = &InputService5TestShapeInputService5TestCaseOperation5Input{}
  1143  	}
  1144  
  1145  	output = &InputService5TestShapeInputService5TestCaseOperation5Output{}
  1146  	req = c.newRequest(op, input, output)
  1147  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1148  	return
  1149  }
  1150  
  1151  // InputService5TestCaseOperation5 API operation for .
  1152  //
  1153  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1154  // with awserr.Error's Code and Message methods to get detailed information about
  1155  // the error.
  1156  //
  1157  // See the AWS API reference guide for 's
  1158  // API operation InputService5TestCaseOperation5 for usage and error information.
  1159  func (c *InputService5ProtocolTest) InputService5TestCaseOperation5(input *InputService5TestShapeInputService5TestCaseOperation5Input) (*InputService5TestShapeInputService5TestCaseOperation5Output, error) {
  1160  	req, out := c.InputService5TestCaseOperation5Request(input)
  1161  	return out, req.Send()
  1162  }
  1163  
  1164  // InputService5TestCaseOperation5WithContext is the same as InputService5TestCaseOperation5 with the addition of
  1165  // the ability to pass a context and additional request options.
  1166  //
  1167  // See InputService5TestCaseOperation5 for details on how to use this API operation.
  1168  //
  1169  // The context must be non-nil and will be used for request cancellation. If
  1170  // the context is nil a panic will occur. In the future the SDK may create
  1171  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1172  // for more information on using Contexts.
  1173  func (c *InputService5ProtocolTest) InputService5TestCaseOperation5WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation5Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation5Output, error) {
  1174  	req, out := c.InputService5TestCaseOperation5Request(input)
  1175  	req.SetContext(ctx)
  1176  	req.ApplyOptions(opts...)
  1177  	return out, req.Send()
  1178  }
  1179  
  1180  const opInputService5TestCaseOperation6 = "OperationName"
  1181  
  1182  // InputService5TestCaseOperation6Request generates a "aws/request.Request" representing the
  1183  // client's request for the InputService5TestCaseOperation6 operation. The "output" return
  1184  // value will be populated with the request's response once the request completes
  1185  // successfully.
  1186  //
  1187  // Use "Send" method on the returned Request to send the API call to the service.
  1188  // the "output" return value is not valid until after Send returns without error.
  1189  //
  1190  // See InputService5TestCaseOperation6 for more information on using the InputService5TestCaseOperation6
  1191  // API call, and error handling.
  1192  //
  1193  // This method is useful when you want to inject custom logic or configuration
  1194  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1195  //
  1196  //
  1197  //    // Example sending a request using the InputService5TestCaseOperation6Request method.
  1198  //    req, resp := client.InputService5TestCaseOperation6Request(params)
  1199  //
  1200  //    err := req.Send()
  1201  //    if err == nil { // resp is now filled
  1202  //        fmt.Println(resp)
  1203  //    }
  1204  func (c *InputService5ProtocolTest) InputService5TestCaseOperation6Request(input *InputService5TestShapeInputService5TestCaseOperation6Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation6Output) {
  1205  	op := &request.Operation{
  1206  		Name:     opInputService5TestCaseOperation6,
  1207  		HTTPPath: "/",
  1208  	}
  1209  
  1210  	if input == nil {
  1211  		input = &InputService5TestShapeInputService5TestCaseOperation6Input{}
  1212  	}
  1213  
  1214  	output = &InputService5TestShapeInputService5TestCaseOperation6Output{}
  1215  	req = c.newRequest(op, input, output)
  1216  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1217  	return
  1218  }
  1219  
  1220  // InputService5TestCaseOperation6 API operation for .
  1221  //
  1222  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1223  // with awserr.Error's Code and Message methods to get detailed information about
  1224  // the error.
  1225  //
  1226  // See the AWS API reference guide for 's
  1227  // API operation InputService5TestCaseOperation6 for usage and error information.
  1228  func (c *InputService5ProtocolTest) InputService5TestCaseOperation6(input *InputService5TestShapeInputService5TestCaseOperation6Input) (*InputService5TestShapeInputService5TestCaseOperation6Output, error) {
  1229  	req, out := c.InputService5TestCaseOperation6Request(input)
  1230  	return out, req.Send()
  1231  }
  1232  
  1233  // InputService5TestCaseOperation6WithContext is the same as InputService5TestCaseOperation6 with the addition of
  1234  // the ability to pass a context and additional request options.
  1235  //
  1236  // See InputService5TestCaseOperation6 for details on how to use this API operation.
  1237  //
  1238  // The context must be non-nil and will be used for request cancellation. If
  1239  // the context is nil a panic will occur. In the future the SDK may create
  1240  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1241  // for more information on using Contexts.
  1242  func (c *InputService5ProtocolTest) InputService5TestCaseOperation6WithContext(ctx aws.Context, input *InputService5TestShapeInputService5TestCaseOperation6Input, opts ...request.Option) (*InputService5TestShapeInputService5TestCaseOperation6Output, error) {
  1243  	req, out := c.InputService5TestCaseOperation6Request(input)
  1244  	req.SetContext(ctx)
  1245  	req.ApplyOptions(opts...)
  1246  	return out, req.Send()
  1247  }
  1248  
  1249  type InputService5TestShapeInputService5TestCaseOperation1Input struct {
  1250  	_ struct{} `type:"structure"`
  1251  
  1252  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1253  }
  1254  
  1255  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1256  func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation1Input {
  1257  	s.RecursiveStruct = v
  1258  	return s
  1259  }
  1260  
  1261  type InputService5TestShapeInputService5TestCaseOperation1Output struct {
  1262  	_ struct{} `type:"structure"`
  1263  }
  1264  
  1265  type InputService5TestShapeInputService5TestCaseOperation2Input struct {
  1266  	_ struct{} `type:"structure"`
  1267  
  1268  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1269  }
  1270  
  1271  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1272  func (s *InputService5TestShapeInputService5TestCaseOperation2Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation2Input {
  1273  	s.RecursiveStruct = v
  1274  	return s
  1275  }
  1276  
  1277  type InputService5TestShapeInputService5TestCaseOperation2Output struct {
  1278  	_ struct{} `type:"structure"`
  1279  }
  1280  
  1281  type InputService5TestShapeInputService5TestCaseOperation3Input struct {
  1282  	_ struct{} `type:"structure"`
  1283  
  1284  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1285  }
  1286  
  1287  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1288  func (s *InputService5TestShapeInputService5TestCaseOperation3Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation3Input {
  1289  	s.RecursiveStruct = v
  1290  	return s
  1291  }
  1292  
  1293  type InputService5TestShapeInputService5TestCaseOperation3Output struct {
  1294  	_ struct{} `type:"structure"`
  1295  }
  1296  
  1297  type InputService5TestShapeInputService5TestCaseOperation4Input struct {
  1298  	_ struct{} `type:"structure"`
  1299  
  1300  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1301  }
  1302  
  1303  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1304  func (s *InputService5TestShapeInputService5TestCaseOperation4Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation4Input {
  1305  	s.RecursiveStruct = v
  1306  	return s
  1307  }
  1308  
  1309  type InputService5TestShapeInputService5TestCaseOperation4Output struct {
  1310  	_ struct{} `type:"structure"`
  1311  }
  1312  
  1313  type InputService5TestShapeInputService5TestCaseOperation5Input struct {
  1314  	_ struct{} `type:"structure"`
  1315  
  1316  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1317  }
  1318  
  1319  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1320  func (s *InputService5TestShapeInputService5TestCaseOperation5Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation5Input {
  1321  	s.RecursiveStruct = v
  1322  	return s
  1323  }
  1324  
  1325  type InputService5TestShapeInputService5TestCaseOperation5Output struct {
  1326  	_ struct{} `type:"structure"`
  1327  }
  1328  
  1329  type InputService5TestShapeInputService5TestCaseOperation6Input struct {
  1330  	_ struct{} `type:"structure"`
  1331  
  1332  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1333  }
  1334  
  1335  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1336  func (s *InputService5TestShapeInputService5TestCaseOperation6Input) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeInputService5TestCaseOperation6Input {
  1337  	s.RecursiveStruct = v
  1338  	return s
  1339  }
  1340  
  1341  type InputService5TestShapeInputService5TestCaseOperation6Output struct {
  1342  	_ struct{} `type:"structure"`
  1343  }
  1344  
  1345  type InputService5TestShapeRecursiveStructType struct {
  1346  	_ struct{} `type:"structure"`
  1347  
  1348  	NoRecurse *string `type:"string"`
  1349  
  1350  	RecursiveList []*InputService5TestShapeRecursiveStructType `type:"list"`
  1351  
  1352  	RecursiveMap map[string]*InputService5TestShapeRecursiveStructType `type:"map"`
  1353  
  1354  	RecursiveStruct *InputService5TestShapeRecursiveStructType `type:"structure"`
  1355  }
  1356  
  1357  // SetNoRecurse sets the NoRecurse field's value.
  1358  func (s *InputService5TestShapeRecursiveStructType) SetNoRecurse(v string) *InputService5TestShapeRecursiveStructType {
  1359  	s.NoRecurse = &v
  1360  	return s
  1361  }
  1362  
  1363  // SetRecursiveList sets the RecursiveList field's value.
  1364  func (s *InputService5TestShapeRecursiveStructType) SetRecursiveList(v []*InputService5TestShapeRecursiveStructType) *InputService5TestShapeRecursiveStructType {
  1365  	s.RecursiveList = v
  1366  	return s
  1367  }
  1368  
  1369  // SetRecursiveMap sets the RecursiveMap field's value.
  1370  func (s *InputService5TestShapeRecursiveStructType) SetRecursiveMap(v map[string]*InputService5TestShapeRecursiveStructType) *InputService5TestShapeRecursiveStructType {
  1371  	s.RecursiveMap = v
  1372  	return s
  1373  }
  1374  
  1375  // SetRecursiveStruct sets the RecursiveStruct field's value.
  1376  func (s *InputService5TestShapeRecursiveStructType) SetRecursiveStruct(v *InputService5TestShapeRecursiveStructType) *InputService5TestShapeRecursiveStructType {
  1377  	s.RecursiveStruct = v
  1378  	return s
  1379  }
  1380  
  1381  // InputService6ProtocolTest provides the API operation methods for making requests to
  1382  // . See this package's package overview docs
  1383  // for details on the service.
  1384  //
  1385  // InputService6ProtocolTest methods are safe to use concurrently. It is not safe to
  1386  // modify mutate any of the struct's properties though.
  1387  type InputService6ProtocolTest struct {
  1388  	*client.Client
  1389  }
  1390  
  1391  // New creates a new instance of the InputService6ProtocolTest client with a session.
  1392  // If additional configuration is needed for the client instance use the optional
  1393  // aws.Config parameter to add your extra config.
  1394  //
  1395  // Example:
  1396  //     mySession := session.Must(session.NewSession())
  1397  //
  1398  //     // Create a InputService6ProtocolTest client from just a session.
  1399  //     svc := inputservice6protocoltest.New(mySession)
  1400  //
  1401  //     // Create a InputService6ProtocolTest client with additional configuration
  1402  //     svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1403  func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest {
  1404  	c := p.ClientConfig("inputservice6protocoltest", cfgs...)
  1405  	return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
  1406  }
  1407  
  1408  // newClient creates, initializes and returns a new service client instance.
  1409  func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService6ProtocolTest {
  1410  	svc := &InputService6ProtocolTest{
  1411  		Client: client.New(
  1412  			cfg,
  1413  			metadata.ClientInfo{
  1414  				ServiceName:   "InputService6ProtocolTest",
  1415  				ServiceID:     "InputService6ProtocolTest",
  1416  				SigningName:   signingName,
  1417  				SigningRegion: signingRegion,
  1418  				PartitionID:   partitionID,
  1419  				Endpoint:      endpoint,
  1420  				APIVersion:    "",
  1421  				JSONVersion:   "1.1",
  1422  				TargetPrefix:  "com.amazonaws.foo",
  1423  			},
  1424  			handlers,
  1425  		),
  1426  	}
  1427  
  1428  	// Handlers
  1429  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1430  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  1431  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  1432  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  1433  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  1434  
  1435  	return svc
  1436  }
  1437  
  1438  // newRequest creates a new request for a InputService6ProtocolTest operation and runs any
  1439  // custom request initialization.
  1440  func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1441  	req := c.NewRequest(op, params, data)
  1442  
  1443  	return req
  1444  }
  1445  
  1446  const opInputService6TestCaseOperation1 = "OperationName"
  1447  
  1448  // InputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
  1449  // client's request for the InputService6TestCaseOperation1 operation. The "output" return
  1450  // value will be populated with the request's response once the request completes
  1451  // successfully.
  1452  //
  1453  // Use "Send" method on the returned Request to send the API call to the service.
  1454  // the "output" return value is not valid until after Send returns without error.
  1455  //
  1456  // See InputService6TestCaseOperation1 for more information on using the InputService6TestCaseOperation1
  1457  // API call, and error handling.
  1458  //
  1459  // This method is useful when you want to inject custom logic or configuration
  1460  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1461  //
  1462  //
  1463  //    // Example sending a request using the InputService6TestCaseOperation1Request method.
  1464  //    req, resp := client.InputService6TestCaseOperation1Request(params)
  1465  //
  1466  //    err := req.Send()
  1467  //    if err == nil { // resp is now filled
  1468  //        fmt.Println(resp)
  1469  //    }
  1470  func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
  1471  	op := &request.Operation{
  1472  		Name:       opInputService6TestCaseOperation1,
  1473  		HTTPMethod: "POST",
  1474  		HTTPPath:   "/",
  1475  	}
  1476  
  1477  	if input == nil {
  1478  		input = &InputService6TestShapeInputService6TestCaseOperation1Input{}
  1479  	}
  1480  
  1481  	output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
  1482  	req = c.newRequest(op, input, output)
  1483  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1484  	return
  1485  }
  1486  
  1487  // InputService6TestCaseOperation1 API operation for .
  1488  //
  1489  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1490  // with awserr.Error's Code and Message methods to get detailed information about
  1491  // the error.
  1492  //
  1493  // See the AWS API reference guide for 's
  1494  // API operation InputService6TestCaseOperation1 for usage and error information.
  1495  func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
  1496  	req, out := c.InputService6TestCaseOperation1Request(input)
  1497  	return out, req.Send()
  1498  }
  1499  
  1500  // InputService6TestCaseOperation1WithContext is the same as InputService6TestCaseOperation1 with the addition of
  1501  // the ability to pass a context and additional request options.
  1502  //
  1503  // See InputService6TestCaseOperation1 for details on how to use this API operation.
  1504  //
  1505  // The context must be non-nil and will be used for request cancellation. If
  1506  // the context is nil a panic will occur. In the future the SDK may create
  1507  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1508  // for more information on using Contexts.
  1509  func (c *InputService6ProtocolTest) InputService6TestCaseOperation1WithContext(ctx aws.Context, input *InputService6TestShapeInputService6TestCaseOperation1Input, opts ...request.Option) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
  1510  	req, out := c.InputService6TestCaseOperation1Request(input)
  1511  	req.SetContext(ctx)
  1512  	req.ApplyOptions(opts...)
  1513  	return out, req.Send()
  1514  }
  1515  
  1516  type InputService6TestShapeInputService6TestCaseOperation1Input struct {
  1517  	_ struct{} `type:"structure"`
  1518  
  1519  	Map map[string]*string `type:"map"`
  1520  }
  1521  
  1522  // SetMap sets the Map field's value.
  1523  func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetMap(v map[string]*string) *InputService6TestShapeInputService6TestCaseOperation1Input {
  1524  	s.Map = v
  1525  	return s
  1526  }
  1527  
  1528  type InputService6TestShapeInputService6TestCaseOperation1Output struct {
  1529  	_ struct{} `type:"structure"`
  1530  }
  1531  
  1532  // InputService7ProtocolTest provides the API operation methods for making requests to
  1533  // . See this package's package overview docs
  1534  // for details on the service.
  1535  //
  1536  // InputService7ProtocolTest methods are safe to use concurrently. It is not safe to
  1537  // modify mutate any of the struct's properties though.
  1538  type InputService7ProtocolTest struct {
  1539  	*client.Client
  1540  }
  1541  
  1542  // New creates a new instance of the InputService7ProtocolTest client with a session.
  1543  // If additional configuration is needed for the client instance use the optional
  1544  // aws.Config parameter to add your extra config.
  1545  //
  1546  // Example:
  1547  //     mySession := session.Must(session.NewSession())
  1548  //
  1549  //     // Create a InputService7ProtocolTest client from just a session.
  1550  //     svc := inputservice7protocoltest.New(mySession)
  1551  //
  1552  //     // Create a InputService7ProtocolTest client with additional configuration
  1553  //     svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1554  func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest {
  1555  	c := p.ClientConfig("inputservice7protocoltest", cfgs...)
  1556  	return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
  1557  }
  1558  
  1559  // newClient creates, initializes and returns a new service client instance.
  1560  func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService7ProtocolTest {
  1561  	svc := &InputService7ProtocolTest{
  1562  		Client: client.New(
  1563  			cfg,
  1564  			metadata.ClientInfo{
  1565  				ServiceName:   "InputService7ProtocolTest",
  1566  				ServiceID:     "InputService7ProtocolTest",
  1567  				SigningName:   signingName,
  1568  				SigningRegion: signingRegion,
  1569  				PartitionID:   partitionID,
  1570  				Endpoint:      endpoint,
  1571  				APIVersion:    "2014-01-01",
  1572  			},
  1573  			handlers,
  1574  		),
  1575  	}
  1576  
  1577  	// Handlers
  1578  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1579  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  1580  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  1581  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  1582  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  1583  
  1584  	return svc
  1585  }
  1586  
  1587  // newRequest creates a new request for a InputService7ProtocolTest operation and runs any
  1588  // custom request initialization.
  1589  func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1590  	req := c.NewRequest(op, params, data)
  1591  
  1592  	return req
  1593  }
  1594  
  1595  const opInputService7TestCaseOperation1 = "OperationName"
  1596  
  1597  // InputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
  1598  // client's request for the InputService7TestCaseOperation1 operation. The "output" return
  1599  // value will be populated with the request's response once the request completes
  1600  // successfully.
  1601  //
  1602  // Use "Send" method on the returned Request to send the API call to the service.
  1603  // the "output" return value is not valid until after Send returns without error.
  1604  //
  1605  // See InputService7TestCaseOperation1 for more information on using the InputService7TestCaseOperation1
  1606  // API call, and error handling.
  1607  //
  1608  // This method is useful when you want to inject custom logic or configuration
  1609  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1610  //
  1611  //
  1612  //    // Example sending a request using the InputService7TestCaseOperation1Request method.
  1613  //    req, resp := client.InputService7TestCaseOperation1Request(params)
  1614  //
  1615  //    err := req.Send()
  1616  //    if err == nil { // resp is now filled
  1617  //        fmt.Println(resp)
  1618  //    }
  1619  func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
  1620  	op := &request.Operation{
  1621  		Name:       opInputService7TestCaseOperation1,
  1622  		HTTPMethod: "POST",
  1623  		HTTPPath:   "/",
  1624  	}
  1625  
  1626  	if input == nil {
  1627  		input = &InputService7TestShapeInputService7TestCaseOperation1Input{}
  1628  	}
  1629  
  1630  	output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
  1631  	req = c.newRequest(op, input, output)
  1632  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1633  	return
  1634  }
  1635  
  1636  // InputService7TestCaseOperation1 API operation for .
  1637  //
  1638  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1639  // with awserr.Error's Code and Message methods to get detailed information about
  1640  // the error.
  1641  //
  1642  // See the AWS API reference guide for 's
  1643  // API operation InputService7TestCaseOperation1 for usage and error information.
  1644  func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
  1645  	req, out := c.InputService7TestCaseOperation1Request(input)
  1646  	return out, req.Send()
  1647  }
  1648  
  1649  // InputService7TestCaseOperation1WithContext is the same as InputService7TestCaseOperation1 with the addition of
  1650  // the ability to pass a context and additional request options.
  1651  //
  1652  // See InputService7TestCaseOperation1 for details on how to use this API operation.
  1653  //
  1654  // The context must be non-nil and will be used for request cancellation. If
  1655  // the context is nil a panic will occur. In the future the SDK may create
  1656  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1657  // for more information on using Contexts.
  1658  func (c *InputService7ProtocolTest) InputService7TestCaseOperation1WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation1Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
  1659  	req, out := c.InputService7TestCaseOperation1Request(input)
  1660  	req.SetContext(ctx)
  1661  	req.ApplyOptions(opts...)
  1662  	return out, req.Send()
  1663  }
  1664  
  1665  const opInputService7TestCaseOperation2 = "OperationName"
  1666  
  1667  // InputService7TestCaseOperation2Request generates a "aws/request.Request" representing the
  1668  // client's request for the InputService7TestCaseOperation2 operation. The "output" return
  1669  // value will be populated with the request's response once the request completes
  1670  // successfully.
  1671  //
  1672  // Use "Send" method on the returned Request to send the API call to the service.
  1673  // the "output" return value is not valid until after Send returns without error.
  1674  //
  1675  // See InputService7TestCaseOperation2 for more information on using the InputService7TestCaseOperation2
  1676  // API call, and error handling.
  1677  //
  1678  // This method is useful when you want to inject custom logic or configuration
  1679  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1680  //
  1681  //
  1682  //    // Example sending a request using the InputService7TestCaseOperation2Request method.
  1683  //    req, resp := client.InputService7TestCaseOperation2Request(params)
  1684  //
  1685  //    err := req.Send()
  1686  //    if err == nil { // resp is now filled
  1687  //        fmt.Println(resp)
  1688  //    }
  1689  func (c *InputService7ProtocolTest) InputService7TestCaseOperation2Request(input *InputService7TestShapeInputService7TestCaseOperation2Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation2Output) {
  1690  	op := &request.Operation{
  1691  		Name:       opInputService7TestCaseOperation2,
  1692  		HTTPMethod: "POST",
  1693  		HTTPPath:   "/",
  1694  	}
  1695  
  1696  	if input == nil {
  1697  		input = &InputService7TestShapeInputService7TestCaseOperation2Input{}
  1698  	}
  1699  
  1700  	output = &InputService7TestShapeInputService7TestCaseOperation2Output{}
  1701  	req = c.newRequest(op, input, output)
  1702  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1703  	return
  1704  }
  1705  
  1706  // InputService7TestCaseOperation2 API operation for .
  1707  //
  1708  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1709  // with awserr.Error's Code and Message methods to get detailed information about
  1710  // the error.
  1711  //
  1712  // See the AWS API reference guide for 's
  1713  // API operation InputService7TestCaseOperation2 for usage and error information.
  1714  func (c *InputService7ProtocolTest) InputService7TestCaseOperation2(input *InputService7TestShapeInputService7TestCaseOperation2Input) (*InputService7TestShapeInputService7TestCaseOperation2Output, error) {
  1715  	req, out := c.InputService7TestCaseOperation2Request(input)
  1716  	return out, req.Send()
  1717  }
  1718  
  1719  // InputService7TestCaseOperation2WithContext is the same as InputService7TestCaseOperation2 with the addition of
  1720  // the ability to pass a context and additional request options.
  1721  //
  1722  // See InputService7TestCaseOperation2 for details on how to use this API operation.
  1723  //
  1724  // The context must be non-nil and will be used for request cancellation. If
  1725  // the context is nil a panic will occur. In the future the SDK may create
  1726  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1727  // for more information on using Contexts.
  1728  func (c *InputService7ProtocolTest) InputService7TestCaseOperation2WithContext(ctx aws.Context, input *InputService7TestShapeInputService7TestCaseOperation2Input, opts ...request.Option) (*InputService7TestShapeInputService7TestCaseOperation2Output, error) {
  1729  	req, out := c.InputService7TestCaseOperation2Request(input)
  1730  	req.SetContext(ctx)
  1731  	req.ApplyOptions(opts...)
  1732  	return out, req.Send()
  1733  }
  1734  
  1735  type InputService7TestShapeInputService7TestCaseOperation1Input struct {
  1736  	_ struct{} `type:"structure"`
  1737  
  1738  	Token *string `type:"string" idempotencyToken:"true"`
  1739  }
  1740  
  1741  // SetToken sets the Token field's value.
  1742  func (s *InputService7TestShapeInputService7TestCaseOperation1Input) SetToken(v string) *InputService7TestShapeInputService7TestCaseOperation1Input {
  1743  	s.Token = &v
  1744  	return s
  1745  }
  1746  
  1747  type InputService7TestShapeInputService7TestCaseOperation1Output struct {
  1748  	_ struct{} `type:"structure"`
  1749  }
  1750  
  1751  type InputService7TestShapeInputService7TestCaseOperation2Input struct {
  1752  	_ struct{} `type:"structure"`
  1753  
  1754  	Token *string `type:"string" idempotencyToken:"true"`
  1755  }
  1756  
  1757  // SetToken sets the Token field's value.
  1758  func (s *InputService7TestShapeInputService7TestCaseOperation2Input) SetToken(v string) *InputService7TestShapeInputService7TestCaseOperation2Input {
  1759  	s.Token = &v
  1760  	return s
  1761  }
  1762  
  1763  type InputService7TestShapeInputService7TestCaseOperation2Output struct {
  1764  	_ struct{} `type:"structure"`
  1765  }
  1766  
  1767  // InputService8ProtocolTest provides the API operation methods for making requests to
  1768  // . See this package's package overview docs
  1769  // for details on the service.
  1770  //
  1771  // InputService8ProtocolTest methods are safe to use concurrently. It is not safe to
  1772  // modify mutate any of the struct's properties though.
  1773  type InputService8ProtocolTest struct {
  1774  	*client.Client
  1775  }
  1776  
  1777  // New creates a new instance of the InputService8ProtocolTest client with a session.
  1778  // If additional configuration is needed for the client instance use the optional
  1779  // aws.Config parameter to add your extra config.
  1780  //
  1781  // Example:
  1782  //     mySession := session.Must(session.NewSession())
  1783  //
  1784  //     // Create a InputService8ProtocolTest client from just a session.
  1785  //     svc := inputservice8protocoltest.New(mySession)
  1786  //
  1787  //     // Create a InputService8ProtocolTest client with additional configuration
  1788  //     svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1789  func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest {
  1790  	c := p.ClientConfig("inputservice8protocoltest", cfgs...)
  1791  	return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
  1792  }
  1793  
  1794  // newClient creates, initializes and returns a new service client instance.
  1795  func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService8ProtocolTest {
  1796  	svc := &InputService8ProtocolTest{
  1797  		Client: client.New(
  1798  			cfg,
  1799  			metadata.ClientInfo{
  1800  				ServiceName:   "InputService8ProtocolTest",
  1801  				ServiceID:     "InputService8ProtocolTest",
  1802  				SigningName:   signingName,
  1803  				SigningRegion: signingRegion,
  1804  				PartitionID:   partitionID,
  1805  				Endpoint:      endpoint,
  1806  				APIVersion:    "2014-01-01",
  1807  			},
  1808  			handlers,
  1809  		),
  1810  	}
  1811  
  1812  	// Handlers
  1813  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1814  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  1815  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  1816  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  1817  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  1818  
  1819  	return svc
  1820  }
  1821  
  1822  // newRequest creates a new request for a InputService8ProtocolTest operation and runs any
  1823  // custom request initialization.
  1824  func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1825  	req := c.NewRequest(op, params, data)
  1826  
  1827  	return req
  1828  }
  1829  
  1830  const opInputService8TestCaseOperation1 = "OperationName"
  1831  
  1832  // InputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
  1833  // client's request for the InputService8TestCaseOperation1 operation. The "output" return
  1834  // value will be populated with the request's response once the request completes
  1835  // successfully.
  1836  //
  1837  // Use "Send" method on the returned Request to send the API call to the service.
  1838  // the "output" return value is not valid until after Send returns without error.
  1839  //
  1840  // See InputService8TestCaseOperation1 for more information on using the InputService8TestCaseOperation1
  1841  // API call, and error handling.
  1842  //
  1843  // This method is useful when you want to inject custom logic or configuration
  1844  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1845  //
  1846  //
  1847  //    // Example sending a request using the InputService8TestCaseOperation1Request method.
  1848  //    req, resp := client.InputService8TestCaseOperation1Request(params)
  1849  //
  1850  //    err := req.Send()
  1851  //    if err == nil { // resp is now filled
  1852  //        fmt.Println(resp)
  1853  //    }
  1854  func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
  1855  	op := &request.Operation{
  1856  		Name:       opInputService8TestCaseOperation1,
  1857  		HTTPMethod: "POST",
  1858  		HTTPPath:   "/",
  1859  	}
  1860  
  1861  	if input == nil {
  1862  		input = &InputService8TestShapeInputService8TestCaseOperation1Input{}
  1863  	}
  1864  
  1865  	output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
  1866  	req = c.newRequest(op, input, output)
  1867  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1868  	return
  1869  }
  1870  
  1871  // InputService8TestCaseOperation1 API operation for .
  1872  //
  1873  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1874  // with awserr.Error's Code and Message methods to get detailed information about
  1875  // the error.
  1876  //
  1877  // See the AWS API reference guide for 's
  1878  // API operation InputService8TestCaseOperation1 for usage and error information.
  1879  func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
  1880  	req, out := c.InputService8TestCaseOperation1Request(input)
  1881  	return out, req.Send()
  1882  }
  1883  
  1884  // InputService8TestCaseOperation1WithContext is the same as InputService8TestCaseOperation1 with the addition of
  1885  // the ability to pass a context and additional request options.
  1886  //
  1887  // See InputService8TestCaseOperation1 for details on how to use this API operation.
  1888  //
  1889  // The context must be non-nil and will be used for request cancellation. If
  1890  // the context is nil a panic will occur. In the future the SDK may create
  1891  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1892  // for more information on using Contexts.
  1893  func (c *InputService8ProtocolTest) InputService8TestCaseOperation1WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation1Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
  1894  	req, out := c.InputService8TestCaseOperation1Request(input)
  1895  	req.SetContext(ctx)
  1896  	req.ApplyOptions(opts...)
  1897  	return out, req.Send()
  1898  }
  1899  
  1900  const opInputService8TestCaseOperation2 = "OperationName"
  1901  
  1902  // InputService8TestCaseOperation2Request generates a "aws/request.Request" representing the
  1903  // client's request for the InputService8TestCaseOperation2 operation. The "output" return
  1904  // value will be populated with the request's response once the request completes
  1905  // successfully.
  1906  //
  1907  // Use "Send" method on the returned Request to send the API call to the service.
  1908  // the "output" return value is not valid until after Send returns without error.
  1909  //
  1910  // See InputService8TestCaseOperation2 for more information on using the InputService8TestCaseOperation2
  1911  // API call, and error handling.
  1912  //
  1913  // This method is useful when you want to inject custom logic or configuration
  1914  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1915  //
  1916  //
  1917  //    // Example sending a request using the InputService8TestCaseOperation2Request method.
  1918  //    req, resp := client.InputService8TestCaseOperation2Request(params)
  1919  //
  1920  //    err := req.Send()
  1921  //    if err == nil { // resp is now filled
  1922  //        fmt.Println(resp)
  1923  //    }
  1924  func (c *InputService8ProtocolTest) InputService8TestCaseOperation2Request(input *InputService8TestShapeInputService8TestCaseOperation2Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation2Output) {
  1925  	op := &request.Operation{
  1926  		Name:       opInputService8TestCaseOperation2,
  1927  		HTTPMethod: "POST",
  1928  		HTTPPath:   "/",
  1929  	}
  1930  
  1931  	if input == nil {
  1932  		input = &InputService8TestShapeInputService8TestCaseOperation2Input{}
  1933  	}
  1934  
  1935  	output = &InputService8TestShapeInputService8TestCaseOperation2Output{}
  1936  	req = c.newRequest(op, input, output)
  1937  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1938  	return
  1939  }
  1940  
  1941  // InputService8TestCaseOperation2 API operation for .
  1942  //
  1943  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1944  // with awserr.Error's Code and Message methods to get detailed information about
  1945  // the error.
  1946  //
  1947  // See the AWS API reference guide for 's
  1948  // API operation InputService8TestCaseOperation2 for usage and error information.
  1949  func (c *InputService8ProtocolTest) InputService8TestCaseOperation2(input *InputService8TestShapeInputService8TestCaseOperation2Input) (*InputService8TestShapeInputService8TestCaseOperation2Output, error) {
  1950  	req, out := c.InputService8TestCaseOperation2Request(input)
  1951  	return out, req.Send()
  1952  }
  1953  
  1954  // InputService8TestCaseOperation2WithContext is the same as InputService8TestCaseOperation2 with the addition of
  1955  // the ability to pass a context and additional request options.
  1956  //
  1957  // See InputService8TestCaseOperation2 for details on how to use this API operation.
  1958  //
  1959  // The context must be non-nil and will be used for request cancellation. If
  1960  // the context is nil a panic will occur. In the future the SDK may create
  1961  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1962  // for more information on using Contexts.
  1963  func (c *InputService8ProtocolTest) InputService8TestCaseOperation2WithContext(ctx aws.Context, input *InputService8TestShapeInputService8TestCaseOperation2Input, opts ...request.Option) (*InputService8TestShapeInputService8TestCaseOperation2Output, error) {
  1964  	req, out := c.InputService8TestCaseOperation2Request(input)
  1965  	req.SetContext(ctx)
  1966  	req.ApplyOptions(opts...)
  1967  	return out, req.Send()
  1968  }
  1969  
  1970  type InputService8TestShapeInputService8TestCaseOperation1Input struct {
  1971  	_ struct{} `type:"structure"`
  1972  
  1973  	FooEnum *string `type:"string" enum:"InputService8TestShapeEnumType"`
  1974  
  1975  	ListEnums []*string `type:"list"`
  1976  }
  1977  
  1978  // SetFooEnum sets the FooEnum field's value.
  1979  func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetFooEnum(v string) *InputService8TestShapeInputService8TestCaseOperation1Input {
  1980  	s.FooEnum = &v
  1981  	return s
  1982  }
  1983  
  1984  // SetListEnums sets the ListEnums field's value.
  1985  func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetListEnums(v []*string) *InputService8TestShapeInputService8TestCaseOperation1Input {
  1986  	s.ListEnums = v
  1987  	return s
  1988  }
  1989  
  1990  type InputService8TestShapeInputService8TestCaseOperation1Output struct {
  1991  	_ struct{} `type:"structure"`
  1992  }
  1993  
  1994  type InputService8TestShapeInputService8TestCaseOperation2Input struct {
  1995  	_ struct{} `type:"structure"`
  1996  
  1997  	FooEnum *string `type:"string" enum:"InputService8TestShapeEnumType"`
  1998  
  1999  	ListEnums []*string `type:"list"`
  2000  }
  2001  
  2002  // SetFooEnum sets the FooEnum field's value.
  2003  func (s *InputService8TestShapeInputService8TestCaseOperation2Input) SetFooEnum(v string) *InputService8TestShapeInputService8TestCaseOperation2Input {
  2004  	s.FooEnum = &v
  2005  	return s
  2006  }
  2007  
  2008  // SetListEnums sets the ListEnums field's value.
  2009  func (s *InputService8TestShapeInputService8TestCaseOperation2Input) SetListEnums(v []*string) *InputService8TestShapeInputService8TestCaseOperation2Input {
  2010  	s.ListEnums = v
  2011  	return s
  2012  }
  2013  
  2014  type InputService8TestShapeInputService8TestCaseOperation2Output struct {
  2015  	_ struct{} `type:"structure"`
  2016  }
  2017  
  2018  const (
  2019  	// EnumTypeFoo is a InputService8TestShapeEnumType enum value
  2020  	EnumTypeFoo = "foo"
  2021  
  2022  	// EnumTypeBar is a InputService8TestShapeEnumType enum value
  2023  	EnumTypeBar = "bar"
  2024  )
  2025  
  2026  // InputService8TestShapeEnumType_Values returns all elements of the InputService8TestShapeEnumType enum
  2027  func InputService8TestShapeEnumType_Values() []string {
  2028  	return []string{
  2029  		EnumTypeFoo,
  2030  		EnumTypeBar,
  2031  	}
  2032  }
  2033  
  2034  // InputService9ProtocolTest provides the API operation methods for making requests to
  2035  // . See this package's package overview docs
  2036  // for details on the service.
  2037  //
  2038  // InputService9ProtocolTest methods are safe to use concurrently. It is not safe to
  2039  // modify mutate any of the struct's properties though.
  2040  type InputService9ProtocolTest struct {
  2041  	*client.Client
  2042  }
  2043  
  2044  // New creates a new instance of the InputService9ProtocolTest client with a session.
  2045  // If additional configuration is needed for the client instance use the optional
  2046  // aws.Config parameter to add your extra config.
  2047  //
  2048  // Example:
  2049  //     mySession := session.Must(session.NewSession())
  2050  //
  2051  //     // Create a InputService9ProtocolTest client from just a session.
  2052  //     svc := inputservice9protocoltest.New(mySession)
  2053  //
  2054  //     // Create a InputService9ProtocolTest client with additional configuration
  2055  //     svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  2056  func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest {
  2057  	c := p.ClientConfig("inputservice9protocoltest", cfgs...)
  2058  	return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
  2059  }
  2060  
  2061  // newClient creates, initializes and returns a new service client instance.
  2062  func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService9ProtocolTest {
  2063  	svc := &InputService9ProtocolTest{
  2064  		Client: client.New(
  2065  			cfg,
  2066  			metadata.ClientInfo{
  2067  				ServiceName:   "InputService9ProtocolTest",
  2068  				ServiceID:     "InputService9ProtocolTest",
  2069  				SigningName:   signingName,
  2070  				SigningRegion: signingRegion,
  2071  				PartitionID:   partitionID,
  2072  				Endpoint:      endpoint,
  2073  				APIVersion:    "",
  2074  				JSONVersion:   "1.1",
  2075  				TargetPrefix:  "com.amazonaws.foo",
  2076  			},
  2077  			handlers,
  2078  		),
  2079  	}
  2080  
  2081  	// Handlers
  2082  	svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  2083  	svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  2084  	svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  2085  	svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  2086  	svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  2087  
  2088  	return svc
  2089  }
  2090  
  2091  // newRequest creates a new request for a InputService9ProtocolTest operation and runs any
  2092  // custom request initialization.
  2093  func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  2094  	req := c.NewRequest(op, params, data)
  2095  
  2096  	return req
  2097  }
  2098  
  2099  const opInputService9TestCaseOperation1 = "StaticOp"
  2100  
  2101  // InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
  2102  // client's request for the InputService9TestCaseOperation1 operation. The "output" return
  2103  // value will be populated with the request's response once the request completes
  2104  // successfully.
  2105  //
  2106  // Use "Send" method on the returned Request to send the API call to the service.
  2107  // the "output" return value is not valid until after Send returns without error.
  2108  //
  2109  // See InputService9TestCaseOperation1 for more information on using the InputService9TestCaseOperation1
  2110  // API call, and error handling.
  2111  //
  2112  // This method is useful when you want to inject custom logic or configuration
  2113  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2114  //
  2115  //
  2116  //    // Example sending a request using the InputService9TestCaseOperation1Request method.
  2117  //    req, resp := client.InputService9TestCaseOperation1Request(params)
  2118  //
  2119  //    err := req.Send()
  2120  //    if err == nil { // resp is now filled
  2121  //        fmt.Println(resp)
  2122  //    }
  2123  func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) {
  2124  	op := &request.Operation{
  2125  		Name:       opInputService9TestCaseOperation1,
  2126  		HTTPMethod: "POST",
  2127  		HTTPPath:   "/",
  2128  	}
  2129  
  2130  	if input == nil {
  2131  		input = &InputService9TestShapeInputService9TestCaseOperation1Input{}
  2132  	}
  2133  
  2134  	output = &InputService9TestShapeInputService9TestCaseOperation1Output{}
  2135  	req = c.newRequest(op, input, output)
  2136  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2137  	req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil))
  2138  	req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
  2139  	return
  2140  }
  2141  
  2142  // InputService9TestCaseOperation1 API operation for .
  2143  //
  2144  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2145  // with awserr.Error's Code and Message methods to get detailed information about
  2146  // the error.
  2147  //
  2148  // See the AWS API reference guide for 's
  2149  // API operation InputService9TestCaseOperation1 for usage and error information.
  2150  func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
  2151  	req, out := c.InputService9TestCaseOperation1Request(input)
  2152  	return out, req.Send()
  2153  }
  2154  
  2155  // InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of
  2156  // the ability to pass a context and additional request options.
  2157  //
  2158  // See InputService9TestCaseOperation1 for details on how to use this API operation.
  2159  //
  2160  // The context must be non-nil and will be used for request cancellation. If
  2161  // the context is nil a panic will occur. In the future the SDK may create
  2162  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2163  // for more information on using Contexts.
  2164  func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation1Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
  2165  	req, out := c.InputService9TestCaseOperation1Request(input)
  2166  	req.SetContext(ctx)
  2167  	req.ApplyOptions(opts...)
  2168  	return out, req.Send()
  2169  }
  2170  
  2171  const opInputService9TestCaseOperation2 = "MemberRefOp"
  2172  
  2173  // InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the
  2174  // client's request for the InputService9TestCaseOperation2 operation. The "output" return
  2175  // value will be populated with the request's response once the request completes
  2176  // successfully.
  2177  //
  2178  // Use "Send" method on the returned Request to send the API call to the service.
  2179  // the "output" return value is not valid until after Send returns without error.
  2180  //
  2181  // See InputService9TestCaseOperation2 for more information on using the InputService9TestCaseOperation2
  2182  // API call, and error handling.
  2183  //
  2184  // This method is useful when you want to inject custom logic or configuration
  2185  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2186  //
  2187  //
  2188  //    // Example sending a request using the InputService9TestCaseOperation2Request method.
  2189  //    req, resp := client.InputService9TestCaseOperation2Request(params)
  2190  //
  2191  //    err := req.Send()
  2192  //    if err == nil { // resp is now filled
  2193  //        fmt.Println(resp)
  2194  //    }
  2195  func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputService9TestCaseOperation2Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) {
  2196  	op := &request.Operation{
  2197  		Name:       opInputService9TestCaseOperation2,
  2198  		HTTPMethod: "POST",
  2199  		HTTPPath:   "/",
  2200  	}
  2201  
  2202  	if input == nil {
  2203  		input = &InputService9TestShapeInputService9TestCaseOperation2Input{}
  2204  	}
  2205  
  2206  	output = &InputService9TestShapeInputService9TestCaseOperation2Output{}
  2207  	req = c.newRequest(op, input, output)
  2208  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2209  	req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("foo-{Name}.", input.hostLabels))
  2210  	req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
  2211  	return
  2212  }
  2213  
  2214  // InputService9TestCaseOperation2 API operation for .
  2215  //
  2216  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2217  // with awserr.Error's Code and Message methods to get detailed information about
  2218  // the error.
  2219  //
  2220  // See the AWS API reference guide for 's
  2221  // API operation InputService9TestCaseOperation2 for usage and error information.
  2222  func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputService9TestCaseOperation2Input) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
  2223  	req, out := c.InputService9TestCaseOperation2Request(input)
  2224  	return out, req.Send()
  2225  }
  2226  
  2227  // InputService9TestCaseOperation2WithContext is the same as InputService9TestCaseOperation2 with the addition of
  2228  // the ability to pass a context and additional request options.
  2229  //
  2230  // See InputService9TestCaseOperation2 for details on how to use this API operation.
  2231  //
  2232  // The context must be non-nil and will be used for request cancellation. If
  2233  // the context is nil a panic will occur. In the future the SDK may create
  2234  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2235  // for more information on using Contexts.
  2236  func (c *InputService9ProtocolTest) InputService9TestCaseOperation2WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation2Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
  2237  	req, out := c.InputService9TestCaseOperation2Request(input)
  2238  	req.SetContext(ctx)
  2239  	req.ApplyOptions(opts...)
  2240  	return out, req.Send()
  2241  }
  2242  
  2243  type InputService9TestShapeInputService9TestCaseOperation1Input struct {
  2244  	_ struct{} `type:"structure"`
  2245  
  2246  	Name *string `type:"string"`
  2247  }
  2248  
  2249  // SetName sets the Name field's value.
  2250  func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetName(v string) *InputService9TestShapeInputService9TestCaseOperation1Input {
  2251  	s.Name = &v
  2252  	return s
  2253  }
  2254  
  2255  type InputService9TestShapeInputService9TestCaseOperation1Output struct {
  2256  	_ struct{} `type:"structure"`
  2257  }
  2258  
  2259  type InputService9TestShapeInputService9TestCaseOperation2Input struct {
  2260  	_ struct{} `type:"structure"`
  2261  
  2262  	// Name is a required field
  2263  	Name *string `type:"string" required:"true"`
  2264  }
  2265  
  2266  // Validate inspects the fields of the type to determine if they are valid.
  2267  func (s *InputService9TestShapeInputService9TestCaseOperation2Input) Validate() error {
  2268  	invalidParams := request.ErrInvalidParams{Context: "InputService9TestShapeInputService9TestCaseOperation2Input"}
  2269  	if s.Name == nil {
  2270  		invalidParams.Add(request.NewErrParamRequired("Name"))
  2271  	}
  2272  	if s.Name != nil && len(*s.Name) < 1 {
  2273  		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2274  	}
  2275  
  2276  	if invalidParams.Len() > 0 {
  2277  		return invalidParams
  2278  	}
  2279  	return nil
  2280  }
  2281  
  2282  // SetName sets the Name field's value.
  2283  func (s *InputService9TestShapeInputService9TestCaseOperation2Input) SetName(v string) *InputService9TestShapeInputService9TestCaseOperation2Input {
  2284  	s.Name = &v
  2285  	return s
  2286  }
  2287  
  2288  func (s *InputService9TestShapeInputService9TestCaseOperation2Input) hostLabels() map[string]string {
  2289  	return map[string]string{
  2290  		"Name": aws.StringValue(s.Name),
  2291  	}
  2292  }
  2293  
  2294  type InputService9TestShapeInputService9TestCaseOperation2Output struct {
  2295  	_ struct{} `type:"structure"`
  2296  }
  2297  
  2298  //
  2299  // Tests begin here
  2300  //
  2301  
  2302  func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
  2303  	svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2304  	input := &InputService1TestShapeInputService1TestCaseOperation1Input{
  2305  		Name: aws.String("myname"),
  2306  	}
  2307  	req, _ := svc.InputService1TestCaseOperation1Request(input)
  2308  	r := req.HTTPRequest
  2309  
  2310  	// build request
  2311  	req.Build()
  2312  	if req.Error != nil {
  2313  		t.Errorf("expect no error, got %v", req.Error)
  2314  	}
  2315  	req.Sign()
  2316  	if req.Error != nil {
  2317  		t.Errorf("expect no error, got %v", req.Error)
  2318  	}
  2319  
  2320  	// assert body
  2321  	if r.Body == nil {
  2322  		t.Errorf("expect body not to be nil")
  2323  	}
  2324  	body, _ := ioutil.ReadAll(r.Body)
  2325  	awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body)))
  2326  
  2327  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2328  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2329  	}
  2330  
  2331  	// assert URL
  2332  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2333  
  2334  	// assert headers
  2335  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2336  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2337  	}
  2338  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2339  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2340  	}
  2341  }
  2342  
  2343  func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) {
  2344  	svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2345  	input := &InputService2TestShapeInputService2TestCaseOperation1Input{
  2346  		TimeArg:    aws.Time(time.Unix(1422172800, 0)),
  2347  		TimeCustom: aws.Time(time.Unix(1422172800, 0)),
  2348  		TimeFormat: aws.Time(time.Unix(1422172800, 0)),
  2349  	}
  2350  	req, _ := svc.InputService2TestCaseOperation1Request(input)
  2351  	r := req.HTTPRequest
  2352  
  2353  	// build request
  2354  	req.Build()
  2355  	if req.Error != nil {
  2356  		t.Errorf("expect no error, got %v", req.Error)
  2357  	}
  2358  	req.Sign()
  2359  	if req.Error != nil {
  2360  		t.Errorf("expect no error, got %v", req.Error)
  2361  	}
  2362  
  2363  	// assert body
  2364  	if r.Body == nil {
  2365  		t.Errorf("expect body not to be nil")
  2366  	}
  2367  	body, _ := ioutil.ReadAll(r.Body)
  2368  	awstesting.AssertJSON(t, `{"TimeArg": 1422172800, "TimeCustom": "Sun, 25 Jan 2015 08:00:00 GMT", "TimeFormat": "Sun, 25 Jan 2015 08:00:00 GMT"}`, util.Trim(string(body)))
  2369  
  2370  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2371  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2372  	}
  2373  
  2374  	// assert URL
  2375  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2376  
  2377  	// assert headers
  2378  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2379  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2380  	}
  2381  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2382  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2383  	}
  2384  }
  2385  
  2386  func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
  2387  	svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2388  	input := &InputService3TestShapeInputService3TestCaseOperation1Input{
  2389  		BlobArg: []byte("foo"),
  2390  	}
  2391  	req, _ := svc.InputService3TestCaseOperation1Request(input)
  2392  	r := req.HTTPRequest
  2393  
  2394  	// build request
  2395  	req.Build()
  2396  	if req.Error != nil {
  2397  		t.Errorf("expect no error, got %v", req.Error)
  2398  	}
  2399  	req.Sign()
  2400  	if req.Error != nil {
  2401  		t.Errorf("expect no error, got %v", req.Error)
  2402  	}
  2403  
  2404  	// assert body
  2405  	if r.Body == nil {
  2406  		t.Errorf("expect body not to be nil")
  2407  	}
  2408  	body, _ := ioutil.ReadAll(r.Body)
  2409  	awstesting.AssertJSON(t, `{"BlobArg": "Zm9v"}`, util.Trim(string(body)))
  2410  
  2411  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2412  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2413  	}
  2414  
  2415  	// assert URL
  2416  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2417  
  2418  	// assert headers
  2419  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2420  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2421  	}
  2422  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2423  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2424  	}
  2425  }
  2426  
  2427  func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) {
  2428  	svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2429  	input := &InputService3TestShapeInputService3TestCaseOperation2Input{
  2430  		BlobMap: map[string][]byte{
  2431  			"key1": []byte("foo"),
  2432  			"key2": []byte("bar"),
  2433  		},
  2434  	}
  2435  	req, _ := svc.InputService3TestCaseOperation2Request(input)
  2436  	r := req.HTTPRequest
  2437  
  2438  	// build request
  2439  	req.Build()
  2440  	if req.Error != nil {
  2441  		t.Errorf("expect no error, got %v", req.Error)
  2442  	}
  2443  	req.Sign()
  2444  	if req.Error != nil {
  2445  		t.Errorf("expect no error, got %v", req.Error)
  2446  	}
  2447  
  2448  	// assert body
  2449  	if r.Body == nil {
  2450  		t.Errorf("expect body not to be nil")
  2451  	}
  2452  	body, _ := ioutil.ReadAll(r.Body)
  2453  	awstesting.AssertJSON(t, `{"BlobMap": {"key1": "Zm9v", "key2": "YmFy"}}`, util.Trim(string(body)))
  2454  
  2455  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2456  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2457  	}
  2458  
  2459  	// assert URL
  2460  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2461  
  2462  	// assert headers
  2463  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2464  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2465  	}
  2466  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2467  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2468  	}
  2469  }
  2470  
  2471  func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) {
  2472  	svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2473  	input := &InputService4TestShapeInputService4TestCaseOperation1Input{
  2474  		ListParam: [][]byte{
  2475  			[]byte("foo"),
  2476  			[]byte("bar"),
  2477  		},
  2478  	}
  2479  	req, _ := svc.InputService4TestCaseOperation1Request(input)
  2480  	r := req.HTTPRequest
  2481  
  2482  	// build request
  2483  	req.Build()
  2484  	if req.Error != nil {
  2485  		t.Errorf("expect no error, got %v", req.Error)
  2486  	}
  2487  	req.Sign()
  2488  	if req.Error != nil {
  2489  		t.Errorf("expect no error, got %v", req.Error)
  2490  	}
  2491  
  2492  	// assert body
  2493  	if r.Body == nil {
  2494  		t.Errorf("expect body not to be nil")
  2495  	}
  2496  	body, _ := ioutil.ReadAll(r.Body)
  2497  	awstesting.AssertJSON(t, `{"ListParam": ["Zm9v", "YmFy"]}`, util.Trim(string(body)))
  2498  
  2499  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2500  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2501  	}
  2502  
  2503  	// assert URL
  2504  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2505  
  2506  	// assert headers
  2507  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2508  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2509  	}
  2510  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2511  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2512  	}
  2513  }
  2514  
  2515  func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) {
  2516  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2517  	input := &InputService5TestShapeInputService5TestCaseOperation1Input{
  2518  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2519  			NoRecurse: aws.String("foo"),
  2520  		},
  2521  	}
  2522  	req, _ := svc.InputService5TestCaseOperation1Request(input)
  2523  	r := req.HTTPRequest
  2524  
  2525  	// build request
  2526  	req.Build()
  2527  	if req.Error != nil {
  2528  		t.Errorf("expect no error, got %v", req.Error)
  2529  	}
  2530  	req.Sign()
  2531  	if req.Error != nil {
  2532  		t.Errorf("expect no error, got %v", req.Error)
  2533  	}
  2534  
  2535  	// assert body
  2536  	if r.Body == nil {
  2537  		t.Errorf("expect body not to be nil")
  2538  	}
  2539  	body, _ := ioutil.ReadAll(r.Body)
  2540  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"NoRecurse": "foo"}}`, util.Trim(string(body)))
  2541  
  2542  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2543  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2544  	}
  2545  
  2546  	// assert URL
  2547  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2548  
  2549  	// assert headers
  2550  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2551  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2552  	}
  2553  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2554  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2555  	}
  2556  }
  2557  
  2558  func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) {
  2559  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2560  	input := &InputService5TestShapeInputService5TestCaseOperation2Input{
  2561  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2562  			RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2563  				NoRecurse: aws.String("foo"),
  2564  			},
  2565  		},
  2566  	}
  2567  	req, _ := svc.InputService5TestCaseOperation2Request(input)
  2568  	r := req.HTTPRequest
  2569  
  2570  	// build request
  2571  	req.Build()
  2572  	if req.Error != nil {
  2573  		t.Errorf("expect no error, got %v", req.Error)
  2574  	}
  2575  	req.Sign()
  2576  	if req.Error != nil {
  2577  		t.Errorf("expect no error, got %v", req.Error)
  2578  	}
  2579  
  2580  	// assert body
  2581  	if r.Body == nil {
  2582  		t.Errorf("expect body not to be nil")
  2583  	}
  2584  	body, _ := ioutil.ReadAll(r.Body)
  2585  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveStruct": {"NoRecurse": "foo"}}}`, util.Trim(string(body)))
  2586  
  2587  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2588  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2589  	}
  2590  
  2591  	// assert URL
  2592  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2593  
  2594  	// assert headers
  2595  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2596  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2597  	}
  2598  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2599  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2600  	}
  2601  }
  2602  
  2603  func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) {
  2604  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2605  	input := &InputService5TestShapeInputService5TestCaseOperation3Input{
  2606  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2607  			RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2608  				RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2609  					RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2610  						NoRecurse: aws.String("foo"),
  2611  					},
  2612  				},
  2613  			},
  2614  		},
  2615  	}
  2616  	req, _ := svc.InputService5TestCaseOperation3Request(input)
  2617  	r := req.HTTPRequest
  2618  
  2619  	// build request
  2620  	req.Build()
  2621  	if req.Error != nil {
  2622  		t.Errorf("expect no error, got %v", req.Error)
  2623  	}
  2624  	req.Sign()
  2625  	if req.Error != nil {
  2626  		t.Errorf("expect no error, got %v", req.Error)
  2627  	}
  2628  
  2629  	// assert body
  2630  	if r.Body == nil {
  2631  		t.Errorf("expect body not to be nil")
  2632  	}
  2633  	body, _ := ioutil.ReadAll(r.Body)
  2634  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveStruct": {"RecursiveStruct": {"RecursiveStruct": {"NoRecurse": "foo"}}}}}`, util.Trim(string(body)))
  2635  
  2636  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2637  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2638  	}
  2639  
  2640  	// assert URL
  2641  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2642  
  2643  	// assert headers
  2644  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2645  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2646  	}
  2647  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2648  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2649  	}
  2650  }
  2651  
  2652  func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) {
  2653  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2654  	input := &InputService5TestShapeInputService5TestCaseOperation4Input{
  2655  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2656  			RecursiveList: []*InputService5TestShapeRecursiveStructType{
  2657  				{
  2658  					NoRecurse: aws.String("foo"),
  2659  				},
  2660  				{
  2661  					NoRecurse: aws.String("bar"),
  2662  				},
  2663  			},
  2664  		},
  2665  	}
  2666  	req, _ := svc.InputService5TestCaseOperation4Request(input)
  2667  	r := req.HTTPRequest
  2668  
  2669  	// build request
  2670  	req.Build()
  2671  	if req.Error != nil {
  2672  		t.Errorf("expect no error, got %v", req.Error)
  2673  	}
  2674  	req.Sign()
  2675  	if req.Error != nil {
  2676  		t.Errorf("expect no error, got %v", req.Error)
  2677  	}
  2678  
  2679  	// assert body
  2680  	if r.Body == nil {
  2681  		t.Errorf("expect body not to be nil")
  2682  	}
  2683  	body, _ := ioutil.ReadAll(r.Body)
  2684  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveList": [{"NoRecurse": "foo"}, {"NoRecurse": "bar"}]}}`, util.Trim(string(body)))
  2685  
  2686  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2687  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2688  	}
  2689  
  2690  	// assert URL
  2691  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2692  
  2693  	// assert headers
  2694  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2695  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2696  	}
  2697  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2698  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2699  	}
  2700  }
  2701  
  2702  func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) {
  2703  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2704  	input := &InputService5TestShapeInputService5TestCaseOperation5Input{
  2705  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2706  			RecursiveList: []*InputService5TestShapeRecursiveStructType{
  2707  				{
  2708  					NoRecurse: aws.String("foo"),
  2709  				},
  2710  				{
  2711  					RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2712  						NoRecurse: aws.String("bar"),
  2713  					},
  2714  				},
  2715  			},
  2716  		},
  2717  	}
  2718  	req, _ := svc.InputService5TestCaseOperation5Request(input)
  2719  	r := req.HTTPRequest
  2720  
  2721  	// build request
  2722  	req.Build()
  2723  	if req.Error != nil {
  2724  		t.Errorf("expect no error, got %v", req.Error)
  2725  	}
  2726  	req.Sign()
  2727  	if req.Error != nil {
  2728  		t.Errorf("expect no error, got %v", req.Error)
  2729  	}
  2730  
  2731  	// assert body
  2732  	if r.Body == nil {
  2733  		t.Errorf("expect body not to be nil")
  2734  	}
  2735  	body, _ := ioutil.ReadAll(r.Body)
  2736  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveList": [{"NoRecurse": "foo"}, {"RecursiveStruct": {"NoRecurse": "bar"}}]}}`, util.Trim(string(body)))
  2737  
  2738  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2739  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2740  	}
  2741  
  2742  	// assert URL
  2743  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2744  
  2745  	// assert headers
  2746  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2747  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2748  	}
  2749  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2750  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2751  	}
  2752  }
  2753  
  2754  func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) {
  2755  	svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2756  	input := &InputService5TestShapeInputService5TestCaseOperation6Input{
  2757  		RecursiveStruct: &InputService5TestShapeRecursiveStructType{
  2758  			RecursiveMap: map[string]*InputService5TestShapeRecursiveStructType{
  2759  				"bar": {
  2760  					NoRecurse: aws.String("bar"),
  2761  				},
  2762  				"foo": {
  2763  					NoRecurse: aws.String("foo"),
  2764  				},
  2765  			},
  2766  		},
  2767  	}
  2768  	req, _ := svc.InputService5TestCaseOperation6Request(input)
  2769  	r := req.HTTPRequest
  2770  
  2771  	// build request
  2772  	req.Build()
  2773  	if req.Error != nil {
  2774  		t.Errorf("expect no error, got %v", req.Error)
  2775  	}
  2776  	req.Sign()
  2777  	if req.Error != nil {
  2778  		t.Errorf("expect no error, got %v", req.Error)
  2779  	}
  2780  
  2781  	// assert body
  2782  	if r.Body == nil {
  2783  		t.Errorf("expect body not to be nil")
  2784  	}
  2785  	body, _ := ioutil.ReadAll(r.Body)
  2786  	awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveMap": {"foo": {"NoRecurse": "foo"}, "bar": {"NoRecurse": "bar"}}}}`, util.Trim(string(body)))
  2787  
  2788  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2789  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2790  	}
  2791  
  2792  	// assert URL
  2793  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2794  
  2795  	// assert headers
  2796  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2797  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2798  	}
  2799  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2800  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2801  	}
  2802  }
  2803  
  2804  func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) {
  2805  	svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2806  	input := &InputService6TestShapeInputService6TestCaseOperation1Input{
  2807  		Map: map[string]*string{},
  2808  	}
  2809  	req, _ := svc.InputService6TestCaseOperation1Request(input)
  2810  	r := req.HTTPRequest
  2811  
  2812  	// build request
  2813  	req.Build()
  2814  	if req.Error != nil {
  2815  		t.Errorf("expect no error, got %v", req.Error)
  2816  	}
  2817  	req.Sign()
  2818  	if req.Error != nil {
  2819  		t.Errorf("expect no error, got %v", req.Error)
  2820  	}
  2821  
  2822  	// assert body
  2823  	if r.Body == nil {
  2824  		t.Errorf("expect body not to be nil")
  2825  	}
  2826  	body, _ := ioutil.ReadAll(r.Body)
  2827  	awstesting.AssertJSON(t, `{"Map": {}}`, util.Trim(string(body)))
  2828  
  2829  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2830  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2831  	}
  2832  
  2833  	// assert URL
  2834  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2835  
  2836  	// assert headers
  2837  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  2838  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  2839  	}
  2840  	if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a {
  2841  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  2842  	}
  2843  }
  2844  
  2845  func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) {
  2846  	svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2847  	input := &InputService7TestShapeInputService7TestCaseOperation1Input{
  2848  		Token: aws.String("abc123"),
  2849  	}
  2850  	req, _ := svc.InputService7TestCaseOperation1Request(input)
  2851  	r := req.HTTPRequest
  2852  
  2853  	// build request
  2854  	req.Build()
  2855  	if req.Error != nil {
  2856  		t.Errorf("expect no error, got %v", req.Error)
  2857  	}
  2858  	req.Sign()
  2859  	if req.Error != nil {
  2860  		t.Errorf("expect no error, got %v", req.Error)
  2861  	}
  2862  
  2863  	// assert body
  2864  	if r.Body == nil {
  2865  		t.Errorf("expect body not to be nil")
  2866  	}
  2867  	body, _ := ioutil.ReadAll(r.Body)
  2868  	awstesting.AssertJSON(t, `{"Token": "abc123"}`, util.Trim(string(body)))
  2869  
  2870  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2871  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2872  	}
  2873  
  2874  	// assert URL
  2875  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2876  }
  2877  
  2878  func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) {
  2879  	svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2880  	input := &InputService7TestShapeInputService7TestCaseOperation2Input{}
  2881  	req, _ := svc.InputService7TestCaseOperation2Request(input)
  2882  	r := req.HTTPRequest
  2883  
  2884  	// build request
  2885  	req.Build()
  2886  	if req.Error != nil {
  2887  		t.Errorf("expect no error, got %v", req.Error)
  2888  	}
  2889  	req.Sign()
  2890  	if req.Error != nil {
  2891  		t.Errorf("expect no error, got %v", req.Error)
  2892  	}
  2893  
  2894  	// assert body
  2895  	if r.Body == nil {
  2896  		t.Errorf("expect body not to be nil")
  2897  	}
  2898  	body, _ := ioutil.ReadAll(r.Body)
  2899  	awstesting.AssertJSON(t, `{"Token": "00000000-0000-4000-8000-000000000000"}`, util.Trim(string(body)))
  2900  
  2901  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2902  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2903  	}
  2904  
  2905  	// assert URL
  2906  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2907  }
  2908  
  2909  func TestInputService8ProtocolTestEnumCase1(t *testing.T) {
  2910  	svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2911  	input := &InputService8TestShapeInputService8TestCaseOperation1Input{
  2912  		FooEnum: aws.String("foo"),
  2913  		ListEnums: []*string{
  2914  			aws.String("foo"),
  2915  			aws.String(""),
  2916  			aws.String("bar"),
  2917  		},
  2918  	}
  2919  	req, _ := svc.InputService8TestCaseOperation1Request(input)
  2920  	r := req.HTTPRequest
  2921  
  2922  	// build request
  2923  	req.Build()
  2924  	if req.Error != nil {
  2925  		t.Errorf("expect no error, got %v", req.Error)
  2926  	}
  2927  	req.Sign()
  2928  	if req.Error != nil {
  2929  		t.Errorf("expect no error, got %v", req.Error)
  2930  	}
  2931  
  2932  	// assert body
  2933  	if r.Body == nil {
  2934  		t.Errorf("expect body not to be nil")
  2935  	}
  2936  	body, _ := ioutil.ReadAll(r.Body)
  2937  	awstesting.AssertJSON(t, `{"FooEnum": "foo", "ListEnums": ["foo", "", "bar"]}`, util.Trim(string(body)))
  2938  
  2939  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2940  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2941  	}
  2942  
  2943  	// assert URL
  2944  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2945  }
  2946  
  2947  func TestInputService8ProtocolTestEnumCase2(t *testing.T) {
  2948  	svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  2949  	input := &InputService8TestShapeInputService8TestCaseOperation2Input{}
  2950  	req, _ := svc.InputService8TestCaseOperation2Request(input)
  2951  	r := req.HTTPRequest
  2952  
  2953  	// build request
  2954  	req.Build()
  2955  	if req.Error != nil {
  2956  		t.Errorf("expect no error, got %v", req.Error)
  2957  	}
  2958  	req.Sign()
  2959  	if req.Error != nil {
  2960  		t.Errorf("expect no error, got %v", req.Error)
  2961  	}
  2962  
  2963  	// assert URL
  2964  	awstesting.AssertURL(t, "https://test/", r.URL.String())
  2965  }
  2966  
  2967  func TestInputService9ProtocolTestEndpointHostTraitStaticPrefixCase1(t *testing.T) {
  2968  	svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")})
  2969  	input := &InputService9TestShapeInputService9TestCaseOperation1Input{
  2970  		Name: aws.String("myname"),
  2971  	}
  2972  	req, _ := svc.InputService9TestCaseOperation1Request(input)
  2973  	r := req.HTTPRequest
  2974  
  2975  	// build request
  2976  	req.Build()
  2977  	if req.Error != nil {
  2978  		t.Errorf("expect no error, got %v", req.Error)
  2979  	}
  2980  	req.Sign()
  2981  	if req.Error != nil {
  2982  		t.Errorf("expect no error, got %v", req.Error)
  2983  	}
  2984  
  2985  	// assert body
  2986  	if r.Body == nil {
  2987  		t.Errorf("expect body not to be nil")
  2988  	}
  2989  	body, _ := ioutil.ReadAll(r.Body)
  2990  	awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body)))
  2991  
  2992  	if e, a := int64(len(body)), r.ContentLength; e != a {
  2993  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  2994  	}
  2995  
  2996  	// assert URL
  2997  	awstesting.AssertURL(t, "https://data-service.region.amazonaws.com/", r.URL.String())
  2998  
  2999  	// assert headers
  3000  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  3001  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  3002  	}
  3003  	if e, a := "com.amazonaws.foo.StaticOp", r.Header.Get("X-Amz-Target"); e != a {
  3004  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  3005  	}
  3006  }
  3007  
  3008  func TestInputService9ProtocolTestEndpointHostTraitStaticPrefixCase2(t *testing.T) {
  3009  	svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")})
  3010  	input := &InputService9TestShapeInputService9TestCaseOperation2Input{
  3011  		Name: aws.String("myname"),
  3012  	}
  3013  	req, _ := svc.InputService9TestCaseOperation2Request(input)
  3014  	r := req.HTTPRequest
  3015  
  3016  	// build request
  3017  	req.Build()
  3018  	if req.Error != nil {
  3019  		t.Errorf("expect no error, got %v", req.Error)
  3020  	}
  3021  	req.Sign()
  3022  	if req.Error != nil {
  3023  		t.Errorf("expect no error, got %v", req.Error)
  3024  	}
  3025  
  3026  	// assert body
  3027  	if r.Body == nil {
  3028  		t.Errorf("expect body not to be nil")
  3029  	}
  3030  	body, _ := ioutil.ReadAll(r.Body)
  3031  	awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body)))
  3032  
  3033  	if e, a := int64(len(body)), r.ContentLength; e != a {
  3034  		t.Errorf("expect serialized body length to match %v ContentLength, got %v", e, a)
  3035  	}
  3036  
  3037  	// assert URL
  3038  	awstesting.AssertURL(t, "https://foo-myname.service.region.amazonaws.com/", r.URL.String())
  3039  
  3040  	// assert headers
  3041  	if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a {
  3042  		t.Errorf("expect Content-Type %v header value, got %v", e, a)
  3043  	}
  3044  	if e, a := "com.amazonaws.foo.MemberRefOp", r.Header.Get("X-Amz-Target"); e != a {
  3045  		t.Errorf("expect X-Amz-Target %v header value, got %v", e, a)
  3046  	}
  3047  }