unmarshal_test.go 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068
  1. package query_test
  2. import (
  3. "bytes"
  4. "encoding/json"
  5. "encoding/xml"
  6. "fmt"
  7. "io"
  8. "io/ioutil"
  9. "net/http"
  10. "net/url"
  11. "testing"
  12. "time"
  13. "github.com/aws/aws-sdk-go/aws"
  14. "github.com/aws/aws-sdk-go/aws/client"
  15. "github.com/aws/aws-sdk-go/aws/client/metadata"
  16. "github.com/aws/aws-sdk-go/aws/request"
  17. "github.com/aws/aws-sdk-go/aws/signer/v4"
  18. "github.com/aws/aws-sdk-go/awstesting"
  19. "github.com/aws/aws-sdk-go/awstesting/unit"
  20. "github.com/aws/aws-sdk-go/private/protocol"
  21. "github.com/aws/aws-sdk-go/private/protocol/query"
  22. "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
  23. "github.com/aws/aws-sdk-go/private/util"
  24. "github.com/stretchr/testify/assert"
  25. )
  26. var _ bytes.Buffer // always import bytes
  27. var _ http.Request
  28. var _ json.Marshaler
  29. var _ time.Time
  30. var _ xmlutil.XMLNode
  31. var _ xml.Attr
  32. var _ = ioutil.Discard
  33. var _ = util.Trim("")
  34. var _ = url.Values{}
  35. var _ = io.EOF
  36. var _ = aws.String
  37. var _ = fmt.Println
  38. func init() {
  39. protocol.RandReader = &awstesting.ZeroReader{}
  40. }
  41. //The service client's operations are safe to be used concurrently.
  42. // It is not safe to mutate any of the client's properties though.
  43. type OutputService1ProtocolTest struct {
  44. *client.Client
  45. }
  46. // New creates a new instance of the OutputService1ProtocolTest client with a session.
  47. // If additional configuration is needed for the client instance use the optional
  48. // aws.Config parameter to add your extra config.
  49. //
  50. // Example:
  51. // // Create a OutputService1ProtocolTest client from just a session.
  52. // svc := outputservice1protocoltest.New(mySession)
  53. //
  54. // // Create a OutputService1ProtocolTest client with additional configuration
  55. // svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  56. func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest {
  57. c := p.ClientConfig("outputservice1protocoltest", cfgs...)
  58. return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  59. }
  60. // newClient creates, initializes and returns a new service client instance.
  61. func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService1ProtocolTest {
  62. svc := &OutputService1ProtocolTest{
  63. Client: client.New(
  64. cfg,
  65. metadata.ClientInfo{
  66. ServiceName: "outputservice1protocoltest",
  67. SigningRegion: signingRegion,
  68. Endpoint: endpoint,
  69. APIVersion: "",
  70. },
  71. handlers,
  72. ),
  73. }
  74. // Handlers
  75. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  76. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  77. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  78. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  79. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  80. return svc
  81. }
  82. // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
  83. // custom request initialization.
  84. func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  85. req := c.NewRequest(op, params, data)
  86. return req
  87. }
  88. const opOutputService1TestCaseOperation1 = "OperationName"
  89. // OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
  90. // client's request for the OutputService1TestCaseOperation1 operation. The "output" return
  91. // value can be used to capture response data after the request's "Send" method
  92. // is called.
  93. //
  94. // Creating a request object using this method should be used when you want to inject
  95. // custom logic into the request's lifecycle using a custom handler, or if you want to
  96. // access properties on the request object before or after sending the request. If
  97. // you just want the service response, call the OutputService1TestCaseOperation1 method directly
  98. // instead.
  99. //
  100. // Note: You must call the "Send" method on the returned request object in order
  101. // to execute the request.
  102. //
  103. // // Example sending a request using the OutputService1TestCaseOperation1Request method.
  104. // req, resp := client.OutputService1TestCaseOperation1Request(params)
  105. //
  106. // err := req.Send()
  107. // if err == nil { // resp is now filled
  108. // fmt.Println(resp)
  109. // }
  110. //
  111. func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) {
  112. op := &request.Operation{
  113. Name: opOutputService1TestCaseOperation1,
  114. HTTPPath: "/",
  115. }
  116. if input == nil {
  117. input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
  118. }
  119. req = c.newRequest(op, input, output)
  120. output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{}
  121. req.Data = output
  122. return
  123. }
  124. func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) {
  125. req, out := c.OutputService1TestCaseOperation1Request(input)
  126. err := req.Send()
  127. return out, err
  128. }
  129. type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
  130. _ struct{} `type:"structure"`
  131. }
  132. type OutputService1TestShapeOutputService1TestCaseOperation1Output struct {
  133. _ struct{} `type:"structure"`
  134. Char *string `type:"character"`
  135. Double *float64 `type:"double"`
  136. FalseBool *bool `type:"boolean"`
  137. Float *float64 `type:"float"`
  138. Long *int64 `type:"long"`
  139. Num *int64 `locationName:"FooNum" type:"integer"`
  140. Str *string `type:"string"`
  141. Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  142. TrueBool *bool `type:"boolean"`
  143. }
  144. //The service client's operations are safe to be used concurrently.
  145. // It is not safe to mutate any of the client's properties though.
  146. type OutputService2ProtocolTest struct {
  147. *client.Client
  148. }
  149. // New creates a new instance of the OutputService2ProtocolTest client with a session.
  150. // If additional configuration is needed for the client instance use the optional
  151. // aws.Config parameter to add your extra config.
  152. //
  153. // Example:
  154. // // Create a OutputService2ProtocolTest client from just a session.
  155. // svc := outputservice2protocoltest.New(mySession)
  156. //
  157. // // Create a OutputService2ProtocolTest client with additional configuration
  158. // svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  159. func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest {
  160. c := p.ClientConfig("outputservice2protocoltest", cfgs...)
  161. return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  162. }
  163. // newClient creates, initializes and returns a new service client instance.
  164. func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService2ProtocolTest {
  165. svc := &OutputService2ProtocolTest{
  166. Client: client.New(
  167. cfg,
  168. metadata.ClientInfo{
  169. ServiceName: "outputservice2protocoltest",
  170. SigningRegion: signingRegion,
  171. Endpoint: endpoint,
  172. APIVersion: "",
  173. },
  174. handlers,
  175. ),
  176. }
  177. // Handlers
  178. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  179. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  180. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  181. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  182. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  183. return svc
  184. }
  185. // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
  186. // custom request initialization.
  187. func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  188. req := c.NewRequest(op, params, data)
  189. return req
  190. }
  191. const opOutputService2TestCaseOperation1 = "OperationName"
  192. // OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
  193. // client's request for the OutputService2TestCaseOperation1 operation. The "output" return
  194. // value can be used to capture response data after the request's "Send" method
  195. // is called.
  196. //
  197. // Creating a request object using this method should be used when you want to inject
  198. // custom logic into the request's lifecycle using a custom handler, or if you want to
  199. // access properties on the request object before or after sending the request. If
  200. // you just want the service response, call the OutputService2TestCaseOperation1 method directly
  201. // instead.
  202. //
  203. // Note: You must call the "Send" method on the returned request object in order
  204. // to execute the request.
  205. //
  206. // // Example sending a request using the OutputService2TestCaseOperation1Request method.
  207. // req, resp := client.OutputService2TestCaseOperation1Request(params)
  208. //
  209. // err := req.Send()
  210. // if err == nil { // resp is now filled
  211. // fmt.Println(resp)
  212. // }
  213. //
  214. func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) {
  215. op := &request.Operation{
  216. Name: opOutputService2TestCaseOperation1,
  217. HTTPPath: "/",
  218. }
  219. if input == nil {
  220. input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
  221. }
  222. req = c.newRequest(op, input, output)
  223. output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{}
  224. req.Data = output
  225. return
  226. }
  227. func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) {
  228. req, out := c.OutputService2TestCaseOperation1Request(input)
  229. err := req.Send()
  230. return out, err
  231. }
  232. type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
  233. _ struct{} `type:"structure"`
  234. }
  235. type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
  236. _ struct{} `type:"structure"`
  237. Num *int64 `type:"integer"`
  238. Str *string `type:"string"`
  239. }
  240. //The service client's operations are safe to be used concurrently.
  241. // It is not safe to mutate any of the client's properties though.
  242. type OutputService3ProtocolTest struct {
  243. *client.Client
  244. }
  245. // New creates a new instance of the OutputService3ProtocolTest client with a session.
  246. // If additional configuration is needed for the client instance use the optional
  247. // aws.Config parameter to add your extra config.
  248. //
  249. // Example:
  250. // // Create a OutputService3ProtocolTest client from just a session.
  251. // svc := outputservice3protocoltest.New(mySession)
  252. //
  253. // // Create a OutputService3ProtocolTest client with additional configuration
  254. // svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  255. func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest {
  256. c := p.ClientConfig("outputservice3protocoltest", cfgs...)
  257. return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  258. }
  259. // newClient creates, initializes and returns a new service client instance.
  260. func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService3ProtocolTest {
  261. svc := &OutputService3ProtocolTest{
  262. Client: client.New(
  263. cfg,
  264. metadata.ClientInfo{
  265. ServiceName: "outputservice3protocoltest",
  266. SigningRegion: signingRegion,
  267. Endpoint: endpoint,
  268. APIVersion: "",
  269. },
  270. handlers,
  271. ),
  272. }
  273. // Handlers
  274. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  275. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  276. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  277. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  278. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  279. return svc
  280. }
  281. // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
  282. // custom request initialization.
  283. func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  284. req := c.NewRequest(op, params, data)
  285. return req
  286. }
  287. const opOutputService3TestCaseOperation1 = "OperationName"
  288. // OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
  289. // client's request for the OutputService3TestCaseOperation1 operation. The "output" return
  290. // value can be used to capture response data after the request's "Send" method
  291. // is called.
  292. //
  293. // Creating a request object using this method should be used when you want to inject
  294. // custom logic into the request's lifecycle using a custom handler, or if you want to
  295. // access properties on the request object before or after sending the request. If
  296. // you just want the service response, call the OutputService3TestCaseOperation1 method directly
  297. // instead.
  298. //
  299. // Note: You must call the "Send" method on the returned request object in order
  300. // to execute the request.
  301. //
  302. // // Example sending a request using the OutputService3TestCaseOperation1Request method.
  303. // req, resp := client.OutputService3TestCaseOperation1Request(params)
  304. //
  305. // err := req.Send()
  306. // if err == nil { // resp is now filled
  307. // fmt.Println(resp)
  308. // }
  309. //
  310. func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) {
  311. op := &request.Operation{
  312. Name: opOutputService3TestCaseOperation1,
  313. HTTPPath: "/",
  314. }
  315. if input == nil {
  316. input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
  317. }
  318. req = c.newRequest(op, input, output)
  319. output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{}
  320. req.Data = output
  321. return
  322. }
  323. func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) {
  324. req, out := c.OutputService3TestCaseOperation1Request(input)
  325. err := req.Send()
  326. return out, err
  327. }
  328. type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
  329. _ struct{} `type:"structure"`
  330. }
  331. type OutputService3TestShapeOutputService3TestCaseOperation1Output struct {
  332. _ struct{} `type:"structure"`
  333. // Blob is automatically base64 encoded/decoded by the SDK.
  334. Blob []byte `type:"blob"`
  335. }
  336. //The service client's operations are safe to be used concurrently.
  337. // It is not safe to mutate any of the client's properties though.
  338. type OutputService4ProtocolTest struct {
  339. *client.Client
  340. }
  341. // New creates a new instance of the OutputService4ProtocolTest client with a session.
  342. // If additional configuration is needed for the client instance use the optional
  343. // aws.Config parameter to add your extra config.
  344. //
  345. // Example:
  346. // // Create a OutputService4ProtocolTest client from just a session.
  347. // svc := outputservice4protocoltest.New(mySession)
  348. //
  349. // // Create a OutputService4ProtocolTest client with additional configuration
  350. // svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  351. func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest {
  352. c := p.ClientConfig("outputservice4protocoltest", cfgs...)
  353. return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  354. }
  355. // newClient creates, initializes and returns a new service client instance.
  356. func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService4ProtocolTest {
  357. svc := &OutputService4ProtocolTest{
  358. Client: client.New(
  359. cfg,
  360. metadata.ClientInfo{
  361. ServiceName: "outputservice4protocoltest",
  362. SigningRegion: signingRegion,
  363. Endpoint: endpoint,
  364. APIVersion: "",
  365. },
  366. handlers,
  367. ),
  368. }
  369. // Handlers
  370. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  371. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  372. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  373. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  374. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  375. return svc
  376. }
  377. // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
  378. // custom request initialization.
  379. func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  380. req := c.NewRequest(op, params, data)
  381. return req
  382. }
  383. const opOutputService4TestCaseOperation1 = "OperationName"
  384. // OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
  385. // client's request for the OutputService4TestCaseOperation1 operation. The "output" return
  386. // value can be used to capture response data after the request's "Send" method
  387. // is called.
  388. //
  389. // Creating a request object using this method should be used when you want to inject
  390. // custom logic into the request's lifecycle using a custom handler, or if you want to
  391. // access properties on the request object before or after sending the request. If
  392. // you just want the service response, call the OutputService4TestCaseOperation1 method directly
  393. // instead.
  394. //
  395. // Note: You must call the "Send" method on the returned request object in order
  396. // to execute the request.
  397. //
  398. // // Example sending a request using the OutputService4TestCaseOperation1Request method.
  399. // req, resp := client.OutputService4TestCaseOperation1Request(params)
  400. //
  401. // err := req.Send()
  402. // if err == nil { // resp is now filled
  403. // fmt.Println(resp)
  404. // }
  405. //
  406. func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) {
  407. op := &request.Operation{
  408. Name: opOutputService4TestCaseOperation1,
  409. HTTPPath: "/",
  410. }
  411. if input == nil {
  412. input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
  413. }
  414. req = c.newRequest(op, input, output)
  415. output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{}
  416. req.Data = output
  417. return
  418. }
  419. func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) {
  420. req, out := c.OutputService4TestCaseOperation1Request(input)
  421. err := req.Send()
  422. return out, err
  423. }
  424. type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
  425. _ struct{} `type:"structure"`
  426. }
  427. type OutputService4TestShapeOutputService4TestCaseOperation1Output struct {
  428. _ struct{} `type:"structure"`
  429. ListMember []*string `type:"list"`
  430. }
  431. //The service client's operations are safe to be used concurrently.
  432. // It is not safe to mutate any of the client's properties though.
  433. type OutputService5ProtocolTest struct {
  434. *client.Client
  435. }
  436. // New creates a new instance of the OutputService5ProtocolTest client with a session.
  437. // If additional configuration is needed for the client instance use the optional
  438. // aws.Config parameter to add your extra config.
  439. //
  440. // Example:
  441. // // Create a OutputService5ProtocolTest client from just a session.
  442. // svc := outputservice5protocoltest.New(mySession)
  443. //
  444. // // Create a OutputService5ProtocolTest client with additional configuration
  445. // svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  446. func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest {
  447. c := p.ClientConfig("outputservice5protocoltest", cfgs...)
  448. return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  449. }
  450. // newClient creates, initializes and returns a new service client instance.
  451. func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService5ProtocolTest {
  452. svc := &OutputService5ProtocolTest{
  453. Client: client.New(
  454. cfg,
  455. metadata.ClientInfo{
  456. ServiceName: "outputservice5protocoltest",
  457. SigningRegion: signingRegion,
  458. Endpoint: endpoint,
  459. APIVersion: "",
  460. },
  461. handlers,
  462. ),
  463. }
  464. // Handlers
  465. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  466. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  467. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  468. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  469. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  470. return svc
  471. }
  472. // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
  473. // custom request initialization.
  474. func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  475. req := c.NewRequest(op, params, data)
  476. return req
  477. }
  478. const opOutputService5TestCaseOperation1 = "OperationName"
  479. // OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
  480. // client's request for the OutputService5TestCaseOperation1 operation. The "output" return
  481. // value can be used to capture response data after the request's "Send" method
  482. // is called.
  483. //
  484. // Creating a request object using this method should be used when you want to inject
  485. // custom logic into the request's lifecycle using a custom handler, or if you want to
  486. // access properties on the request object before or after sending the request. If
  487. // you just want the service response, call the OutputService5TestCaseOperation1 method directly
  488. // instead.
  489. //
  490. // Note: You must call the "Send" method on the returned request object in order
  491. // to execute the request.
  492. //
  493. // // Example sending a request using the OutputService5TestCaseOperation1Request method.
  494. // req, resp := client.OutputService5TestCaseOperation1Request(params)
  495. //
  496. // err := req.Send()
  497. // if err == nil { // resp is now filled
  498. // fmt.Println(resp)
  499. // }
  500. //
  501. func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) {
  502. op := &request.Operation{
  503. Name: opOutputService5TestCaseOperation1,
  504. HTTPPath: "/",
  505. }
  506. if input == nil {
  507. input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
  508. }
  509. req = c.newRequest(op, input, output)
  510. output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{}
  511. req.Data = output
  512. return
  513. }
  514. func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) {
  515. req, out := c.OutputService5TestCaseOperation1Request(input)
  516. err := req.Send()
  517. return out, err
  518. }
  519. type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
  520. _ struct{} `type:"structure"`
  521. }
  522. type OutputService5TestShapeOutputService5TestCaseOperation1Output struct {
  523. _ struct{} `type:"structure"`
  524. ListMember []*string `locationNameList:"item" type:"list"`
  525. }
  526. //The service client's operations are safe to be used concurrently.
  527. // It is not safe to mutate any of the client's properties though.
  528. type OutputService6ProtocolTest struct {
  529. *client.Client
  530. }
  531. // New creates a new instance of the OutputService6ProtocolTest client with a session.
  532. // If additional configuration is needed for the client instance use the optional
  533. // aws.Config parameter to add your extra config.
  534. //
  535. // Example:
  536. // // Create a OutputService6ProtocolTest client from just a session.
  537. // svc := outputservice6protocoltest.New(mySession)
  538. //
  539. // // Create a OutputService6ProtocolTest client with additional configuration
  540. // svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  541. func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest {
  542. c := p.ClientConfig("outputservice6protocoltest", cfgs...)
  543. return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  544. }
  545. // newClient creates, initializes and returns a new service client instance.
  546. func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService6ProtocolTest {
  547. svc := &OutputService6ProtocolTest{
  548. Client: client.New(
  549. cfg,
  550. metadata.ClientInfo{
  551. ServiceName: "outputservice6protocoltest",
  552. SigningRegion: signingRegion,
  553. Endpoint: endpoint,
  554. APIVersion: "",
  555. },
  556. handlers,
  557. ),
  558. }
  559. // Handlers
  560. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  561. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  562. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  563. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  564. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  565. return svc
  566. }
  567. // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
  568. // custom request initialization.
  569. func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  570. req := c.NewRequest(op, params, data)
  571. return req
  572. }
  573. const opOutputService6TestCaseOperation1 = "OperationName"
  574. // OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
  575. // client's request for the OutputService6TestCaseOperation1 operation. The "output" return
  576. // value can be used to capture response data after the request's "Send" method
  577. // is called.
  578. //
  579. // Creating a request object using this method should be used when you want to inject
  580. // custom logic into the request's lifecycle using a custom handler, or if you want to
  581. // access properties on the request object before or after sending the request. If
  582. // you just want the service response, call the OutputService6TestCaseOperation1 method directly
  583. // instead.
  584. //
  585. // Note: You must call the "Send" method on the returned request object in order
  586. // to execute the request.
  587. //
  588. // // Example sending a request using the OutputService6TestCaseOperation1Request method.
  589. // req, resp := client.OutputService6TestCaseOperation1Request(params)
  590. //
  591. // err := req.Send()
  592. // if err == nil { // resp is now filled
  593. // fmt.Println(resp)
  594. // }
  595. //
  596. func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) {
  597. op := &request.Operation{
  598. Name: opOutputService6TestCaseOperation1,
  599. HTTPPath: "/",
  600. }
  601. if input == nil {
  602. input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
  603. }
  604. req = c.newRequest(op, input, output)
  605. output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{}
  606. req.Data = output
  607. return
  608. }
  609. func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) {
  610. req, out := c.OutputService6TestCaseOperation1Request(input)
  611. err := req.Send()
  612. return out, err
  613. }
  614. type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
  615. _ struct{} `type:"structure"`
  616. }
  617. type OutputService6TestShapeOutputService6TestCaseOperation1Output struct {
  618. _ struct{} `type:"structure"`
  619. ListMember []*string `type:"list" flattened:"true"`
  620. }
  621. //The service client's operations are safe to be used concurrently.
  622. // It is not safe to mutate any of the client's properties though.
  623. type OutputService7ProtocolTest struct {
  624. *client.Client
  625. }
  626. // New creates a new instance of the OutputService7ProtocolTest client with a session.
  627. // If additional configuration is needed for the client instance use the optional
  628. // aws.Config parameter to add your extra config.
  629. //
  630. // Example:
  631. // // Create a OutputService7ProtocolTest client from just a session.
  632. // svc := outputservice7protocoltest.New(mySession)
  633. //
  634. // // Create a OutputService7ProtocolTest client with additional configuration
  635. // svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  636. func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest {
  637. c := p.ClientConfig("outputservice7protocoltest", cfgs...)
  638. return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  639. }
  640. // newClient creates, initializes and returns a new service client instance.
  641. func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService7ProtocolTest {
  642. svc := &OutputService7ProtocolTest{
  643. Client: client.New(
  644. cfg,
  645. metadata.ClientInfo{
  646. ServiceName: "outputservice7protocoltest",
  647. SigningRegion: signingRegion,
  648. Endpoint: endpoint,
  649. APIVersion: "",
  650. },
  651. handlers,
  652. ),
  653. }
  654. // Handlers
  655. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  656. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  657. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  658. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  659. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  660. return svc
  661. }
  662. // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
  663. // custom request initialization.
  664. func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  665. req := c.NewRequest(op, params, data)
  666. return req
  667. }
  668. const opOutputService7TestCaseOperation1 = "OperationName"
  669. // OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
  670. // client's request for the OutputService7TestCaseOperation1 operation. The "output" return
  671. // value can be used to capture response data after the request's "Send" method
  672. // is called.
  673. //
  674. // Creating a request object using this method should be used when you want to inject
  675. // custom logic into the request's lifecycle using a custom handler, or if you want to
  676. // access properties on the request object before or after sending the request. If
  677. // you just want the service response, call the OutputService7TestCaseOperation1 method directly
  678. // instead.
  679. //
  680. // Note: You must call the "Send" method on the returned request object in order
  681. // to execute the request.
  682. //
  683. // // Example sending a request using the OutputService7TestCaseOperation1Request method.
  684. // req, resp := client.OutputService7TestCaseOperation1Request(params)
  685. //
  686. // err := req.Send()
  687. // if err == nil { // resp is now filled
  688. // fmt.Println(resp)
  689. // }
  690. //
  691. func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) {
  692. op := &request.Operation{
  693. Name: opOutputService7TestCaseOperation1,
  694. HTTPPath: "/",
  695. }
  696. if input == nil {
  697. input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
  698. }
  699. req = c.newRequest(op, input, output)
  700. output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{}
  701. req.Data = output
  702. return
  703. }
  704. func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) {
  705. req, out := c.OutputService7TestCaseOperation1Request(input)
  706. err := req.Send()
  707. return out, err
  708. }
  709. type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
  710. _ struct{} `type:"structure"`
  711. }
  712. type OutputService7TestShapeOutputService7TestCaseOperation1Output struct {
  713. _ struct{} `type:"structure"`
  714. ListMember []*string `type:"list" flattened:"true"`
  715. }
  716. //The service client's operations are safe to be used concurrently.
  717. // It is not safe to mutate any of the client's properties though.
  718. type OutputService8ProtocolTest struct {
  719. *client.Client
  720. }
  721. // New creates a new instance of the OutputService8ProtocolTest client with a session.
  722. // If additional configuration is needed for the client instance use the optional
  723. // aws.Config parameter to add your extra config.
  724. //
  725. // Example:
  726. // // Create a OutputService8ProtocolTest client from just a session.
  727. // svc := outputservice8protocoltest.New(mySession)
  728. //
  729. // // Create a OutputService8ProtocolTest client with additional configuration
  730. // svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  731. func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest {
  732. c := p.ClientConfig("outputservice8protocoltest", cfgs...)
  733. return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  734. }
  735. // newClient creates, initializes and returns a new service client instance.
  736. func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService8ProtocolTest {
  737. svc := &OutputService8ProtocolTest{
  738. Client: client.New(
  739. cfg,
  740. metadata.ClientInfo{
  741. ServiceName: "outputservice8protocoltest",
  742. SigningRegion: signingRegion,
  743. Endpoint: endpoint,
  744. APIVersion: "",
  745. },
  746. handlers,
  747. ),
  748. }
  749. // Handlers
  750. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  751. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  752. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  753. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  754. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  755. return svc
  756. }
  757. // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
  758. // custom request initialization.
  759. func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  760. req := c.NewRequest(op, params, data)
  761. return req
  762. }
  763. const opOutputService8TestCaseOperation1 = "OperationName"
  764. // OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
  765. // client's request for the OutputService8TestCaseOperation1 operation. The "output" return
  766. // value can be used to capture response data after the request's "Send" method
  767. // is called.
  768. //
  769. // Creating a request object using this method should be used when you want to inject
  770. // custom logic into the request's lifecycle using a custom handler, or if you want to
  771. // access properties on the request object before or after sending the request. If
  772. // you just want the service response, call the OutputService8TestCaseOperation1 method directly
  773. // instead.
  774. //
  775. // Note: You must call the "Send" method on the returned request object in order
  776. // to execute the request.
  777. //
  778. // // Example sending a request using the OutputService8TestCaseOperation1Request method.
  779. // req, resp := client.OutputService8TestCaseOperation1Request(params)
  780. //
  781. // err := req.Send()
  782. // if err == nil { // resp is now filled
  783. // fmt.Println(resp)
  784. // }
  785. //
  786. func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) {
  787. op := &request.Operation{
  788. Name: opOutputService8TestCaseOperation1,
  789. HTTPPath: "/",
  790. }
  791. if input == nil {
  792. input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
  793. }
  794. req = c.newRequest(op, input, output)
  795. output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{}
  796. req.Data = output
  797. return
  798. }
  799. func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) {
  800. req, out := c.OutputService8TestCaseOperation1Request(input)
  801. err := req.Send()
  802. return out, err
  803. }
  804. type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
  805. _ struct{} `type:"structure"`
  806. }
  807. type OutputService8TestShapeOutputService8TestCaseOperation1Output struct {
  808. _ struct{} `type:"structure"`
  809. List []*OutputService8TestShapeStructureShape `type:"list"`
  810. }
  811. type OutputService8TestShapeStructureShape struct {
  812. _ struct{} `type:"structure"`
  813. Bar *string `type:"string"`
  814. Baz *string `type:"string"`
  815. Foo *string `type:"string"`
  816. }
  817. //The service client's operations are safe to be used concurrently.
  818. // It is not safe to mutate any of the client's properties though.
  819. type OutputService9ProtocolTest struct {
  820. *client.Client
  821. }
  822. // New creates a new instance of the OutputService9ProtocolTest client with a session.
  823. // If additional configuration is needed for the client instance use the optional
  824. // aws.Config parameter to add your extra config.
  825. //
  826. // Example:
  827. // // Create a OutputService9ProtocolTest client from just a session.
  828. // svc := outputservice9protocoltest.New(mySession)
  829. //
  830. // // Create a OutputService9ProtocolTest client with additional configuration
  831. // svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  832. func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest {
  833. c := p.ClientConfig("outputservice9protocoltest", cfgs...)
  834. return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  835. }
  836. // newClient creates, initializes and returns a new service client instance.
  837. func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService9ProtocolTest {
  838. svc := &OutputService9ProtocolTest{
  839. Client: client.New(
  840. cfg,
  841. metadata.ClientInfo{
  842. ServiceName: "outputservice9protocoltest",
  843. SigningRegion: signingRegion,
  844. Endpoint: endpoint,
  845. APIVersion: "",
  846. },
  847. handlers,
  848. ),
  849. }
  850. // Handlers
  851. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  852. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  853. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  854. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  855. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  856. return svc
  857. }
  858. // newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
  859. // custom request initialization.
  860. func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  861. req := c.NewRequest(op, params, data)
  862. return req
  863. }
  864. const opOutputService9TestCaseOperation1 = "OperationName"
  865. // OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
  866. // client's request for the OutputService9TestCaseOperation1 operation. The "output" return
  867. // value can be used to capture response data after the request's "Send" method
  868. // is called.
  869. //
  870. // Creating a request object using this method should be used when you want to inject
  871. // custom logic into the request's lifecycle using a custom handler, or if you want to
  872. // access properties on the request object before or after sending the request. If
  873. // you just want the service response, call the OutputService9TestCaseOperation1 method directly
  874. // instead.
  875. //
  876. // Note: You must call the "Send" method on the returned request object in order
  877. // to execute the request.
  878. //
  879. // // Example sending a request using the OutputService9TestCaseOperation1Request method.
  880. // req, resp := client.OutputService9TestCaseOperation1Request(params)
  881. //
  882. // err := req.Send()
  883. // if err == nil { // resp is now filled
  884. // fmt.Println(resp)
  885. // }
  886. //
  887. func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) {
  888. op := &request.Operation{
  889. Name: opOutputService9TestCaseOperation1,
  890. HTTPPath: "/",
  891. }
  892. if input == nil {
  893. input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
  894. }
  895. req = c.newRequest(op, input, output)
  896. output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{}
  897. req.Data = output
  898. return
  899. }
  900. func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) {
  901. req, out := c.OutputService9TestCaseOperation1Request(input)
  902. err := req.Send()
  903. return out, err
  904. }
  905. type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
  906. _ struct{} `type:"structure"`
  907. }
  908. type OutputService9TestShapeOutputService9TestCaseOperation1Output struct {
  909. _ struct{} `type:"structure"`
  910. List []*OutputService9TestShapeStructureShape `type:"list" flattened:"true"`
  911. }
  912. type OutputService9TestShapeStructureShape struct {
  913. _ struct{} `type:"structure"`
  914. Bar *string `type:"string"`
  915. Baz *string `type:"string"`
  916. Foo *string `type:"string"`
  917. }
  918. //The service client's operations are safe to be used concurrently.
  919. // It is not safe to mutate any of the client's properties though.
  920. type OutputService10ProtocolTest struct {
  921. *client.Client
  922. }
  923. // New creates a new instance of the OutputService10ProtocolTest client with a session.
  924. // If additional configuration is needed for the client instance use the optional
  925. // aws.Config parameter to add your extra config.
  926. //
  927. // Example:
  928. // // Create a OutputService10ProtocolTest client from just a session.
  929. // svc := outputservice10protocoltest.New(mySession)
  930. //
  931. // // Create a OutputService10ProtocolTest client with additional configuration
  932. // svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  933. func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest {
  934. c := p.ClientConfig("outputservice10protocoltest", cfgs...)
  935. return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  936. }
  937. // newClient creates, initializes and returns a new service client instance.
  938. func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService10ProtocolTest {
  939. svc := &OutputService10ProtocolTest{
  940. Client: client.New(
  941. cfg,
  942. metadata.ClientInfo{
  943. ServiceName: "outputservice10protocoltest",
  944. SigningRegion: signingRegion,
  945. Endpoint: endpoint,
  946. APIVersion: "",
  947. },
  948. handlers,
  949. ),
  950. }
  951. // Handlers
  952. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  953. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  954. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  955. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  956. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  957. return svc
  958. }
  959. // newRequest creates a new request for a OutputService10ProtocolTest operation and runs any
  960. // custom request initialization.
  961. func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  962. req := c.NewRequest(op, params, data)
  963. return req
  964. }
  965. const opOutputService10TestCaseOperation1 = "OperationName"
  966. // OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
  967. // client's request for the OutputService10TestCaseOperation1 operation. The "output" return
  968. // value can be used to capture response data after the request's "Send" method
  969. // is called.
  970. //
  971. // Creating a request object using this method should be used when you want to inject
  972. // custom logic into the request's lifecycle using a custom handler, or if you want to
  973. // access properties on the request object before or after sending the request. If
  974. // you just want the service response, call the OutputService10TestCaseOperation1 method directly
  975. // instead.
  976. //
  977. // Note: You must call the "Send" method on the returned request object in order
  978. // to execute the request.
  979. //
  980. // // Example sending a request using the OutputService10TestCaseOperation1Request method.
  981. // req, resp := client.OutputService10TestCaseOperation1Request(params)
  982. //
  983. // err := req.Send()
  984. // if err == nil { // resp is now filled
  985. // fmt.Println(resp)
  986. // }
  987. //
  988. func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) {
  989. op := &request.Operation{
  990. Name: opOutputService10TestCaseOperation1,
  991. HTTPPath: "/",
  992. }
  993. if input == nil {
  994. input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{}
  995. }
  996. req = c.newRequest(op, input, output)
  997. output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{}
  998. req.Data = output
  999. return
  1000. }
  1001. func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) {
  1002. req, out := c.OutputService10TestCaseOperation1Request(input)
  1003. err := req.Send()
  1004. return out, err
  1005. }
  1006. type OutputService10TestShapeOutputService10TestCaseOperation1Input struct {
  1007. _ struct{} `type:"structure"`
  1008. }
  1009. type OutputService10TestShapeOutputService10TestCaseOperation1Output struct {
  1010. _ struct{} `type:"structure"`
  1011. List []*string `locationNameList:"NamedList" type:"list" flattened:"true"`
  1012. }
  1013. //The service client's operations are safe to be used concurrently.
  1014. // It is not safe to mutate any of the client's properties though.
  1015. type OutputService11ProtocolTest struct {
  1016. *client.Client
  1017. }
  1018. // New creates a new instance of the OutputService11ProtocolTest client with a session.
  1019. // If additional configuration is needed for the client instance use the optional
  1020. // aws.Config parameter to add your extra config.
  1021. //
  1022. // Example:
  1023. // // Create a OutputService11ProtocolTest client from just a session.
  1024. // svc := outputservice11protocoltest.New(mySession)
  1025. //
  1026. // // Create a OutputService11ProtocolTest client with additional configuration
  1027. // svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1028. func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest {
  1029. c := p.ClientConfig("outputservice11protocoltest", cfgs...)
  1030. return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  1031. }
  1032. // newClient creates, initializes and returns a new service client instance.
  1033. func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService11ProtocolTest {
  1034. svc := &OutputService11ProtocolTest{
  1035. Client: client.New(
  1036. cfg,
  1037. metadata.ClientInfo{
  1038. ServiceName: "outputservice11protocoltest",
  1039. SigningRegion: signingRegion,
  1040. Endpoint: endpoint,
  1041. APIVersion: "",
  1042. },
  1043. handlers,
  1044. ),
  1045. }
  1046. // Handlers
  1047. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1048. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  1049. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  1050. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  1051. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  1052. return svc
  1053. }
  1054. // newRequest creates a new request for a OutputService11ProtocolTest operation and runs any
  1055. // custom request initialization.
  1056. func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1057. req := c.NewRequest(op, params, data)
  1058. return req
  1059. }
  1060. const opOutputService11TestCaseOperation1 = "OperationName"
  1061. // OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
  1062. // client's request for the OutputService11TestCaseOperation1 operation. The "output" return
  1063. // value can be used to capture response data after the request's "Send" method
  1064. // is called.
  1065. //
  1066. // Creating a request object using this method should be used when you want to inject
  1067. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1068. // access properties on the request object before or after sending the request. If
  1069. // you just want the service response, call the OutputService11TestCaseOperation1 method directly
  1070. // instead.
  1071. //
  1072. // Note: You must call the "Send" method on the returned request object in order
  1073. // to execute the request.
  1074. //
  1075. // // Example sending a request using the OutputService11TestCaseOperation1Request method.
  1076. // req, resp := client.OutputService11TestCaseOperation1Request(params)
  1077. //
  1078. // err := req.Send()
  1079. // if err == nil { // resp is now filled
  1080. // fmt.Println(resp)
  1081. // }
  1082. //
  1083. func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) {
  1084. op := &request.Operation{
  1085. Name: opOutputService11TestCaseOperation1,
  1086. HTTPPath: "/",
  1087. }
  1088. if input == nil {
  1089. input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{}
  1090. }
  1091. req = c.newRequest(op, input, output)
  1092. output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{}
  1093. req.Data = output
  1094. return
  1095. }
  1096. func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) {
  1097. req, out := c.OutputService11TestCaseOperation1Request(input)
  1098. err := req.Send()
  1099. return out, err
  1100. }
  1101. type OutputService11TestShapeOutputService11TestCaseOperation1Input struct {
  1102. _ struct{} `type:"structure"`
  1103. }
  1104. type OutputService11TestShapeOutputService11TestCaseOperation1Output struct {
  1105. _ struct{} `type:"structure"`
  1106. Map map[string]*OutputService11TestShapeStructType `type:"map"`
  1107. }
  1108. type OutputService11TestShapeStructType struct {
  1109. _ struct{} `type:"structure"`
  1110. Foo *string `locationName:"foo" type:"string"`
  1111. }
  1112. //The service client's operations are safe to be used concurrently.
  1113. // It is not safe to mutate any of the client's properties though.
  1114. type OutputService12ProtocolTest struct {
  1115. *client.Client
  1116. }
  1117. // New creates a new instance of the OutputService12ProtocolTest client with a session.
  1118. // If additional configuration is needed for the client instance use the optional
  1119. // aws.Config parameter to add your extra config.
  1120. //
  1121. // Example:
  1122. // // Create a OutputService12ProtocolTest client from just a session.
  1123. // svc := outputservice12protocoltest.New(mySession)
  1124. //
  1125. // // Create a OutputService12ProtocolTest client with additional configuration
  1126. // svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1127. func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest {
  1128. c := p.ClientConfig("outputservice12protocoltest", cfgs...)
  1129. return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  1130. }
  1131. // newClient creates, initializes and returns a new service client instance.
  1132. func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService12ProtocolTest {
  1133. svc := &OutputService12ProtocolTest{
  1134. Client: client.New(
  1135. cfg,
  1136. metadata.ClientInfo{
  1137. ServiceName: "outputservice12protocoltest",
  1138. SigningRegion: signingRegion,
  1139. Endpoint: endpoint,
  1140. APIVersion: "",
  1141. },
  1142. handlers,
  1143. ),
  1144. }
  1145. // Handlers
  1146. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1147. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  1148. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  1149. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  1150. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  1151. return svc
  1152. }
  1153. // newRequest creates a new request for a OutputService12ProtocolTest operation and runs any
  1154. // custom request initialization.
  1155. func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1156. req := c.NewRequest(op, params, data)
  1157. return req
  1158. }
  1159. const opOutputService12TestCaseOperation1 = "OperationName"
  1160. // OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
  1161. // client's request for the OutputService12TestCaseOperation1 operation. The "output" return
  1162. // value can be used to capture response data after the request's "Send" method
  1163. // is called.
  1164. //
  1165. // Creating a request object using this method should be used when you want to inject
  1166. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1167. // access properties on the request object before or after sending the request. If
  1168. // you just want the service response, call the OutputService12TestCaseOperation1 method directly
  1169. // instead.
  1170. //
  1171. // Note: You must call the "Send" method on the returned request object in order
  1172. // to execute the request.
  1173. //
  1174. // // Example sending a request using the OutputService12TestCaseOperation1Request method.
  1175. // req, resp := client.OutputService12TestCaseOperation1Request(params)
  1176. //
  1177. // err := req.Send()
  1178. // if err == nil { // resp is now filled
  1179. // fmt.Println(resp)
  1180. // }
  1181. //
  1182. func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) {
  1183. op := &request.Operation{
  1184. Name: opOutputService12TestCaseOperation1,
  1185. HTTPPath: "/",
  1186. }
  1187. if input == nil {
  1188. input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{}
  1189. }
  1190. req = c.newRequest(op, input, output)
  1191. output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{}
  1192. req.Data = output
  1193. return
  1194. }
  1195. func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) {
  1196. req, out := c.OutputService12TestCaseOperation1Request(input)
  1197. err := req.Send()
  1198. return out, err
  1199. }
  1200. type OutputService12TestShapeOutputService12TestCaseOperation1Input struct {
  1201. _ struct{} `type:"structure"`
  1202. }
  1203. type OutputService12TestShapeOutputService12TestCaseOperation1Output struct {
  1204. _ struct{} `type:"structure"`
  1205. Map map[string]*string `type:"map" flattened:"true"`
  1206. }
  1207. //The service client's operations are safe to be used concurrently.
  1208. // It is not safe to mutate any of the client's properties though.
  1209. type OutputService13ProtocolTest struct {
  1210. *client.Client
  1211. }
  1212. // New creates a new instance of the OutputService13ProtocolTest client with a session.
  1213. // If additional configuration is needed for the client instance use the optional
  1214. // aws.Config parameter to add your extra config.
  1215. //
  1216. // Example:
  1217. // // Create a OutputService13ProtocolTest client from just a session.
  1218. // svc := outputservice13protocoltest.New(mySession)
  1219. //
  1220. // // Create a OutputService13ProtocolTest client with additional configuration
  1221. // svc := outputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1222. func NewOutputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService13ProtocolTest {
  1223. c := p.ClientConfig("outputservice13protocoltest", cfgs...)
  1224. return newOutputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  1225. }
  1226. // newClient creates, initializes and returns a new service client instance.
  1227. func newOutputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService13ProtocolTest {
  1228. svc := &OutputService13ProtocolTest{
  1229. Client: client.New(
  1230. cfg,
  1231. metadata.ClientInfo{
  1232. ServiceName: "outputservice13protocoltest",
  1233. SigningRegion: signingRegion,
  1234. Endpoint: endpoint,
  1235. APIVersion: "",
  1236. },
  1237. handlers,
  1238. ),
  1239. }
  1240. // Handlers
  1241. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1242. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  1243. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  1244. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  1245. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  1246. return svc
  1247. }
  1248. // newRequest creates a new request for a OutputService13ProtocolTest operation and runs any
  1249. // custom request initialization.
  1250. func (c *OutputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1251. req := c.NewRequest(op, params, data)
  1252. return req
  1253. }
  1254. const opOutputService13TestCaseOperation1 = "OperationName"
  1255. // OutputService13TestCaseOperation1Request generates a "aws/request.Request" representing the
  1256. // client's request for the OutputService13TestCaseOperation1 operation. The "output" return
  1257. // value can be used to capture response data after the request's "Send" method
  1258. // is called.
  1259. //
  1260. // Creating a request object using this method should be used when you want to inject
  1261. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1262. // access properties on the request object before or after sending the request. If
  1263. // you just want the service response, call the OutputService13TestCaseOperation1 method directly
  1264. // instead.
  1265. //
  1266. // Note: You must call the "Send" method on the returned request object in order
  1267. // to execute the request.
  1268. //
  1269. // // Example sending a request using the OutputService13TestCaseOperation1Request method.
  1270. // req, resp := client.OutputService13TestCaseOperation1Request(params)
  1271. //
  1272. // err := req.Send()
  1273. // if err == nil { // resp is now filled
  1274. // fmt.Println(resp)
  1275. // }
  1276. //
  1277. func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *request.Request, output *OutputService13TestShapeOutputService13TestCaseOperation1Output) {
  1278. op := &request.Operation{
  1279. Name: opOutputService13TestCaseOperation1,
  1280. HTTPPath: "/",
  1281. }
  1282. if input == nil {
  1283. input = &OutputService13TestShapeOutputService13TestCaseOperation1Input{}
  1284. }
  1285. req = c.newRequest(op, input, output)
  1286. output = &OutputService13TestShapeOutputService13TestCaseOperation1Output{}
  1287. req.Data = output
  1288. return
  1289. }
  1290. func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputService13TestCaseOperation1Output, error) {
  1291. req, out := c.OutputService13TestCaseOperation1Request(input)
  1292. err := req.Send()
  1293. return out, err
  1294. }
  1295. type OutputService13TestShapeOutputService13TestCaseOperation1Input struct {
  1296. _ struct{} `type:"structure"`
  1297. }
  1298. type OutputService13TestShapeOutputService13TestCaseOperation1Output struct {
  1299. _ struct{} `type:"structure"`
  1300. Map map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
  1301. }
  1302. //The service client's operations are safe to be used concurrently.
  1303. // It is not safe to mutate any of the client's properties though.
  1304. type OutputService14ProtocolTest struct {
  1305. *client.Client
  1306. }
  1307. // New creates a new instance of the OutputService14ProtocolTest client with a session.
  1308. // If additional configuration is needed for the client instance use the optional
  1309. // aws.Config parameter to add your extra config.
  1310. //
  1311. // Example:
  1312. // // Create a OutputService14ProtocolTest client from just a session.
  1313. // svc := outputservice14protocoltest.New(mySession)
  1314. //
  1315. // // Create a OutputService14ProtocolTest client with additional configuration
  1316. // svc := outputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1317. func NewOutputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService14ProtocolTest {
  1318. c := p.ClientConfig("outputservice14protocoltest", cfgs...)
  1319. return newOutputService14ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  1320. }
  1321. // newClient creates, initializes and returns a new service client instance.
  1322. func newOutputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService14ProtocolTest {
  1323. svc := &OutputService14ProtocolTest{
  1324. Client: client.New(
  1325. cfg,
  1326. metadata.ClientInfo{
  1327. ServiceName: "outputservice14protocoltest",
  1328. SigningRegion: signingRegion,
  1329. Endpoint: endpoint,
  1330. APIVersion: "",
  1331. },
  1332. handlers,
  1333. ),
  1334. }
  1335. // Handlers
  1336. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1337. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  1338. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  1339. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  1340. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  1341. return svc
  1342. }
  1343. // newRequest creates a new request for a OutputService14ProtocolTest operation and runs any
  1344. // custom request initialization.
  1345. func (c *OutputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1346. req := c.NewRequest(op, params, data)
  1347. return req
  1348. }
  1349. const opOutputService14TestCaseOperation1 = "OperationName"
  1350. // OutputService14TestCaseOperation1Request generates a "aws/request.Request" representing the
  1351. // client's request for the OutputService14TestCaseOperation1 operation. The "output" return
  1352. // value can be used to capture response data after the request's "Send" method
  1353. // is called.
  1354. //
  1355. // Creating a request object using this method should be used when you want to inject
  1356. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1357. // access properties on the request object before or after sending the request. If
  1358. // you just want the service response, call the OutputService14TestCaseOperation1 method directly
  1359. // instead.
  1360. //
  1361. // Note: You must call the "Send" method on the returned request object in order
  1362. // to execute the request.
  1363. //
  1364. // // Example sending a request using the OutputService14TestCaseOperation1Request method.
  1365. // req, resp := client.OutputService14TestCaseOperation1Request(params)
  1366. //
  1367. // err := req.Send()
  1368. // if err == nil { // resp is now filled
  1369. // fmt.Println(resp)
  1370. // }
  1371. //
  1372. func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *request.Request, output *OutputService14TestShapeOutputService14TestCaseOperation1Output) {
  1373. op := &request.Operation{
  1374. Name: opOutputService14TestCaseOperation1,
  1375. HTTPPath: "/",
  1376. }
  1377. if input == nil {
  1378. input = &OutputService14TestShapeOutputService14TestCaseOperation1Input{}
  1379. }
  1380. req = c.newRequest(op, input, output)
  1381. output = &OutputService14TestShapeOutputService14TestCaseOperation1Output{}
  1382. req.Data = output
  1383. return
  1384. }
  1385. func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputService14TestCaseOperation1Output, error) {
  1386. req, out := c.OutputService14TestCaseOperation1Request(input)
  1387. err := req.Send()
  1388. return out, err
  1389. }
  1390. type OutputService14TestShapeOutputService14TestCaseOperation1Input struct {
  1391. _ struct{} `type:"structure"`
  1392. }
  1393. type OutputService14TestShapeOutputService14TestCaseOperation1Output struct {
  1394. _ struct{} `type:"structure"`
  1395. Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
  1396. }
  1397. //The service client's operations are safe to be used concurrently.
  1398. // It is not safe to mutate any of the client's properties though.
  1399. type OutputService15ProtocolTest struct {
  1400. *client.Client
  1401. }
  1402. // New creates a new instance of the OutputService15ProtocolTest client with a session.
  1403. // If additional configuration is needed for the client instance use the optional
  1404. // aws.Config parameter to add your extra config.
  1405. //
  1406. // Example:
  1407. // // Create a OutputService15ProtocolTest client from just a session.
  1408. // svc := outputservice15protocoltest.New(mySession)
  1409. //
  1410. // // Create a OutputService15ProtocolTest client with additional configuration
  1411. // svc := outputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  1412. func NewOutputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService15ProtocolTest {
  1413. c := p.ClientConfig("outputservice15protocoltest", cfgs...)
  1414. return newOutputService15ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  1415. }
  1416. // newClient creates, initializes and returns a new service client instance.
  1417. func newOutputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService15ProtocolTest {
  1418. svc := &OutputService15ProtocolTest{
  1419. Client: client.New(
  1420. cfg,
  1421. metadata.ClientInfo{
  1422. ServiceName: "outputservice15protocoltest",
  1423. SigningRegion: signingRegion,
  1424. Endpoint: endpoint,
  1425. APIVersion: "",
  1426. },
  1427. handlers,
  1428. ),
  1429. }
  1430. // Handlers
  1431. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  1432. svc.Handlers.Build.PushBackNamed(query.BuildHandler)
  1433. svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
  1434. svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
  1435. svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
  1436. return svc
  1437. }
  1438. // newRequest creates a new request for a OutputService15ProtocolTest operation and runs any
  1439. // custom request initialization.
  1440. func (c *OutputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  1441. req := c.NewRequest(op, params, data)
  1442. return req
  1443. }
  1444. const opOutputService15TestCaseOperation1 = "OperationName"
  1445. // OutputService15TestCaseOperation1Request generates a "aws/request.Request" representing the
  1446. // client's request for the OutputService15TestCaseOperation1 operation. The "output" return
  1447. // value can be used to capture response data after the request's "Send" method
  1448. // is called.
  1449. //
  1450. // Creating a request object using this method should be used when you want to inject
  1451. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1452. // access properties on the request object before or after sending the request. If
  1453. // you just want the service response, call the OutputService15TestCaseOperation1 method directly
  1454. // instead.
  1455. //
  1456. // Note: You must call the "Send" method on the returned request object in order
  1457. // to execute the request.
  1458. //
  1459. // // Example sending a request using the OutputService15TestCaseOperation1Request method.
  1460. // req, resp := client.OutputService15TestCaseOperation1Request(params)
  1461. //
  1462. // err := req.Send()
  1463. // if err == nil { // resp is now filled
  1464. // fmt.Println(resp)
  1465. // }
  1466. //
  1467. func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1Request(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (req *request.Request, output *OutputService15TestShapeOutputService15TestCaseOperation1Output) {
  1468. op := &request.Operation{
  1469. Name: opOutputService15TestCaseOperation1,
  1470. HTTPPath: "/",
  1471. }
  1472. if input == nil {
  1473. input = &OutputService15TestShapeOutputService15TestCaseOperation1Input{}
  1474. }
  1475. req = c.newRequest(op, input, output)
  1476. output = &OutputService15TestShapeOutputService15TestCaseOperation1Output{}
  1477. req.Data = output
  1478. return
  1479. }
  1480. func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (*OutputService15TestShapeOutputService15TestCaseOperation1Output, error) {
  1481. req, out := c.OutputService15TestCaseOperation1Request(input)
  1482. err := req.Send()
  1483. return out, err
  1484. }
  1485. type OutputService15TestShapeOutputService15TestCaseOperation1Input struct {
  1486. _ struct{} `type:"structure"`
  1487. }
  1488. type OutputService15TestShapeOutputService15TestCaseOperation1Output struct {
  1489. _ struct{} `type:"structure"`
  1490. Foo *string `type:"string"`
  1491. }
  1492. //
  1493. // Tests begin here
  1494. //
  1495. func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
  1496. svc := NewOutputService1ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1497. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><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></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"))
  1498. req, out := svc.OutputService1TestCaseOperation1Request(nil)
  1499. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1500. // set headers
  1501. // unmarshal response
  1502. query.UnmarshalMeta(req)
  1503. query.Unmarshal(req)
  1504. assert.NoError(t, req.Error)
  1505. // assert response
  1506. assert.NotNil(t, out) // ensure out variable is used
  1507. assert.Equal(t, "a", *out.Char)
  1508. assert.Equal(t, 1.3, *out.Double)
  1509. assert.Equal(t, false, *out.FalseBool)
  1510. assert.Equal(t, 1.2, *out.Float)
  1511. assert.Equal(t, int64(200), *out.Long)
  1512. assert.Equal(t, int64(123), *out.Num)
  1513. assert.Equal(t, "myname", *out.Str)
  1514. assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
  1515. assert.Equal(t, true, *out.TrueBool)
  1516. }
  1517. func TestOutputService2ProtocolTestNotAllMembersInResponseCase1(t *testing.T) {
  1518. svc := NewOutputService2ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1519. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><Str>myname</Str></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"))
  1520. req, out := svc.OutputService2TestCaseOperation1Request(nil)
  1521. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1522. // set headers
  1523. // unmarshal response
  1524. query.UnmarshalMeta(req)
  1525. query.Unmarshal(req)
  1526. assert.NoError(t, req.Error)
  1527. // assert response
  1528. assert.NotNil(t, out) // ensure out variable is used
  1529. assert.Equal(t, "myname", *out.Str)
  1530. }
  1531. func TestOutputService3ProtocolTestBlobCase1(t *testing.T) {
  1532. svc := NewOutputService3ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1533. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1534. req, out := svc.OutputService3TestCaseOperation1Request(nil)
  1535. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1536. // set headers
  1537. // unmarshal response
  1538. query.UnmarshalMeta(req)
  1539. query.Unmarshal(req)
  1540. assert.NoError(t, req.Error)
  1541. // assert response
  1542. assert.NotNil(t, out) // ensure out variable is used
  1543. assert.Equal(t, "value", string(out.Blob))
  1544. }
  1545. func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
  1546. svc := NewOutputService4ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1547. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1548. req, out := svc.OutputService4TestCaseOperation1Request(nil)
  1549. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1550. // set headers
  1551. // unmarshal response
  1552. query.UnmarshalMeta(req)
  1553. query.Unmarshal(req)
  1554. assert.NoError(t, req.Error)
  1555. // assert response
  1556. assert.NotNil(t, out) // ensure out variable is used
  1557. assert.Equal(t, "abc", *out.ListMember[0])
  1558. assert.Equal(t, "123", *out.ListMember[1])
  1559. }
  1560. func TestOutputService5ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
  1561. svc := NewOutputService5ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1562. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1563. req, out := svc.OutputService5TestCaseOperation1Request(nil)
  1564. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1565. // set headers
  1566. // unmarshal response
  1567. query.UnmarshalMeta(req)
  1568. query.Unmarshal(req)
  1569. assert.NoError(t, req.Error)
  1570. // assert response
  1571. assert.NotNil(t, out) // ensure out variable is used
  1572. assert.Equal(t, "abc", *out.ListMember[0])
  1573. assert.Equal(t, "123", *out.ListMember[1])
  1574. }
  1575. func TestOutputService6ProtocolTestFlattenedListCase1(t *testing.T) {
  1576. svc := NewOutputService6ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1577. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1578. req, out := svc.OutputService6TestCaseOperation1Request(nil)
  1579. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1580. // set headers
  1581. // unmarshal response
  1582. query.UnmarshalMeta(req)
  1583. query.Unmarshal(req)
  1584. assert.NoError(t, req.Error)
  1585. // assert response
  1586. assert.NotNil(t, out) // ensure out variable is used
  1587. assert.Equal(t, "abc", *out.ListMember[0])
  1588. assert.Equal(t, "123", *out.ListMember[1])
  1589. }
  1590. func TestOutputService7ProtocolTestFlattenedSingleElementListCase1(t *testing.T) {
  1591. svc := NewOutputService7ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1592. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1593. req, out := svc.OutputService7TestCaseOperation1Request(nil)
  1594. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1595. // set headers
  1596. // unmarshal response
  1597. query.UnmarshalMeta(req)
  1598. query.Unmarshal(req)
  1599. assert.NoError(t, req.Error)
  1600. // assert response
  1601. assert.NotNil(t, out) // ensure out variable is used
  1602. assert.Equal(t, "abc", *out.ListMember[0])
  1603. }
  1604. func TestOutputService8ProtocolTestListOfStructuresCase1(t *testing.T) {
  1605. svc := NewOutputService8ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1606. buf := bytes.NewReader([]byte("<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><member><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></member><member><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></member></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1607. req, out := svc.OutputService8TestCaseOperation1Request(nil)
  1608. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1609. // set headers
  1610. // unmarshal response
  1611. query.UnmarshalMeta(req)
  1612. query.Unmarshal(req)
  1613. assert.NoError(t, req.Error)
  1614. // assert response
  1615. assert.NotNil(t, out) // ensure out variable is used
  1616. assert.Equal(t, "firstbar", *out.List[0].Bar)
  1617. assert.Equal(t, "firstbaz", *out.List[0].Baz)
  1618. assert.Equal(t, "firstfoo", *out.List[0].Foo)
  1619. assert.Equal(t, "secondbar", *out.List[1].Bar)
  1620. assert.Equal(t, "secondbaz", *out.List[1].Baz)
  1621. assert.Equal(t, "secondfoo", *out.List[1].Foo)
  1622. }
  1623. func TestOutputService9ProtocolTestFlattenedListOfStructuresCase1(t *testing.T) {
  1624. svc := NewOutputService9ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1625. buf := bytes.NewReader([]byte("<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></List><List><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1626. req, out := svc.OutputService9TestCaseOperation1Request(nil)
  1627. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1628. // set headers
  1629. // unmarshal response
  1630. query.UnmarshalMeta(req)
  1631. query.Unmarshal(req)
  1632. assert.NoError(t, req.Error)
  1633. // assert response
  1634. assert.NotNil(t, out) // ensure out variable is used
  1635. assert.Equal(t, "firstbar", *out.List[0].Bar)
  1636. assert.Equal(t, "firstbaz", *out.List[0].Baz)
  1637. assert.Equal(t, "firstfoo", *out.List[0].Foo)
  1638. assert.Equal(t, "secondbar", *out.List[1].Bar)
  1639. assert.Equal(t, "secondbaz", *out.List[1].Baz)
  1640. assert.Equal(t, "secondfoo", *out.List[1].Foo)
  1641. }
  1642. func TestOutputService10ProtocolTestFlattenedListWithLocationNameCase1(t *testing.T) {
  1643. svc := NewOutputService10ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1644. buf := bytes.NewReader([]byte("<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><NamedList>a</NamedList><NamedList>b</NamedList></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1645. req, out := svc.OutputService10TestCaseOperation1Request(nil)
  1646. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1647. // set headers
  1648. // unmarshal response
  1649. query.UnmarshalMeta(req)
  1650. query.Unmarshal(req)
  1651. assert.NoError(t, req.Error)
  1652. // assert response
  1653. assert.NotNil(t, out) // ensure out variable is used
  1654. assert.Equal(t, "a", *out.List[0])
  1655. assert.Equal(t, "b", *out.List[1])
  1656. }
  1657. func TestOutputService11ProtocolTestNormalMapCase1(t *testing.T) {
  1658. svc := NewOutputService11ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1659. buf := bytes.NewReader([]byte("<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08\"><OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1660. req, out := svc.OutputService11TestCaseOperation1Request(nil)
  1661. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1662. // set headers
  1663. // unmarshal response
  1664. query.UnmarshalMeta(req)
  1665. query.Unmarshal(req)
  1666. assert.NoError(t, req.Error)
  1667. // assert response
  1668. assert.NotNil(t, out) // ensure out variable is used
  1669. assert.Equal(t, "bam", *out.Map["baz"].Foo)
  1670. assert.Equal(t, "bar", *out.Map["qux"].Foo)
  1671. }
  1672. func TestOutputService12ProtocolTestFlattenedMapCase1(t *testing.T) {
  1673. svc := NewOutputService12ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1674. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1675. req, out := svc.OutputService12TestCaseOperation1Request(nil)
  1676. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1677. // set headers
  1678. // unmarshal response
  1679. query.UnmarshalMeta(req)
  1680. query.Unmarshal(req)
  1681. assert.NoError(t, req.Error)
  1682. // assert response
  1683. assert.NotNil(t, out) // ensure out variable is used
  1684. assert.Equal(t, "bam", *out.Map["baz"])
  1685. assert.Equal(t, "bar", *out.Map["qux"])
  1686. }
  1687. func TestOutputService13ProtocolTestFlattenedMapInShapeDefinitionCase1(t *testing.T) {
  1688. svc := NewOutputService13ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1689. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><Attribute><Name>qux</Name><Value>bar</Value></Attribute></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1690. req, out := svc.OutputService13TestCaseOperation1Request(nil)
  1691. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1692. // set headers
  1693. // unmarshal response
  1694. query.UnmarshalMeta(req)
  1695. query.Unmarshal(req)
  1696. assert.NoError(t, req.Error)
  1697. // assert response
  1698. assert.NotNil(t, out) // ensure out variable is used
  1699. assert.Equal(t, "bar", *out.Map["qux"])
  1700. }
  1701. func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) {
  1702. svc := NewOutputService14ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1703. buf := bytes.NewReader([]byte("<OperationNameResponse><OperationNameResult><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"))
  1704. req, out := svc.OutputService14TestCaseOperation1Request(nil)
  1705. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1706. // set headers
  1707. // unmarshal response
  1708. query.UnmarshalMeta(req)
  1709. query.Unmarshal(req)
  1710. assert.NoError(t, req.Error)
  1711. // assert response
  1712. assert.NotNil(t, out) // ensure out variable is used
  1713. assert.Equal(t, "bam", *out.Map["baz"])
  1714. assert.Equal(t, "bar", *out.Map["qux"])
  1715. }
  1716. func TestOutputService15ProtocolTestEmptyStringCase1(t *testing.T) {
  1717. svc := NewOutputService15ProtocolTest(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
  1718. buf := bytes.NewReader([]byte("<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"))
  1719. req, out := svc.OutputService15TestCaseOperation1Request(nil)
  1720. req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
  1721. // set headers
  1722. // unmarshal response
  1723. query.UnmarshalMeta(req)
  1724. query.Unmarshal(req)
  1725. assert.NoError(t, req.Error)
  1726. // assert response
  1727. assert.NotNil(t, out) // ensure out variable is used
  1728. assert.Equal(t, "", *out.Foo)
  1729. }