12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670 |
- package restjson_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/restjson"
- "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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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 *OutputService1TestShapeOutputService1TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService1TestCaseOperation1,
- HTTPPath: "/",
- }
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{}
- 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) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
- }
- type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService1TestShapeOutputService1TestCaseOperation1Output 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 `type:"integer"`
- Status *int64 `location:"statusCode" type:"integer"`
- Str *string `type:"string"`
- 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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 OutputService2TestShapeBlobContainer struct {
- _ struct{} `type:"structure"`
- // Foo is automatically base64 encoded/decoded by the SDK.
- Foo []byte `locationName:"foo" type:"blob"`
- }
- type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- _ struct{} `type:"structure"`
- // BlobMember is automatically base64 encoded/decoded by the SDK.
- BlobMember []byte `type:"blob"`
- StructMember *OutputService2TestShapeBlobContainer `type:"structure"`
- }
- //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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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"`
- StructMember *OutputService3TestShapeTimeContainer `type:"structure"`
- TimeMember *time.Time `type:"timestamp" timestampFormat:"unix"`
- }
- type OutputService3TestShapeTimeContainer struct {
- _ struct{} `type:"structure"`
- Foo *time.Time `locationName:"foo" type:"timestamp" timestampFormat:"unix"`
- }
- //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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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 `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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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 []*OutputService5TestShapeSingleStruct `type:"list"`
- }
- type OutputService5TestShapeSingleStruct 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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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"`
- MapMember map[string][]*int64 `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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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"`
- MapMember map[string]*time.Time `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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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"`
- StrType *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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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"`
- AllHeaders map[string]*string `location:"headers" type:"map"`
- PrefixedHeaders map[string]*string `location:"headers" locationName:"X-" 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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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 OutputService10TestShapeBodyStructure struct {
- _ struct{} `type:"structure"`
- Foo *string `type:"string"`
- }
- type OutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- _ struct{} `type:"structure"`
- }
- type OutputService10TestShapeOutputService10TestCaseOperation1Output struct {
- _ struct{} `type:"structure" payload:"Data"`
- Data *OutputService10TestShapeBodyStructure `type:"structure"`
- Header *string `location:"header" locationName:"X-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 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(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restjson.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" payload:"Stream"`
- Stream []byte `type:"blob"`
- }
- //
- // Tests begin here
- //
- func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}"))
- 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
- restjson.UnmarshalMeta(req)
- restjson.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, int64(200), *out.Status)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, true, *out.TrueBool)
- }
- func TestOutputService2ProtocolTestBlobMembersCase1(t *testing.T) {
- svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "hi!", string(out.BlobMember))
- assert.Equal(t, "there!", string(out.StructMember.Foo))
- }
- func TestOutputService3ProtocolTestTimestampMembersCase1(t *testing.T) {
- svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.StructMember.Foo.String())
- assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.TimeMember.String())
- }
- func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
- svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"ListMember\": [\"a\", \"b\"]}"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.ListMember[0])
- assert.Equal(t, "b", *out.ListMember[1])
- }
- func TestOutputService5ProtocolTestListsWithStructureMemberCase1(t *testing.T) {
- svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"ListMember\": [{\"Foo\": \"a\"}, {\"Foo\": \"b\"}]}"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.ListMember[0].Foo)
- assert.Equal(t, "b", *out.ListMember[1].Foo)
- }
- func TestOutputService6ProtocolTestMapsCase1(t *testing.T) {
- svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, int64(1), *out.MapMember["a"][0])
- assert.Equal(t, int64(2), *out.MapMember["a"][1])
- assert.Equal(t, int64(3), *out.MapMember["b"][0])
- assert.Equal(t, int64(4), *out.MapMember["b"][1])
- }
- func TestOutputService7ProtocolTestComplexMapValuesCase1(t *testing.T) {
- svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": 1398796238, \"b\": 1398796238}}"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["a"].String())
- assert.Equal(t, time.Unix(1.398796238e+09, 0).UTC().String(), out.MapMember["b"].String())
- }
- func TestOutputService8ProtocolTestIgnoresExtraDataCase1(t *testing.T) {
- svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"foo\": \"bar\"}"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- }
- func TestOutputService9ProtocolTestSupportsHeaderMapsCase1(t *testing.T) {
- svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{}"))
- req, out := svc.OutputService9TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- req.HTTPResponse.Header.Set("Content-Length", "10")
- req.HTTPResponse.Header.Set("X-Bam", "boo")
- req.HTTPResponse.Header.Set("X-Foo", "bar")
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.Unmarshal(req)
- assert.NoError(t, req.Error)
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "10", *out.AllHeaders["Content-Length"])
- assert.Equal(t, "boo", *out.AllHeaders["X-Bam"])
- assert.Equal(t, "bar", *out.AllHeaders["X-Foo"])
- assert.Equal(t, "boo", *out.PrefixedHeaders["Bam"])
- assert.Equal(t, "bar", *out.PrefixedHeaders["Foo"])
- }
- func TestOutputService10ProtocolTestJSONPayloadCase1(t *testing.T) {
- svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("{\"Foo\": \"abc\"}"))
- req, out := svc.OutputService10TestCaseOperation1Request(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
- restjson.UnmarshalMeta(req)
- restjson.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 TestOutputService11ProtocolTestStreamingPayloadCase1(t *testing.T) {
- svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
- buf := bytes.NewReader([]byte("abc"))
- req, out := svc.OutputService11TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
- // set headers
- // unmarshal response
- restjson.UnmarshalMeta(req)
- restjson.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))
- }
|