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// InputService9ProtocolTest provides the API operation methods for making requests to 2027// . See this package's package overview docs 2028// for details on the service. 2029// 2030// InputService9ProtocolTest methods are safe to use concurrently. It is not safe to 2031// modify mutate any of the struct's properties though. 2032type InputService9ProtocolTest struct { 2033 *client.Client 2034} 2035 2036// New creates a new instance of the InputService9ProtocolTest client with a session. 2037// If additional configuration is needed for the client instance use the optional 2038// aws.Config parameter to add your extra config. 2039// 2040// Example: 2041// mySession := session.Must(session.NewSession()) 2042// 2043// // Create a InputService9ProtocolTest client from just a session. 2044// svc := inputservice9protocoltest.New(mySession) 2045// 2046// // Create a InputService9ProtocolTest client with additional configuration 2047// svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 2048func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest { 2049 c := p.ClientConfig("inputservice9protocoltest", cfgs...) 2050 return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 2051} 2052 2053// newClient creates, initializes and returns a new service client instance. 2054func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *InputService9ProtocolTest { 2055 svc := &InputService9ProtocolTest{ 2056 Client: client.New( 2057 cfg, 2058 metadata.ClientInfo{ 2059 ServiceName: "InputService9ProtocolTest", 2060 ServiceID: "InputService9ProtocolTest", 2061 SigningName: signingName, 2062 SigningRegion: signingRegion, 2063 PartitionID: partitionID, 2064 Endpoint: endpoint, 2065 APIVersion: "", 2066 JSONVersion: "1.1", 2067 TargetPrefix: "com.amazonaws.foo", 2068 }, 2069 handlers, 2070 ), 2071 } 2072 2073 // Handlers 2074 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 2075 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 2076 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 2077 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 2078 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 2079 2080 return svc 2081} 2082 2083// newRequest creates a new request for a InputService9ProtocolTest operation and runs any 2084// custom request initialization. 2085func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 2086 req := c.NewRequest(op, params, data) 2087 2088 return req 2089} 2090 2091const opInputService9TestCaseOperation1 = "StaticOp" 2092 2093// InputService9TestCaseOperation1Request generates a "aws/request.Request" representing the 2094// client's request for the InputService9TestCaseOperation1 operation. The "output" return 2095// value will be populated with the request's response once the request completes 2096// successfully. 2097// 2098// Use "Send" method on the returned Request to send the API call to the service. 2099// the "output" return value is not valid until after Send returns without error. 2100// 2101// See InputService9TestCaseOperation1 for more information on using the InputService9TestCaseOperation1 2102// API call, and error handling. 2103// 2104// This method is useful when you want to inject custom logic or configuration 2105// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2106// 2107// 2108// // Example sending a request using the InputService9TestCaseOperation1Request method. 2109// req, resp := client.InputService9TestCaseOperation1Request(params) 2110// 2111// err := req.Send() 2112// if err == nil { // resp is now filled 2113// fmt.Println(resp) 2114// } 2115func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { 2116 op := &request.Operation{ 2117 Name: opInputService9TestCaseOperation1, 2118 HTTPMethod: "POST", 2119 HTTPPath: "/", 2120 } 2121 2122 if input == nil { 2123 input = &InputService9TestShapeInputService9TestCaseOperation1Input{} 2124 } 2125 2126 output = &InputService9TestShapeInputService9TestCaseOperation1Output{} 2127 req = c.newRequest(op, input, output) 2128 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2129 req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil)) 2130 req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) 2131 return 2132} 2133 2134// InputService9TestCaseOperation1 API operation for . 2135// 2136// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2137// with awserr.Error's Code and Message methods to get detailed information about 2138// the error. 2139// 2140// See the AWS API reference guide for 's 2141// API operation InputService9TestCaseOperation1 for usage and error information. 2142func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { 2143 req, out := c.InputService9TestCaseOperation1Request(input) 2144 return out, req.Send() 2145} 2146 2147// InputService9TestCaseOperation1WithContext is the same as InputService9TestCaseOperation1 with the addition of 2148// the ability to pass a context and additional request options. 2149// 2150// See InputService9TestCaseOperation1 for details on how to use this API operation. 2151// 2152// The context must be non-nil and will be used for request cancellation. If 2153// the context is nil a panic will occur. In the future the SDK may create 2154// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2155// for more information on using Contexts. 2156func (c *InputService9ProtocolTest) InputService9TestCaseOperation1WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation1Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) { 2157 req, out := c.InputService9TestCaseOperation1Request(input) 2158 req.SetContext(ctx) 2159 req.ApplyOptions(opts...) 2160 return out, req.Send() 2161} 2162 2163const opInputService9TestCaseOperation2 = "MemberRefOp" 2164 2165// InputService9TestCaseOperation2Request generates a "aws/request.Request" representing the 2166// client's request for the InputService9TestCaseOperation2 operation. The "output" return 2167// value will be populated with the request's response once the request completes 2168// successfully. 2169// 2170// Use "Send" method on the returned Request to send the API call to the service. 2171// the "output" return value is not valid until after Send returns without error. 2172// 2173// See InputService9TestCaseOperation2 for more information on using the InputService9TestCaseOperation2 2174// API call, and error handling. 2175// 2176// This method is useful when you want to inject custom logic or configuration 2177// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2178// 2179// 2180// // Example sending a request using the InputService9TestCaseOperation2Request method. 2181// req, resp := client.InputService9TestCaseOperation2Request(params) 2182// 2183// err := req.Send() 2184// if err == nil { // resp is now filled 2185// fmt.Println(resp) 2186// } 2187func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputService9TestCaseOperation2Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) { 2188 op := &request.Operation{ 2189 Name: opInputService9TestCaseOperation2, 2190 HTTPMethod: "POST", 2191 HTTPPath: "/", 2192 } 2193 2194 if input == nil { 2195 input = &InputService9TestShapeInputService9TestCaseOperation2Input{} 2196 } 2197 2198 output = &InputService9TestShapeInputService9TestCaseOperation2Output{} 2199 req = c.newRequest(op, input, output) 2200 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2201 req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("foo-{Name}.", input.hostLabels)) 2202 req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) 2203 return 2204} 2205 2206// InputService9TestCaseOperation2 API operation for . 2207// 2208// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2209// with awserr.Error's Code and Message methods to get detailed information about 2210// the error. 2211// 2212// See the AWS API reference guide for 's 2213// API operation InputService9TestCaseOperation2 for usage and error information. 2214func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputService9TestCaseOperation2Input) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) { 2215 req, out := c.InputService9TestCaseOperation2Request(input) 2216 return out, req.Send() 2217} 2218 2219// InputService9TestCaseOperation2WithContext is the same as InputService9TestCaseOperation2 with the addition of 2220// the ability to pass a context and additional request options. 2221// 2222// See InputService9TestCaseOperation2 for details on how to use this API operation. 2223// 2224// The context must be non-nil and will be used for request cancellation. If 2225// the context is nil a panic will occur. In the future the SDK may create 2226// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2227// for more information on using Contexts. 2228func (c *InputService9ProtocolTest) InputService9TestCaseOperation2WithContext(ctx aws.Context, input *InputService9TestShapeInputService9TestCaseOperation2Input, opts ...request.Option) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) { 2229 req, out := c.InputService9TestCaseOperation2Request(input) 2230 req.SetContext(ctx) 2231 req.ApplyOptions(opts...) 2232 return out, req.Send() 2233} 2234 2235type InputService9TestShapeInputService9TestCaseOperation1Input struct { 2236 _ struct{} `type:"structure"` 2237 2238 Name *string `type:"string"` 2239} 2240 2241// SetName sets the Name field's value. 2242func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetName(v string) *InputService9TestShapeInputService9TestCaseOperation1Input { 2243 s.Name = &v 2244 return s 2245} 2246 2247type InputService9TestShapeInputService9TestCaseOperation1Output struct { 2248 _ struct{} `type:"structure"` 2249} 2250 2251type InputService9TestShapeInputService9TestCaseOperation2Input struct { 2252 _ struct{} `type:"structure"` 2253 2254 // Name is a required field 2255 Name *string `type:"string" required:"true"` 2256} 2257 2258// Validate inspects the fields of the type to determine if they are valid. 2259func (s *InputService9TestShapeInputService9TestCaseOperation2Input) Validate() error { 2260 invalidParams := request.ErrInvalidParams{Context: "InputService9TestShapeInputService9TestCaseOperation2Input"} 2261 if s.Name == nil { 2262 invalidParams.Add(request.NewErrParamRequired("Name")) 2263 } 2264 if s.Name != nil && len(*s.Name) < 1 { 2265 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2266 } 2267 2268 if invalidParams.Len() > 0 { 2269 return invalidParams 2270 } 2271 return nil 2272} 2273 2274// SetName sets the Name field's value. 2275func (s *InputService9TestShapeInputService9TestCaseOperation2Input) SetName(v string) *InputService9TestShapeInputService9TestCaseOperation2Input { 2276 s.Name = &v 2277 return s 2278} 2279 2280func (s *InputService9TestShapeInputService9TestCaseOperation2Input) hostLabels() map[string]string { 2281 return map[string]string{ 2282 "Name": aws.StringValue(s.Name), 2283 } 2284} 2285 2286type InputService9TestShapeInputService9TestCaseOperation2Output struct { 2287 _ struct{} `type:"structure"` 2288} 2289 2290// 2291// Tests begin here 2292// 2293 2294func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { 2295 svc := NewInputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2296 input := &InputService1TestShapeInputService1TestCaseOperation1Input{ 2297 Name: aws.String("myname"), 2298 } 2299 req, _ := svc.InputService1TestCaseOperation1Request(input) 2300 r := req.HTTPRequest 2301 2302 // build request 2303 req.Build() 2304 if req.Error != nil { 2305 t.Errorf("expect no error, got %v", req.Error) 2306 } 2307 2308 // assert body 2309 if r.Body == nil { 2310 t.Errorf("expect body not to be nil") 2311 } 2312 body, _ := ioutil.ReadAll(r.Body) 2313 awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body))) 2314 2315 // assert URL 2316 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2317 2318 // assert headers 2319 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2320 t.Errorf("expect %v, got %v", e, a) 2321 } 2322 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2323 t.Errorf("expect %v, got %v", e, a) 2324 } 2325 2326} 2327 2328func TestInputService2ProtocolTestTimestampValuesCase1(t *testing.T) { 2329 svc := NewInputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2330 input := &InputService2TestShapeInputService2TestCaseOperation1Input{ 2331 TimeArg: aws.Time(time.Unix(1422172800, 0)), 2332 TimeCustom: aws.Time(time.Unix(1422172800, 0)), 2333 TimeFormat: aws.Time(time.Unix(1422172800, 0)), 2334 } 2335 req, _ := svc.InputService2TestCaseOperation1Request(input) 2336 r := req.HTTPRequest 2337 2338 // build request 2339 req.Build() 2340 if req.Error != nil { 2341 t.Errorf("expect no error, got %v", req.Error) 2342 } 2343 2344 // assert body 2345 if r.Body == nil { 2346 t.Errorf("expect body not to be nil") 2347 } 2348 body, _ := ioutil.ReadAll(r.Body) 2349 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))) 2350 2351 // assert URL 2352 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2353 2354 // assert headers 2355 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2356 t.Errorf("expect %v, got %v", e, a) 2357 } 2358 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2359 t.Errorf("expect %v, got %v", e, a) 2360 } 2361 2362} 2363 2364func TestInputService3ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { 2365 svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2366 input := &InputService3TestShapeInputService3TestCaseOperation1Input{ 2367 BlobArg: []byte("foo"), 2368 } 2369 req, _ := svc.InputService3TestCaseOperation1Request(input) 2370 r := req.HTTPRequest 2371 2372 // build request 2373 req.Build() 2374 if req.Error != nil { 2375 t.Errorf("expect no error, got %v", req.Error) 2376 } 2377 2378 // assert body 2379 if r.Body == nil { 2380 t.Errorf("expect body not to be nil") 2381 } 2382 body, _ := ioutil.ReadAll(r.Body) 2383 awstesting.AssertJSON(t, `{"BlobArg": "Zm9v"}`, util.Trim(string(body))) 2384 2385 // assert URL 2386 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2387 2388 // assert headers 2389 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2390 t.Errorf("expect %v, got %v", e, a) 2391 } 2392 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2393 t.Errorf("expect %v, got %v", e, a) 2394 } 2395 2396} 2397 2398func TestInputService3ProtocolTestBase64EncodedBlobsCase2(t *testing.T) { 2399 svc := NewInputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2400 input := &InputService3TestShapeInputService3TestCaseOperation2Input{ 2401 BlobMap: map[string][]byte{ 2402 "key1": []byte("foo"), 2403 "key2": []byte("bar"), 2404 }, 2405 } 2406 req, _ := svc.InputService3TestCaseOperation2Request(input) 2407 r := req.HTTPRequest 2408 2409 // build request 2410 req.Build() 2411 if req.Error != nil { 2412 t.Errorf("expect no error, got %v", req.Error) 2413 } 2414 2415 // assert body 2416 if r.Body == nil { 2417 t.Errorf("expect body not to be nil") 2418 } 2419 body, _ := ioutil.ReadAll(r.Body) 2420 awstesting.AssertJSON(t, `{"BlobMap": {"key1": "Zm9v", "key2": "YmFy"}}`, util.Trim(string(body))) 2421 2422 // assert URL 2423 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2424 2425 // assert headers 2426 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2427 t.Errorf("expect %v, got %v", e, a) 2428 } 2429 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2430 t.Errorf("expect %v, got %v", e, a) 2431 } 2432 2433} 2434 2435func TestInputService4ProtocolTestNestedBlobsCase1(t *testing.T) { 2436 svc := NewInputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2437 input := &InputService4TestShapeInputService4TestCaseOperation1Input{ 2438 ListParam: [][]byte{ 2439 []byte("foo"), 2440 []byte("bar"), 2441 }, 2442 } 2443 req, _ := svc.InputService4TestCaseOperation1Request(input) 2444 r := req.HTTPRequest 2445 2446 // build request 2447 req.Build() 2448 if req.Error != nil { 2449 t.Errorf("expect no error, got %v", req.Error) 2450 } 2451 2452 // assert body 2453 if r.Body == nil { 2454 t.Errorf("expect body not to be nil") 2455 } 2456 body, _ := ioutil.ReadAll(r.Body) 2457 awstesting.AssertJSON(t, `{"ListParam": ["Zm9v", "YmFy"]}`, util.Trim(string(body))) 2458 2459 // assert URL 2460 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2461 2462 // assert headers 2463 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2464 t.Errorf("expect %v, got %v", e, a) 2465 } 2466 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2467 t.Errorf("expect %v, got %v", e, a) 2468 } 2469 2470} 2471 2472func TestInputService5ProtocolTestRecursiveShapesCase1(t *testing.T) { 2473 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2474 input := &InputService5TestShapeInputService5TestCaseOperation1Input{ 2475 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2476 NoRecurse: aws.String("foo"), 2477 }, 2478 } 2479 req, _ := svc.InputService5TestCaseOperation1Request(input) 2480 r := req.HTTPRequest 2481 2482 // build request 2483 req.Build() 2484 if req.Error != nil { 2485 t.Errorf("expect no error, got %v", req.Error) 2486 } 2487 2488 // assert body 2489 if r.Body == nil { 2490 t.Errorf("expect body not to be nil") 2491 } 2492 body, _ := ioutil.ReadAll(r.Body) 2493 awstesting.AssertJSON(t, `{"RecursiveStruct": {"NoRecurse": "foo"}}`, util.Trim(string(body))) 2494 2495 // assert URL 2496 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2497 2498 // assert headers 2499 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2500 t.Errorf("expect %v, got %v", e, a) 2501 } 2502 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2503 t.Errorf("expect %v, got %v", e, a) 2504 } 2505 2506} 2507 2508func TestInputService5ProtocolTestRecursiveShapesCase2(t *testing.T) { 2509 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2510 input := &InputService5TestShapeInputService5TestCaseOperation2Input{ 2511 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2512 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2513 NoRecurse: aws.String("foo"), 2514 }, 2515 }, 2516 } 2517 req, _ := svc.InputService5TestCaseOperation2Request(input) 2518 r := req.HTTPRequest 2519 2520 // build request 2521 req.Build() 2522 if req.Error != nil { 2523 t.Errorf("expect no error, got %v", req.Error) 2524 } 2525 2526 // assert body 2527 if r.Body == nil { 2528 t.Errorf("expect body not to be nil") 2529 } 2530 body, _ := ioutil.ReadAll(r.Body) 2531 awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveStruct": {"NoRecurse": "foo"}}}`, util.Trim(string(body))) 2532 2533 // assert URL 2534 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2535 2536 // assert headers 2537 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2538 t.Errorf("expect %v, got %v", e, a) 2539 } 2540 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2541 t.Errorf("expect %v, got %v", e, a) 2542 } 2543 2544} 2545 2546func TestInputService5ProtocolTestRecursiveShapesCase3(t *testing.T) { 2547 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2548 input := &InputService5TestShapeInputService5TestCaseOperation3Input{ 2549 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2550 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2551 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2552 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2553 NoRecurse: aws.String("foo"), 2554 }, 2555 }, 2556 }, 2557 }, 2558 } 2559 req, _ := svc.InputService5TestCaseOperation3Request(input) 2560 r := req.HTTPRequest 2561 2562 // build request 2563 req.Build() 2564 if req.Error != nil { 2565 t.Errorf("expect no error, got %v", req.Error) 2566 } 2567 2568 // assert body 2569 if r.Body == nil { 2570 t.Errorf("expect body not to be nil") 2571 } 2572 body, _ := ioutil.ReadAll(r.Body) 2573 awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveStruct": {"RecursiveStruct": {"RecursiveStruct": {"NoRecurse": "foo"}}}}}`, util.Trim(string(body))) 2574 2575 // assert URL 2576 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2577 2578 // assert headers 2579 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2580 t.Errorf("expect %v, got %v", e, a) 2581 } 2582 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2583 t.Errorf("expect %v, got %v", e, a) 2584 } 2585 2586} 2587 2588func TestInputService5ProtocolTestRecursiveShapesCase4(t *testing.T) { 2589 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2590 input := &InputService5TestShapeInputService5TestCaseOperation4Input{ 2591 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2592 RecursiveList: []*InputService5TestShapeRecursiveStructType{ 2593 { 2594 NoRecurse: aws.String("foo"), 2595 }, 2596 { 2597 NoRecurse: aws.String("bar"), 2598 }, 2599 }, 2600 }, 2601 } 2602 req, _ := svc.InputService5TestCaseOperation4Request(input) 2603 r := req.HTTPRequest 2604 2605 // build request 2606 req.Build() 2607 if req.Error != nil { 2608 t.Errorf("expect no error, got %v", req.Error) 2609 } 2610 2611 // assert body 2612 if r.Body == nil { 2613 t.Errorf("expect body not to be nil") 2614 } 2615 body, _ := ioutil.ReadAll(r.Body) 2616 awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveList": [{"NoRecurse": "foo"}, {"NoRecurse": "bar"}]}}`, util.Trim(string(body))) 2617 2618 // assert URL 2619 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2620 2621 // assert headers 2622 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2623 t.Errorf("expect %v, got %v", e, a) 2624 } 2625 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2626 t.Errorf("expect %v, got %v", e, a) 2627 } 2628 2629} 2630 2631func TestInputService5ProtocolTestRecursiveShapesCase5(t *testing.T) { 2632 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2633 input := &InputService5TestShapeInputService5TestCaseOperation5Input{ 2634 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2635 RecursiveList: []*InputService5TestShapeRecursiveStructType{ 2636 { 2637 NoRecurse: aws.String("foo"), 2638 }, 2639 { 2640 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2641 NoRecurse: aws.String("bar"), 2642 }, 2643 }, 2644 }, 2645 }, 2646 } 2647 req, _ := svc.InputService5TestCaseOperation5Request(input) 2648 r := req.HTTPRequest 2649 2650 // build request 2651 req.Build() 2652 if req.Error != nil { 2653 t.Errorf("expect no error, got %v", req.Error) 2654 } 2655 2656 // assert body 2657 if r.Body == nil { 2658 t.Errorf("expect body not to be nil") 2659 } 2660 body, _ := ioutil.ReadAll(r.Body) 2661 awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveList": [{"NoRecurse": "foo"}, {"RecursiveStruct": {"NoRecurse": "bar"}}]}}`, util.Trim(string(body))) 2662 2663 // assert URL 2664 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2665 2666 // assert headers 2667 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2668 t.Errorf("expect %v, got %v", e, a) 2669 } 2670 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2671 t.Errorf("expect %v, got %v", e, a) 2672 } 2673 2674} 2675 2676func TestInputService5ProtocolTestRecursiveShapesCase6(t *testing.T) { 2677 svc := NewInputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2678 input := &InputService5TestShapeInputService5TestCaseOperation6Input{ 2679 RecursiveStruct: &InputService5TestShapeRecursiveStructType{ 2680 RecursiveMap: map[string]*InputService5TestShapeRecursiveStructType{ 2681 "bar": { 2682 NoRecurse: aws.String("bar"), 2683 }, 2684 "foo": { 2685 NoRecurse: aws.String("foo"), 2686 }, 2687 }, 2688 }, 2689 } 2690 req, _ := svc.InputService5TestCaseOperation6Request(input) 2691 r := req.HTTPRequest 2692 2693 // build request 2694 req.Build() 2695 if req.Error != nil { 2696 t.Errorf("expect no error, got %v", req.Error) 2697 } 2698 2699 // assert body 2700 if r.Body == nil { 2701 t.Errorf("expect body not to be nil") 2702 } 2703 body, _ := ioutil.ReadAll(r.Body) 2704 awstesting.AssertJSON(t, `{"RecursiveStruct": {"RecursiveMap": {"foo": {"NoRecurse": "foo"}, "bar": {"NoRecurse": "bar"}}}}`, util.Trim(string(body))) 2705 2706 // assert URL 2707 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2708 2709 // assert headers 2710 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2711 t.Errorf("expect %v, got %v", e, a) 2712 } 2713 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2714 t.Errorf("expect %v, got %v", e, a) 2715 } 2716 2717} 2718 2719func TestInputService6ProtocolTestEmptyMapsCase1(t *testing.T) { 2720 svc := NewInputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2721 input := &InputService6TestShapeInputService6TestCaseOperation1Input{ 2722 Map: map[string]*string{}, 2723 } 2724 req, _ := svc.InputService6TestCaseOperation1Request(input) 2725 r := req.HTTPRequest 2726 2727 // build request 2728 req.Build() 2729 if req.Error != nil { 2730 t.Errorf("expect no error, got %v", req.Error) 2731 } 2732 2733 // assert body 2734 if r.Body == nil { 2735 t.Errorf("expect body not to be nil") 2736 } 2737 body, _ := ioutil.ReadAll(r.Body) 2738 awstesting.AssertJSON(t, `{"Map": {}}`, util.Trim(string(body))) 2739 2740 // assert URL 2741 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2742 2743 // assert headers 2744 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2745 t.Errorf("expect %v, got %v", e, a) 2746 } 2747 if e, a := "com.amazonaws.foo.OperationName", r.Header.Get("X-Amz-Target"); e != a { 2748 t.Errorf("expect %v, got %v", e, a) 2749 } 2750 2751} 2752 2753func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase1(t *testing.T) { 2754 svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2755 input := &InputService7TestShapeInputService7TestCaseOperation1Input{ 2756 Token: aws.String("abc123"), 2757 } 2758 req, _ := svc.InputService7TestCaseOperation1Request(input) 2759 r := req.HTTPRequest 2760 2761 // build request 2762 req.Build() 2763 if req.Error != nil { 2764 t.Errorf("expect no error, got %v", req.Error) 2765 } 2766 2767 // assert body 2768 if r.Body == nil { 2769 t.Errorf("expect body not to be nil") 2770 } 2771 body, _ := ioutil.ReadAll(r.Body) 2772 awstesting.AssertJSON(t, `{"Token": "abc123"}`, util.Trim(string(body))) 2773 2774 // assert URL 2775 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2776 2777 // assert headers 2778 2779} 2780 2781func TestInputService7ProtocolTestIdempotencyTokenAutoFillCase2(t *testing.T) { 2782 svc := NewInputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2783 input := &InputService7TestShapeInputService7TestCaseOperation2Input{} 2784 req, _ := svc.InputService7TestCaseOperation2Request(input) 2785 r := req.HTTPRequest 2786 2787 // build request 2788 req.Build() 2789 if req.Error != nil { 2790 t.Errorf("expect no error, got %v", req.Error) 2791 } 2792 2793 // assert body 2794 if r.Body == nil { 2795 t.Errorf("expect body not to be nil") 2796 } 2797 body, _ := ioutil.ReadAll(r.Body) 2798 awstesting.AssertJSON(t, `{"Token": "00000000-0000-4000-8000-000000000000"}`, util.Trim(string(body))) 2799 2800 // assert URL 2801 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2802 2803 // assert headers 2804 2805} 2806 2807func TestInputService8ProtocolTestEnumCase1(t *testing.T) { 2808 svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2809 input := &InputService8TestShapeInputService8TestCaseOperation1Input{ 2810 FooEnum: aws.String("foo"), 2811 ListEnums: []*string{ 2812 aws.String("foo"), 2813 aws.String(""), 2814 aws.String("bar"), 2815 }, 2816 } 2817 req, _ := svc.InputService8TestCaseOperation1Request(input) 2818 r := req.HTTPRequest 2819 2820 // build request 2821 req.Build() 2822 if req.Error != nil { 2823 t.Errorf("expect no error, got %v", req.Error) 2824 } 2825 2826 // assert body 2827 if r.Body == nil { 2828 t.Errorf("expect body not to be nil") 2829 } 2830 body, _ := ioutil.ReadAll(r.Body) 2831 awstesting.AssertJSON(t, `{"FooEnum": "foo", "ListEnums": ["foo", "", "bar"]}`, util.Trim(string(body))) 2832 2833 // assert URL 2834 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2835 2836 // assert headers 2837 2838} 2839 2840func TestInputService8ProtocolTestEnumCase2(t *testing.T) { 2841 svc := NewInputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2842 input := &InputService8TestShapeInputService8TestCaseOperation2Input{} 2843 req, _ := svc.InputService8TestCaseOperation2Request(input) 2844 r := req.HTTPRequest 2845 2846 // build request 2847 req.Build() 2848 if req.Error != nil { 2849 t.Errorf("expect no error, got %v", req.Error) 2850 } 2851 2852 // assert URL 2853 awstesting.AssertURL(t, "https://test/", r.URL.String()) 2854 2855 // assert headers 2856 2857} 2858 2859func TestInputService9ProtocolTestEndpointHostTraitStaticPrefixCase1(t *testing.T) { 2860 svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")}) 2861 input := &InputService9TestShapeInputService9TestCaseOperation1Input{ 2862 Name: aws.String("myname"), 2863 } 2864 req, _ := svc.InputService9TestCaseOperation1Request(input) 2865 r := req.HTTPRequest 2866 2867 // build request 2868 req.Build() 2869 if req.Error != nil { 2870 t.Errorf("expect no error, got %v", req.Error) 2871 } 2872 2873 // assert body 2874 if r.Body == nil { 2875 t.Errorf("expect body not to be nil") 2876 } 2877 body, _ := ioutil.ReadAll(r.Body) 2878 awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body))) 2879 2880 // assert URL 2881 awstesting.AssertURL(t, "https://data-service.region.amazonaws.com/", r.URL.String()) 2882 2883 // assert headers 2884 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2885 t.Errorf("expect %v, got %v", e, a) 2886 } 2887 if e, a := "com.amazonaws.foo.StaticOp", r.Header.Get("X-Amz-Target"); e != a { 2888 t.Errorf("expect %v, got %v", e, a) 2889 } 2890 2891} 2892 2893func TestInputService9ProtocolTestEndpointHostTraitStaticPrefixCase2(t *testing.T) { 2894 svc := NewInputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://service.region.amazonaws.com")}) 2895 input := &InputService9TestShapeInputService9TestCaseOperation2Input{ 2896 Name: aws.String("myname"), 2897 } 2898 req, _ := svc.InputService9TestCaseOperation2Request(input) 2899 r := req.HTTPRequest 2900 2901 // build request 2902 req.Build() 2903 if req.Error != nil { 2904 t.Errorf("expect no error, got %v", req.Error) 2905 } 2906 2907 // assert body 2908 if r.Body == nil { 2909 t.Errorf("expect body not to be nil") 2910 } 2911 body, _ := ioutil.ReadAll(r.Body) 2912 awstesting.AssertJSON(t, `{"Name": "myname"}`, util.Trim(string(body))) 2913 2914 // assert URL 2915 awstesting.AssertURL(t, "https://foo-myname.service.region.amazonaws.com/", r.URL.String()) 2916 2917 // assert headers 2918 if e, a := "application/x-amz-json-1.1", r.Header.Get("Content-Type"); e != a { 2919 t.Errorf("expect %v, got %v", e, a) 2920 } 2921 if e, a := "com.amazonaws.foo.MemberRefOp", r.Header.Get("X-Amz-Target"); e != a { 2922 t.Errorf("expect %v, got %v", e, a) 2923 } 2924 2925} 2926