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