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