123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908 |
- package restxml_test
- import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restxml"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/private/util"
- "github.com/stretchr/testify/assert"
- )
- var _ bytes.Buffer // always import bytes
- var _ http.Request
- var _ json.Marshaler
- var _ time.Time
- var _ xmlutil.XMLNode
- var _ xml.Attr
- var _ = ioutil.Discard
- var _ = util.Trim("")
- var _ = url.Values{}
- var _ = io.EOF
- var _ = aws.String
- var _ = fmt.Println
- func init() {
- protocol.RandReader = &awstesting.ZeroReader{}
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService1ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService1ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService1ProtocolTest client from just a session.
- // svc := outputservice1protocoltest.New(mySession)
- //
- // // Create a OutputService1ProtocolTest client with additional configuration
- // svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest {
- c := p.ClientConfig("outputservice1protocoltest", cfgs...)
- return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService1ProtocolTest {
- svc := &OutputService1ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice1protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService1TestCaseOperation1 = "OperationName"
- // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService1TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService1TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService1TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService1TestCaseOperation1Request method.
- // req, resp := client.OutputService1TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputShape) {
- op := &request.Operation{
- Name: opOutputService1TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputShape{}
- req.Data = output
- return
- }
- // OutputService1TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService1TestCaseOperation1 for usage and error information.
- func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- const opOutputService1TestCaseOperation2 = "OperationName"
- // OutputService1TestCaseOperation2Request generates a "aws/request.Request" representing the
- // client's request for the OutputService1TestCaseOperation2 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService1TestCaseOperation2 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService1TestCaseOperation2 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService1TestCaseOperation2Request method.
- // req, resp := client.OutputService1TestCaseOperation2Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2Request(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (req *request.Request, output *OutputService1TestShapeOutputShape) {
- op := &request.Operation{
- Name: opOutputService1TestCaseOperation2,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation2Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputShape{}
- req.Data = output
- return
- }
- // OutputService1TestCaseOperation2 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService1TestCaseOperation2 for usage and error information.
- func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation2(input *OutputService1TestShapeOutputService1TestCaseOperation2Input) (*OutputService1TestShapeOutputShape, error) {
- req, out := c.OutputService1TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService1TestShapeOutputService1TestCaseOperation2Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService1TestShapeOutputShape struct {
- _ struct{} `type:"structure"`
- Char *string `type:"character"`
- Double *float64 `type:"double"`
- FalseBool *bool `type:"boolean"`
- Float *float64 `type:"float"`
- ImaHeader *string `location:"header" type:"string"`
- ImaHeaderLocation *string `location:"header" locationName:"X-Foo" type:"string"`
- Long *int64 `type:"long"`
- Num *int64 `locationName:"FooNum" type:"integer"`
- Str *string `type:"string"`
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
- TrueBool *bool `type:"boolean"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService2ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService2ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService2ProtocolTest client from just a session.
- // svc := outputservice2protocoltest.New(mySession)
- //
- // // Create a OutputService2ProtocolTest client with additional configuration
- // svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest {
- c := p.ClientConfig("outputservice2protocoltest", cfgs...)
- return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService2ProtocolTest {
- svc := &OutputService2ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice2protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService2TestCaseOperation1 = "OperationName"
- // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService2TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService2TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService2TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService2TestCaseOperation1Request method.
- // req, resp := client.OutputService2TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService2TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService2TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService2TestCaseOperation1 for usage and error information.
- func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) {
- req, out := c.OutputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- // Blob is automatically base64 encoded/decoded by the SDK.
- Blob []byte `type:"blob"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService3ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService3ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService3ProtocolTest client from just a session.
- // svc := outputservice3protocoltest.New(mySession)
- //
- // // Create a OutputService3ProtocolTest client with additional configuration
- // svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest {
- c := p.ClientConfig("outputservice3protocoltest", cfgs...)
- return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService3ProtocolTest {
- svc := &OutputService3ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice3protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService3TestCaseOperation1 = "OperationName"
- // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService3TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService3TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService3TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService3TestCaseOperation1Request method.
- // req, resp := client.OutputService3TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService3TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService3TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService3TestCaseOperation1 for usage and error information.
- func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) {
- req, out := c.OutputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService3TestShapeOutputService3TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- ListMember []*string `type:"list"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService4ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService4ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService4ProtocolTest client from just a session.
- // svc := outputservice4protocoltest.New(mySession)
- //
- // // Create a OutputService4ProtocolTest client with additional configuration
- // svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest {
- c := p.ClientConfig("outputservice4protocoltest", cfgs...)
- return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService4ProtocolTest {
- svc := &OutputService4ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice4protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService4TestCaseOperation1 = "OperationName"
- // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService4TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService4TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService4TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService4TestCaseOperation1Request method.
- // req, resp := client.OutputService4TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService4TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService4TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService4TestCaseOperation1 for usage and error information.
- func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) {
- req, out := c.OutputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService4TestShapeOutputService4TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- ListMember []*string `locationNameList:"item" type:"list"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService5ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService5ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService5ProtocolTest client from just a session.
- // svc := outputservice5protocoltest.New(mySession)
- //
- // // Create a OutputService5ProtocolTest client with additional configuration
- // svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest {
- c := p.ClientConfig("outputservice5protocoltest", cfgs...)
- return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService5ProtocolTest {
- svc := &OutputService5ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice5protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService5TestCaseOperation1 = "OperationName"
- // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService5TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService5TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService5TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService5TestCaseOperation1Request method.
- // req, resp := client.OutputService5TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService5TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService5TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService5TestCaseOperation1 for usage and error information.
- func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) {
- req, out := c.OutputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService5TestShapeOutputService5TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- ListMember []*string `type:"list" flattened:"true"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService6ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService6ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService6ProtocolTest client from just a session.
- // svc := outputservice6protocoltest.New(mySession)
- //
- // // Create a OutputService6ProtocolTest client with additional configuration
- // svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest {
- c := p.ClientConfig("outputservice6protocoltest", cfgs...)
- return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService6ProtocolTest {
- svc := &OutputService6ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice6protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService6TestCaseOperation1 = "OperationName"
- // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService6TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService6TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService6TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService6TestCaseOperation1Request method.
- // req, resp := client.OutputService6TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService6TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService6TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService6TestCaseOperation1 for usage and error information.
- func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) {
- req, out := c.OutputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService6TestShapeOutputService6TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- Map map[string]*OutputService6TestShapeSingleStructure `type:"map"`
- }
- type OutputService6TestShapeSingleStructure struct {
- _ struct{} `type:"structure"`
- Foo *string `locationName:"foo" type:"string"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService7ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService7ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService7ProtocolTest client from just a session.
- // svc := outputservice7protocoltest.New(mySession)
- //
- // // Create a OutputService7ProtocolTest client with additional configuration
- // svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest {
- c := p.ClientConfig("outputservice7protocoltest", cfgs...)
- return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService7ProtocolTest {
- svc := &OutputService7ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice7protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService7TestCaseOperation1 = "OperationName"
- // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService7TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService7TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService7TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService7TestCaseOperation1Request method.
- // req, resp := client.OutputService7TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService7TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService7TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService7TestCaseOperation1 for usage and error information.
- func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) {
- req, out := c.OutputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService7TestShapeOutputService7TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- Map map[string]*string `type:"map" flattened:"true"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService8ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService8ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService8ProtocolTest client from just a session.
- // svc := outputservice8protocoltest.New(mySession)
- //
- // // Create a OutputService8ProtocolTest client with additional configuration
- // svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest {
- c := p.ClientConfig("outputservice8protocoltest", cfgs...)
- return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService8ProtocolTest {
- svc := &OutputService8ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice8protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService8TestCaseOperation1 = "OperationName"
- // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService8TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService8TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService8TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService8TestCaseOperation1Request method.
- // req, resp := client.OutputService8TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService8TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService8TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService8TestCaseOperation1 for usage and error information.
- func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) {
- req, out := c.OutputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService8TestShapeOutputService8TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService9ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService9ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService9ProtocolTest client from just a session.
- // svc := outputservice9protocoltest.New(mySession)
- //
- // // Create a OutputService9ProtocolTest client with additional configuration
- // svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest {
- c := p.ClientConfig("outputservice9protocoltest", cfgs...)
- return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService9ProtocolTest {
- svc := &OutputService9ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice9protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService9TestCaseOperation1 = "OperationName"
- // OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService9TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService9TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService9TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService9TestCaseOperation1Request method.
- // req, resp := client.OutputService9TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService9TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService9TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService9TestCaseOperation1 for usage and error information.
- func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) {
- req, out := c.OutputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService9TestShapeOutputService9TestCaseOperation1Output struct {
- _ struct{} `type:"structure" payload:"Data"`
- Data *OutputService9TestShapeSingleStructure `type:"structure"`
- Header *string `location:"header" locationName:"X-Foo" type:"string"`
- }
- type OutputService9TestShapeSingleStructure struct {
- _ struct{} `type:"structure"`
- Foo *string `type:"string"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService10ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService10ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService10ProtocolTest client from just a session.
- // svc := outputservice10protocoltest.New(mySession)
- //
- // // Create a OutputService10ProtocolTest client with additional configuration
- // svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest {
- c := p.ClientConfig("outputservice10protocoltest", cfgs...)
- return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService10ProtocolTest {
- svc := &OutputService10ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice10protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService10ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService10TestCaseOperation1 = "OperationName"
- // OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService10TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService10TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService10TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService10TestCaseOperation1Request method.
- // req, resp := client.OutputService10TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService10TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService10TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService10TestCaseOperation1 for usage and error information.
- func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) {
- req, out := c.OutputService10TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService10TestShapeOutputService10TestCaseOperation1Output struct {
- _ struct{} `type:"structure" payload:"Stream"`
- Stream []byte `type:"blob"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService11ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService11ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService11ProtocolTest client from just a session.
- // svc := outputservice11protocoltest.New(mySession)
- //
- // // Create a OutputService11ProtocolTest client with additional configuration
- // svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest {
- c := p.ClientConfig("outputservice11protocoltest", cfgs...)
- return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService11ProtocolTest {
- svc := &OutputService11ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice11protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService11ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService11TestCaseOperation1 = "OperationName"
- // OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService11TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService11TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService11TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService11TestCaseOperation1Request method.
- // req, resp := client.OutputService11TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService11TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService11TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService11TestCaseOperation1 for usage and error information.
- func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) {
- req, out := c.OutputService11TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService11TestShapeOutputService11TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService11TestShapeOutputService11TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- Char *string `location:"header" locationName:"x-char" type:"character"`
- Double *float64 `location:"header" locationName:"x-double" type:"double"`
- FalseBool *bool `location:"header" locationName:"x-false-bool" type:"boolean"`
- Float *float64 `location:"header" locationName:"x-float" type:"float"`
- Integer *int64 `location:"header" locationName:"x-int" type:"integer"`
- Long *int64 `location:"header" locationName:"x-long" type:"long"`
- Str *string `location:"header" locationName:"x-str" type:"string"`
- Timestamp *time.Time `location:"header" locationName:"x-timestamp" type:"timestamp" timestampFormat:"iso8601"`
- TrueBool *bool `location:"header" locationName:"x-true-bool" type:"boolean"`
- }
- //The service client's operations are safe to be used concurrently.
- // It is not safe to mutate any of the client's properties though.
- type OutputService12ProtocolTest struct {
- *client.Client
- }
- // New creates a new instance of the OutputService12ProtocolTest client with a session.
- // If additional configuration is needed for the client instance use the optional
- // aws.Config parameter to add your extra config.
- //
- // Example:
- // // Create a OutputService12ProtocolTest client from just a session.
- // svc := outputservice12protocoltest.New(mySession)
- //
- // // Create a OutputService12ProtocolTest client with additional configuration
- // svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
- func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest {
- c := p.ClientConfig("outputservice12protocoltest", cfgs...)
- return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
- }
- // newClient creates, initializes and returns a new service client instance.
- func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService12ProtocolTest {
- svc := &OutputService12ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice12protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
- return svc
- }
- // newRequest creates a new request for a OutputService12ProtocolTest operation and runs any
- // custom request initialization.
- func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
- return req
- }
- const opOutputService12TestCaseOperation1 = "OperationName"
- // OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
- // client's request for the OutputService12TestCaseOperation1 operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See OutputService12TestCaseOperation1 for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the OutputService12TestCaseOperation1 method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the OutputService12TestCaseOperation1Request method.
- // req, resp := client.OutputService12TestCaseOperation1Request(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService12TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{}
- req.Data = output
- return
- }
- // OutputService12TestCaseOperation1 API operation for .
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for 's
- // API operation OutputService12TestCaseOperation1 for usage and error information.
- func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) {
- req, out := c.OutputService12TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService12TestShapeOutputService12TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService12TestShapeOutputService12TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- Foo *string `type:"string"`
- }
- //
- // Tests begin here
- //
- func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- 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></OperationNameResponse>"))
- req, out := svc.OutputService1TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- req.HTTPResponse.Header.Set("ImaHeader", "test")
- req.HTTPResponse.Header.Set("X-Foo", "abc")
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, "test", *out.ImaHeader)
- assert.Equal(t, "abc", *out.ImaHeaderLocation)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
- assert.Equal(t, true, *out.TrueBool)
- }
- func TestOutputService1ProtocolTestScalarMembersCase2(t *testing.T) {
- svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- 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>"))
- req, out := svc.OutputService1TestCaseOperation2Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- req.HTTPResponse.Header.Set("ImaHeader", "test")
- req.HTTPResponse.Header.Set("X-Foo", "abc")
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, "test", *out.ImaHeader)
- assert.Equal(t, "abc", *out.ImaHeaderLocation)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "", *out.Str)
- assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
- assert.Equal(t, true, *out.TrueBool)
- }
- func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
- svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult>"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "value", string(out.Blob))
- }
- func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
- svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult>"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
- }
- func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
- svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult>"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
- }
- func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
- svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult>"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
- }
- func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
- svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- 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>"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"].Foo)
- assert.Equal(t, "bar", *out.Map["qux"].Foo)
- }
- func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
- svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult>"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
- }
- func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
- svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResult><Map><entry><foo>qux</foo><bar>bar</bar></entry><entry><foo>baz</foo><bar>bam</bar></entry></Map></OperationNameResult>"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
- }
- func TestOutputService9ProtocolTestXMLPayloadCase1(t *testing.T) {
- svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResponse><Foo>abc</Foo></OperationNameResponse>"))
- req, out := svc.OutputService9TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- req.HTTPResponse.Header.Set("X-Foo", "baz")
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.Data.Foo)
- assert.Equal(t, "baz", *out.Header)
- }
- func TestOutputService10ProtocolTestStreamingPayloadCase1(t *testing.T) {
- svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("abc"))
- req, out := svc.OutputService10TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", string(out.Stream))
- }
- func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) {
- svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte(""))
- req, out := svc.OutputService11TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- req.HTTPResponse.Header.Set("x-char", "a")
- req.HTTPResponse.Header.Set("x-double", "1.5")
- req.HTTPResponse.Header.Set("x-false-bool", "false")
- req.HTTPResponse.Header.Set("x-float", "1.5")
- req.HTTPResponse.Header.Set("x-int", "1")
- req.HTTPResponse.Header.Set("x-long", "100")
- req.HTTPResponse.Header.Set("x-str", "string")
- req.HTTPResponse.Header.Set("x-timestamp", "Sun, 25 Jan 2015 08:00:00 GMT")
- req.HTTPResponse.Header.Set("x-true-bool", "true")
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.5, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.5, *out.Float)
- assert.Equal(t, int64(1), *out.Integer)
- assert.Equal(t, int64(100), *out.Long)
- assert.Equal(t, "string", *out.Str)
- assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
- assert.Equal(t, true, *out.TrueBool)
- }
- func TestOutputService12ProtocolTestEmptyStringCase1(t *testing.T) {
- svc := NewOutputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"))
- req, out := svc.OutputService12TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restxml.UnmarshalMeta(req)
- restxml.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "", *out.Foo)
- }
|