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