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