github.com/aavshr/aws-sdk-go@v1.41.3/private/protocol/jsonrpc/unmarshal_test.go (about) 1 // Code generated by models/protocol_tests/generate.go. DO NOT EDIT. 2 3 package jsonrpc_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/jsonrpc" 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(jsonrpc.BuildHandler) 97 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 98 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 99 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.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 type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { 181 _ struct{} `type:"structure"` 182 } 183 184 type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { 185 _ struct{} `type:"structure"` 186 187 Char *string `type:"character"` 188 189 Double *float64 `type:"double"` 190 191 FalseBool *bool `type:"boolean"` 192 193 Float *float64 `type:"float"` 194 195 Long *int64 `type:"long"` 196 197 Num *int64 `type:"integer"` 198 199 Str *string `type:"string"` 200 201 TrueBool *bool `type:"boolean"` 202 } 203 204 // SetChar sets the Char field's value. 205 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetChar(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 206 s.Char = &v 207 return s 208 } 209 210 // SetDouble sets the Double field's value. 211 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetDouble(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 212 s.Double = &v 213 return s 214 } 215 216 // SetFalseBool sets the FalseBool field's value. 217 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFalseBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 218 s.FalseBool = &v 219 return s 220 } 221 222 // SetFloat sets the Float field's value. 223 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetFloat(v float64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 224 s.Float = &v 225 return s 226 } 227 228 // SetLong sets the Long field's value. 229 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetLong(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 230 s.Long = &v 231 return s 232 } 233 234 // SetNum sets the Num field's value. 235 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetNum(v int64) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 236 s.Num = &v 237 return s 238 } 239 240 // SetStr sets the Str field's value. 241 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetStr(v string) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 242 s.Str = &v 243 return s 244 } 245 246 // SetTrueBool sets the TrueBool field's value. 247 func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueBool(v bool) *OutputService1TestShapeOutputService1TestCaseOperation1Output { 248 s.TrueBool = &v 249 return s 250 } 251 252 // OutputService2ProtocolTest provides the API operation methods for making requests to 253 // . See this package's package overview docs 254 // for details on the service. 255 // 256 // OutputService2ProtocolTest methods are safe to use concurrently. It is not safe to 257 // modify mutate any of the struct's properties though. 258 type OutputService2ProtocolTest struct { 259 *client.Client 260 } 261 262 // New creates a new instance of the OutputService2ProtocolTest client with a session. 263 // If additional configuration is needed for the client instance use the optional 264 // aws.Config parameter to add your extra config. 265 // 266 // Example: 267 // mySession := session.Must(session.NewSession()) 268 // 269 // // Create a OutputService2ProtocolTest client from just a session. 270 // svc := outputservice2protocoltest.New(mySession) 271 // 272 // // Create a OutputService2ProtocolTest client with additional configuration 273 // svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 274 func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest { 275 c := p.ClientConfig("outputservice2protocoltest", cfgs...) 276 return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 277 } 278 279 // newClient creates, initializes and returns a new service client instance. 280 func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService2ProtocolTest { 281 svc := &OutputService2ProtocolTest{ 282 Client: client.New( 283 cfg, 284 metadata.ClientInfo{ 285 ServiceName: "OutputService2ProtocolTest", 286 ServiceID: "OutputService2ProtocolTest", 287 SigningName: signingName, 288 SigningRegion: signingRegion, 289 PartitionID: partitionID, 290 Endpoint: endpoint, 291 APIVersion: "", 292 }, 293 handlers, 294 ), 295 } 296 297 // Handlers 298 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 299 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 300 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 301 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 302 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 303 304 return svc 305 } 306 307 // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any 308 // custom request initialization. 309 func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 310 req := c.NewRequest(op, params, data) 311 312 return req 313 } 314 315 const opOutputService2TestCaseOperation1 = "OperationName" 316 317 // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the 318 // client's request for the OutputService2TestCaseOperation1 operation. The "output" return 319 // value will be populated with the request's response once the request completes 320 // successfully. 321 // 322 // Use "Send" method on the returned Request to send the API call to the service. 323 // the "output" return value is not valid until after Send returns without error. 324 // 325 // See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1 326 // API call, and error handling. 327 // 328 // This method is useful when you want to inject custom logic or configuration 329 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 330 // 331 // 332 // // Example sending a request using the OutputService2TestCaseOperation1Request method. 333 // req, resp := client.OutputService2TestCaseOperation1Request(params) 334 // 335 // err := req.Send() 336 // if err == nil { // resp is now filled 337 // fmt.Println(resp) 338 // } 339 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { 340 op := &request.Operation{ 341 Name: opOutputService2TestCaseOperation1, 342 HTTPPath: "/", 343 } 344 345 if input == nil { 346 input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} 347 } 348 349 output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} 350 req = c.newRequest(op, input, output) 351 return 352 } 353 354 // OutputService2TestCaseOperation1 API operation for . 355 // 356 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 357 // with awserr.Error's Code and Message methods to get detailed information about 358 // the error. 359 // 360 // See the AWS API reference guide for 's 361 // API operation OutputService2TestCaseOperation1 for usage and error information. 362 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { 363 req, out := c.OutputService2TestCaseOperation1Request(input) 364 return out, req.Send() 365 } 366 367 // OutputService2TestCaseOperation1WithContext is the same as OutputService2TestCaseOperation1 with the addition of 368 // the ability to pass a context and additional request options. 369 // 370 // See OutputService2TestCaseOperation1 for details on how to use this API operation. 371 // 372 // The context must be non-nil and will be used for request cancellation. If 373 // the context is nil a panic will occur. In the future the SDK may create 374 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 375 // for more information on using Contexts. 376 func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1WithContext(ctx aws.Context, input *OutputService2TestShapeOutputService2TestCaseOperation1Input, opts ...request.Option) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { 377 req, out := c.OutputService2TestCaseOperation1Request(input) 378 req.SetContext(ctx) 379 req.ApplyOptions(opts...) 380 return out, req.Send() 381 } 382 383 type OutputService2TestShapeBlobContainer struct { 384 _ struct{} `type:"structure"` 385 386 // Foo is automatically base64 encoded/decoded by the SDK. 387 Foo []byte `locationName:"foo" type:"blob"` 388 } 389 390 // SetFoo sets the Foo field's value. 391 func (s *OutputService2TestShapeBlobContainer) SetFoo(v []byte) *OutputService2TestShapeBlobContainer { 392 s.Foo = v 393 return s 394 } 395 396 type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { 397 _ struct{} `type:"structure"` 398 } 399 400 type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { 401 _ struct{} `type:"structure"` 402 403 // BlobMember is automatically base64 encoded/decoded by the SDK. 404 BlobMember []byte `type:"blob"` 405 406 StructMember *OutputService2TestShapeBlobContainer `type:"structure"` 407 } 408 409 // SetBlobMember sets the BlobMember field's value. 410 func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlobMember(v []byte) *OutputService2TestShapeOutputService2TestCaseOperation1Output { 411 s.BlobMember = v 412 return s 413 } 414 415 // SetStructMember sets the StructMember field's value. 416 func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetStructMember(v *OutputService2TestShapeBlobContainer) *OutputService2TestShapeOutputService2TestCaseOperation1Output { 417 s.StructMember = v 418 return s 419 } 420 421 // OutputService3ProtocolTest provides the API operation methods for making requests to 422 // . See this package's package overview docs 423 // for details on the service. 424 // 425 // OutputService3ProtocolTest methods are safe to use concurrently. It is not safe to 426 // modify mutate any of the struct's properties though. 427 type OutputService3ProtocolTest struct { 428 *client.Client 429 } 430 431 // New creates a new instance of the OutputService3ProtocolTest client with a session. 432 // If additional configuration is needed for the client instance use the optional 433 // aws.Config parameter to add your extra config. 434 // 435 // Example: 436 // mySession := session.Must(session.NewSession()) 437 // 438 // // Create a OutputService3ProtocolTest client from just a session. 439 // svc := outputservice3protocoltest.New(mySession) 440 // 441 // // Create a OutputService3ProtocolTest client with additional configuration 442 // svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 443 func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest { 444 c := p.ClientConfig("outputservice3protocoltest", cfgs...) 445 return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 446 } 447 448 // newClient creates, initializes and returns a new service client instance. 449 func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService3ProtocolTest { 450 svc := &OutputService3ProtocolTest{ 451 Client: client.New( 452 cfg, 453 metadata.ClientInfo{ 454 ServiceName: "OutputService3ProtocolTest", 455 ServiceID: "OutputService3ProtocolTest", 456 SigningName: signingName, 457 SigningRegion: signingRegion, 458 PartitionID: partitionID, 459 Endpoint: endpoint, 460 APIVersion: "", 461 }, 462 handlers, 463 ), 464 } 465 466 // Handlers 467 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 468 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 469 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 470 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 471 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 472 473 return svc 474 } 475 476 // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any 477 // custom request initialization. 478 func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 479 req := c.NewRequest(op, params, data) 480 481 return req 482 } 483 484 const opOutputService3TestCaseOperation1 = "OperationName" 485 486 // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the 487 // client's request for the OutputService3TestCaseOperation1 operation. The "output" return 488 // value will be populated with the request's response once the request completes 489 // successfully. 490 // 491 // Use "Send" method on the returned Request to send the API call to the service. 492 // the "output" return value is not valid until after Send returns without error. 493 // 494 // See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1 495 // API call, and error handling. 496 // 497 // This method is useful when you want to inject custom logic or configuration 498 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 499 // 500 // 501 // // Example sending a request using the OutputService3TestCaseOperation1Request method. 502 // req, resp := client.OutputService3TestCaseOperation1Request(params) 503 // 504 // err := req.Send() 505 // if err == nil { // resp is now filled 506 // fmt.Println(resp) 507 // } 508 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { 509 op := &request.Operation{ 510 Name: opOutputService3TestCaseOperation1, 511 HTTPPath: "/", 512 } 513 514 if input == nil { 515 input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} 516 } 517 518 output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} 519 req = c.newRequest(op, input, output) 520 return 521 } 522 523 // OutputService3TestCaseOperation1 API operation for . 524 // 525 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 526 // with awserr.Error's Code and Message methods to get detailed information about 527 // the error. 528 // 529 // See the AWS API reference guide for 's 530 // API operation OutputService3TestCaseOperation1 for usage and error information. 531 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { 532 req, out := c.OutputService3TestCaseOperation1Request(input) 533 return out, req.Send() 534 } 535 536 // OutputService3TestCaseOperation1WithContext is the same as OutputService3TestCaseOperation1 with the addition of 537 // the ability to pass a context and additional request options. 538 // 539 // See OutputService3TestCaseOperation1 for details on how to use this API operation. 540 // 541 // The context must be non-nil and will be used for request cancellation. If 542 // the context is nil a panic will occur. In the future the SDK may create 543 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 544 // for more information on using Contexts. 545 func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1WithContext(ctx aws.Context, input *OutputService3TestShapeOutputService3TestCaseOperation1Input, opts ...request.Option) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { 546 req, out := c.OutputService3TestCaseOperation1Request(input) 547 req.SetContext(ctx) 548 req.ApplyOptions(opts...) 549 return out, req.Send() 550 } 551 552 type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { 553 _ struct{} `type:"structure"` 554 } 555 556 type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { 557 _ struct{} `type:"structure"` 558 559 StructMember *OutputService3TestShapeTimeContainer `type:"structure"` 560 561 TimeArg *time.Time `type:"timestamp"` 562 563 TimeCustom *time.Time `type:"timestamp" timestampFormat:"rfc822"` 564 565 TimeFormat *time.Time `type:"timestamp" timestampFormat:"iso8601"` 566 } 567 568 // SetStructMember sets the StructMember field's value. 569 func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetStructMember(v *OutputService3TestShapeTimeContainer) *OutputService3TestShapeOutputService3TestCaseOperation1Output { 570 s.StructMember = v 571 return s 572 } 573 574 // SetTimeArg sets the TimeArg field's value. 575 func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetTimeArg(v time.Time) *OutputService3TestShapeOutputService3TestCaseOperation1Output { 576 s.TimeArg = &v 577 return s 578 } 579 580 // SetTimeCustom sets the TimeCustom field's value. 581 func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetTimeCustom(v time.Time) *OutputService3TestShapeOutputService3TestCaseOperation1Output { 582 s.TimeCustom = &v 583 return s 584 } 585 586 // SetTimeFormat sets the TimeFormat field's value. 587 func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetTimeFormat(v time.Time) *OutputService3TestShapeOutputService3TestCaseOperation1Output { 588 s.TimeFormat = &v 589 return s 590 } 591 592 type OutputService3TestShapeTimeContainer struct { 593 _ struct{} `type:"structure"` 594 595 Bar *time.Time `locationName:"bar" type:"timestamp" timestampFormat:"iso8601"` 596 597 Foo *time.Time `locationName:"foo" type:"timestamp"` 598 } 599 600 // SetBar sets the Bar field's value. 601 func (s *OutputService3TestShapeTimeContainer) SetBar(v time.Time) *OutputService3TestShapeTimeContainer { 602 s.Bar = &v 603 return s 604 } 605 606 // SetFoo sets the Foo field's value. 607 func (s *OutputService3TestShapeTimeContainer) SetFoo(v time.Time) *OutputService3TestShapeTimeContainer { 608 s.Foo = &v 609 return s 610 } 611 612 // OutputService4ProtocolTest provides the API operation methods for making requests to 613 // . See this package's package overview docs 614 // for details on the service. 615 // 616 // OutputService4ProtocolTest methods are safe to use concurrently. It is not safe to 617 // modify mutate any of the struct's properties though. 618 type OutputService4ProtocolTest struct { 619 *client.Client 620 } 621 622 // New creates a new instance of the OutputService4ProtocolTest client with a session. 623 // If additional configuration is needed for the client instance use the optional 624 // aws.Config parameter to add your extra config. 625 // 626 // Example: 627 // mySession := session.Must(session.NewSession()) 628 // 629 // // Create a OutputService4ProtocolTest client from just a session. 630 // svc := outputservice4protocoltest.New(mySession) 631 // 632 // // Create a OutputService4ProtocolTest client with additional configuration 633 // svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 634 func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest { 635 c := p.ClientConfig("outputservice4protocoltest", cfgs...) 636 return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 637 } 638 639 // newClient creates, initializes and returns a new service client instance. 640 func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService4ProtocolTest { 641 svc := &OutputService4ProtocolTest{ 642 Client: client.New( 643 cfg, 644 metadata.ClientInfo{ 645 ServiceName: "OutputService4ProtocolTest", 646 ServiceID: "OutputService4ProtocolTest", 647 SigningName: signingName, 648 SigningRegion: signingRegion, 649 PartitionID: partitionID, 650 Endpoint: endpoint, 651 APIVersion: "", 652 }, 653 handlers, 654 ), 655 } 656 657 // Handlers 658 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 659 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 660 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 661 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 662 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 663 664 return svc 665 } 666 667 // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any 668 // custom request initialization. 669 func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 670 req := c.NewRequest(op, params, data) 671 672 return req 673 } 674 675 const opOutputService4TestCaseOperation1 = "OperationName" 676 677 // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the 678 // client's request for the OutputService4TestCaseOperation1 operation. The "output" return 679 // value will be populated with the request's response once the request completes 680 // successfully. 681 // 682 // Use "Send" method on the returned Request to send the API call to the service. 683 // the "output" return value is not valid until after Send returns without error. 684 // 685 // See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1 686 // API call, and error handling. 687 // 688 // This method is useful when you want to inject custom logic or configuration 689 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 690 // 691 // 692 // // Example sending a request using the OutputService4TestCaseOperation1Request method. 693 // req, resp := client.OutputService4TestCaseOperation1Request(params) 694 // 695 // err := req.Send() 696 // if err == nil { // resp is now filled 697 // fmt.Println(resp) 698 // } 699 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { 700 op := &request.Operation{ 701 Name: opOutputService4TestCaseOperation1, 702 HTTPPath: "/", 703 } 704 705 if input == nil { 706 input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} 707 } 708 709 output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} 710 req = c.newRequest(op, input, output) 711 return 712 } 713 714 // OutputService4TestCaseOperation1 API operation for . 715 // 716 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 717 // with awserr.Error's Code and Message methods to get detailed information about 718 // the error. 719 // 720 // See the AWS API reference guide for 's 721 // API operation OutputService4TestCaseOperation1 for usage and error information. 722 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { 723 req, out := c.OutputService4TestCaseOperation1Request(input) 724 return out, req.Send() 725 } 726 727 // OutputService4TestCaseOperation1WithContext is the same as OutputService4TestCaseOperation1 with the addition of 728 // the ability to pass a context and additional request options. 729 // 730 // See OutputService4TestCaseOperation1 for details on how to use this API operation. 731 // 732 // The context must be non-nil and will be used for request cancellation. If 733 // the context is nil a panic will occur. In the future the SDK may create 734 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 735 // for more information on using Contexts. 736 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation1Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { 737 req, out := c.OutputService4TestCaseOperation1Request(input) 738 req.SetContext(ctx) 739 req.ApplyOptions(opts...) 740 return out, req.Send() 741 } 742 743 const opOutputService4TestCaseOperation2 = "OperationName" 744 745 // OutputService4TestCaseOperation2Request generates a "aws/request.Request" representing the 746 // client's request for the OutputService4TestCaseOperation2 operation. The "output" return 747 // value will be populated with the request's response once the request completes 748 // successfully. 749 // 750 // Use "Send" method on the returned Request to send the API call to the service. 751 // the "output" return value is not valid until after Send returns without error. 752 // 753 // See OutputService4TestCaseOperation2 for more information on using the OutputService4TestCaseOperation2 754 // API call, and error handling. 755 // 756 // This method is useful when you want to inject custom logic or configuration 757 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 758 // 759 // 760 // // Example sending a request using the OutputService4TestCaseOperation2Request method. 761 // req, resp := client.OutputService4TestCaseOperation2Request(params) 762 // 763 // err := req.Send() 764 // if err == nil { // resp is now filled 765 // fmt.Println(resp) 766 // } 767 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation2Request(input *OutputService4TestShapeOutputService4TestCaseOperation2Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation2Output) { 768 op := &request.Operation{ 769 Name: opOutputService4TestCaseOperation2, 770 HTTPPath: "/", 771 } 772 773 if input == nil { 774 input = &OutputService4TestShapeOutputService4TestCaseOperation2Input{} 775 } 776 777 output = &OutputService4TestShapeOutputService4TestCaseOperation2Output{} 778 req = c.newRequest(op, input, output) 779 return 780 } 781 782 // OutputService4TestCaseOperation2 API operation for . 783 // 784 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 785 // with awserr.Error's Code and Message methods to get detailed information about 786 // the error. 787 // 788 // See the AWS API reference guide for 's 789 // API operation OutputService4TestCaseOperation2 for usage and error information. 790 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation2(input *OutputService4TestShapeOutputService4TestCaseOperation2Input) (*OutputService4TestShapeOutputService4TestCaseOperation2Output, error) { 791 req, out := c.OutputService4TestCaseOperation2Request(input) 792 return out, req.Send() 793 } 794 795 // OutputService4TestCaseOperation2WithContext is the same as OutputService4TestCaseOperation2 with the addition of 796 // the ability to pass a context and additional request options. 797 // 798 // See OutputService4TestCaseOperation2 for details on how to use this API operation. 799 // 800 // The context must be non-nil and will be used for request cancellation. If 801 // the context is nil a panic will occur. In the future the SDK may create 802 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 803 // for more information on using Contexts. 804 func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation2WithContext(ctx aws.Context, input *OutputService4TestShapeOutputService4TestCaseOperation2Input, opts ...request.Option) (*OutputService4TestShapeOutputService4TestCaseOperation2Output, error) { 805 req, out := c.OutputService4TestCaseOperation2Request(input) 806 req.SetContext(ctx) 807 req.ApplyOptions(opts...) 808 return out, req.Send() 809 } 810 811 type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { 812 _ struct{} `type:"structure"` 813 } 814 815 type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { 816 _ struct{} `type:"structure"` 817 818 ListMember []*string `type:"list"` 819 820 ListMemberMap []map[string]*string `type:"list"` 821 822 ListMemberStruct []*OutputService4TestShapeStructType `type:"list"` 823 } 824 825 // SetListMember sets the ListMember field's value. 826 func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { 827 s.ListMember = v 828 return s 829 } 830 831 // SetListMemberMap sets the ListMemberMap field's value. 832 func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMemberMap(v []map[string]*string) *OutputService4TestShapeOutputService4TestCaseOperation1Output { 833 s.ListMemberMap = v 834 return s 835 } 836 837 // SetListMemberStruct sets the ListMemberStruct field's value. 838 func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListMemberStruct(v []*OutputService4TestShapeStructType) *OutputService4TestShapeOutputService4TestCaseOperation1Output { 839 s.ListMemberStruct = v 840 return s 841 } 842 843 type OutputService4TestShapeOutputService4TestCaseOperation2Input struct { 844 _ struct{} `type:"structure"` 845 } 846 847 type OutputService4TestShapeOutputService4TestCaseOperation2Output struct { 848 _ struct{} `type:"structure"` 849 850 ListMember []*string `type:"list"` 851 852 ListMemberMap []map[string]*string `type:"list"` 853 854 ListMemberStruct []*OutputService4TestShapeStructType `type:"list"` 855 } 856 857 // SetListMember sets the ListMember field's value. 858 func (s *OutputService4TestShapeOutputService4TestCaseOperation2Output) SetListMember(v []*string) *OutputService4TestShapeOutputService4TestCaseOperation2Output { 859 s.ListMember = v 860 return s 861 } 862 863 // SetListMemberMap sets the ListMemberMap field's value. 864 func (s *OutputService4TestShapeOutputService4TestCaseOperation2Output) SetListMemberMap(v []map[string]*string) *OutputService4TestShapeOutputService4TestCaseOperation2Output { 865 s.ListMemberMap = v 866 return s 867 } 868 869 // SetListMemberStruct sets the ListMemberStruct field's value. 870 func (s *OutputService4TestShapeOutputService4TestCaseOperation2Output) SetListMemberStruct(v []*OutputService4TestShapeStructType) *OutputService4TestShapeOutputService4TestCaseOperation2Output { 871 s.ListMemberStruct = v 872 return s 873 } 874 875 type OutputService4TestShapeStructType struct { 876 _ struct{} `type:"structure"` 877 } 878 879 // OutputService5ProtocolTest provides the API operation methods for making requests to 880 // . See this package's package overview docs 881 // for details on the service. 882 // 883 // OutputService5ProtocolTest methods are safe to use concurrently. It is not safe to 884 // modify mutate any of the struct's properties though. 885 type OutputService5ProtocolTest struct { 886 *client.Client 887 } 888 889 // New creates a new instance of the OutputService5ProtocolTest client with a session. 890 // If additional configuration is needed for the client instance use the optional 891 // aws.Config parameter to add your extra config. 892 // 893 // Example: 894 // mySession := session.Must(session.NewSession()) 895 // 896 // // Create a OutputService5ProtocolTest client from just a session. 897 // svc := outputservice5protocoltest.New(mySession) 898 // 899 // // Create a OutputService5ProtocolTest client with additional configuration 900 // svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 901 func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest { 902 c := p.ClientConfig("outputservice5protocoltest", cfgs...) 903 return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 904 } 905 906 // newClient creates, initializes and returns a new service client instance. 907 func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService5ProtocolTest { 908 svc := &OutputService5ProtocolTest{ 909 Client: client.New( 910 cfg, 911 metadata.ClientInfo{ 912 ServiceName: "OutputService5ProtocolTest", 913 ServiceID: "OutputService5ProtocolTest", 914 SigningName: signingName, 915 SigningRegion: signingRegion, 916 PartitionID: partitionID, 917 Endpoint: endpoint, 918 APIVersion: "", 919 }, 920 handlers, 921 ), 922 } 923 924 // Handlers 925 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 926 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 927 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 928 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 929 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 930 931 return svc 932 } 933 934 // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any 935 // custom request initialization. 936 func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 937 req := c.NewRequest(op, params, data) 938 939 return req 940 } 941 942 const opOutputService5TestCaseOperation1 = "OperationName" 943 944 // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the 945 // client's request for the OutputService5TestCaseOperation1 operation. The "output" return 946 // value will be populated with the request's response once the request completes 947 // successfully. 948 // 949 // Use "Send" method on the returned Request to send the API call to the service. 950 // the "output" return value is not valid until after Send returns without error. 951 // 952 // See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1 953 // API call, and error handling. 954 // 955 // This method is useful when you want to inject custom logic or configuration 956 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 957 // 958 // 959 // // Example sending a request using the OutputService5TestCaseOperation1Request method. 960 // req, resp := client.OutputService5TestCaseOperation1Request(params) 961 // 962 // err := req.Send() 963 // if err == nil { // resp is now filled 964 // fmt.Println(resp) 965 // } 966 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { 967 op := &request.Operation{ 968 Name: opOutputService5TestCaseOperation1, 969 HTTPPath: "/", 970 } 971 972 if input == nil { 973 input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} 974 } 975 976 output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} 977 req = c.newRequest(op, input, output) 978 return 979 } 980 981 // OutputService5TestCaseOperation1 API operation for . 982 // 983 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 984 // with awserr.Error's Code and Message methods to get detailed information about 985 // the error. 986 // 987 // See the AWS API reference guide for 's 988 // API operation OutputService5TestCaseOperation1 for usage and error information. 989 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { 990 req, out := c.OutputService5TestCaseOperation1Request(input) 991 return out, req.Send() 992 } 993 994 // OutputService5TestCaseOperation1WithContext is the same as OutputService5TestCaseOperation1 with the addition of 995 // the ability to pass a context and additional request options. 996 // 997 // See OutputService5TestCaseOperation1 for details on how to use this API operation. 998 // 999 // The context must be non-nil and will be used for request cancellation. If 1000 // the context is nil a panic will occur. In the future the SDK may create 1001 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1002 // for more information on using Contexts. 1003 func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1WithContext(ctx aws.Context, input *OutputService5TestShapeOutputService5TestCaseOperation1Input, opts ...request.Option) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { 1004 req, out := c.OutputService5TestCaseOperation1Request(input) 1005 req.SetContext(ctx) 1006 req.ApplyOptions(opts...) 1007 return out, req.Send() 1008 } 1009 1010 type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { 1011 _ struct{} `type:"structure"` 1012 } 1013 1014 type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { 1015 _ struct{} `type:"structure"` 1016 1017 MapMember map[string][]*int64 `type:"map"` 1018 } 1019 1020 // SetMapMember sets the MapMember field's value. 1021 func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetMapMember(v map[string][]*int64) *OutputService5TestShapeOutputService5TestCaseOperation1Output { 1022 s.MapMember = v 1023 return s 1024 } 1025 1026 // OutputService6ProtocolTest provides the API operation methods for making requests to 1027 // . See this package's package overview docs 1028 // for details on the service. 1029 // 1030 // OutputService6ProtocolTest methods are safe to use concurrently. It is not safe to 1031 // modify mutate any of the struct's properties though. 1032 type OutputService6ProtocolTest struct { 1033 *client.Client 1034 } 1035 1036 // New creates a new instance of the OutputService6ProtocolTest client with a session. 1037 // If additional configuration is needed for the client instance use the optional 1038 // aws.Config parameter to add your extra config. 1039 // 1040 // Example: 1041 // mySession := session.Must(session.NewSession()) 1042 // 1043 // // Create a OutputService6ProtocolTest client from just a session. 1044 // svc := outputservice6protocoltest.New(mySession) 1045 // 1046 // // Create a OutputService6ProtocolTest client with additional configuration 1047 // svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1048 func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest { 1049 c := p.ClientConfig("outputservice6protocoltest", cfgs...) 1050 return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1051 } 1052 1053 // newClient creates, initializes and returns a new service client instance. 1054 func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService6ProtocolTest { 1055 svc := &OutputService6ProtocolTest{ 1056 Client: client.New( 1057 cfg, 1058 metadata.ClientInfo{ 1059 ServiceName: "OutputService6ProtocolTest", 1060 ServiceID: "OutputService6ProtocolTest", 1061 SigningName: signingName, 1062 SigningRegion: signingRegion, 1063 PartitionID: partitionID, 1064 Endpoint: endpoint, 1065 APIVersion: "", 1066 }, 1067 handlers, 1068 ), 1069 } 1070 1071 // Handlers 1072 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1073 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 1074 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 1075 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 1076 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 1077 1078 return svc 1079 } 1080 1081 // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any 1082 // custom request initialization. 1083 func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1084 req := c.NewRequest(op, params, data) 1085 1086 return req 1087 } 1088 1089 const opOutputService6TestCaseOperation1 = "OperationName" 1090 1091 // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the 1092 // client's request for the OutputService6TestCaseOperation1 operation. The "output" return 1093 // value will be populated with the request's response once the request completes 1094 // successfully. 1095 // 1096 // Use "Send" method on the returned Request to send the API call to the service. 1097 // the "output" return value is not valid until after Send returns without error. 1098 // 1099 // See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1 1100 // API call, and error handling. 1101 // 1102 // This method is useful when you want to inject custom logic or configuration 1103 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1104 // 1105 // 1106 // // Example sending a request using the OutputService6TestCaseOperation1Request method. 1107 // req, resp := client.OutputService6TestCaseOperation1Request(params) 1108 // 1109 // err := req.Send() 1110 // if err == nil { // resp is now filled 1111 // fmt.Println(resp) 1112 // } 1113 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { 1114 op := &request.Operation{ 1115 Name: opOutputService6TestCaseOperation1, 1116 HTTPPath: "/", 1117 } 1118 1119 if input == nil { 1120 input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} 1121 } 1122 1123 output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} 1124 req = c.newRequest(op, input, output) 1125 return 1126 } 1127 1128 // OutputService6TestCaseOperation1 API operation for . 1129 // 1130 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1131 // with awserr.Error's Code and Message methods to get detailed information about 1132 // the error. 1133 // 1134 // See the AWS API reference guide for 's 1135 // API operation OutputService6TestCaseOperation1 for usage and error information. 1136 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { 1137 req, out := c.OutputService6TestCaseOperation1Request(input) 1138 return out, req.Send() 1139 } 1140 1141 // OutputService6TestCaseOperation1WithContext is the same as OutputService6TestCaseOperation1 with the addition of 1142 // the ability to pass a context and additional request options. 1143 // 1144 // See OutputService6TestCaseOperation1 for details on how to use this API operation. 1145 // 1146 // The context must be non-nil and will be used for request cancellation. If 1147 // the context is nil a panic will occur. In the future the SDK may create 1148 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1149 // for more information on using Contexts. 1150 func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1WithContext(ctx aws.Context, input *OutputService6TestShapeOutputService6TestCaseOperation1Input, opts ...request.Option) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { 1151 req, out := c.OutputService6TestCaseOperation1Request(input) 1152 req.SetContext(ctx) 1153 req.ApplyOptions(opts...) 1154 return out, req.Send() 1155 } 1156 1157 type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { 1158 _ struct{} `type:"structure"` 1159 } 1160 1161 type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { 1162 _ struct{} `type:"structure"` 1163 1164 StrType *string `type:"string"` 1165 } 1166 1167 // SetStrType sets the StrType field's value. 1168 func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetStrType(v string) *OutputService6TestShapeOutputService6TestCaseOperation1Output { 1169 s.StrType = &v 1170 return s 1171 } 1172 1173 // OutputService7ProtocolTest provides the API operation methods for making requests to 1174 // . See this package's package overview docs 1175 // for details on the service. 1176 // 1177 // OutputService7ProtocolTest methods are safe to use concurrently. It is not safe to 1178 // modify mutate any of the struct's properties though. 1179 type OutputService7ProtocolTest struct { 1180 *client.Client 1181 } 1182 1183 // New creates a new instance of the OutputService7ProtocolTest client with a session. 1184 // If additional configuration is needed for the client instance use the optional 1185 // aws.Config parameter to add your extra config. 1186 // 1187 // Example: 1188 // mySession := session.Must(session.NewSession()) 1189 // 1190 // // Create a OutputService7ProtocolTest client from just a session. 1191 // svc := outputservice7protocoltest.New(mySession) 1192 // 1193 // // Create a OutputService7ProtocolTest client with additional configuration 1194 // svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1195 func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest { 1196 c := p.ClientConfig("outputservice7protocoltest", cfgs...) 1197 return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1198 } 1199 1200 // newClient creates, initializes and returns a new service client instance. 1201 func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService7ProtocolTest { 1202 svc := &OutputService7ProtocolTest{ 1203 Client: client.New( 1204 cfg, 1205 metadata.ClientInfo{ 1206 ServiceName: "OutputService7ProtocolTest", 1207 ServiceID: "OutputService7ProtocolTest", 1208 SigningName: signingName, 1209 SigningRegion: signingRegion, 1210 PartitionID: partitionID, 1211 Endpoint: endpoint, 1212 APIVersion: "", 1213 }, 1214 handlers, 1215 ), 1216 } 1217 1218 // Handlers 1219 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1220 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 1221 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 1222 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 1223 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 1224 1225 return svc 1226 } 1227 1228 // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any 1229 // custom request initialization. 1230 func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1231 req := c.NewRequest(op, params, data) 1232 1233 return req 1234 } 1235 1236 const opOutputService7TestCaseOperation1 = "OperationName" 1237 1238 // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the 1239 // client's request for the OutputService7TestCaseOperation1 operation. The "output" return 1240 // value will be populated with the request's response once the request completes 1241 // successfully. 1242 // 1243 // Use "Send" method on the returned Request to send the API call to the service. 1244 // the "output" return value is not valid until after Send returns without error. 1245 // 1246 // See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1 1247 // API call, and error handling. 1248 // 1249 // This method is useful when you want to inject custom logic or configuration 1250 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1251 // 1252 // 1253 // // Example sending a request using the OutputService7TestCaseOperation1Request method. 1254 // req, resp := client.OutputService7TestCaseOperation1Request(params) 1255 // 1256 // err := req.Send() 1257 // if err == nil { // resp is now filled 1258 // fmt.Println(resp) 1259 // } 1260 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { 1261 op := &request.Operation{ 1262 Name: opOutputService7TestCaseOperation1, 1263 HTTPPath: "/", 1264 } 1265 1266 if input == nil { 1267 input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} 1268 } 1269 1270 output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} 1271 req = c.newRequest(op, input, output) 1272 return 1273 } 1274 1275 // OutputService7TestCaseOperation1 API operation for . 1276 // 1277 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1278 // with awserr.Error's Code and Message methods to get detailed information about 1279 // the error. 1280 // 1281 // See the AWS API reference guide for 's 1282 // API operation OutputService7TestCaseOperation1 for usage and error information. 1283 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { 1284 req, out := c.OutputService7TestCaseOperation1Request(input) 1285 return out, req.Send() 1286 } 1287 1288 // OutputService7TestCaseOperation1WithContext is the same as OutputService7TestCaseOperation1 with the addition of 1289 // the ability to pass a context and additional request options. 1290 // 1291 // See OutputService7TestCaseOperation1 for details on how to use this API operation. 1292 // 1293 // The context must be non-nil and will be used for request cancellation. If 1294 // the context is nil a panic will occur. In the future the SDK may create 1295 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1296 // for more information on using Contexts. 1297 func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1WithContext(ctx aws.Context, input *OutputService7TestShapeOutputService7TestCaseOperation1Input, opts ...request.Option) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { 1298 req, out := c.OutputService7TestCaseOperation1Request(input) 1299 req.SetContext(ctx) 1300 req.ApplyOptions(opts...) 1301 return out, req.Send() 1302 } 1303 1304 type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { 1305 _ struct{} `type:"structure"` 1306 } 1307 1308 type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { 1309 _ struct{} `type:"structure"` 1310 1311 FooEnum *string `type:"string" enum:"OutputService7TestShapeJSONEnumType"` 1312 1313 ListEnums []*string `type:"list"` 1314 } 1315 1316 // SetFooEnum sets the FooEnum field's value. 1317 func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetFooEnum(v string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { 1318 s.FooEnum = &v 1319 return s 1320 } 1321 1322 // SetListEnums sets the ListEnums field's value. 1323 func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetListEnums(v []*string) *OutputService7TestShapeOutputService7TestCaseOperation1Output { 1324 s.ListEnums = v 1325 return s 1326 } 1327 1328 const ( 1329 // JSONEnumTypeFoo is a OutputService7TestShapeJSONEnumType enum value 1330 JSONEnumTypeFoo = "foo" 1331 1332 // JSONEnumTypeBar is a OutputService7TestShapeJSONEnumType enum value 1333 JSONEnumTypeBar = "bar" 1334 ) 1335 1336 // OutputService7TestShapeJSONEnumType_Values returns all elements of the OutputService7TestShapeJSONEnumType enum 1337 func OutputService7TestShapeJSONEnumType_Values() []string { 1338 return []string{ 1339 JSONEnumTypeFoo, 1340 JSONEnumTypeBar, 1341 } 1342 } 1343 1344 // OutputService8ProtocolTest provides the API operation methods for making requests to 1345 // . See this package's package overview docs 1346 // for details on the service. 1347 // 1348 // OutputService8ProtocolTest methods are safe to use concurrently. It is not safe to 1349 // modify mutate any of the struct's properties though. 1350 type OutputService8ProtocolTest struct { 1351 *client.Client 1352 } 1353 1354 // New creates a new instance of the OutputService8ProtocolTest client with a session. 1355 // If additional configuration is needed for the client instance use the optional 1356 // aws.Config parameter to add your extra config. 1357 // 1358 // Example: 1359 // mySession := session.Must(session.NewSession()) 1360 // 1361 // // Create a OutputService8ProtocolTest client from just a session. 1362 // svc := outputservice8protocoltest.New(mySession) 1363 // 1364 // // Create a OutputService8ProtocolTest client with additional configuration 1365 // svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2")) 1366 func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest { 1367 c := p.ClientConfig("outputservice8protocoltest", cfgs...) 1368 return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) 1369 } 1370 1371 // newClient creates, initializes and returns a new service client instance. 1372 func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *OutputService8ProtocolTest { 1373 svc := &OutputService8ProtocolTest{ 1374 Client: client.New( 1375 cfg, 1376 metadata.ClientInfo{ 1377 ServiceName: "OutputService8ProtocolTest", 1378 ServiceID: "OutputService8ProtocolTest", 1379 SigningName: signingName, 1380 SigningRegion: signingRegion, 1381 PartitionID: partitionID, 1382 Endpoint: endpoint, 1383 APIVersion: "", 1384 }, 1385 handlers, 1386 ), 1387 } 1388 1389 // Handlers 1390 svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 1391 svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) 1392 svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) 1393 svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) 1394 svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) 1395 1396 return svc 1397 } 1398 1399 // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any 1400 // custom request initialization. 1401 func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { 1402 req := c.NewRequest(op, params, data) 1403 1404 return req 1405 } 1406 1407 const opOutputService8TestCaseOperation1 = "OperationName" 1408 1409 // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the 1410 // client's request for the OutputService8TestCaseOperation1 operation. The "output" return 1411 // value will be populated with the request's response once the request completes 1412 // successfully. 1413 // 1414 // Use "Send" method on the returned Request to send the API call to the service. 1415 // the "output" return value is not valid until after Send returns without error. 1416 // 1417 // See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1 1418 // API call, and error handling. 1419 // 1420 // This method is useful when you want to inject custom logic or configuration 1421 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1422 // 1423 // 1424 // // Example sending a request using the OutputService8TestCaseOperation1Request method. 1425 // req, resp := client.OutputService8TestCaseOperation1Request(params) 1426 // 1427 // err := req.Send() 1428 // if err == nil { // resp is now filled 1429 // fmt.Println(resp) 1430 // } 1431 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { 1432 op := &request.Operation{ 1433 Name: opOutputService8TestCaseOperation1, 1434 HTTPPath: "/", 1435 } 1436 1437 if input == nil { 1438 input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} 1439 } 1440 1441 output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} 1442 req = c.newRequest(op, input, output) 1443 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1444 return 1445 } 1446 1447 // OutputService8TestCaseOperation1 API operation for . 1448 // 1449 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1450 // with awserr.Error's Code and Message methods to get detailed information about 1451 // the error. 1452 // 1453 // See the AWS API reference guide for 's 1454 // API operation OutputService8TestCaseOperation1 for usage and error information. 1455 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { 1456 req, out := c.OutputService8TestCaseOperation1Request(input) 1457 return out, req.Send() 1458 } 1459 1460 // OutputService8TestCaseOperation1WithContext is the same as OutputService8TestCaseOperation1 with the addition of 1461 // the ability to pass a context and additional request options. 1462 // 1463 // See OutputService8TestCaseOperation1 for details on how to use this API operation. 1464 // 1465 // The context must be non-nil and will be used for request cancellation. If 1466 // the context is nil a panic will occur. In the future the SDK may create 1467 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1468 // for more information on using Contexts. 1469 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation1Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { 1470 req, out := c.OutputService8TestCaseOperation1Request(input) 1471 req.SetContext(ctx) 1472 req.ApplyOptions(opts...) 1473 return out, req.Send() 1474 } 1475 1476 const opOutputService8TestCaseOperation2 = "OperationName" 1477 1478 // OutputService8TestCaseOperation2Request generates a "aws/request.Request" representing the 1479 // client's request for the OutputService8TestCaseOperation2 operation. The "output" return 1480 // value will be populated with the request's response once the request completes 1481 // successfully. 1482 // 1483 // Use "Send" method on the returned Request to send the API call to the service. 1484 // the "output" return value is not valid until after Send returns without error. 1485 // 1486 // See OutputService8TestCaseOperation2 for more information on using the OutputService8TestCaseOperation2 1487 // API call, and error handling. 1488 // 1489 // This method is useful when you want to inject custom logic or configuration 1490 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1491 // 1492 // 1493 // // Example sending a request using the OutputService8TestCaseOperation2Request method. 1494 // req, resp := client.OutputService8TestCaseOperation2Request(params) 1495 // 1496 // err := req.Send() 1497 // if err == nil { // resp is now filled 1498 // fmt.Println(resp) 1499 // } 1500 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation2Request(input *OutputService8TestShapeOutputService8TestCaseOperation2Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation2Output) { 1501 op := &request.Operation{ 1502 Name: opOutputService8TestCaseOperation2, 1503 HTTPPath: "/", 1504 } 1505 1506 if input == nil { 1507 input = &OutputService8TestShapeOutputService8TestCaseOperation2Input{} 1508 } 1509 1510 output = &OutputService8TestShapeOutputService8TestCaseOperation2Output{} 1511 req = c.newRequest(op, input, output) 1512 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1513 return 1514 } 1515 1516 // OutputService8TestCaseOperation2 API operation for . 1517 // 1518 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1519 // with awserr.Error's Code and Message methods to get detailed information about 1520 // the error. 1521 // 1522 // See the AWS API reference guide for 's 1523 // API operation OutputService8TestCaseOperation2 for usage and error information. 1524 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation2(input *OutputService8TestShapeOutputService8TestCaseOperation2Input) (*OutputService8TestShapeOutputService8TestCaseOperation2Output, error) { 1525 req, out := c.OutputService8TestCaseOperation2Request(input) 1526 return out, req.Send() 1527 } 1528 1529 // OutputService8TestCaseOperation2WithContext is the same as OutputService8TestCaseOperation2 with the addition of 1530 // the ability to pass a context and additional request options. 1531 // 1532 // See OutputService8TestCaseOperation2 for details on how to use this API operation. 1533 // 1534 // The context must be non-nil and will be used for request cancellation. If 1535 // the context is nil a panic will occur. In the future the SDK may create 1536 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1537 // for more information on using Contexts. 1538 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation2WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation2Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation2Output, error) { 1539 req, out := c.OutputService8TestCaseOperation2Request(input) 1540 req.SetContext(ctx) 1541 req.ApplyOptions(opts...) 1542 return out, req.Send() 1543 } 1544 1545 const opOutputService8TestCaseOperation3 = "OperationName" 1546 1547 // OutputService8TestCaseOperation3Request generates a "aws/request.Request" representing the 1548 // client's request for the OutputService8TestCaseOperation3 operation. The "output" return 1549 // value will be populated with the request's response once the request completes 1550 // successfully. 1551 // 1552 // Use "Send" method on the returned Request to send the API call to the service. 1553 // the "output" return value is not valid until after Send returns without error. 1554 // 1555 // See OutputService8TestCaseOperation3 for more information on using the OutputService8TestCaseOperation3 1556 // API call, and error handling. 1557 // 1558 // This method is useful when you want to inject custom logic or configuration 1559 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1560 // 1561 // 1562 // // Example sending a request using the OutputService8TestCaseOperation3Request method. 1563 // req, resp := client.OutputService8TestCaseOperation3Request(params) 1564 // 1565 // err := req.Send() 1566 // if err == nil { // resp is now filled 1567 // fmt.Println(resp) 1568 // } 1569 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation3Request(input *OutputService8TestShapeOutputService8TestCaseOperation3Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation3Output) { 1570 op := &request.Operation{ 1571 Name: opOutputService8TestCaseOperation3, 1572 HTTPPath: "/", 1573 } 1574 1575 if input == nil { 1576 input = &OutputService8TestShapeOutputService8TestCaseOperation3Input{} 1577 } 1578 1579 output = &OutputService8TestShapeOutputService8TestCaseOperation3Output{} 1580 req = c.newRequest(op, input, output) 1581 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1582 return 1583 } 1584 1585 // OutputService8TestCaseOperation3 API operation for . 1586 // 1587 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1588 // with awserr.Error's Code and Message methods to get detailed information about 1589 // the error. 1590 // 1591 // See the AWS API reference guide for 's 1592 // API operation OutputService8TestCaseOperation3 for usage and error information. 1593 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation3(input *OutputService8TestShapeOutputService8TestCaseOperation3Input) (*OutputService8TestShapeOutputService8TestCaseOperation3Output, error) { 1594 req, out := c.OutputService8TestCaseOperation3Request(input) 1595 return out, req.Send() 1596 } 1597 1598 // OutputService8TestCaseOperation3WithContext is the same as OutputService8TestCaseOperation3 with the addition of 1599 // the ability to pass a context and additional request options. 1600 // 1601 // See OutputService8TestCaseOperation3 for details on how to use this API operation. 1602 // 1603 // The context must be non-nil and will be used for request cancellation. If 1604 // the context is nil a panic will occur. In the future the SDK may create 1605 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1606 // for more information on using Contexts. 1607 func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation3WithContext(ctx aws.Context, input *OutputService8TestShapeOutputService8TestCaseOperation3Input, opts ...request.Option) (*OutputService8TestShapeOutputService8TestCaseOperation3Output, error) { 1608 req, out := c.OutputService8TestCaseOperation3Request(input) 1609 req.SetContext(ctx) 1610 req.ApplyOptions(opts...) 1611 return out, req.Send() 1612 } 1613 1614 type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { 1615 _ struct{} `type:"structure"` 1616 } 1617 1618 type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { 1619 _ struct{} `type:"structure"` 1620 } 1621 1622 type OutputService8TestShapeOutputService8TestCaseOperation2Input struct { 1623 _ struct{} `type:"structure"` 1624 } 1625 1626 type OutputService8TestShapeOutputService8TestCaseOperation2Output struct { 1627 _ struct{} `type:"structure"` 1628 } 1629 1630 type OutputService8TestShapeOutputService8TestCaseOperation3Input struct { 1631 _ struct{} `type:"structure"` 1632 } 1633 1634 type OutputService8TestShapeOutputService8TestCaseOperation3Output struct { 1635 _ struct{} `type:"structure"` 1636 } 1637 1638 // 1639 // Tests begin here 1640 // 1641 1642 func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) { 1643 svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1644 1645 buf := bytes.NewReader([]byte("{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}")) 1646 req, out := svc.OutputService1TestCaseOperation1Request(nil) 1647 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1648 1649 // set headers 1650 1651 // unmarshal response 1652 req.Handlers.UnmarshalMeta.Run(req) 1653 req.Handlers.Unmarshal.Run(req) 1654 if req.Error != nil { 1655 t.Errorf("expect not error, got %v", req.Error) 1656 } 1657 1658 // assert response 1659 if out == nil { 1660 t.Errorf("expect not to be nil") 1661 } 1662 if e, a := "a", *out.Char; e != a { 1663 t.Errorf("expect %v, got %v", e, a) 1664 } 1665 if e, a := 1.3, *out.Double; e != a { 1666 t.Errorf("expect %v, got %v", e, a) 1667 } 1668 if e, a := false, *out.FalseBool; e != a { 1669 t.Errorf("expect %v, got %v", e, a) 1670 } 1671 if e, a := 1.2, *out.Float; e != a { 1672 t.Errorf("expect %v, got %v", e, a) 1673 } 1674 if e, a := int64(200), *out.Long; e != a { 1675 t.Errorf("expect %v, got %v", e, a) 1676 } 1677 if e, a := int64(123), *out.Num; e != a { 1678 t.Errorf("expect %v, got %v", e, a) 1679 } 1680 if e, a := "myname", *out.Str; e != a { 1681 t.Errorf("expect %v, got %v", e, a) 1682 } 1683 if e, a := true, *out.TrueBool; e != a { 1684 t.Errorf("expect %v, got %v", e, a) 1685 } 1686 1687 } 1688 1689 func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) { 1690 svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1691 1692 buf := bytes.NewReader([]byte("{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}")) 1693 req, out := svc.OutputService2TestCaseOperation1Request(nil) 1694 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1695 1696 // set headers 1697 1698 // unmarshal response 1699 req.Handlers.UnmarshalMeta.Run(req) 1700 req.Handlers.Unmarshal.Run(req) 1701 if req.Error != nil { 1702 t.Errorf("expect not error, got %v", req.Error) 1703 } 1704 1705 // assert response 1706 if out == nil { 1707 t.Errorf("expect not to be nil") 1708 } 1709 if e, a := "hi!", string(out.BlobMember); e != a { 1710 t.Errorf("expect %v, got %v", e, a) 1711 } 1712 if e, a := "there!", string(out.StructMember.Foo); e != a { 1713 t.Errorf("expect %v, got %v", e, a) 1714 } 1715 1716 } 1717 1718 func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) { 1719 svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1720 1721 buf := bytes.NewReader([]byte("{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38Z\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38Z\"}}")) 1722 req, out := svc.OutputService3TestCaseOperation1Request(nil) 1723 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1724 1725 // set headers 1726 1727 // unmarshal response 1728 req.Handlers.UnmarshalMeta.Run(req) 1729 req.Handlers.Unmarshal.Run(req) 1730 if req.Error != nil { 1731 t.Errorf("expect not error, got %v", req.Error) 1732 } 1733 1734 // assert response 1735 if out == nil { 1736 t.Errorf("expect not to be nil") 1737 } 1738 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Bar.UTC().String(); e != a { 1739 t.Errorf("expect %v, got %v", e, a) 1740 } 1741 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.UTC().String(); e != a { 1742 t.Errorf("expect %v, got %v", e, a) 1743 } 1744 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeArg.UTC().String(); e != a { 1745 t.Errorf("expect %v, got %v", e, a) 1746 } 1747 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeCustom.UTC().String(); e != a { 1748 t.Errorf("expect %v, got %v", e, a) 1749 } 1750 if e, a := time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeFormat.UTC().String(); e != a { 1751 t.Errorf("expect %v, got %v", e, a) 1752 } 1753 1754 } 1755 1756 func TestOutputService4ProtocolTestListsCase1(t *testing.T) { 1757 svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1758 1759 buf := bytes.NewReader([]byte("{\"ListMember\": [\"a\", \"b\"]}")) 1760 req, out := svc.OutputService4TestCaseOperation1Request(nil) 1761 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1762 1763 // set headers 1764 1765 // unmarshal response 1766 req.Handlers.UnmarshalMeta.Run(req) 1767 req.Handlers.Unmarshal.Run(req) 1768 if req.Error != nil { 1769 t.Errorf("expect not error, got %v", req.Error) 1770 } 1771 1772 // assert response 1773 if out == nil { 1774 t.Errorf("expect not to be nil") 1775 } 1776 if e, a := "a", *out.ListMember[0]; e != a { 1777 t.Errorf("expect %v, got %v", e, a) 1778 } 1779 if e, a := "b", *out.ListMember[1]; e != a { 1780 t.Errorf("expect %v, got %v", e, a) 1781 } 1782 1783 } 1784 1785 func TestOutputService4ProtocolTestListsCase2(t *testing.T) { 1786 svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1787 1788 buf := bytes.NewReader([]byte("{\"ListMember\": [\"a\", null], \"ListMemberMap\": [{}, null, null, {}], \"ListMemberStruct\": [{}, null, null, {}]}")) 1789 req, out := svc.OutputService4TestCaseOperation2Request(nil) 1790 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1791 1792 // set headers 1793 1794 // unmarshal response 1795 req.Handlers.UnmarshalMeta.Run(req) 1796 req.Handlers.Unmarshal.Run(req) 1797 if req.Error != nil { 1798 t.Errorf("expect not error, got %v", req.Error) 1799 } 1800 1801 // assert response 1802 if out == nil { 1803 t.Errorf("expect not to be nil") 1804 } 1805 if e, a := "a", *out.ListMember[0]; e != a { 1806 t.Errorf("expect %v, got %v", e, a) 1807 } 1808 if e := out.ListMember[1]; e != nil { 1809 t.Errorf("expect nil, got %v", e) 1810 } 1811 if e := out.ListMemberMap[1]; e != nil { 1812 t.Errorf("expect nil, got %v", e) 1813 } 1814 if e := out.ListMemberMap[2]; e != nil { 1815 t.Errorf("expect nil, got %v", e) 1816 } 1817 if e := out.ListMemberStruct[1]; e != nil { 1818 t.Errorf("expect nil, got %v", e) 1819 } 1820 if e := out.ListMemberStruct[2]; e != nil { 1821 t.Errorf("expect nil, got %v", e) 1822 } 1823 1824 } 1825 1826 func TestOutputService5ProtocolTestMapsCase1(t *testing.T) { 1827 svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1828 1829 buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}")) 1830 req, out := svc.OutputService5TestCaseOperation1Request(nil) 1831 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1832 1833 // set headers 1834 1835 // unmarshal response 1836 req.Handlers.UnmarshalMeta.Run(req) 1837 req.Handlers.Unmarshal.Run(req) 1838 if req.Error != nil { 1839 t.Errorf("expect not error, got %v", req.Error) 1840 } 1841 1842 // assert response 1843 if out == nil { 1844 t.Errorf("expect not to be nil") 1845 } 1846 if e, a := int64(1), *out.MapMember["a"][0]; e != a { 1847 t.Errorf("expect %v, got %v", e, a) 1848 } 1849 if e, a := int64(2), *out.MapMember["a"][1]; e != a { 1850 t.Errorf("expect %v, got %v", e, a) 1851 } 1852 if e, a := int64(3), *out.MapMember["b"][0]; e != a { 1853 t.Errorf("expect %v, got %v", e, a) 1854 } 1855 if e, a := int64(4), *out.MapMember["b"][1]; e != a { 1856 t.Errorf("expect %v, got %v", e, a) 1857 } 1858 1859 } 1860 1861 func TestOutputService6ProtocolTestIgnoresExtraDataCase1(t *testing.T) { 1862 svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1863 1864 buf := bytes.NewReader([]byte("{\"foo\": \"bar\"}")) 1865 req, out := svc.OutputService6TestCaseOperation1Request(nil) 1866 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1867 1868 // set headers 1869 1870 // unmarshal response 1871 req.Handlers.UnmarshalMeta.Run(req) 1872 req.Handlers.Unmarshal.Run(req) 1873 if req.Error != nil { 1874 t.Errorf("expect not error, got %v", req.Error) 1875 } 1876 1877 // assert response 1878 if out == nil { 1879 t.Errorf("expect not to be nil") 1880 } 1881 1882 } 1883 1884 func TestOutputService7ProtocolTestEnumOutputCase1(t *testing.T) { 1885 svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1886 1887 buf := bytes.NewReader([]byte("{\"FooEnum\": \"foo\", \"ListEnums\": [\"foo\", \"bar\"]}")) 1888 req, out := svc.OutputService7TestCaseOperation1Request(nil) 1889 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1890 1891 // set headers 1892 1893 // unmarshal response 1894 req.Handlers.UnmarshalMeta.Run(req) 1895 req.Handlers.Unmarshal.Run(req) 1896 if req.Error != nil { 1897 t.Errorf("expect not error, got %v", req.Error) 1898 } 1899 1900 // assert response 1901 if out == nil { 1902 t.Errorf("expect not to be nil") 1903 } 1904 if e, a := "foo", *out.FooEnum; e != a { 1905 t.Errorf("expect %v, got %v", e, a) 1906 } 1907 if e, a := "foo", *out.ListEnums[0]; e != a { 1908 t.Errorf("expect %v, got %v", e, a) 1909 } 1910 if e, a := "bar", *out.ListEnums[1]; e != a { 1911 t.Errorf("expect %v, got %v", e, a) 1912 } 1913 1914 } 1915 1916 func TestOutputService8ProtocolTestunmodeledNonjsonResponsePayloadCase1(t *testing.T) { 1917 svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1918 1919 buf := bytes.NewReader([]byte("success")) 1920 req, out := svc.OutputService8TestCaseOperation1Request(nil) 1921 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1922 1923 // set headers 1924 1925 // unmarshal response 1926 req.Handlers.UnmarshalMeta.Run(req) 1927 req.Handlers.Unmarshal.Run(req) 1928 if req.Error != nil { 1929 t.Errorf("expect not error, got %v", req.Error) 1930 } 1931 1932 // assert response 1933 if out == nil { 1934 t.Errorf("expect not to be nil") 1935 } 1936 1937 } 1938 1939 func TestOutputService8ProtocolTestunmodeledNonjsonResponsePayloadCase2(t *testing.T) { 1940 svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1941 1942 buf := bytes.NewReader([]byte("\"success\"")) 1943 req, out := svc.OutputService8TestCaseOperation2Request(nil) 1944 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1945 1946 // set headers 1947 1948 // unmarshal response 1949 req.Handlers.UnmarshalMeta.Run(req) 1950 req.Handlers.Unmarshal.Run(req) 1951 if req.Error != nil { 1952 t.Errorf("expect not error, got %v", req.Error) 1953 } 1954 1955 // assert response 1956 if out == nil { 1957 t.Errorf("expect not to be nil") 1958 } 1959 1960 } 1961 1962 func TestOutputService8ProtocolTestunmodeledNonjsonResponsePayloadCase3(t *testing.T) { 1963 svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")}) 1964 1965 buf := bytes.NewReader([]byte("{}")) 1966 req, out := svc.OutputService8TestCaseOperation3Request(nil) 1967 req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}} 1968 1969 // set headers 1970 1971 // unmarshal response 1972 req.Handlers.UnmarshalMeta.Run(req) 1973 req.Handlers.Unmarshal.Run(req) 1974 if req.Error != nil { 1975 t.Errorf("expect not error, got %v", req.Error) 1976 } 1977 1978 // assert response 1979 if out == nil { 1980 t.Errorf("expect not to be nil") 1981 } 1982 1983 }