github.com/aavshr/aws-sdk-go@v1.41.3/private/protocol/restxml/unmarshal_test.go (about) 1 // Code generated by models/protocol_tests/generate.go. DO NOT EDIT. 2 3 package restxml_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/restxml" 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 // OutputService1ProtocolTest 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 // OutputService1ProtocolTest methods are safe to use concurrently. It is not safe to 54 // modify mutate any of the struct's properties though. 55 type OutputService1ProtocolTest struct { 56 *client.Client 57 } 58 59 // New creates a new instance of the OutputService1ProtocolTest 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 OutputService1ProtocolTest client from just a session. 67 // svc := outputservice1protocoltest.New(mySession) 68 // 69 // // Create a OutputService1ProtocolTest client with additional configuration 70 // svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 71 func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest { 72 c := p.ClientConfig("outputservice1protocoltest", cfgs...) 73 return newOutputService1ProtocolTestClient(*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 newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService1ProtocolTest { 78 svc := &OutputService1ProtocolTest{ 79 Client: client.New( 80 cfg, 81 metadata.ClientInfo{ 82 ServiceName: "OutputService1ProtocolTest", 83 ServiceID: "OutputService1ProtocolTest", 84 SigningName: signingName, 85 SigningRegion: signingRegion, 86 PartitionID: partitionID, 87 Endpoint: endpoint, 88 APIVersion: "", 89 }, 90 handlers, 91 ), 92 } 93 94 // Handlers 95 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 96 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 97 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 98 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 99 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 100 101 return svc 102 } 103 104 // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any 105 // custom request initialization. 106 func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 107 req := c.NewRequest(op, params, data) 108 109 return req 110 } 111 112 const opOutputService1TestCaseOperation1 = "OperationName" 113 114 // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the 115 // client's request for the OutputService1TestCaseOperation1 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 OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1 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 OutputService1TestCaseOperation1Request method. 130 // req, resp := client.OutputService1TestCaseOperation1Request(params) 131 // 132 // err := req.Send() 133 // if err == nil { // resp is now filled 134 // fmt.Println(resp) 135 // } 136 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) { 137 op := &request.Operation{ 138 Name: opOutputService1TestCaseOperation1, 139 HTTPPath: "/", 140 } 141 142 if input == nil { 143 input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} 144 } 145 146 output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{} 147 req = c.newRequest(op, input, output) 148 return 149 } 150 151 // OutputService1TestCaseOperation1 API operation for . 152 // 153 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 154 // with awserr.Error's Code and Message methods to get detailed information about 155 // the error. 156 // 157 // See the AWS API reference guide for 's 158 // API operation OutputService1TestCaseOperation1 for usage and error information. 159 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { 160 req, out := c.OutputService1TestCaseOperation1Request(input) 161 return out, req.Send() 162 } 163 164 // OutputService1TestCaseOperation1WithContext is the same as OutputService1TestCaseOperation1 with the addition of 165 // the ability to pass a context and additional request options. 166 // 167 // See OutputService1TestCaseOperation1 for details on how to use this API operation. 168 // 169 // The context must be non-nil and will be used for request cancellation. If 170 // the context is nil a panic will occur. In the future the SDK may create 171 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 172 // for more information on using Contexts. 173 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation1Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { 174 req, out := c.OutputService1TestCaseOperation1Request(input) 175 req.SetContext(ctx) 176 req.ApplyOptions(opts...) 177 return out, req.Send() 178 } 179 180 const opOutputService1TestCaseOperation2 = "OperationName" 181 182 // OutputService1TestCaseOperation2Request generates a "aws/request.Request" representing the 183 // client's request for the OutputService1TestCaseOperation2 operation. The "output" return 184 // value will be populated with the request's response once the request completes 185 // successfully. 186 // 187 // Use "Send" method on the returned Request to send the API call to the service. 188 // the "output" return value is not valid until after Send returns without error. 189 // 190 // See OutputService1TestCaseOperation2 for more information on using the OutputService1TestCaseOperation2 191 // API call, and error handling. 192 // 193 // This method is useful when you want to inject custom logic or configuration 194 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 195 // 196 // 197 // // Example sending a request using the OutputService1TestCaseOperation2Request method. 198 // req, resp := client.OutputService1TestCaseOperation2Request(params) 199 // 200 // err := req.Send() 201 // if err == nil { // resp is now filled 202 // fmt.Println(resp) 203 // } 204 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2Request(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation2Output) { 205 op := &request.Operation{ 206 Name: opOutputService1TestCaseOperation2, 207 HTTPPath: "/", 208 } 209 210 if input == nil { 211 input = &OutputService1TestShapeOutputService1TestCaseOperation2Input{} 212 } 213 214 output = &OutputService1TestShapeOutputService1TestCaseOperation2Output{} 215 req = c.newRequest(op, input, output) 216 return 217 } 218 219 // OutputService1TestCaseOperation2 API operation for . 220 // 221 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 222 // with awserr.Error's Code and Message methods to get detailed information about 223 // the error. 224 // 225 // See the AWS API reference guide for 's 226 // API operation OutputService1TestCaseOperation2 for usage and error information. 227 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { 228 req, out := c.OutputService1TestCaseOperation2Request(input) 229 return out, req.Send() 230 } 231 232 // OutputService1TestCaseOperation2WithContext is the same as OutputService1TestCaseOperation2 with the addition of 233 // the ability to pass a context and additional request options. 234 // 235 // See OutputService1TestCaseOperation2 for details on how to use this API operation. 236 // 237 // The context must be non-nil and will be used for request cancellation. If 238 // the context is nil a panic will occur. In the future the SDK may create 239 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 240 // for more information on using Contexts. 241 func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2WithContext(ctx aws.Context, input *OutputService1TestShapeOutputService1TestCaseOperation2Input, opts ...request.Option) (*OutputService1TestShapeOutputService1TestCaseOperation2Output, error) { 242 req, out := c.OutputService1TestCaseOperation2Request(input) 243 req.SetContext(ctx) 244 req.ApplyOptions(opts...) 245 return out, req.Send() 246 } 247 248 type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { 249 _ struct{} `type:"structure"` 250 } 251 252 type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { 253 _ struct{} `type:"structure"` 254 255 // Blob is automatically base64 encoded/decoded by the SDK. 256 Blob []byte `type:"blob"` 257 258 // BlobHeader is automatically base64 encoded/decoded by the SDK. 259 BlobHeader []byte `location:"header" type:"blob"` 260 261 Char *string `type:"character"` 262 263 Double *float64 `type:"double"` 264 265 FalseBool *bool `type:"boolean"` 266 267 Float *float64 `type:"float"` 268 269 ImaHeader *string `location:"header" type:"string"` 270 271 ImaHeaderLocation *string `location:"header" locationName:"X-Foo" type:"string"` 272 273 Long *int64 `type:"long"` 274 275 Num *int64 `locationName:"FooNum" type:"integer"` 276 277 Str *string `type:"string"` 278 279 Timestamp *time.Time `type:"timestamp"` 280 281 TrueBool *bool `type:"boolean"` 282 } 283 284 // SetBlob sets the Blob field's value. 285 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetBlob(v []byte) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 286 s.Blob = v 287 return s 288 } 289 290 // SetBlobHeader sets the BlobHeader field's value. 291 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetBlobHeader(v []byte) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 292 s.BlobHeader = v 293 return s 294 } 295 296 // SetChar sets the Char field's value. 297 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 298 s.Char = &v 299 return s 300 } 301 302 // SetDouble sets the Double field's value. 303 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 304 s.Double = &v 305 return s 306 } 307 308 // SetFalseBool sets the FalseBool field's value. 309 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 310 s.FalseBool = &v 311 return s 312 } 313 314 // SetFloat sets the Float field's value. 315 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 316 s.Float = &v 317 return s 318 } 319 320 // SetImaHeader sets the ImaHeader field's value. 321 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetImaHeader(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 322 s.ImaHeader = &v 323 return s 324 } 325 326 // SetImaHeaderLocation sets the ImaHeaderLocation field's value. 327 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetImaHeaderLocation(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 328 s.ImaHeaderLocation = &v 329 return s 330 } 331 332 // SetLong sets the Long field's value. 333 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 334 s.Long = &v 335 return s 336 } 337 338 // SetNum sets the Num field's value. 339 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 340 s.Num = &v 341 return s 342 } 343 344 // SetStr sets the Str field's value. 345 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 346 s.Str = &v 347 return s 348 } 349 350 // SetTimestamp sets the Timestamp field's value. 351 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTimestamp(v time.Time) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 352 s.Timestamp = &v 353 return s 354 } 355 356 // SetTrueBool sets the TrueBool field's value. 357 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 358 s.TrueBool = &v 359 return s 360 } 361 362 type OutputService1TestShapeOutputService1TestCaseOperation2Input struct { 363 _ struct{} `type:"structure"` 364 } 365 366 type OutputService1TestShapeOutputService1TestCaseOperation2Output struct { 367 _ struct{} `type:"structure"` 368 369 // Blob is automatically base64 encoded/decoded by the SDK. 370 Blob []byte `type:"blob"` 371 372 // BlobHeader is automatically base64 encoded/decoded by the SDK. 373 BlobHeader []byte `location:"header" type:"blob"` 374 375 Char *string `type:"character"` 376 377 Double *float64 `type:"double"` 378 379 FalseBool *bool `type:"boolean"` 380 381 Float *float64 `type:"float"` 382 383 ImaHeader *string `location:"header" type:"string"` 384 385 ImaHeaderLocation *string `location:"header" locationName:"X-Foo" type:"string"` 386 387 Long *int64 `type:"long"` 388 389 Num *int64 `locationName:"FooNum" type:"integer"` 390 391 Str *string `type:"string"` 392 393 Timestamp *time.Time `type:"timestamp"` 394 395 TrueBool *bool `type:"boolean"` 396 } 397 398 // SetBlob sets the Blob field's value. 399 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetBlob(v []byte) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 400 s.Blob = v 401 return s 402 } 403 404 // SetBlobHeader sets the BlobHeader field's value. 405 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetBlobHeader(v []byte) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 406 s.BlobHeader = v 407 return s 408 } 409 410 // SetChar sets the Char field's value. 411 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 412 s.Char = &v 413 return s 414 } 415 416 // SetDouble sets the Double field's value. 417 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 418 s.Double = &v 419 return s 420 } 421 422 // SetFalseBool sets the FalseBool field's value. 423 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 424 s.FalseBool = &v 425 return s 426 } 427 428 // SetFloat sets the Float field's value. 429 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 430 s.Float = &v 431 return s 432 } 433 434 // SetImaHeader sets the ImaHeader field's value. 435 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetImaHeader(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 436 s.ImaHeader = &v 437 return s 438 } 439 440 // SetImaHeaderLocation sets the ImaHeaderLocation field's value. 441 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetImaHeaderLocation(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 442 s.ImaHeaderLocation = &v 443 return s 444 } 445 446 // SetLong sets the Long field's value. 447 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 448 s.Long = &v 449 return s 450 } 451 452 // SetNum sets the Num field's value. 453 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 454 s.Num = &v 455 return s 456 } 457 458 // SetStr sets the Str field's value. 459 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 460 s.Str = &v 461 return s 462 } 463 464 // SetTimestamp sets the Timestamp field's value. 465 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetTimestamp(v time.Time) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 466 s.Timestamp = &v 467 return s 468 } 469 470 // SetTrueBool sets the TrueBool field's value. 471 func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation2Output { 472 s.TrueBool = &v 473 return s 474 } 475 476 // OutputService2ProtocolTest provides the API operation methods for making requests to 477 // . See this package's package overview docs 478 // for details on the service. 479 // 480 // OutputService2ProtocolTest methods are safe to use concurrently. It is not safe to 481 // modify mutate any of the struct's properties though. 482 type OutputService2ProtocolTest struct { 483 *client.Client 484 } 485 486 // New creates a new instance of the OutputService2ProtocolTest client with a session. 487 // If additional configuration is needed for the client instance use the optional 488 // aws.Config parameter to add your extra config. 489 // 490 // Example: 491 // mySession := session.Must(session.NewSession()) 492 // 493 // // Create a OutputService2ProtocolTest client from just a session. 494 // svc := outputservice2protocoltest.New(mySession) 495 // 496 // // Create a OutputService2ProtocolTest client with additional configuration 497 // svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 498 func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest { 499 c := p.ClientConfig("outputservice2protocoltest", cfgs...) 500 return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 501 } 502 503 // newClient creates, initializes and returns a new service client instance. 504 func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest { 505 svc := &OutputService2ProtocolTest{ 506 Client: client.New( 507 cfg, 508 metadata.ClientInfo{ 509 ServiceName: "OutputService2ProtocolTest", 510 ServiceID: "OutputService2ProtocolTest", 511 SigningName: signingName, 512 SigningRegion: signingRegion, 513 PartitionID: partitionID, 514 Endpoint: endpoint, 515 APIVersion: "", 516 }, 517 handlers, 518 ), 519 } 520 521 // Handlers 522 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 523 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 524 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 525 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 526 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 527 528 return svc 529 } 530 531 // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any 532 // custom request initialization. 533 func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 534 req := c.NewRequest(op, params, data) 535 536 return req 537 } 538 539 const opOutputService2TestCaseOperation1 = "OperationName" 540 541 // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the 542 // client's request for the OutputService2TestCaseOperation1 operation. The "output" return 543 // value will be populated with the request's response once the request completes 544 // successfully. 545 // 546 // Use "Send" method on the returned Request to send the API call to the service. 547 // the "output" return value is not valid until after Send returns without error. 548 // 549 // See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1 550 // API call, and error handling. 551 // 552 // This method is useful when you want to inject custom logic or configuration 553 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 554 // 555 // 556 // // Example sending a request using the OutputService2TestCaseOperation1Request method. 557 // req, resp := client.OutputService2TestCaseOperation1Request(params) 558 // 559 // err := req.Send() 560 // if err == nil { // resp is now filled 561 // fmt.Println(resp) 562 // } 563 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { 564 op := &request.Operation{ 565 Name: opOutputService2TestCaseOperation1, 566 HTTPPath: "/", 567 } 568 569 if input == nil { 570 input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} 571 } 572 573 output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} 574 req = c.newRequest(op, input, output) 575 return 576 } 577 578 // OutputService2TestCaseOperation1 API operation for . 579 // 580 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 581 // with awserr.Error's Code and Message methods to get detailed information about 582 // the error. 583 // 584 // See the AWS API reference guide for 's 585 // API operation OutputService2TestCaseOperation1 for usage and error information. 586 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { 587 req, out := c.OutputService2TestCaseOperation1Request(input) 588 return out, req.Send() 589 } 590 591 // OutputService2TestCaseOperation1WithContext is the same as OutputService2TestCaseOperation1 with the addition of 592 // the ability to pass a context and additional request options. 593 // 594 // See OutputService2TestCaseOperation1 for details on how to use this API operation. 595 // 596 // The context must be non-nil and will be used for request cancellation. If 597 // the context is nil a panic will occur. In the future the SDK may create 598 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 599 // for more information on using Contexts. 600 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1WithContext(ctx aws.Context, input *OutputService2TestShapeOutputService2TestCaseOperation1Input, opts ...request.Option) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { 601 req, out := c.OutputService2TestCaseOperation1Request(input) 602 req.SetContext(ctx) 603 req.ApplyOptions(opts...) 604 return out, req.Send() 605 } 606 607 type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { 608 _ struct{} `type:"structure"` 609 } 610 611 type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { 612 _ struct{} `type:"structure"` 613 614 // Blob is automatically base64 encoded/decoded by the SDK. 615 Blob []byte `type:"blob"` 616 } 617 618 // SetBlob sets the Blob field's value. 619 func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlob(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output { 620 s.Blob = v 621 return s 622 } 623 624 // OutputService3ProtocolTest provides the API operation methods for making requests to 625 // . See this package's package overview docs 626 // for details on the service. 627 // 628 // OutputService3ProtocolTest methods are safe to use concurrently. It is not safe to 629 // modify mutate any of the struct's properties though. 630 type OutputService3ProtocolTest struct { 631 *client.Client 632 } 633 634 // New creates a new instance of the OutputService3ProtocolTest client with a session. 635 // If additional configuration is needed for the client instance use the optional 636 // aws.Config parameter to add your extra config. 637 // 638 // Example: 639 // mySession := session.Must(session.NewSession()) 640 // 641 // // Create a OutputService3ProtocolTest client from just a session. 642 // svc := outputservice3protocoltest.New(mySession) 643 // 644 // // Create a OutputService3ProtocolTest client with additional configuration 645 // svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 646 func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest { 647 c := p.ClientConfig("outputservice3protocoltest", cfgs...) 648 return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 649 } 650 651 // newClient creates, initializes and returns a new service client instance. 652 func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest { 653 svc := &OutputService3ProtocolTest{ 654 Client: client.New( 655 cfg, 656 metadata.ClientInfo{ 657 ServiceName: "OutputService3ProtocolTest", 658 ServiceID: "OutputService3ProtocolTest", 659 SigningName: signingName, 660 SigningRegion: signingRegion, 661 PartitionID: partitionID, 662 Endpoint: endpoint, 663 APIVersion: "", 664 }, 665 handlers, 666 ), 667 } 668 669 // Handlers 670 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 671 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 672 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 673 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 674 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 675 676 return svc 677 } 678 679 // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any 680 // custom request initialization. 681 func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 682 req := c.NewRequest(op, params, data) 683 684 return req 685 } 686 687 const opOutputService3TestCaseOperation1 = "OperationName" 688 689 // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the 690 // client's request for the OutputService3TestCaseOperation1 operation. The "output" return 691 // value will be populated with the request's response once the request completes 692 // successfully. 693 // 694 // Use "Send" method on the returned Request to send the API call to the service. 695 // the "output" return value is not valid until after Send returns without error. 696 // 697 // See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1 698 // API call, and error handling. 699 // 700 // This method is useful when you want to inject custom logic or configuration 701 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 702 // 703 // 704 // // Example sending a request using the OutputService3TestCaseOperation1Request method. 705 // req, resp := client.OutputService3TestCaseOperation1Request(params) 706 // 707 // err := req.Send() 708 // if err == nil { // resp is now filled 709 // fmt.Println(resp) 710 // } 711 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { 712 op := &request.Operation{ 713 Name: opOutputService3TestCaseOperation1, 714 HTTPPath: "/", 715 } 716 717 if input == nil { 718 input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} 719 } 720 721 output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} 722 req = c.newRequest(op, input, output) 723 return 724 } 725 726 // OutputService3TestCaseOperation1 API operation for . 727 // 728 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 729 // with awserr.Error's Code and Message methods to get detailed information about 730 // the error. 731 // 732 // See the AWS API reference guide for 's 733 // API operation OutputService3TestCaseOperation1 for usage and error information. 734 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { 735 req, out := c.OutputService3TestCaseOperation1Request(input) 736 return out, req.Send() 737 } 738 739 // OutputService3TestCaseOperation1WithContext is the same as OutputService3TestCaseOperation1 with the addition of 740 // the ability to pass a context and additional request options. 741 // 742 // See OutputService3TestCaseOperation1 for details on how to use this API operation. 743 // 744 // The context must be non-nil and will be used for request cancellation. If 745 // the context is nil a panic will occur. In the future the SDK may create 746 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 747 // for more information on using Contexts. 748 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1WithContext(ctx aws.Context, input *OutputService3TestShapeOutputService3TestCaseOperation1Input, opts ...request.Option) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { 749 req, out := c.OutputService3TestCaseOperation1Request(input) 750 req.SetContext(ctx) 751 req.ApplyOptions(opts...) 752 return out, req.Send() 753 } 754 755 type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { 756 _ struct{} `type:"structure"` 757 } 758 759 type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { 760 _ struct{} `type:"structure"` 761 762 ListMember []*string `type:"list"` 763 } 764 765 // SetListMember sets the ListMember field's value. 766 func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetListMember(v []*string) *OutputService3TestShapeOutputService3TestCaseOperation1Output { 767 s.ListMember = v 768 return s 769 } 770 771 // OutputService4ProtocolTest provides the API operation methods for making requests to 772 // . See this package's package overview docs 773 // for details on the service. 774 // 775 // OutputService4ProtocolTest methods are safe to use concurrently. It is not safe to 776 // modify mutate any of the struct's properties though. 777 type OutputService4ProtocolTest struct { 778 *client.Client 779 } 780 781 // New creates a new instance of the OutputService4ProtocolTest client with a session. 782 // If additional configuration is needed for the client instance use the optional 783 // aws.Config parameter to add your extra config. 784 // 785 // Example: 786 // mySession := session.Must(session.NewSession()) 787 // 788 // // Create a OutputService4ProtocolTest client from just a session. 789 // svc := outputservice4protocoltest.New(mySession) 790 // 791 // // Create a OutputService4ProtocolTest client with additional configuration 792 // svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 793 func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest { 794 c := p.ClientConfig("outputservice4protocoltest", cfgs...) 795 return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 796 } 797 798 // newClient creates, initializes and returns a new service client instance. 799 func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest { 800 svc := &OutputService4ProtocolTest{ 801 Client: client.New( 802 cfg, 803 metadata.ClientInfo{ 804 ServiceName: "OutputService4ProtocolTest", 805 ServiceID: "OutputService4ProtocolTest", 806 SigningName: signingName, 807 SigningRegion: signingRegion, 808 PartitionID: partitionID, 809 Endpoint: endpoint, 810 APIVersion: "", 811 }, 812 handlers, 813 ), 814 } 815 816 // Handlers 817 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 818 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 819 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 820 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 821 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 822 823 return svc 824 } 825 826 // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any 827 // custom request initialization. 828 func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 829 req := c.NewRequest(op, params, data) 830 831 return req 832 } 833 834 const opOutputService4TestCaseOperation1 = "OperationName" 835 836 // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the 837 // client's request for the OutputService4TestCaseOperation1 operation. The "output" return 838 // value will be populated with the request's response once the request completes 839 // successfully. 840 // 841 // Use "Send" method on the returned Request to send the API call to the service. 842 // the "output" return value is not valid until after Send returns without error. 843 // 844 // See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1 845 // API call, and error handling. 846 // 847 // This method is useful when you want to inject custom logic or configuration 848 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 849 // 850 // 851 // // Example sending a request using the OutputService4TestCaseOperation1Request method. 852 // req, resp := client.OutputService4TestCaseOperation1Request(params) 853 // 854 // err := req.Send() 855 // if err == nil { // resp is now filled 856 // fmt.Println(resp) 857 // } 858 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { 859 op := &request.Operation{ 860 Name: opOutputService4TestCaseOperation1, 861 HTTPPath: "/", 862 } 863 864 if input == nil { 865 input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} 866 } 867 868 output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} 869 req = c.newRequest(op, input, output) 870 return 871 } 872 873 // OutputService4TestCaseOperation1 API operation for . 874 // 875 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 876 // with awserr.Error's Code and Message methods to get detailed information about 877 // the error. 878 // 879 // See the AWS API reference guide for 's 880 // API operation OutputService4TestCaseOperation1 for usage and error information. 881 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { 882 req, out := c.OutputService4TestCaseOperation1Request(input) 883 return out, req.Send() 884 } 885 886 // OutputService4TestCaseOperation1WithContext is the same as OutputService4TestCaseOperation1 with the addition of 887 // the ability to pass a context and additional request options. 888 // 889 // See OutputService4TestCaseOperation1 for details on how to use this API operation. 890 // 891 // The context must be non-nil and will be used for request cancellation. If 892 // the context is nil a panic will occur. In the future the SDK may create 893 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 894 // for more information on using Contexts. 895 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation1Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { 896 req, out := c.OutputService4TestCaseOperation1Request(input) 897 req.SetContext(ctx) 898 req.ApplyOptions(opts...) 899 return out, req.Send() 900 } 901 902 type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { 903 _ struct{} `type:"structure"` 904 } 905 906 type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { 907 _ struct{} `type:"structure"` 908 909 ListMember []*string `locationNameList:"item" type:"list"` 910 } 911 912 // SetListMember sets the ListMember field's value. 913 func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { 914 s.ListMember = v 915 return s 916 } 917 918 // OutputService5ProtocolTest provides the API operation methods for making requests to 919 // . See this package's package overview docs 920 // for details on the service. 921 // 922 // OutputService5ProtocolTest methods are safe to use concurrently. It is not safe to 923 // modify mutate any of the struct's properties though. 924 type OutputService5ProtocolTest struct { 925 *client.Client 926 } 927 928 // New creates a new instance of the OutputService5ProtocolTest client with a session. 929 // If additional configuration is needed for the client instance use the optional 930 // aws.Config parameter to add your extra config. 931 // 932 // Example: 933 // mySession := session.Must(session.NewSession()) 934 // 935 // // Create a OutputService5ProtocolTest client from just a session. 936 // svc := outputservice5protocoltest.New(mySession) 937 // 938 // // Create a OutputService5ProtocolTest client with additional configuration 939 // svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 940 func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest { 941 c := p.ClientConfig("outputservice5protocoltest", cfgs...) 942 return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 943 } 944 945 // newClient creates, initializes and returns a new service client instance. 946 func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest { 947 svc := &OutputService5ProtocolTest{ 948 Client: client.New( 949 cfg, 950 metadata.ClientInfo{ 951 ServiceName: "OutputService5ProtocolTest", 952 ServiceID: "OutputService5ProtocolTest", 953 SigningName: signingName, 954 SigningRegion: signingRegion, 955 PartitionID: partitionID, 956 Endpoint: endpoint, 957 APIVersion: "", 958 }, 959 handlers, 960 ), 961 } 962 963 // Handlers 964 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 965 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 966 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 967 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 968 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 969 970 return svc 971 } 972 973 // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any 974 // custom request initialization. 975 func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 976 req := c.NewRequest(op, params, data) 977 978 return req 979 } 980 981 const opOutputService5TestCaseOperation1 = "OperationName" 982 983 // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the 984 // client's request for the OutputService5TestCaseOperation1 operation. The "output" return 985 // value will be populated with the request's response once the request completes 986 // successfully. 987 // 988 // Use "Send" method on the returned Request to send the API call to the service. 989 // the "output" return value is not valid until after Send returns without error. 990 // 991 // See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1 992 // API call, and error handling. 993 // 994 // This method is useful when you want to inject custom logic or configuration 995 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 996 // 997 // 998 // // Example sending a request using the OutputService5TestCaseOperation1Request method. 999 // req, resp := client.OutputService5TestCaseOperation1Request(params) 1000 // 1001 // err := req.Send() 1002 // if err == nil { // resp is now filled 1003 // fmt.Println(resp) 1004 // } 1005 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { 1006 op := &request.Operation{ 1007 Name: opOutputService5TestCaseOperation1, 1008 HTTPPath: "/", 1009 } 1010 1011 if input == nil { 1012 input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} 1013 } 1014 1015 output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} 1016 req = c.newRequest(op, input, output) 1017 return 1018 } 1019 1020 // OutputService5TestCaseOperation1 API operation for . 1021 // 1022 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1023 // with awserr.Error's Code and Message methods to get detailed information about 1024 // the error. 1025 // 1026 // See the AWS API reference guide for 's 1027 // API operation OutputService5TestCaseOperation1 for usage and error information. 1028 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { 1029 req, out := c.OutputService5TestCaseOperation1Request(input) 1030 return out, req.Send() 1031 } 1032 1033 // OutputService5TestCaseOperation1WithContext is the same as OutputService5TestCaseOperation1 with the addition of 1034 // the ability to pass a context and additional request options. 1035 // 1036 // See OutputService5TestCaseOperation1 for details on how to use this API operation. 1037 // 1038 // The context must be non-nil and will be used for request cancellation. If 1039 // the context is nil a panic will occur. In the future the SDK may create 1040 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1041 // for more information on using Contexts. 1042 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1WithContext(ctx aws.Context, input *OutputService5TestShapeOutputService5TestCaseOperation1Input, opts ...request.Option) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { 1043 req, out := c.OutputService5TestCaseOperation1Request(input) 1044 req.SetContext(ctx) 1045 req.ApplyOptions(opts...) 1046 return out, req.Send() 1047 } 1048 1049 type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { 1050 _ struct{} `type:"structure"` 1051 } 1052 1053 type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { 1054 _ struct{} `type:"structure"` 1055 1056 ListMember []*string `type:"list" flattened:"true"` 1057 } 1058 1059 // SetListMember sets the ListMember field's value. 1060 func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListMember(v []*string) *OutputService5TestShapeOutputService5TestCaseOperation1Output { 1061 s.ListMember = v 1062 return s 1063 } 1064 1065 // OutputService6ProtocolTest provides the API operation methods for making requests to 1066 // . See this package's package overview docs 1067 // for details on the service. 1068 // 1069 // OutputService6ProtocolTest methods are safe to use concurrently. It is not safe to 1070 // modify mutate any of the struct's properties though. 1071 type OutputService6ProtocolTest struct { 1072 *client.Client 1073 } 1074 1075 // New creates a new instance of the OutputService6ProtocolTest client with a session. 1076 // If additional configuration is needed for the client instance use the optional 1077 // aws.Config parameter to add your extra config. 1078 // 1079 // Example: 1080 // mySession := session.Must(session.NewSession()) 1081 // 1082 // // Create a OutputService6ProtocolTest client from just a session. 1083 // svc := outputservice6protocoltest.New(mySession) 1084 // 1085 // // Create a OutputService6ProtocolTest client with additional configuration 1086 // svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1087 func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest { 1088 c := p.ClientConfig("outputservice6protocoltest", cfgs...) 1089 return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1090 } 1091 1092 // newClient creates, initializes and returns a new service client instance. 1093 func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest { 1094 svc := &OutputService6ProtocolTest{ 1095 Client: client.New( 1096 cfg, 1097 metadata.ClientInfo{ 1098 ServiceName: "OutputService6ProtocolTest", 1099 ServiceID: "OutputService6ProtocolTest", 1100 SigningName: signingName, 1101 SigningRegion: signingRegion, 1102 PartitionID: partitionID, 1103 Endpoint: endpoint, 1104 APIVersion: "", 1105 }, 1106 handlers, 1107 ), 1108 } 1109 1110 // Handlers 1111 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1112 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1113 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1114 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1115 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1116 1117 return svc 1118 } 1119 1120 // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any 1121 // custom request initialization. 1122 func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1123 req := c.NewRequest(op, params, data) 1124 1125 return req 1126 } 1127 1128 const opOutputService6TestCaseOperation1 = "OperationName" 1129 1130 // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the 1131 // client's request for the OutputService6TestCaseOperation1 operation. The "output" return 1132 // value will be populated with the request's response once the request completes 1133 // successfully. 1134 // 1135 // Use "Send" method on the returned Request to send the API call to the service. 1136 // the "output" return value is not valid until after Send returns without error. 1137 // 1138 // See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1 1139 // API call, and error handling. 1140 // 1141 // This method is useful when you want to inject custom logic or configuration 1142 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1143 // 1144 // 1145 // // Example sending a request using the OutputService6TestCaseOperation1Request method. 1146 // req, resp := client.OutputService6TestCaseOperation1Request(params) 1147 // 1148 // err := req.Send() 1149 // if err == nil { // resp is now filled 1150 // fmt.Println(resp) 1151 // } 1152 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { 1153 op := &request.Operation{ 1154 Name: opOutputService6TestCaseOperation1, 1155 HTTPPath: "/", 1156 } 1157 1158 if input == nil { 1159 input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} 1160 } 1161 1162 output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} 1163 req = c.newRequest(op, input, output) 1164 return 1165 } 1166 1167 // OutputService6TestCaseOperation1 API operation for . 1168 // 1169 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1170 // with awserr.Error's Code and Message methods to get detailed information about 1171 // the error. 1172 // 1173 // See the AWS API reference guide for 's 1174 // API operation OutputService6TestCaseOperation1 for usage and error information. 1175 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { 1176 req, out := c.OutputService6TestCaseOperation1Request(input) 1177 return out, req.Send() 1178 } 1179 1180 // OutputService6TestCaseOperation1WithContext is the same as OutputService6TestCaseOperation1 with the addition of 1181 // the ability to pass a context and additional request options. 1182 // 1183 // See OutputService6TestCaseOperation1 for details on how to use this API operation. 1184 // 1185 // The context must be non-nil and will be used for request cancellation. If 1186 // the context is nil a panic will occur. In the future the SDK may create 1187 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1188 // for more information on using Contexts. 1189 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1WithContext(ctx aws.Context, input *OutputService6TestShapeOutputService6TestCaseOperation1Input, opts ...request.Option) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { 1190 req, out := c.OutputService6TestCaseOperation1Request(input) 1191 req.SetContext(ctx) 1192 req.ApplyOptions(opts...) 1193 return out, req.Send() 1194 } 1195 1196 type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { 1197 _ struct{} `type:"structure"` 1198 } 1199 1200 type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { 1201 _ struct{} `type:"structure"` 1202 1203 Map map[string]*OutputService6TestShapeSingleStructure `type:"map"` 1204 } 1205 1206 // SetMap sets the Map field's value. 1207 func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMap(v map[string]*OutputService6TestShapeSingleStructure) *OutputService6TestShapeOutputService6TestCaseOperation1Output { 1208 s.Map = v 1209 return s 1210 } 1211 1212 type OutputService6TestShapeSingleStructure struct { 1213 _ struct{} `type:"structure"` 1214 1215 Foo *string `locationName:"foo" type:"string"` 1216 } 1217 1218 // SetFoo sets the Foo field's value. 1219 func (s *OutputService6TestShapeSingleStructure) SetFoo(v string) *OutputService6TestShapeSingleStructure { 1220 s.Foo = &v 1221 return s 1222 } 1223 1224 // OutputService7ProtocolTest provides the API operation methods for making requests to 1225 // . See this package's package overview docs 1226 // for details on the service. 1227 // 1228 // OutputService7ProtocolTest methods are safe to use concurrently. It is not safe to 1229 // modify mutate any of the struct's properties though. 1230 type OutputService7ProtocolTest struct { 1231 *client.Client 1232 } 1233 1234 // New creates a new instance of the OutputService7ProtocolTest client with a session. 1235 // If additional configuration is needed for the client instance use the optional 1236 // aws.Config parameter to add your extra config. 1237 // 1238 // Example: 1239 // mySession := session.Must(session.NewSession()) 1240 // 1241 // // Create a OutputService7ProtocolTest client from just a session. 1242 // svc := outputservice7protocoltest.New(mySession) 1243 // 1244 // // Create a OutputService7ProtocolTest client with additional configuration 1245 // svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1246 func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { 1247 c := p.ClientConfig("outputservice7protocoltest", cfgs...) 1248 return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1249 } 1250 1251 // newClient creates, initializes and returns a new service client instance. 1252 func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { 1253 svc := &OutputService7ProtocolTest{ 1254 Client: client.New( 1255 cfg, 1256 metadata.ClientInfo{ 1257 ServiceName: "OutputService7ProtocolTest", 1258 ServiceID: "OutputService7ProtocolTest", 1259 SigningName: signingName, 1260 SigningRegion: signingRegion, 1261 PartitionID: partitionID, 1262 Endpoint: endpoint, 1263 APIVersion: "", 1264 }, 1265 handlers, 1266 ), 1267 } 1268 1269 // Handlers 1270 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1271 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1272 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1273 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1274 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1275 1276 return svc 1277 } 1278 1279 // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any 1280 // custom request initialization. 1281 func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1282 req := c.NewRequest(op, params, data) 1283 1284 return req 1285 } 1286 1287 const opOutputService7TestCaseOperation1 = "OperationName" 1288 1289 // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the 1290 // client's request for the OutputService7TestCaseOperation1 operation. The "output" return 1291 // value will be populated with the request's response once the request completes 1292 // successfully. 1293 // 1294 // Use "Send" method on the returned Request to send the API call to the service. 1295 // the "output" return value is not valid until after Send returns without error. 1296 // 1297 // See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1 1298 // API call, and error handling. 1299 // 1300 // This method is useful when you want to inject custom logic or configuration 1301 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1302 // 1303 // 1304 // // Example sending a request using the OutputService7TestCaseOperation1Request method. 1305 // req, resp := client.OutputService7TestCaseOperation1Request(params) 1306 // 1307 // err := req.Send() 1308 // if err == nil { // resp is now filled 1309 // fmt.Println(resp) 1310 // } 1311 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { 1312 op := &request.Operation{ 1313 Name: opOutputService7TestCaseOperation1, 1314 HTTPPath: "/", 1315 } 1316 1317 if input == nil { 1318 input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} 1319 } 1320 1321 output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} 1322 req = c.newRequest(op, input, output) 1323 return 1324 } 1325 1326 // OutputService7TestCaseOperation1 API operation for . 1327 // 1328 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1329 // with awserr.Error's Code and Message methods to get detailed information about 1330 // the error. 1331 // 1332 // See the AWS API reference guide for 's 1333 // API operation OutputService7TestCaseOperation1 for usage and error information. 1334 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { 1335 req, out := c.OutputService7TestCaseOperation1Request(input) 1336 return out, req.Send() 1337 } 1338 1339 // OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of 1340 // the ability to pass a context and additional request options. 1341 // 1342 // See OutputService7TestCaseOperation1 for details on how to use this API operation. 1343 // 1344 // The context must be non-nil and will be used for request cancellation. If 1345 // the context is nil a panic will occur. In the future the SDK may create 1346 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1347 // for more information on using Contexts. 1348 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { 1349 req, out := c.OutputService7TestCaseOperation1Request(input) 1350 req.SetContext(ctx) 1351 req.ApplyOptions(opts...) 1352 return out, req.Send() 1353 } 1354 1355 type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { 1356 _ struct{} `type:"structure"` 1357 } 1358 1359 type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { 1360 _ struct{} `type:"structure"` 1361 1362 Map map[string]*string `type:"map" flattened:"true"` 1363 } 1364 1365 // SetMap sets the Map field's value. 1366 func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { 1367 s.Map = v 1368 return s 1369 } 1370 1371 // OutputService8ProtocolTest provides the API operation methods for making requests to 1372 // . See this package's package overview docs 1373 // for details on the service. 1374 // 1375 // OutputService8ProtocolTest methods are safe to use concurrently. It is not safe to 1376 // modify mutate any of the struct's properties though. 1377 type OutputService8ProtocolTest struct { 1378 *client.Client 1379 } 1380 1381 // New creates a new instance of the OutputService8ProtocolTest client with a session. 1382 // If additional configuration is needed for the client instance use the optional 1383 // aws.Config parameter to add your extra config. 1384 // 1385 // Example: 1386 // mySession := session.Must(session.NewSession()) 1387 // 1388 // // Create a OutputService8ProtocolTest client from just a session. 1389 // svc := outputservice8protocoltest.New(mySession) 1390 // 1391 // // Create a OutputService8ProtocolTest client with additional configuration 1392 // svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1393 func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest { 1394 c := p.ClientConfig("outputservice8protocoltest", cfgs...) 1395 return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1396 } 1397 1398 // newClient creates, initializes and returns a new service client instance. 1399 func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest { 1400 svc := &OutputService8ProtocolTest{ 1401 Client: client.New( 1402 cfg, 1403 metadata.ClientInfo{ 1404 ServiceName: "OutputService8ProtocolTest", 1405 ServiceID: "OutputService8ProtocolTest", 1406 SigningName: signingName, 1407 SigningRegion: signingRegion, 1408 PartitionID: partitionID, 1409 Endpoint: endpoint, 1410 APIVersion: "", 1411 }, 1412 handlers, 1413 ), 1414 } 1415 1416 // Handlers 1417 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1418 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1419 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1420 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1421 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1422 1423 return svc 1424 } 1425 1426 // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any 1427 // custom request initialization. 1428 func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1429 req := c.NewRequest(op, params, data) 1430 1431 return req 1432 } 1433 1434 const opOutputService8TestCaseOperation1 = "OperationName" 1435 1436 // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the 1437 // client's request for the OutputService8TestCaseOperation1 operation. The "output" return 1438 // value will be populated with the request's response once the request completes 1439 // successfully. 1440 // 1441 // Use "Send" method on the returned Request to send the API call to the service. 1442 // the "output" return value is not valid until after Send returns without error. 1443 // 1444 // See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1 1445 // API call, and error handling. 1446 // 1447 // This method is useful when you want to inject custom logic or configuration 1448 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1449 // 1450 // 1451 // // Example sending a request using the OutputService8TestCaseOperation1Request method. 1452 // req, resp := client.OutputService8TestCaseOperation1Request(params) 1453 // 1454 // err := req.Send() 1455 // if err == nil { // resp is now filled 1456 // fmt.Println(resp) 1457 // } 1458 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { 1459 op := &request.Operation{ 1460 Name: opOutputService8TestCaseOperation1, 1461 HTTPPath: "/", 1462 } 1463 1464 if input == nil { 1465 input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} 1466 } 1467 1468 output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} 1469 req = c.newRequest(op, input, output) 1470 return 1471 } 1472 1473 // OutputService8TestCaseOperation1 API operation for . 1474 // 1475 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1476 // with awserr.Error's Code and Message methods to get detailed information about 1477 // the error. 1478 // 1479 // See the AWS API reference guide for 's 1480 // API operation OutputService8TestCaseOperation1 for usage and error information. 1481 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { 1482 req, out := c.OutputService8TestCaseOperation1Request(input) 1483 return out, req.Send() 1484 } 1485 1486 // OutputService8TestCaseOperation1WithContext is the same as OutputService8TestCaseOperation1 with the addition of 1487 // the ability to pass a context and additional request options. 1488 // 1489 // See OutputService8TestCaseOperation1 for details on how to use this API operation. 1490 // 1491 // The context must be non-nil and will be used for request cancellation. If 1492 // the context is nil a panic will occur. In the future the SDK may create 1493 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1494 // for more information on using Contexts. 1495 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation1Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { 1496 req, out := c.OutputService8TestCaseOperation1Request(input) 1497 req.SetContext(ctx) 1498 req.ApplyOptions(opts...) 1499 return out, req.Send() 1500 } 1501 1502 type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { 1503 _ struct{} `type:"structure"` 1504 } 1505 1506 type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { 1507 _ struct{} `type:"structure"` 1508 1509 Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map"` 1510 } 1511 1512 // SetMap sets the Map field's value. 1513 func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetMap(v map[string]*string) *OutputService8TestShapeOutputService8TestCaseOperation1Output { 1514 s.Map = v 1515 return s 1516 } 1517 1518 // OutputService9ProtocolTest provides the API operation methods for making requests to 1519 // . See this package's package overview docs 1520 // for details on the service. 1521 // 1522 // OutputService9ProtocolTest methods are safe to use concurrently. It is not safe to 1523 // modify mutate any of the struct's properties though. 1524 type OutputService9ProtocolTest struct { 1525 *client.Client 1526 } 1527 1528 // New creates a new instance of the OutputService9ProtocolTest client with a session. 1529 // If additional configuration is needed for the client instance use the optional 1530 // aws.Config parameter to add your extra config. 1531 // 1532 // Example: 1533 // mySession := session.Must(session.NewSession()) 1534 // 1535 // // Create a OutputService9ProtocolTest client from just a session. 1536 // svc := outputservice9protocoltest.New(mySession) 1537 // 1538 // // Create a OutputService9ProtocolTest client with additional configuration 1539 // svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1540 func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest { 1541 c := p.ClientConfig("outputservice9protocoltest", cfgs...) 1542 return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1543 } 1544 1545 // newClient creates, initializes and returns a new service client instance. 1546 func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService9ProtocolTest { 1547 svc := &OutputService9ProtocolTest{ 1548 Client: client.New( 1549 cfg, 1550 metadata.ClientInfo{ 1551 ServiceName: "OutputService9ProtocolTest", 1552 ServiceID: "OutputService9ProtocolTest", 1553 SigningName: signingName, 1554 SigningRegion: signingRegion, 1555 PartitionID: partitionID, 1556 Endpoint: endpoint, 1557 APIVersion: "", 1558 }, 1559 handlers, 1560 ), 1561 } 1562 1563 // Handlers 1564 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1565 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1566 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1567 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1568 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1569 1570 return svc 1571 } 1572 1573 // newRequest creates a new request for a OutputService9ProtocolTest operation and runs any 1574 // custom request initialization. 1575 func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1576 req := c.NewRequest(op, params, data) 1577 1578 return req 1579 } 1580 1581 const opOutputService9TestCaseOperation1 = "OperationName" 1582 1583 // OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the 1584 // client's request for the OutputService9TestCaseOperation1 operation. The "output" return 1585 // value will be populated with the request's response once the request completes 1586 // successfully. 1587 // 1588 // Use "Send" method on the returned Request to send the API call to the service. 1589 // the "output" return value is not valid until after Send returns without error. 1590 // 1591 // See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1 1592 // API call, and error handling. 1593 // 1594 // This method is useful when you want to inject custom logic or configuration 1595 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1596 // 1597 // 1598 // // Example sending a request using the OutputService9TestCaseOperation1Request method. 1599 // req, resp := client.OutputService9TestCaseOperation1Request(params) 1600 // 1601 // err := req.Send() 1602 // if err == nil { // resp is now filled 1603 // fmt.Println(resp) 1604 // } 1605 func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) { 1606 op := &request.Operation{ 1607 Name: opOutputService9TestCaseOperation1, 1608 HTTPPath: "/", 1609 } 1610 1611 if input == nil { 1612 input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{} 1613 } 1614 1615 output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{} 1616 req = c.newRequest(op, input, output) 1617 return 1618 } 1619 1620 // OutputService9TestCaseOperation1 API operation for . 1621 // 1622 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1623 // with awserr.Error's Code and Message methods to get detailed information about 1624 // the error. 1625 // 1626 // See the AWS API reference guide for 's 1627 // API operation OutputService9TestCaseOperation1 for usage and error information. 1628 func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { 1629 req, out := c.OutputService9TestCaseOperation1Request(input) 1630 return out, req.Send() 1631 } 1632 1633 // OutputService9TestCaseOperation1WithContext is the same as OutputService9TestCaseOperation1 with the addition of 1634 // the ability to pass a context and additional request options. 1635 // 1636 // See OutputService9TestCaseOperation1 for details on how to use this API operation. 1637 // 1638 // The context must be non-nil and will be used for request cancellation. If 1639 // the context is nil a panic will occur. In the future the SDK may create 1640 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1641 // for more information on using Contexts. 1642 func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1WithContext(ctx aws.Context, input *OutputService9TestShapeOutputService9TestCaseOperation1Input, opts ...request.Option) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { 1643 req, out := c.OutputService9TestCaseOperation1Request(input) 1644 req.SetContext(ctx) 1645 req.ApplyOptions(opts...) 1646 return out, req.Send() 1647 } 1648 1649 type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { 1650 _ struct{} `type:"structure"` 1651 } 1652 1653 type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { 1654 _ struct{} `type:"structure" payload:"Data"` 1655 1656 Data *OutputService9TestShapeSingleStructure `type:"structure"` 1657 1658 Header *string `location:"header" locationName:"X-Foo" type:"string"` 1659 } 1660 1661 // SetData sets the Data field's value. 1662 func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetData(v *OutputService9TestShapeSingleStructure) *OutputService9TestShapeOutputService9TestCaseOperation1Output { 1663 s.Data = v 1664 return s 1665 } 1666 1667 // SetHeader sets the Header field's value. 1668 func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetHeader(v string) *OutputService9TestShapeOutputService9TestCaseOperation1Output { 1669 s.Header = &v 1670 return s 1671 } 1672 1673 type OutputService9TestShapeSingleStructure struct { 1674 _ struct{} `type:"structure"` 1675 1676 Foo *string `type:"string"` 1677 } 1678 1679 // SetFoo sets the Foo field's value. 1680 func (s *OutputService9TestShapeSingleStructure) SetFoo(v string) *OutputService9TestShapeSingleStructure { 1681 s.Foo = &v 1682 return s 1683 } 1684 1685 // OutputService10ProtocolTest provides the API operation methods for making requests to 1686 // . See this package's package overview docs 1687 // for details on the service. 1688 // 1689 // OutputService10ProtocolTest methods are safe to use concurrently. It is not safe to 1690 // modify mutate any of the struct's properties though. 1691 type OutputService10ProtocolTest struct { 1692 *client.Client 1693 } 1694 1695 // New creates a new instance of the OutputService10ProtocolTest client with a session. 1696 // If additional configuration is needed for the client instance use the optional 1697 // aws.Config parameter to add your extra config. 1698 // 1699 // Example: 1700 // mySession := session.Must(session.NewSession()) 1701 // 1702 // // Create a OutputService10ProtocolTest client from just a session. 1703 // svc := outputservice10protocoltest.New(mySession) 1704 // 1705 // // Create a OutputService10ProtocolTest client with additional configuration 1706 // svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1707 func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest { 1708 c := p.ClientConfig("outputservice10protocoltest", cfgs...) 1709 return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1710 } 1711 1712 // newClient creates, initializes and returns a new service client instance. 1713 func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService10ProtocolTest { 1714 svc := &OutputService10ProtocolTest{ 1715 Client: client.New( 1716 cfg, 1717 metadata.ClientInfo{ 1718 ServiceName: "OutputService10ProtocolTest", 1719 ServiceID: "OutputService10ProtocolTest", 1720 SigningName: signingName, 1721 SigningRegion: signingRegion, 1722 PartitionID: partitionID, 1723 Endpoint: endpoint, 1724 APIVersion: "", 1725 }, 1726 handlers, 1727 ), 1728 } 1729 1730 // Handlers 1731 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1732 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1733 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1734 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1735 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1736 1737 return svc 1738 } 1739 1740 // newRequest creates a new request for a OutputService10ProtocolTest operation and runs any 1741 // custom request initialization. 1742 func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1743 req := c.NewRequest(op, params, data) 1744 1745 return req 1746 } 1747 1748 const opOutputService10TestCaseOperation1 = "OperationName" 1749 1750 // OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the 1751 // client's request for the OutputService10TestCaseOperation1 operation. The "output" return 1752 // value will be populated with the request's response once the request completes 1753 // successfully. 1754 // 1755 // Use "Send" method on the returned Request to send the API call to the service. 1756 // the "output" return value is not valid until after Send returns without error. 1757 // 1758 // See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1 1759 // API call, and error handling. 1760 // 1761 // This method is useful when you want to inject custom logic or configuration 1762 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1763 // 1764 // 1765 // // Example sending a request using the OutputService10TestCaseOperation1Request method. 1766 // req, resp := client.OutputService10TestCaseOperation1Request(params) 1767 // 1768 // err := req.Send() 1769 // if err == nil { // resp is now filled 1770 // fmt.Println(resp) 1771 // } 1772 func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) { 1773 op := &request.Operation{ 1774 Name: opOutputService10TestCaseOperation1, 1775 HTTPPath: "/", 1776 } 1777 1778 if input == nil { 1779 input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{} 1780 } 1781 1782 output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{} 1783 req = c.newRequest(op, input, output) 1784 return 1785 } 1786 1787 // OutputService10TestCaseOperation1 API operation for . 1788 // 1789 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1790 // with awserr.Error's Code and Message methods to get detailed information about 1791 // the error. 1792 // 1793 // See the AWS API reference guide for 's 1794 // API operation OutputService10TestCaseOperation1 for usage and error information. 1795 func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { 1796 req, out := c.OutputService10TestCaseOperation1Request(input) 1797 return out, req.Send() 1798 } 1799 1800 // OutputService10TestCaseOperation1WithContext is the same as OutputService10TestCaseOperation1 with the addition of 1801 // the ability to pass a context and additional request options. 1802 // 1803 // See OutputService10TestCaseOperation1 for details on how to use this API operation. 1804 // 1805 // The context must be non-nil and will be used for request cancellation. If 1806 // the context is nil a panic will occur. In the future the SDK may create 1807 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1808 // for more information on using Contexts. 1809 func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1WithContext(ctx aws.Context, input *OutputService10TestShapeOutputService10TestCaseOperation1Input, opts ...request.Option) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { 1810 req, out := c.OutputService10TestCaseOperation1Request(input) 1811 req.SetContext(ctx) 1812 req.ApplyOptions(opts...) 1813 return out, req.Send() 1814 } 1815 1816 type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { 1817 _ struct{} `type:"structure"` 1818 } 1819 1820 type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { 1821 _ struct{} `type:"structure" payload:"Stream"` 1822 1823 Stream []byte `type:"blob"` 1824 } 1825 1826 // SetStream sets the Stream field's value. 1827 func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetStream(v []byte) *OutputService10TestShapeOutputService10TestCaseOperation1Output { 1828 s.Stream = v 1829 return s 1830 } 1831 1832 // OutputService11ProtocolTest provides the API operation methods for making requests to 1833 // . See this package's package overview docs 1834 // for details on the service. 1835 // 1836 // OutputService11ProtocolTest methods are safe to use concurrently. It is not safe to 1837 // modify mutate any of the struct's properties though. 1838 type OutputService11ProtocolTest struct { 1839 *client.Client 1840 } 1841 1842 // New creates a new instance of the OutputService11ProtocolTest client with a session. 1843 // If additional configuration is needed for the client instance use the optional 1844 // aws.Config parameter to add your extra config. 1845 // 1846 // Example: 1847 // mySession := session.Must(session.NewSession()) 1848 // 1849 // // Create a OutputService11ProtocolTest client from just a session. 1850 // svc := outputservice11protocoltest.New(mySession) 1851 // 1852 // // Create a OutputService11ProtocolTest client with additional configuration 1853 // svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1854 func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest { 1855 c := p.ClientConfig("outputservice11protocoltest", cfgs...) 1856 return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1857 } 1858 1859 // newClient creates, initializes and returns a new service client instance. 1860 func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService11ProtocolTest { 1861 svc := &OutputService11ProtocolTest{ 1862 Client: client.New( 1863 cfg, 1864 metadata.ClientInfo{ 1865 ServiceName: "OutputService11ProtocolTest", 1866 ServiceID: "OutputService11ProtocolTest", 1867 SigningName: signingName, 1868 SigningRegion: signingRegion, 1869 PartitionID: partitionID, 1870 Endpoint: endpoint, 1871 APIVersion: "", 1872 }, 1873 handlers, 1874 ), 1875 } 1876 1877 // Handlers 1878 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1879 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 1880 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 1881 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 1882 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 1883 1884 return svc 1885 } 1886 1887 // newRequest creates a new request for a OutputService11ProtocolTest operation and runs any 1888 // custom request initialization. 1889 func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1890 req := c.NewRequest(op, params, data) 1891 1892 return req 1893 } 1894 1895 const opOutputService11TestCaseOperation1 = "OperationName" 1896 1897 // OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the 1898 // client's request for the OutputService11TestCaseOperation1 operation. The "output" return 1899 // value will be populated with the request's response once the request completes 1900 // successfully. 1901 // 1902 // Use "Send" method on the returned Request to send the API call to the service. 1903 // the "output" return value is not valid until after Send returns without error. 1904 // 1905 // See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1 1906 // API call, and error handling. 1907 // 1908 // This method is useful when you want to inject custom logic or configuration 1909 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1910 // 1911 // 1912 // // Example sending a request using the OutputService11TestCaseOperation1Request method. 1913 // req, resp := client.OutputService11TestCaseOperation1Request(params) 1914 // 1915 // err := req.Send() 1916 // if err == nil { // resp is now filled 1917 // fmt.Println(resp) 1918 // } 1919 func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) { 1920 op := &request.Operation{ 1921 Name: opOutputService11TestCaseOperation1, 1922 HTTPPath: "/", 1923 } 1924 1925 if input == nil { 1926 input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{} 1927 } 1928 1929 output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{} 1930 req = c.newRequest(op, input, output) 1931 return 1932 } 1933 1934 // OutputService11TestCaseOperation1 API operation for . 1935 // 1936 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1937 // with awserr.Error's Code and Message methods to get detailed information about 1938 // the error. 1939 // 1940 // See the AWS API reference guide for 's 1941 // API operation OutputService11TestCaseOperation1 for usage and error information. 1942 func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { 1943 req, out := c.OutputService11TestCaseOperation1Request(input) 1944 return out, req.Send() 1945 } 1946 1947 // OutputService11TestCaseOperation1WithContext is the same as OutputService11TestCaseOperation1 with the addition of 1948 // the ability to pass a context and additional request options. 1949 // 1950 // See OutputService11TestCaseOperation1 for details on how to use this API operation. 1951 // 1952 // The context must be non-nil and will be used for request cancellation. If 1953 // the context is nil a panic will occur. In the future the SDK may create 1954 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1955 // for more information on using Contexts. 1956 func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1WithContext(ctx aws.Context, input *OutputService11TestShapeOutputService11TestCaseOperation1Input, opts ...request.Option) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { 1957 req, out := c.OutputService11TestCaseOperation1Request(input) 1958 req.SetContext(ctx) 1959 req.ApplyOptions(opts...) 1960 return out, req.Send() 1961 } 1962 1963 type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { 1964 _ struct{} `type:"structure"` 1965 } 1966 1967 type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { 1968 _ struct{} `type:"structure"` 1969 1970 Char *string `location:"header" locationName:"x-char" type:"character"` 1971 1972 Double *float64 `location:"header" locationName:"x-double" type:"double"` 1973 1974 FalseBool *bool `location:"header" locationName:"x-false-bool" type:"boolean"` 1975 1976 Float *float64 `location:"header" locationName:"x-float" type:"float"` 1977 1978 Integer *int64 `location:"header" locationName:"x-int" type:"integer"` 1979 1980 Long *int64 `location:"header" locationName:"x-long" type:"long"` 1981 1982 Str *string `location:"header" locationName:"x-str" type:"string"` 1983 1984 Timestamp *time.Time `location:"header" locationName:"x-timestamp" type:"timestamp"` 1985 1986 TrueBool *bool `location:"header" locationName:"x-true-bool" type:"boolean"` 1987 } 1988 1989 // SetChar sets the Char field's value. 1990 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetChar(v string) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 1991 s.Char = &v 1992 return s 1993 } 1994 1995 // SetDouble sets the Double field's value. 1996 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetDouble(v float64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 1997 s.Double = &v 1998 return s 1999 } 2000 2001 // SetFalseBool sets the FalseBool field's value. 2002 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetFalseBool(v bool) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2003 s.FalseBool = &v 2004 return s 2005 } 2006 2007 // SetFloat sets the Float field's value. 2008 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetFloat(v float64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2009 s.Float = &v 2010 return s 2011 } 2012 2013 // SetInteger sets the Integer field's value. 2014 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetInteger(v int64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2015 s.Integer = &v 2016 return s 2017 } 2018 2019 // SetLong sets the Long field's value. 2020 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetLong(v int64) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2021 s.Long = &v 2022 return s 2023 } 2024 2025 // SetStr sets the Str field's value. 2026 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetStr(v string) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2027 s.Str = &v 2028 return s 2029 } 2030 2031 // SetTimestamp sets the Timestamp field's value. 2032 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetTimestamp(v time.Time) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2033 s.Timestamp = &v 2034 return s 2035 } 2036 2037 // SetTrueBool sets the TrueBool field's value. 2038 func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetTrueBool(v bool) *OutputService11TestShapeOutputService11TestCaseOperation1Output { 2039 s.TrueBool = &v 2040 return s 2041 } 2042 2043 // OutputService12ProtocolTest provides the API operation methods for making requests to 2044 // . See this package's package overview docs 2045 // for details on the service. 2046 // 2047 // OutputService12ProtocolTest methods are safe to use concurrently. It is not safe to 2048 // modify mutate any of the struct's properties though. 2049 type OutputService12ProtocolTest struct { 2050 *client.Client 2051 } 2052 2053 // New creates a new instance of the OutputService12ProtocolTest client with a session. 2054 // If additional configuration is needed for the client instance use the optional 2055 // aws.Config parameter to add your extra config. 2056 // 2057 // Example: 2058 // mySession := session.Must(session.NewSession()) 2059 // 2060 // // Create a OutputService12ProtocolTest client from just a session. 2061 // svc := outputservice12protocoltest.New(mySession) 2062 // 2063 // // Create a OutputService12ProtocolTest client with additional configuration 2064 // svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 2065 func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest { 2066 c := p.ClientConfig("outputservice12protocoltest", cfgs...) 2067 return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 2068 } 2069 2070 // newClient creates, initializes and returns a new service client instance. 2071 func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService12ProtocolTest { 2072 svc := &OutputService12ProtocolTest{ 2073 Client: client.New( 2074 cfg, 2075 metadata.ClientInfo{ 2076 ServiceName: "OutputService12ProtocolTest", 2077 ServiceID: "OutputService12ProtocolTest", 2078 SigningName: signingName, 2079 SigningRegion: signingRegion, 2080 PartitionID: partitionID, 2081 Endpoint: endpoint, 2082 APIVersion: "", 2083 }, 2084 handlers, 2085 ), 2086 } 2087 2088 // Handlers 2089 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 2090 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 2091 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 2092 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 2093 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 2094 2095 return svc 2096 } 2097 2098 // newRequest creates a new request for a OutputService12ProtocolTest operation and runs any 2099 // custom request initialization. 2100 func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 2101 req := c.NewRequest(op, params, data) 2102 2103 return req 2104 } 2105 2106 const opOutputService12TestCaseOperation1 = "OperationName" 2107 2108 // OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the 2109 // client's request for the OutputService12TestCaseOperation1 operation. The "output" return 2110 // value will be populated with the request's response once the request completes 2111 // successfully. 2112 // 2113 // Use "Send" method on the returned Request to send the API call to the service. 2114 // the "output" return value is not valid until after Send returns without error. 2115 // 2116 // See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1 2117 // API call, and error handling. 2118 // 2119 // This method is useful when you want to inject custom logic or configuration 2120 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2121 // 2122 // 2123 // // Example sending a request using the OutputService12TestCaseOperation1Request method. 2124 // req, resp := client.OutputService12TestCaseOperation1Request(params) 2125 // 2126 // err := req.Send() 2127 // if err == nil { // resp is now filled 2128 // fmt.Println(resp) 2129 // } 2130 func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) { 2131 op := &request.Operation{ 2132 Name: opOutputService12TestCaseOperation1, 2133 HTTPPath: "/", 2134 } 2135 2136 if input == nil { 2137 input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{} 2138 } 2139 2140 output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{} 2141 req = c.newRequest(op, input, output) 2142 return 2143 } 2144 2145 // OutputService12TestCaseOperation1 API operation for . 2146 // 2147 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2148 // with awserr.Error's Code and Message methods to get detailed information about 2149 // the error. 2150 // 2151 // See the AWS API reference guide for 's 2152 // API operation OutputService12TestCaseOperation1 for usage and error information. 2153 func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { 2154 req, out := c.OutputService12TestCaseOperation1Request(input) 2155 return out, req.Send() 2156 } 2157 2158 // OutputService12TestCaseOperation1WithContext is the same as OutputService12TestCaseOperation1 with the addition of 2159 // the ability to pass a context and additional request options. 2160 // 2161 // See OutputService12TestCaseOperation1 for details on how to use this API operation. 2162 // 2163 // The context must be non-nil and will be used for request cancellation. If 2164 // the context is nil a panic will occur. In the future the SDK may create 2165 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2166 // for more information on using Contexts. 2167 func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1WithContext(ctx aws.Context, input *OutputService12TestShapeOutputService12TestCaseOperation1Input, opts ...request.Option) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { 2168 req, out := c.OutputService12TestCaseOperation1Request(input) 2169 req.SetContext(ctx) 2170 req.ApplyOptions(opts...) 2171 return out, req.Send() 2172 } 2173 2174 type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { 2175 _ struct{} `type:"structure"` 2176 } 2177 2178 type OutputService12TestShapeOutputService12TestCaseOperation1Output struct { 2179 _ struct{} `type:"structure"` 2180 2181 Foo *string `type:"string"` 2182 } 2183 2184 // SetFoo sets the Foo field's value. 2185 func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) SetFoo(v string) *OutputService12TestShapeOutputService12TestCaseOperation1Output { 2186 s.Foo = &v 2187 return s 2188 } 2189 2190 // OutputService13ProtocolTest provides the API operation methods for making requests to 2191 // . See this package's package overview docs 2192 // for details on the service. 2193 // 2194 // OutputService13ProtocolTest methods are safe to use concurrently. It is not safe to 2195 // modify mutate any of the struct's properties though. 2196 type OutputService13ProtocolTest struct { 2197 *client.Client 2198 } 2199 2200 // New creates a new instance of the OutputService13ProtocolTest client with a session. 2201 // If additional configuration is needed for the client instance use the optional 2202 // aws.Config parameter to add your extra config. 2203 // 2204 // Example: 2205 // mySession := session.Must(session.NewSession()) 2206 // 2207 // // Create a OutputService13ProtocolTest client from just a session. 2208 // svc := outputservice13protocoltest.New(mySession) 2209 // 2210 // // Create a OutputService13ProtocolTest client with additional configuration 2211 // svc := outputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 2212 func NewOutputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService13ProtocolTest { 2213 c := p.ClientConfig("outputservice13protocoltest", cfgs...) 2214 return newOutputService13ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 2215 } 2216 2217 // newClient creates, initializes and returns a new service client instance. 2218 func newOutputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService13ProtocolTest { 2219 svc := &OutputService13ProtocolTest{ 2220 Client: client.New( 2221 cfg, 2222 metadata.ClientInfo{ 2223 ServiceName: "OutputService13ProtocolTest", 2224 ServiceID: "OutputService13ProtocolTest", 2225 SigningName: signingName, 2226 SigningRegion: signingRegion, 2227 PartitionID: partitionID, 2228 Endpoint: endpoint, 2229 APIVersion: "", 2230 }, 2231 handlers, 2232 ), 2233 } 2234 2235 // Handlers 2236 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 2237 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 2238 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 2239 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 2240 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 2241 2242 return svc 2243 } 2244 2245 // newRequest creates a new request for a OutputService13ProtocolTest operation and runs any 2246 // custom request initialization. 2247 func (c *OutputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 2248 req := c.NewRequest(op, params, data) 2249 2250 return req 2251 } 2252 2253 const opOutputService13TestCaseOperation1 = "OperationName" 2254 2255 // OutputService13TestCaseOperation1Request generates a "aws/request.Request" representing the 2256 // client's request for the OutputService13TestCaseOperation1 operation. The "output" return 2257 // value will be populated with the request's response once the request completes 2258 // successfully. 2259 // 2260 // Use "Send" method on the returned Request to send the API call to the service. 2261 // the "output" return value is not valid until after Send returns without error. 2262 // 2263 // See OutputService13TestCaseOperation1 for more information on using the OutputService13TestCaseOperation1 2264 // API call, and error handling. 2265 // 2266 // This method is useful when you want to inject custom logic or configuration 2267 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2268 // 2269 // 2270 // // Example sending a request using the OutputService13TestCaseOperation1Request method. 2271 // req, resp := client.OutputService13TestCaseOperation1Request(params) 2272 // 2273 // err := req.Send() 2274 // if err == nil { // resp is now filled 2275 // fmt.Println(resp) 2276 // } 2277 func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *request.Request, output *OutputService13TestShapeOutputService13TestCaseOperation1Output) { 2278 op := &request.Operation{ 2279 Name: opOutputService13TestCaseOperation1, 2280 HTTPPath: "/", 2281 } 2282 2283 if input == nil { 2284 input = &OutputService13TestShapeOutputService13TestCaseOperation1Input{} 2285 } 2286 2287 output = &OutputService13TestShapeOutputService13TestCaseOperation1Output{} 2288 req = c.newRequest(op, input, output) 2289 return 2290 } 2291 2292 // OutputService13TestCaseOperation1 API operation for . 2293 // 2294 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2295 // with awserr.Error's Code and Message methods to get detailed information about 2296 // the error. 2297 // 2298 // See the AWS API reference guide for 's 2299 // API operation OutputService13TestCaseOperation1 for usage and error information. 2300 func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputService13TestCaseOperation1Output, error) { 2301 req, out := c.OutputService13TestCaseOperation1Request(input) 2302 return out, req.Send() 2303 } 2304 2305 // OutputService13TestCaseOperation1WithContext is the same as OutputService13TestCaseOperation1 with the addition of 2306 // the ability to pass a context and additional request options. 2307 // 2308 // See OutputService13TestCaseOperation1 for details on how to use this API operation. 2309 // 2310 // The context must be non-nil and will be used for request cancellation. If 2311 // the context is nil a panic will occur. In the future the SDK may create 2312 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2313 // for more information on using Contexts. 2314 func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1WithContext(ctx aws.Context, input *OutputService13TestShapeOutputService13TestCaseOperation1Input, opts ...request.Option) (*OutputService13TestShapeOutputService13TestCaseOperation1Output, error) { 2315 req, out := c.OutputService13TestCaseOperation1Request(input) 2316 req.SetContext(ctx) 2317 req.ApplyOptions(opts...) 2318 return out, req.Send() 2319 } 2320 2321 type OutputService13TestShapeOutputService13TestCaseOperation1Input struct { 2322 _ struct{} `type:"structure"` 2323 } 2324 2325 type OutputService13TestShapeOutputService13TestCaseOperation1Output struct { 2326 _ struct{} `type:"structure"` 2327 2328 StructMember *OutputService13TestShapeTimeContainer `type:"structure"` 2329 2330 TimeArg *time.Time `type:"timestamp"` 2331 2332 TimeArgInHeader *time.Time `location:"header" locationName:"x-amz-timearg" type:"timestamp"` 2333 2334 TimeCustom *time.Time `type:"timestamp" timestampFormat:"rfc822"` 2335 2336 TimeCustomInHeader *time.Time `location:"header" locationName:"x-amz-timecustom" type:"timestamp" timestampFormat:"unixTimestamp"` 2337 2338 TimeFormat *time.Time `type:"timestamp" timestampFormat:"unixTimestamp"` 2339 2340 TimeFormatInHeader *time.Time `location:"header" locationName:"x-amz-timeformat" type:"timestamp" timestampFormat:"unixTimestamp"` 2341 } 2342 2343 // SetStructMember sets the StructMember field's value. 2344 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetStructMember(v *OutputService13TestShapeTimeContainer) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2345 s.StructMember = v 2346 return s 2347 } 2348 2349 // SetTimeArg sets the TimeArg field's value. 2350 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeArg(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2351 s.TimeArg = &v 2352 return s 2353 } 2354 2355 // SetTimeArgInHeader sets the TimeArgInHeader field's value. 2356 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeArgInHeader(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2357 s.TimeArgInHeader = &v 2358 return s 2359 } 2360 2361 // SetTimeCustom sets the TimeCustom field's value. 2362 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeCustom(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2363 s.TimeCustom = &v 2364 return s 2365 } 2366 2367 // SetTimeCustomInHeader sets the TimeCustomInHeader field's value. 2368 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeCustomInHeader(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2369 s.TimeCustomInHeader = &v 2370 return s 2371 } 2372 2373 // SetTimeFormat sets the TimeFormat field's value. 2374 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeFormat(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2375 s.TimeFormat = &v 2376 return s 2377 } 2378 2379 // SetTimeFormatInHeader sets the TimeFormatInHeader field's value. 2380 func (s *OutputService13TestShapeOutputService13TestCaseOperation1Output) SetTimeFormatInHeader(v time.Time) *OutputService13TestShapeOutputService13TestCaseOperation1Output { 2381 s.TimeFormatInHeader = &v 2382 return s 2383 } 2384 2385 type OutputService13TestShapeTimeContainer struct { 2386 _ struct{} `type:"structure"` 2387 2388 Bar *time.Time `locationName:"bar" type:"timestamp" timestampFormat:"unixTimestamp"` 2389 2390 Foo *time.Time `locationName:"foo" type:"timestamp"` 2391 } 2392 2393 // SetBar sets the Bar field's value. 2394 func (s *OutputService13TestShapeTimeContainer) SetBar(v time.Time) *OutputService13TestShapeTimeContainer { 2395 s.Bar = &v 2396 return s 2397 } 2398 2399 // SetFoo sets the Foo field's value. 2400 func (s *OutputService13TestShapeTimeContainer) SetFoo(v time.Time) *OutputService13TestShapeTimeContainer { 2401 s.Foo = &v 2402 return s 2403 } 2404 2405 // OutputService14ProtocolTest provides the API operation methods for making requests to 2406 // . See this package's package overview docs 2407 // for details on the service. 2408 // 2409 // OutputService14ProtocolTest methods are safe to use concurrently. It is not safe to 2410 // modify mutate any of the struct's properties though. 2411 type OutputService14ProtocolTest struct { 2412 *client.Client 2413 } 2414 2415 // New creates a new instance of the OutputService14ProtocolTest client with a session. 2416 // If additional configuration is needed for the client instance use the optional 2417 // aws.Config parameter to add your extra config. 2418 // 2419 // Example: 2420 // mySession := session.Must(session.NewSession()) 2421 // 2422 // // Create a OutputService14ProtocolTest client from just a session. 2423 // svc := outputservice14protocoltest.New(mySession) 2424 // 2425 // // Create a OutputService14ProtocolTest client with additional configuration 2426 // svc := outputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 2427 func NewOutputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService14ProtocolTest { 2428 c := p.ClientConfig("outputservice14protocoltest", cfgs...) 2429 return newOutputService14ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 2430 } 2431 2432 // newClient creates, initializes and returns a new service client instance. 2433 func newOutputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService14ProtocolTest { 2434 svc := &OutputService14ProtocolTest{ 2435 Client: client.New( 2436 cfg, 2437 metadata.ClientInfo{ 2438 ServiceName: "OutputService14ProtocolTest", 2439 ServiceID: "OutputService14ProtocolTest", 2440 SigningName: signingName, 2441 SigningRegion: signingRegion, 2442 PartitionID: partitionID, 2443 Endpoint: endpoint, 2444 APIVersion: "", 2445 }, 2446 handlers, 2447 ), 2448 } 2449 2450 // Handlers 2451 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 2452 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 2453 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 2454 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 2455 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 2456 2457 return svc 2458 } 2459 2460 // newRequest creates a new request for a OutputService14ProtocolTest operation and runs any 2461 // custom request initialization. 2462 func (c *OutputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 2463 req := c.NewRequest(op, params, data) 2464 2465 return req 2466 } 2467 2468 const opOutputService14TestCaseOperation1 = "OperationName" 2469 2470 // OutputService14TestCaseOperation1Request generates a "aws/request.Request" representing the 2471 // client's request for the OutputService14TestCaseOperation1 operation. The "output" return 2472 // value will be populated with the request's response once the request completes 2473 // successfully. 2474 // 2475 // Use "Send" method on the returned Request to send the API call to the service. 2476 // the "output" return value is not valid until after Send returns without error. 2477 // 2478 // See OutputService14TestCaseOperation1 for more information on using the OutputService14TestCaseOperation1 2479 // API call, and error handling. 2480 // 2481 // This method is useful when you want to inject custom logic or configuration 2482 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2483 // 2484 // 2485 // // Example sending a request using the OutputService14TestCaseOperation1Request method. 2486 // req, resp := client.OutputService14TestCaseOperation1Request(params) 2487 // 2488 // err := req.Send() 2489 // if err == nil { // resp is now filled 2490 // fmt.Println(resp) 2491 // } 2492 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *request.Request, output *OutputService14TestShapeOutputService14TestCaseOperation1Output) { 2493 op := &request.Operation{ 2494 Name: opOutputService14TestCaseOperation1, 2495 HTTPMethod: "POST", 2496 HTTPPath: "/path", 2497 } 2498 2499 if input == nil { 2500 input = &OutputService14TestShapeOutputService14TestCaseOperation1Input{} 2501 } 2502 2503 output = &OutputService14TestShapeOutputService14TestCaseOperation1Output{} 2504 req = c.newRequest(op, input, output) 2505 return 2506 } 2507 2508 // OutputService14TestCaseOperation1 API operation for . 2509 // 2510 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2511 // with awserr.Error's Code and Message methods to get detailed information about 2512 // the error. 2513 // 2514 // See the AWS API reference guide for 's 2515 // API operation OutputService14TestCaseOperation1 for usage and error information. 2516 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputService14TestCaseOperation1Output, error) { 2517 req, out := c.OutputService14TestCaseOperation1Request(input) 2518 return out, req.Send() 2519 } 2520 2521 // OutputService14TestCaseOperation1WithContext is the same as OutputService14TestCaseOperation1 with the addition of 2522 // the ability to pass a context and additional request options. 2523 // 2524 // See OutputService14TestCaseOperation1 for details on how to use this API operation. 2525 // 2526 // The context must be non-nil and will be used for request cancellation. If 2527 // the context is nil a panic will occur. In the future the SDK may create 2528 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2529 // for more information on using Contexts. 2530 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1WithContext(ctx aws.Context, input *OutputService14TestShapeOutputService14TestCaseOperation1Input, opts ...request.Option) (*OutputService14TestShapeOutputService14TestCaseOperation1Output, error) { 2531 req, out := c.OutputService14TestCaseOperation1Request(input) 2532 req.SetContext(ctx) 2533 req.ApplyOptions(opts...) 2534 return out, req.Send() 2535 } 2536 2537 const opOutputService14TestCaseOperation2 = "OperationName" 2538 2539 // OutputService14TestCaseOperation2Request generates a "aws/request.Request" representing the 2540 // client's request for the OutputService14TestCaseOperation2 operation. The "output" return 2541 // value will be populated with the request's response once the request completes 2542 // successfully. 2543 // 2544 // Use "Send" method on the returned Request to send the API call to the service. 2545 // the "output" return value is not valid until after Send returns without error. 2546 // 2547 // See OutputService14TestCaseOperation2 for more information on using the OutputService14TestCaseOperation2 2548 // API call, and error handling. 2549 // 2550 // This method is useful when you want to inject custom logic or configuration 2551 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2552 // 2553 // 2554 // // Example sending a request using the OutputService14TestCaseOperation2Request method. 2555 // req, resp := client.OutputService14TestCaseOperation2Request(params) 2556 // 2557 // err := req.Send() 2558 // if err == nil { // resp is now filled 2559 // fmt.Println(resp) 2560 // } 2561 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation2Request(input *OutputService14TestShapeOutputService14TestCaseOperation2Input) (req *request.Request, output *OutputService14TestShapeOutputService14TestCaseOperation2Output) { 2562 op := &request.Operation{ 2563 Name: opOutputService14TestCaseOperation2, 2564 HTTPMethod: "POST", 2565 HTTPPath: "/path", 2566 } 2567 2568 if input == nil { 2569 input = &OutputService14TestShapeOutputService14TestCaseOperation2Input{} 2570 } 2571 2572 output = &OutputService14TestShapeOutputService14TestCaseOperation2Output{} 2573 req = c.newRequest(op, input, output) 2574 req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2575 return 2576 } 2577 2578 // OutputService14TestCaseOperation2 API operation for . 2579 // 2580 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2581 // with awserr.Error's Code and Message methods to get detailed information about 2582 // the error. 2583 // 2584 // See the AWS API reference guide for 's 2585 // API operation OutputService14TestCaseOperation2 for usage and error information. 2586 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation2(input *OutputService14TestShapeOutputService14TestCaseOperation2Input) (*OutputService14TestShapeOutputService14TestCaseOperation2Output, error) { 2587 req, out := c.OutputService14TestCaseOperation2Request(input) 2588 return out, req.Send() 2589 } 2590 2591 // OutputService14TestCaseOperation2WithContext is the same as OutputService14TestCaseOperation2 with the addition of 2592 // the ability to pass a context and additional request options. 2593 // 2594 // See OutputService14TestCaseOperation2 for details on how to use this API operation. 2595 // 2596 // The context must be non-nil and will be used for request cancellation. If 2597 // the context is nil a panic will occur. In the future the SDK may create 2598 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2599 // for more information on using Contexts. 2600 func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation2WithContext(ctx aws.Context, input *OutputService14TestShapeOutputService14TestCaseOperation2Input, opts ...request.Option) (*OutputService14TestShapeOutputService14TestCaseOperation2Output, error) { 2601 req, out := c.OutputService14TestCaseOperation2Request(input) 2602 req.SetContext(ctx) 2603 req.ApplyOptions(opts...) 2604 return out, req.Send() 2605 } 2606 2607 type OutputService14TestShapeOutputService14TestCaseOperation1Input struct { 2608 _ struct{} `type:"structure"` 2609 } 2610 2611 type OutputService14TestShapeOutputService14TestCaseOperation1Output struct { 2612 _ struct{} `type:"structure"` 2613 2614 FooEnum *string `type:"string" enum:"OutputService14TestShapeRESTJSONEnumType"` 2615 2616 HeaderEnum *string `location:"header" locationName:"x-amz-enum" type:"string" enum:"OutputService14TestShapeRESTJSONEnumType"` 2617 2618 ListEnums []*string `type:"list"` 2619 } 2620 2621 // SetFooEnum sets the FooEnum field's value. 2622 func (s *OutputService14TestShapeOutputService14TestCaseOperation1Output) SetFooEnum(v string) *OutputService14TestShapeOutputService14TestCaseOperation1Output { 2623 s.FooEnum = &v 2624 return s 2625 } 2626 2627 // SetHeaderEnum sets the HeaderEnum field's value. 2628 func (s *OutputService14TestShapeOutputService14TestCaseOperation1Output) SetHeaderEnum(v string) *OutputService14TestShapeOutputService14TestCaseOperation1Output { 2629 s.HeaderEnum = &v 2630 return s 2631 } 2632 2633 // SetListEnums sets the ListEnums field's value. 2634 func (s *OutputService14TestShapeOutputService14TestCaseOperation1Output) SetListEnums(v []*string) *OutputService14TestShapeOutputService14TestCaseOperation1Output { 2635 s.ListEnums = v 2636 return s 2637 } 2638 2639 type OutputService14TestShapeOutputService14TestCaseOperation2Input struct { 2640 _ struct{} `locationName:"OutputShape" type:"structure"` 2641 2642 FooEnum *string `type:"string" enum:"OutputService14TestShapeRESTJSONEnumType"` 2643 2644 HeaderEnum *string `location:"header" locationName:"x-amz-enum" type:"string" enum:"OutputService14TestShapeRESTJSONEnumType"` 2645 2646 ListEnums []*string `type:"list"` 2647 } 2648 2649 // SetFooEnum sets the FooEnum field's value. 2650 func (s *OutputService14TestShapeOutputService14TestCaseOperation2Input) SetFooEnum(v string) *OutputService14TestShapeOutputService14TestCaseOperation2Input { 2651 s.FooEnum = &v 2652 return s 2653 } 2654 2655 // SetHeaderEnum sets the HeaderEnum field's value. 2656 func (s *OutputService14TestShapeOutputService14TestCaseOperation2Input) SetHeaderEnum(v string) *OutputService14TestShapeOutputService14TestCaseOperation2Input { 2657 s.HeaderEnum = &v 2658 return s 2659 } 2660 2661 // SetListEnums sets the ListEnums field's value. 2662 func (s *OutputService14TestShapeOutputService14TestCaseOperation2Input) SetListEnums(v []*string) *OutputService14TestShapeOutputService14TestCaseOperation2Input { 2663 s.ListEnums = v 2664 return s 2665 } 2666 2667 type OutputService14TestShapeOutputService14TestCaseOperation2Output struct { 2668 _ struct{} `type:"structure"` 2669 } 2670 2671 const ( 2672 // RESTJSONEnumTypeFoo is a OutputService14TestShapeRESTJSONEnumType enum value 2673 RESTJSONEnumTypeFoo = "foo" 2674 2675 // RESTJSONEnumTypeBar is a OutputService14TestShapeRESTJSONEnumType enum value 2676 RESTJSONEnumTypeBar = "bar" 2677 2678 // RESTJSONEnumType0 is a OutputService14TestShapeRESTJSONEnumType enum value 2679 RESTJSONEnumType0 = "0" 2680 2681 // RESTJSONEnumType1 is a OutputService14TestShapeRESTJSONEnumType enum value 2682 RESTJSONEnumType1 = "1" 2683 ) 2684 2685 // OutputService14TestShapeRESTJSONEnumType_Values returns all elements of the OutputService14TestShapeRESTJSONEnumType enum 2686 func OutputService14TestShapeRESTJSONEnumType_Values() []string { 2687 return []string{ 2688 RESTJSONEnumTypeFoo, 2689 RESTJSONEnumTypeBar, 2690 RESTJSONEnumType0, 2691 RESTJSONEnumType1, 2692 } 2693 } 2694 2695 // OutputService15ProtocolTest provides the API operation methods for making requests to 2696 // . See this package's package overview docs 2697 // for details on the service. 2698 // 2699 // OutputService15ProtocolTest methods are safe to use concurrently. It is not safe to 2700 // modify mutate any of the struct's properties though. 2701 type OutputService15ProtocolTest struct { 2702 *client.Client 2703 } 2704 2705 // New creates a new instance of the OutputService15ProtocolTest client with a session. 2706 // If additional configuration is needed for the client instance use the optional 2707 // aws.Config parameter to add your extra config. 2708 // 2709 // Example: 2710 // mySession := session.Must(session.NewSession()) 2711 // 2712 // // Create a OutputService15ProtocolTest client from just a session. 2713 // svc := outputservice15protocoltest.New(mySession) 2714 // 2715 // // Create a OutputService15ProtocolTest client with additional configuration 2716 // svc := outputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 2717 func NewOutputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService15ProtocolTest { 2718 c := p.ClientConfig("outputservice15protocoltest", cfgs...) 2719 return newOutputService15ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 2720 } 2721 2722 // newClient creates, initializes and returns a new service client instance. 2723 func newOutputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService15ProtocolTest { 2724 svc := &OutputService15ProtocolTest{ 2725 Client: client.New( 2726 cfg, 2727 metadata.ClientInfo{ 2728 ServiceName: "OutputService15ProtocolTest", 2729 ServiceID: "OutputService15ProtocolTest", 2730 SigningName: signingName, 2731 SigningRegion: signingRegion, 2732 PartitionID: partitionID, 2733 Endpoint: endpoint, 2734 APIVersion: "", 2735 }, 2736 handlers, 2737 ), 2738 } 2739 2740 // Handlers 2741 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 2742 svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) 2743 svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) 2744 svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) 2745 svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) 2746 2747 return svc 2748 } 2749 2750 // newRequest creates a new request for a OutputService15ProtocolTest operation and runs any 2751 // custom request initialization. 2752 func (c *OutputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 2753 req := c.NewRequest(op, params, data) 2754 2755 return req 2756 } 2757 2758 const opOutputService15TestCaseOperation1 = "OperationName" 2759 2760 // OutputService15TestCaseOperation1Request generates a "aws/request.Request" representing the 2761 // client's request for the OutputService15TestCaseOperation1 operation. The "output" return 2762 // value will be populated with the request's response once the request completes 2763 // successfully. 2764 // 2765 // Use "Send" method on the returned Request to send the API call to the service. 2766 // the "output" return value is not valid until after Send returns without error. 2767 // 2768 // See OutputService15TestCaseOperation1 for more information on using the OutputService15TestCaseOperation1 2769 // API call, and error handling. 2770 // 2771 // This method is useful when you want to inject custom logic or configuration 2772 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 2773 // 2774 // 2775 // // Example sending a request using the OutputService15TestCaseOperation1Request method. 2776 // req, resp := client.OutputService15TestCaseOperation1Request(params) 2777 // 2778 // err := req.Send() 2779 // if err == nil { // resp is now filled 2780 // fmt.Println(resp) 2781 // } 2782 func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1Request(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (req *request.Request, output *OutputService15TestShapeOutputService15TestCaseOperation1Output) { 2783 op := &request.Operation{ 2784 Name: opOutputService15TestCaseOperation1, 2785 HTTPMethod: "GET", 2786 HTTPPath: "/path", 2787 } 2788 2789 if input == nil { 2790 input = &OutputService15TestShapeOutputService15TestCaseOperation1Input{} 2791 } 2792 2793 output = &OutputService15TestShapeOutputService15TestCaseOperation1Output{} 2794 req = c.newRequest(op, input, output) 2795 return 2796 } 2797 2798 // OutputService15TestCaseOperation1 API operation for . 2799 // 2800 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2801 // with awserr.Error's Code and Message methods to get detailed information about 2802 // the error. 2803 // 2804 // See the AWS API reference guide for 's 2805 // API operation OutputService15TestCaseOperation1 for usage and error information. 2806 func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (*OutputService15TestShapeOutputService15TestCaseOperation1Output, error) { 2807 req, out := c.OutputService15TestCaseOperation1Request(input) 2808 return out, req.Send() 2809 } 2810 2811 // OutputService15TestCaseOperation1WithContext is the same as OutputService15TestCaseOperation1 with the addition of 2812 // the ability to pass a context and additional request options. 2813 // 2814 // See OutputService15TestCaseOperation1 for details on how to use this API operation. 2815 // 2816 // The context must be non-nil and will be used for request cancellation. If 2817 // the context is nil a panic will occur. In the future the SDK may create 2818 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2819 // for more information on using Contexts. 2820 func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1WithContext(ctx aws.Context, input *OutputService15TestShapeOutputService15TestCaseOperation1Input, opts ...request.Option) (*OutputService15TestShapeOutputService15TestCaseOperation1Output, error) { 2821 req, out := c.OutputService15TestCaseOperation1Request(input) 2822 req.SetContext(ctx) 2823 req.ApplyOptions(opts...) 2824 return out, req.Send() 2825 } 2826 2827 type OutputService15TestShapeItemDetailShape struct { 2828 _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` 2829 2830 ID *string `type:"string"` 2831 2832 // Type is a required field 2833 Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"OutputService15TestShapeItemType"` 2834 } 2835 2836 // SetID sets the ID field's value. 2837 func (s *OutputService15TestShapeItemDetailShape) SetID(v string) *OutputService15TestShapeItemDetailShape { 2838 s.ID = &v 2839 return s 2840 } 2841 2842 // SetType sets the Type field's value. 2843 func (s *OutputService15TestShapeItemDetailShape) SetType(v string) *OutputService15TestShapeItemDetailShape { 2844 s.Type = &v 2845 return s 2846 } 2847 2848 type OutputService15TestShapeItemShape struct { 2849 _ struct{} `type:"structure"` 2850 2851 ItemDetail *OutputService15TestShapeItemDetailShape `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` 2852 } 2853 2854 // SetItemDetail sets the ItemDetail field's value. 2855 func (s *OutputService15TestShapeItemShape) SetItemDetail(v *OutputService15TestShapeItemDetailShape) *OutputService15TestShapeItemShape { 2856 s.ItemDetail = v 2857 return s 2858 } 2859 2860 type OutputService15TestShapeOutputService15TestCaseOperation1Input struct { 2861 _ struct{} `type:"structure"` 2862 } 2863 2864 type OutputService15TestShapeOutputService15TestCaseOperation1Output struct { 2865 _ struct{} `type:"structure"` 2866 2867 ListItems []*OutputService15TestShapeItemShape `locationName:"ItemsList" locationNameList:"Item" type:"list"` 2868 } 2869 2870 // SetListItems sets the ListItems field's value. 2871 func (s *OutputService15TestShapeOutputService15TestCaseOperation1Output) SetListItems(v []*OutputService15TestShapeItemShape) *OutputService15TestShapeOutputService15TestCaseOperation1Output { 2872 s.ListItems = v 2873 return s 2874 } 2875 2876 const ( 2877 // ItemTypeType1 is a OutputService15TestShapeItemType enum value 2878 ItemTypeType1 = "Type1" 2879 2880 // ItemTypeType2 is a OutputService15TestShapeItemType enum value 2881 ItemTypeType2 = "Type2" 2882 2883 // ItemTypeType3 is a OutputService15TestShapeItemType enum value 2884 ItemTypeType3 = "Type3" 2885 ) 2886 2887 // OutputService15TestShapeItemType_Values returns all elements of the OutputService15TestShapeItemType enum 2888 func OutputService15TestShapeItemType_Values() []string { 2889 return []string{ 2890 ItemTypeType1, 2891 ItemTypeType2, 2892 ItemTypeType3, 2893 } 2894 } 2895 2896 // 2897 // Tests begin here 2898 // 2899 2900 func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { 2901 svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2902 2903 buf := bytes.NewReader([]byte("<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp><Blob>aGVsbG8=</Blob></OperationNameResponse>")) 2904 req, out := svc.OutputService1TestCaseOperation1Request(nil) 2905 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 2906 2907 // set headers 2908 req.HTTPResponse.Header.Set("BlobHeader", "aGVsbG8=") 2909 req.HTTPResponse.Header.Set("ImaHeader", "test") 2910 req.HTTPResponse.Header.Set("X-Foo", "abc") 2911 2912 // unmarshal response 2913 req.Handlers.UnmarshalMeta.Run(req) 2914 req.Handlers.Unmarshal.Run(req) 2915 if req.Error != nil { 2916 t.Errorf("expect not error, got %v", req.Error) 2917 } 2918 2919 // assert response 2920 if out == nil { 2921 t.Errorf("expect not to be nil") 2922 } 2923 if e, a := "hello", string(out.Blob); e != a { 2924 t.Errorf("expect %v, got %v", e, a) 2925 } 2926 if e, a := "hello", string(out.BlobHeader); e != a { 2927 t.Errorf("expect %v, got %v", e, a) 2928 } 2929 if e, a := "a", *out.Char; e != a { 2930 t.Errorf("expect %v, got %v", e, a) 2931 } 2932 if e, a := 1.3, *out.Double; e != a { 2933 t.Errorf("expect %v, got %v", e, a) 2934 } 2935 if e, a := false, *out.FalseBool; e != a { 2936 t.Errorf("expect %v, got %v", e, a) 2937 } 2938 if e, a := 1.2, *out.Float; e != a { 2939 t.Errorf("expect %v, got %v", e, a) 2940 } 2941 if e, a := "test", *out.ImaHeader; e != a { 2942 t.Errorf("expect %v, got %v", e, a) 2943 } 2944 if e, a := "abc", *out.ImaHeaderLocation; e != a { 2945 t.Errorf("expect %v, got %v", e, a) 2946 } 2947 if e, a := int64(200), *out.Long; e != a { 2948 t.Errorf("expect %v, got %v", e, a) 2949 } 2950 if e, a := int64(123), *out.Num; e != a { 2951 t.Errorf("expect %v, got %v", e, a) 2952 } 2953 if e, a := "myname", *out.Str; e != a { 2954 t.Errorf("expect %v, got %v", e, a) 2955 } 2956 if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.UTC().String(); e != a { 2957 t.Errorf("expect %v, got %v", e, a) 2958 } 2959 if e, a := true, *out.TrueBool; e != a { 2960 t.Errorf("expect %v, got %v", e, a) 2961 } 2962 2963 } 2964 2965 func TestOutputService1ProtocolTestScalarMembersCase2(t *testing.T) { 2966 svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 2967 2968 buf := bytes.NewReader([]byte("<OperationNameResponse><Str></Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResponse>")) 2969 req, out := svc.OutputService1TestCaseOperation2Request(nil) 2970 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 2971 2972 // set headers 2973 req.HTTPResponse.Header.Set("ImaHeader", "test") 2974 req.HTTPResponse.Header.Set("X-Foo", "abc") 2975 2976 // unmarshal response 2977 req.Handlers.UnmarshalMeta.Run(req) 2978 req.Handlers.Unmarshal.Run(req) 2979 if req.Error != nil { 2980 t.Errorf("expect not error, got %v", req.Error) 2981 } 2982 2983 // assert response 2984 if out == nil { 2985 t.Errorf("expect not to be nil") 2986 } 2987 if e, a := "a", *out.Char; e != a { 2988 t.Errorf("expect %v, got %v", e, a) 2989 } 2990 if e, a := 1.3, *out.Double; e != a { 2991 t.Errorf("expect %v, got %v", e, a) 2992 } 2993 if e, a := false, *out.FalseBool; e != a { 2994 t.Errorf("expect %v, got %v", e, a) 2995 } 2996 if e, a := 1.2, *out.Float; e != a { 2997 t.Errorf("expect %v, got %v", e, a) 2998 } 2999 if e, a := "test", *out.ImaHeader; e != a { 3000 t.Errorf("expect %v, got %v", e, a) 3001 } 3002 if e, a := "abc", *out.ImaHeaderLocation; e != a { 3003 t.Errorf("expect %v, got %v", e, a) 3004 } 3005 if e, a := int64(200), *out.Long; e != a { 3006 t.Errorf("expect %v, got %v", e, a) 3007 } 3008 if e, a := int64(123), *out.Num; e != a { 3009 t.Errorf("expect %v, got %v", e, a) 3010 } 3011 if e, a := "", *out.Str; e != a { 3012 t.Errorf("expect %v, got %v", e, a) 3013 } 3014 if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.UTC().String(); e != a { 3015 t.Errorf("expect %v, got %v", e, a) 3016 } 3017 if e, a := true, *out.TrueBool; e != a { 3018 t.Errorf("expect %v, got %v", e, a) 3019 } 3020 3021 } 3022 3023 func TestOutputService2ProtocolTestBlobCase1(t *testing.T) { 3024 svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3025 3026 buf := bytes.NewReader([]byte("<OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult>")) 3027 req, out := svc.OutputService2TestCaseOperation1Request(nil) 3028 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3029 3030 // set headers 3031 3032 // unmarshal response 3033 req.Handlers.UnmarshalMeta.Run(req) 3034 req.Handlers.Unmarshal.Run(req) 3035 if req.Error != nil { 3036 t.Errorf("expect not error, got %v", req.Error) 3037 } 3038 3039 // assert response 3040 if out == nil { 3041 t.Errorf("expect not to be nil") 3042 } 3043 if e, a := "value", string(out.Blob); e != a { 3044 t.Errorf("expect %v, got %v", e, a) 3045 } 3046 3047 } 3048 3049 func TestOutputService3ProtocolTestListsCase1(t *testing.T) { 3050 svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3051 3052 buf := bytes.NewReader([]byte("<OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult>")) 3053 req, out := svc.OutputService3TestCaseOperation1Request(nil) 3054 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3055 3056 // set headers 3057 3058 // unmarshal response 3059 req.Handlers.UnmarshalMeta.Run(req) 3060 req.Handlers.Unmarshal.Run(req) 3061 if req.Error != nil { 3062 t.Errorf("expect not error, got %v", req.Error) 3063 } 3064 3065 // assert response 3066 if out == nil { 3067 t.Errorf("expect not to be nil") 3068 } 3069 if e, a := "abc", *out.ListMember[0]; e != a { 3070 t.Errorf("expect %v, got %v", e, a) 3071 } 3072 if e, a := "123", *out.ListMember[1]; e != a { 3073 t.Errorf("expect %v, got %v", e, a) 3074 } 3075 3076 } 3077 3078 func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) { 3079 svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3080 3081 buf := bytes.NewReader([]byte("<OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult>")) 3082 req, out := svc.OutputService4TestCaseOperation1Request(nil) 3083 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3084 3085 // set headers 3086 3087 // unmarshal response 3088 req.Handlers.UnmarshalMeta.Run(req) 3089 req.Handlers.Unmarshal.Run(req) 3090 if req.Error != nil { 3091 t.Errorf("expect not error, got %v", req.Error) 3092 } 3093 3094 // assert response 3095 if out == nil { 3096 t.Errorf("expect not to be nil") 3097 } 3098 if e, a := "abc", *out.ListMember[0]; e != a { 3099 t.Errorf("expect %v, got %v", e, a) 3100 } 3101 if e, a := "123", *out.ListMember[1]; e != a { 3102 t.Errorf("expect %v, got %v", e, a) 3103 } 3104 3105 } 3106 3107 func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) { 3108 svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3109 3110 buf := bytes.NewReader([]byte("<OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult>")) 3111 req, out := svc.OutputService5TestCaseOperation1Request(nil) 3112 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3113 3114 // set headers 3115 3116 // unmarshal response 3117 req.Handlers.UnmarshalMeta.Run(req) 3118 req.Handlers.Unmarshal.Run(req) 3119 if req.Error != nil { 3120 t.Errorf("expect not error, got %v", req.Error) 3121 } 3122 3123 // assert response 3124 if out == nil { 3125 t.Errorf("expect not to be nil") 3126 } 3127 if e, a := "abc", *out.ListMember[0]; e != a { 3128 t.Errorf("expect %v, got %v", e, a) 3129 } 3130 if e, a := "123", *out.ListMember[1]; e != a { 3131 t.Errorf("expect %v, got %v", e, a) 3132 } 3133 3134 } 3135 3136 func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) { 3137 svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3138 3139 buf := bytes.NewReader([]byte("<OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult>")) 3140 req, out := svc.OutputService6TestCaseOperation1Request(nil) 3141 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3142 3143 // set headers 3144 3145 // unmarshal response 3146 req.Handlers.UnmarshalMeta.Run(req) 3147 req.Handlers.Unmarshal.Run(req) 3148 if req.Error != nil { 3149 t.Errorf("expect not error, got %v", req.Error) 3150 } 3151 3152 // assert response 3153 if out == nil { 3154 t.Errorf("expect not to be nil") 3155 } 3156 if e, a := "bam", *out.Map["baz"].Foo; e != a { 3157 t.Errorf("expect %v, got %v", e, a) 3158 } 3159 if e, a := "bar", *out.Map["qux"].Foo; e != a { 3160 t.Errorf("expect %v, got %v", e, a) 3161 } 3162 3163 } 3164 3165 func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) { 3166 svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3167 3168 buf := bytes.NewReader([]byte("<OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult>")) 3169 req, out := svc.OutputService7TestCaseOperation1Request(nil) 3170 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3171 3172 // set headers 3173 3174 // unmarshal response 3175 req.Handlers.UnmarshalMeta.Run(req) 3176 req.Handlers.Unmarshal.Run(req) 3177 if req.Error != nil { 3178 t.Errorf("expect not error, got %v", req.Error) 3179 } 3180 3181 // assert response 3182 if out == nil { 3183 t.Errorf("expect not to be nil") 3184 } 3185 if e, a := "bam", *out.Map["baz"]; e != a { 3186 t.Errorf("expect %v, got %v", e, a) 3187 } 3188 if e, a := "bar", *out.Map["qux"]; e != a { 3189 t.Errorf("expect %v, got %v", e, a) 3190 } 3191 3192 } 3193 3194 func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) { 3195 svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3196 3197 buf := bytes.NewReader([]byte("<OperationNameResult><Map><entry><foo>qux</foo><bar>bar</bar></entry><entry><foo>baz</foo><bar>bam</bar></entry></Map></OperationNameResult>")) 3198 req, out := svc.OutputService8TestCaseOperation1Request(nil) 3199 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3200 3201 // set headers 3202 3203 // unmarshal response 3204 req.Handlers.UnmarshalMeta.Run(req) 3205 req.Handlers.Unmarshal.Run(req) 3206 if req.Error != nil { 3207 t.Errorf("expect not error, got %v", req.Error) 3208 } 3209 3210 // assert response 3211 if out == nil { 3212 t.Errorf("expect not to be nil") 3213 } 3214 if e, a := "bam", *out.Map["baz"]; e != a { 3215 t.Errorf("expect %v, got %v", e, a) 3216 } 3217 if e, a := "bar", *out.Map["qux"]; e != a { 3218 t.Errorf("expect %v, got %v", e, a) 3219 } 3220 3221 } 3222 3223 func TestOutputService9ProtocolTestXMLPayloadCase1(t *testing.T) { 3224 svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3225 3226 buf := bytes.NewReader([]byte("<OperationNameResponse><Foo>abc</Foo></OperationNameResponse>")) 3227 req, out := svc.OutputService9TestCaseOperation1Request(nil) 3228 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3229 3230 // set headers 3231 req.HTTPResponse.Header.Set("X-Foo", "baz") 3232 3233 // unmarshal response 3234 req.Handlers.UnmarshalMeta.Run(req) 3235 req.Handlers.Unmarshal.Run(req) 3236 if req.Error != nil { 3237 t.Errorf("expect not error, got %v", req.Error) 3238 } 3239 3240 // assert response 3241 if out == nil { 3242 t.Errorf("expect not to be nil") 3243 } 3244 if e, a := "abc", *out.Data.Foo; e != a { 3245 t.Errorf("expect %v, got %v", e, a) 3246 } 3247 if e, a := "baz", *out.Header; e != a { 3248 t.Errorf("expect %v, got %v", e, a) 3249 } 3250 3251 } 3252 3253 func TestOutputService10ProtocolTestStreamingPayloadCase1(t *testing.T) { 3254 svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3255 3256 buf := bytes.NewReader([]byte("abc")) 3257 req, out := svc.OutputService10TestCaseOperation1Request(nil) 3258 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3259 3260 // set headers 3261 3262 // unmarshal response 3263 req.Handlers.UnmarshalMeta.Run(req) 3264 req.Handlers.Unmarshal.Run(req) 3265 if req.Error != nil { 3266 t.Errorf("expect not error, got %v", req.Error) 3267 } 3268 3269 // assert response 3270 if out == nil { 3271 t.Errorf("expect not to be nil") 3272 } 3273 if e, a := "abc", string(out.Stream); e != a { 3274 t.Errorf("expect %v, got %v", e, a) 3275 } 3276 3277 } 3278 3279 func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) { 3280 svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3281 3282 buf := bytes.NewReader([]byte("")) 3283 req, out := svc.OutputService11TestCaseOperation1Request(nil) 3284 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3285 3286 // set headers 3287 req.HTTPResponse.Header.Set("x-char", "a") 3288 req.HTTPResponse.Header.Set("x-double", "1.5") 3289 req.HTTPResponse.Header.Set("x-false-bool", "false") 3290 req.HTTPResponse.Header.Set("x-float", "1.5") 3291 req.HTTPResponse.Header.Set("x-int", "1") 3292 req.HTTPResponse.Header.Set("x-long", "100") 3293 req.HTTPResponse.Header.Set("x-str", "string") 3294 req.HTTPResponse.Header.Set("x-timestamp", "Sun, 25 Jan 2015 08:00:00 GMT") 3295 req.HTTPResponse.Header.Set("x-true-bool", "true") 3296 3297 // unmarshal response 3298 req.Handlers.UnmarshalMeta.Run(req) 3299 req.Handlers.Unmarshal.Run(req) 3300 if req.Error != nil { 3301 t.Errorf("expect not error, got %v", req.Error) 3302 } 3303 3304 // assert response 3305 if out == nil { 3306 t.Errorf("expect not to be nil") 3307 } 3308 if e, a := "a", *out.Char; e != a { 3309 t.Errorf("expect %v, got %v", e, a) 3310 } 3311 if e, a := 1.5, *out.Double; e != a { 3312 t.Errorf("expect %v, got %v", e, a) 3313 } 3314 if e, a := false, *out.FalseBool; e != a { 3315 t.Errorf("expect %v, got %v", e, a) 3316 } 3317 if e, a := 1.5, *out.Float; e != a { 3318 t.Errorf("expect %v, got %v", e, a) 3319 } 3320 if e, a := int64(1), *out.Integer; e != a { 3321 t.Errorf("expect %v, got %v", e, a) 3322 } 3323 if e, a := int64(100), *out.Long; e != a { 3324 t.Errorf("expect %v, got %v", e, a) 3325 } 3326 if e, a := "string", *out.Str; e != a { 3327 t.Errorf("expect %v, got %v", e, a) 3328 } 3329 if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.UTC().String(); e != a { 3330 t.Errorf("expect %v, got %v", e, a) 3331 } 3332 if e, a := true, *out.TrueBool; e != a { 3333 t.Errorf("expect %v, got %v", e, a) 3334 } 3335 3336 } 3337 3338 func TestOutputService12ProtocolTestEmptyStringCase1(t *testing.T) { 3339 svc := NewOutputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3340 3341 buf := bytes.NewReader([]byte("<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>")) 3342 req, out := svc.OutputService12TestCaseOperation1Request(nil) 3343 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3344 3345 // set headers 3346 3347 // unmarshal response 3348 req.Handlers.UnmarshalMeta.Run(req) 3349 req.Handlers.Unmarshal.Run(req) 3350 if req.Error != nil { 3351 t.Errorf("expect not error, got %v", req.Error) 3352 } 3353 3354 // assert response 3355 if out == nil { 3356 t.Errorf("expect not to be nil") 3357 } 3358 if e, a := "", *out.Foo; e != a { 3359 t.Errorf("expect %v, got %v", e, a) 3360 } 3361 3362 } 3363 3364 func TestOutputService13ProtocolTestTimestampMembersCase1(t *testing.T) { 3365 svc := NewOutputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3366 3367 buf := bytes.NewReader([]byte("<OperationNameResponse><StructMember><foo>2014-04-29T18:30:38Z</foo><bar>1398796238</bar></StructMember><TimeArg>2014-04-29T18:30:38Z</TimeArg><TimeCustom>Tue, 29 Apr 2014 18:30:38 GMT</TimeCustom><TimeFormat>1398796238</TimeFormat><RequestId>requestid</RequestId></OperationNameResponse>")) 3368 req, out := svc.OutputService13TestCaseOperation1Request(nil) 3369 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3370 3371 // set headers 3372 req.HTTPResponse.Header.Set("x-amz-timearg", "Tue, 29 Apr 2014 18:30:38 GMT") 3373 req.HTTPResponse.Header.Set("x-amz-timecustom", "1398796238") 3374 req.HTTPResponse.Header.Set("x-amz-timeformat", "1398796238") 3375 3376 // unmarshal response 3377 req.Handlers.UnmarshalMeta.Run(req) 3378 req.Handlers.Unmarshal.Run(req) 3379 if req.Error != nil { 3380 t.Errorf("expect not error, got %v", req.Error) 3381 } 3382 3383 // assert response 3384 if out == nil { 3385 t.Errorf("expect not to be nil") 3386 } 3387 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Bar.UTC().String(); e != a { 3388 t.Errorf("expect %v, got %v", e, a) 3389 } 3390 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.UTC().String(); e != a { 3391 t.Errorf("expect %v, got %v", e, a) 3392 } 3393 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeArg.UTC().String(); e != a { 3394 t.Errorf("expect %v, got %v", e, a) 3395 } 3396 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeArgInHeader.UTC().String(); e != a { 3397 t.Errorf("expect %v, got %v", e, a) 3398 } 3399 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeCustom.UTC().String(); e != a { 3400 t.Errorf("expect %v, got %v", e, a) 3401 } 3402 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeCustomInHeader.UTC().String(); e != a { 3403 t.Errorf("expect %v, got %v", e, a) 3404 } 3405 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeFormat.UTC().String(); e != a { 3406 t.Errorf("expect %v, got %v", e, a) 3407 } 3408 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeFormatInHeader.UTC().String(); e != a { 3409 t.Errorf("expect %v, got %v", e, a) 3410 } 3411 3412 } 3413 3414 func TestOutputService14ProtocolTestEnumCase1(t *testing.T) { 3415 svc := NewOutputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3416 3417 buf := bytes.NewReader([]byte("<OperationNameResponse><FooEnum>foo</FooEnum><ListEnums><member>0</member><member>1</member></ListEnums></OperationNameResponse>")) 3418 req, out := svc.OutputService14TestCaseOperation1Request(nil) 3419 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3420 3421 // set headers 3422 req.HTTPResponse.Header.Set("x-amz-enum", "baz") 3423 3424 // unmarshal response 3425 req.Handlers.UnmarshalMeta.Run(req) 3426 req.Handlers.Unmarshal.Run(req) 3427 if req.Error != nil { 3428 t.Errorf("expect not error, got %v", req.Error) 3429 } 3430 3431 // assert response 3432 if out == nil { 3433 t.Errorf("expect not to be nil") 3434 } 3435 if e, a := "foo", *out.FooEnum; e != a { 3436 t.Errorf("expect %v, got %v", e, a) 3437 } 3438 if e, a := "baz", *out.HeaderEnum; e != a { 3439 t.Errorf("expect %v, got %v", e, a) 3440 } 3441 if e, a := "0", *out.ListEnums[0]; e != a { 3442 t.Errorf("expect %v, got %v", e, a) 3443 } 3444 if e, a := "1", *out.ListEnums[1]; e != a { 3445 t.Errorf("expect %v, got %v", e, a) 3446 } 3447 3448 } 3449 3450 func TestOutputService14ProtocolTestEnumCase2(t *testing.T) { 3451 svc := NewOutputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3452 3453 buf := bytes.NewReader([]byte("")) 3454 req, out := svc.OutputService14TestCaseOperation2Request(nil) 3455 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3456 3457 // set headers 3458 3459 // unmarshal response 3460 req.Handlers.UnmarshalMeta.Run(req) 3461 req.Handlers.Unmarshal.Run(req) 3462 if req.Error != nil { 3463 t.Errorf("expect not error, got %v", req.Error) 3464 } 3465 3466 // assert response 3467 if out == nil { 3468 t.Errorf("expect not to be nil") 3469 } 3470 3471 } 3472 3473 func TestOutputService15ProtocolTestXMLAttributesCase1(t *testing.T) { 3474 svc := NewOutputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 3475 3476 buf := bytes.NewReader([]byte("<SomeOutputDoc xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"><ItemsList><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type1\"><ID>id1</ID></ItemDetail></Item><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type2\"><ID>id2</ID></ItemDetail></Item><Item><ItemDetail xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"Type3\"><ID>id3</ID></ItemDetail></Item></ItemsList></SomeOutputDoc>")) 3477 req, out := svc.OutputService15TestCaseOperation1Request(nil) 3478 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 3479 3480 // set headers 3481 3482 // unmarshal response 3483 req.Handlers.UnmarshalMeta.Run(req) 3484 req.Handlers.Unmarshal.Run(req) 3485 if req.Error != nil { 3486 t.Errorf("expect not error, got %v", req.Error) 3487 } 3488 3489 // assert response 3490 if out == nil { 3491 t.Errorf("expect not to be nil") 3492 } 3493 if e, a := "id1", *out.ListItems[0].ItemDetail.ID; e != a { 3494 t.Errorf("expect %v, got %v", e, a) 3495 } 3496 if e, a := "Type1", *out.ListItems[0].ItemDetail.Type; e != a { 3497 t.Errorf("expect %v, got %v", e, a) 3498 } 3499 if e, a := "id2", *out.ListItems[1].ItemDetail.ID; e != a { 3500 t.Errorf("expect %v, got %v", e, a) 3501 } 3502 if e, a := "Type2", *out.ListItems[1].ItemDetail.Type; e != a { 3503 t.Errorf("expect %v, got %v", e, a) 3504 } 3505 if e, a := "id3", *out.ListItems[2].ItemDetail.ID; e != a { 3506 t.Errorf("expect %v, got %v", e, a) 3507 } 3508 if e, a := "Type3", *out.ListItems[2].ItemDetail.Type; e != a { 3509 t.Errorf("expect %v, got %v", e, a) 3510 } 3511 3512 }